pytorch
6349bde5 - [4/N] Nnapi backend delegation preprocess: List Tensors & Comment Updates (#61752)

Commit
3 years ago
[4/N] Nnapi backend delegation preprocess: List Tensors & Comment Updates (#61752) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/61752 Updated Android NNAPI preprocess, so that it can accept both single Tensor inputs and Tensor List inputs. - The inputs are not real data, but input parameters for shape, dtype, quantization, and dimorder that are bundled as a Tensor. Comments were updated to make this clearer. - In the future, preprocess will also accept a dedicated NnapiArg object. Compile_spec should have the following format: {"forward": {"inputs": at::Tensor}} OR {"forward": {"inputs": c10::List< at::Tensor >}} Example input Tensor: torch.tensor([[1.0, -1.0, 2.0, -2.0]]).unsqueeze(-1).unsqueeze(-1) ### Testing OSS testing is blocked by https://github.com/pytorch/pytorch/pull/61594. Testing was done locally in D29726948 TODO: Add OSS tests for single Tensor and Tensor List inputs. ghstack-source-id: 133683735 Test Plan: OSS testing is blocked by https://github.com/pytorch/pytorch/pull/61594. Testing was done locally in D29726948. TODO: Add OSS tests for single Tensor and Tensor List inputs. Reviewed By: iseeyuan Differential Revision: D29726432 fbshipit-source-id: 08de70578f37681bda365f9776a1c96030257e7a
Author
Parents
Loading