Functions for handling zero dim tensor (#693)
Summary: Pull Request resolved: https://github.com/pytorch/executorch/pull/693 Update `tensor_has_dim` to also account for zero-rank tensors, which allow dim to be 0 or -1. Also introduced two helper functions to `nonzero_dim` and `nonempty_size` that are used to handle zero-rank tensors ghstack-source-id: 203341574 exported-using-ghexport Reviewed By: SS-JIA Differential Revision: D49735859 fbshipit-source-id: 2ed843a12d922fd78b0f7e67b6ff89cc871298d4
M
Manuel Candales committed
788d3391a183f9d046274cbc460b1f688c1b55d0
Parent: 006e3b2
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 10/9/2023, 11:58:51 AM