pytorch
0e4ddc2b - NT: Refactor for lazy computation of opt_sizes (#97895)

Commit
2 years ago
NT: Refactor for lazy computation of opt_sizes (#97895) This PR changes the `opt_sizes_` metadata to be computed lazily if needed rather than at construction. Since this metadata is data-dependent, we can't calculate it if we have symbolic metadata (i.e. for dynamic shapes). Notes: * `opt_size()` is the only public accessor of `opt_sizes_`; several kernels use it. During the first call to this, the metadata is computed. * `size()` / `sym_size()` use `opt_size()`. For the symbolic case, this will have to change. Pull Request resolved: https://github.com/pytorch/pytorch/pull/97895 Approved by: https://github.com/drisspg
Author
Committer
Parents
Loading