Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/instance_state.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3095,21 +3095,21 @@ ModelInstanceState::InitializeShapeInputBinding(
: context.max_dims_[io_index].d[0];
context.max_shapes_[io_index] = ShapeTensor();
context.max_shapes_[io_index].SetDataFromShapeValues(
engine_->getProfileTensorValues(
engine_->getProfileTensorValuesV2(
input_name.c_str(), profile_index,
nvinfer1::OptProfileSelector::kMAX),
input_datatype, context.nb_shape_values_);

context.min_shapes_[io_index] = ShapeTensor();
context.min_shapes_[io_index].SetDataFromShapeValues(
engine_->getProfileTensorValues(
engine_->getProfileTensorValuesV2(
input_name.c_str(), profile_index,
nvinfer1::OptProfileSelector::kMIN),
input_datatype, context.nb_shape_values_);

context.opt_shapes_[io_index] = ShapeTensor();
context.opt_shapes_[io_index].SetDataFromShapeValues(
engine_->getProfileTensorValues(
engine_->getProfileTensorValuesV2(
input_name.c_str(), profile_index,
nvinfer1::OptProfileSelector::kOPT),
input_datatype, context.nb_shape_values_);
Expand Down
2 changes: 1 addition & 1 deletion src/model_state.cc
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ ModelState::GetProfileMaxBatchSize(
}

} else {
const int32_t* max_shapes = engine->getProfileTensorValues(
const int64_t* max_shapes = engine->getProfileTensorValuesV2(
tensor_name.c_str(), profile_index,
nvinfer1::OptProfileSelector::kMAX);
if (*max_batch_size > *max_shapes) {
Expand Down
2 changes: 1 addition & 1 deletion src/shape_tensor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ ShapeTensor::SetDataFromBuffer(

TRITONSERVER_Error*
ShapeTensor::SetDataFromShapeValues(
const int32_t* shape_values, TRITONSERVER_DataType datatype,
const int64_t* shape_values, TRITONSERVER_DataType datatype,
size_t nb_shape_values)
{
nb_shape_values_ = nb_shape_values;
Expand Down
2 changes: 1 addition & 1 deletion src/shape_tensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class ShapeTensor {
const char* input_name, bool support_batching, size_t total_batch_size);

TRITONSERVER_Error* SetDataFromShapeValues(
const int32_t* shape_values, TRITONSERVER_DataType datatype,
const int64_t* shape_values, TRITONSERVER_DataType datatype,
size_t nb_shape_values);

int64_t GetDistance(const ShapeTensor& other, int64_t total_batch_size) const;
Expand Down