pytorch
5798a00a - [3/N] Nnapi Backend Delegate Preprocess: Basic OSS Test (#61594)

Commit
3 years ago
[3/N] Nnapi Backend Delegate Preprocess: Basic OSS Test (#61594) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/61594 ### Summary: Added a unit test for the Nnapi delegate's preprocess() function. The function was previously tested locally, but now a basic test is added for OSS. See https://github.com/pytorch/pytorch/pull/61499 for preprocess implementation. See D29647123 for local testing. **TODO:** Add more comprehensive tests. Add tests for model execution, after the Nnapi delegate's initialization and execution is implemented T91991928. **CMakeLists.txt:** Added a library for the Nnapi delegate - Explicit linking of torch_python is necessary for the Nnapi delegate's use of pybind **test_backends.py:** Added a test for lowering to Nnapi - Based off https://github.com/pytorch/pytorch/blob/master/test/test_nnapi.py - Only differences are the loading of the nnapi backend library and the need to change dtype from float64 to float32 ### Test Plan: Running `python test/test_jit.py TestBackendsWithCompiler -v` succeeds. Also saved and examined the model file locally. Test Plan: Imported from OSS Reviewed By: iseeyuan Differential Revision: D29687143 fbshipit-source-id: 9ba9e57f7f856e5ac15e13527f6178d613b32802
Author
Parents
Loading