Skip to content

Commit

Permalink
Undo ShapeWithBatchDim() change
Browse files Browse the repository at this point in the history
  • Loading branch information
pskiran1 committed Jul 22, 2024
1 parent fb8e98c commit 85d5d11
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 6 additions & 1 deletion src/infer_request.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,12 @@ InferenceRequest::Normalize()
// FIXME: Temporarily skips byte size checks for GPU tensors. See
// DLIS-6820.
} else {
const std::vector<int64_t>& input_dims = input.ShapeWithBatchDim();
// Shape tensor with dynamic batching does not introduce a new
// dimension to the tensor but adds an additional value to the 1-D
// array.
const std::vector<int64_t>& input_dims =
input.IsShapeTensor() ? input.OriginalShape()
: input.ShapeWithBatchDim();
int64_t expected_byte_size = INT_MAX;
expected_byte_size =
triton::common::GetByteSize(data_type, input_dims);
Expand Down
7 changes: 0 additions & 7 deletions src/infer_request.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,7 @@ class InferenceRequest {
// into batch + shape.
const std::vector<int64_t>& ShapeWithBatchDim() const
{
if (tensor_type_ == TensorType::SHAPE_TENSOR) {
// Shape tensor with dynamic batching does not introduce a new
// dimension to the tensor but adds an additional value to the 1-D
// array.
return original_shape_;
} else {
return shape_with_batch_dim_;
}
}
std::vector<int64_t>* MutableShapeWithBatchDim()
{
Expand Down

0 comments on commit 85d5d11

Please sign in to comment.