[FEA][torchinductor-EVT] tensor construction API that takes in shape + stride directly
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.5k
- Forks
- 2.1k
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 7
Description
Is your feature request related to a problem? Please describe.
This is a small API change in that is a little annoying to have to check whether strides are row or column major before passing to the tensor constructor at https://github.com/NVIDIA/cutlass/blob/5e497243f7ad13a2aa842143f9b10bbb23d98292/python/cutlass/backend/evt/ir/tensor.py#L54.
TorchInductor tracks this internally, so it is easier for us to check whether the shape + stride are contiguous and then passing it along.
Describe the solution you'd like
Ideally just take a shape and stride arg rather than having to convert to a shape, layout tag pair and then have the constructor interpret these.
Describe alternatives you've considered
I added a shim layer in inductor that does this, so it's nbd, but just a nice-to-have, perhaps having two versions of the API wouldn't hurt here.
cc @eellison, @henrylhtsang
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in python/cutlass/backend/evt/ir/tensor.py around line 54 and inspect how the tensor constructor currently interprets shape and layout tags. Trace the existing construction callers and TorchInductor integration, then define the affected API behavior and add coverage for shape-plus-stride construction before validating the existing EVT tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- backend-api-design, machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100