fix nonzero upper bound (#393)
Summary: Pull Request resolved: https://github.com/pytorch/executorch/pull/393 If nonzero's input has `n` dimensions, then the resulting output tensor is of size `(z, n)`, where `z` is the total number of non-zero elements in the input tensor. Therefore, an upper bound for out's shape is [input.numel(), input.dim()] Reviewed By: ydwu4 Differential Revision: D49342476 fbshipit-source-id: ac70fd83090cc80c93315b9fc5be830afb6207df
M
Manuel Candales committed
ebb752fd9cd5f077fcd0c649eb8cc74fbcaab65e
Parent: 60ea5c6
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 9/18/2023, 9:36:00 PM