Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add INT64 Datatype Support for Shape Tensors in TensorRT Backend #91

Merged
merged 10 commits into from
Jun 20, 2024

Conversation

pskiran1
Copy link
Member

@pskiran1 pskiran1 commented Jun 6, 2024

  • Introduced ShapeTensor class to handle both int32_t and int64_t shape tensors, using an internal char datatype buffer to store the shape tensor values.

@pskiran1 pskiran1 requested review from tanmayv25, GuanLuo and Tabrizian and removed request for tanmayv25 June 6, 2024 17:12
@pskiran1 pskiran1 marked this pull request as ready for review June 8, 2024 19:33
src/tensorrt_utils.h Outdated Show resolved Hide resolved
src/instance_state.cc Show resolved Hide resolved
src/instance_state.cc Outdated Show resolved Hide resolved
src/instance_state.cc Outdated Show resolved Hide resolved
auto it = request_shape_values.find(io_index);
for (size_t idx = 1; idx < citr->second.nb_shape_values_; idx++) {
if (it->second.GetDataType() == ShapeTensorDataType::INT32) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the duplicate code can be reduced here. How about adding a function in the ShapeTensor class called GetDistance which returns the distance between this shape tensor and the one that gets passed in the argument.
It can take care of data type handling.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved this code to ShapeTensor::GetDistance() method.

src/instance_state.h Outdated Show resolved Hide resolved
src/instance_state.cc Outdated Show resolved Hide resolved
@pskiran1 pskiran1 requested a review from tanmayv25 June 12, 2024 11:07
@pskiran1 pskiran1 merged commit 315293f into main Jun 20, 2024
1 check passed
@pskiran1 pskiran1 deleted the spolisetty_dlis_6653 branch June 25, 2024 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants