pytorch
13a2f426 - [inductor] Add size, stride, storage_offset to RAIIAtenTensorHandle (#110764)

Commit
1 year ago
[inductor] Add size, stride, storage_offset to RAIIAtenTensorHandle (#110764) Summary: For unbacked SymInts, the C++ wrapper codegen can generate expressions like `buf123.size()` or `.stride()` or `.storage_offset()`: https://github.com/pytorch/pytorch/blob/7cc0020a80527207a1725e6d21ce7c326668fe0d/torch/_inductor/ir.py#L2504-L2520 Here we add corresponding methods to the `RAIIAtenTensorHandle` class so that the above codegen works in the ABI compatibility mode. Test Plan: CI + the following PR Reviewers: Subscribers: Tasks: Tags: Pull Request resolved: https://github.com/pytorch/pytorch/pull/110764 Approved by: https://github.com/chenyang78 ghstack dependencies: #110713, #110745
Author
Committer
Parents
Loading