Summary:
What it does:
Adds a get_stride() method to the PermuteView class in torch/_inductor/ir.py. The method permutes the strides of the underlying data in the same order as the dimensions — mirroring the existing get_size() pattern
Why:
Previously, PermuteView didn't implement get_stride(), which caused a NotImplementedError when downstream operations (like aten.slice.Tensor) needed stride info from a PermuteView wrapping a ComputedBuffer. This was hit during AOTI lowering of models that do compute → permute → slice (e.g., pad → permute → slice in the GR model).
Test Plan:
- internal lowering passed with this patch
- CI for added unit test
Reviewed By: silverlakeli, ColinPeppler
Differential Revision: D107267848
Pull Request resolved: #185992
Approved by: https://github.com/Skylion007
SOCIAL SHARE CARD GENERATOR