-
Notifications
You must be signed in to change notification settings - Fork 365
fix: Issue in non-Tensor Input Resolution #1617
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code conforms to C++ style guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code conforms to Python style guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code conforms to Python style guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code conforms to C++ style guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code conforms to C++ style guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code conforms to Python style guidelines
Expected this PR to make it into 23.03 release |
This does not make sense in fact. |
- In certain TensorRT-executed blocks, multiple non-Tensor inputs originate from the same parent Tensor in another Torch block, so a single pass of `resolveTRTNonTensorInputs` does not resolve all non-Tensor inputs, causing failures at compile-time - Add do-while loop to ensure all input dependencies are resolved by running dependency-resolution algorithm multiple times, if necessary - Add function to `SegmentedBlock` to get the ID of a block, so re-inserted blocks retain the same ID as the previous block being replaced
- Added test case in partitioning to elicit bug arising from multiple nonTensor inputs to TensorRT block
62f59c6
to
ac715b0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code conforms to C++ style guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code conforms to Python style guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code conforms to C++ style guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code conforms to Python style guidelines
cur_partitioned_block[i] = | ||
SegmentedBlock(cur_partitioned_block[i].get_id(), SegmentedBlock::kTensorRT, dependency_nodes); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added to ensure the block IDs of segmented blocks stay in order despite resolution of non-Tensor inputs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, please squash your commits then merge.
6f3ec49
to
5f43bf1
Compare
Description
In certain TensorRT-executed blocks, multiple non-Tensor inputs originate from the same parent Tensor in another Torch block, so a single pass of resolveTRTNonTensorInputs does not resolve all non-Tensor inputs, causing failures at compile-timeprim::Loop
in the TensorRT block and is fixed in PR fix: fix the prim::Loop fallback issue #1691SegmentedBlock
to get the ID of a block, so re-inserted blocks retain the same ID as the previous block being replacedFailure Case
Before Non-Tensor Input Resolution
After 1 Round of Non-Tensor Input Resolution
After 2 Rounds of Non-Tensor Input Resolution
Fixes #1612
Related to: #1613
Type of change
Checklist: