Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix "Cannot call numel() on tensor with symbolic sizes/strides" (#3368)
Summary: Pull Request resolved: #3368 X-link: facebookresearch/FBGEMM#459 This is to fix the issue reported in https://fb.workplace.com/groups/1075192433118967/permalink/1536587573646115/ That error message is the outcome but not the root cause. The cause is due to the error of calling `numel` on tensor with symbolic sizes/strides {F1959054688} And the line of code calling `numel` was pointed out by IvanKobzarev in https://fburl.com/workplace/4dvcfy9s This happens when PT compiles Sparse Arch where `indices` has dynamic (symbolic) shapes. The fix is straightforward. We apply `sym_numel` and `c10::SymFloat` for `indices`, instead. Reviewed By: sryap, spcyppt Differential Revision: D65883474 fbshipit-source-id: 607cbee8503475ac67541493cb3ba67505c599a6
- Loading branch information