feat: support tile dynamo converter by zewenli98 · Pull Request #2402 · pytorch/TensorRT
Description
Support tile dynamo converter. This is a part of slice converter.
Fixes part of #2215
Type of change
Please delete options that are not relevant and/or add your own.
- New feature (non-breaking change which adds functionality)
Checklist:
- My code follows the style guidelines of this project (You can use the linters)
- I have performed a self-review of my own code
- I have commented my code, particularly in hard-to-understand areas and hacks
- I have made corresponding changes to the documentation
- I have added tests to verify my fix or my feature
- New and existing unit tests pass locally with my changes
- I have added the relevant labels to my PR in so that relevant reviewers are notified
| shapes = [] | ||
| for i, (s, d) in enumerate(zip(input.shape, dims)): | ||
| shapes.append( | ||
| impl.elementwise.mul(ctx, target, source_ir, f"{name}_mul_{i}", s, d) |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this part, if in the function definition the dims is Sequence[int]?
I am assuming it is for the case where the dims is a sequence of ITensors? Then accordingly maybe the function definition needs to be changed?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the else part is not needed. Thanks for comments!
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Just a minor clarification I wanted, in this I see that dims are SymInt[] so that should be fine for int based arithmetic operations right?
Hi - generally SymInt and int are not interchangeable, since int is a concrete value whereas SymInt does not generally have a fixed or concrete value. In the test cases, are the values you encounter in args[1] ints or SymInts when calling this function?
In that case, we should be typing everything with int and not SymInt, since we are not able to support Dynamic shape through SymInt now anyway.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters