Register operators of CV models in PyTorch mobile (#27379)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/27379
Currently the operators need to be registered manually through c10 registration.
Test Plan:
The operators should be covered by tests on operators.
A few ops (add, conv) are covered in test_lite_interpreter.cpp for demonstration.
CV models may be too large to include in unittests.
Simple local loaders can be built. Follow similar pattern as in test_lite_interpreter to
1. load the torch script model
2. run the model to get reference results
3. save and load the mobile module using torch::jit::module._save_for_mobile() and torch::jit::_load_for_mobile().
4. run the mobile module by run_method() and compare the results to reference results.
Tested models:
* Lenet
* XrayMobileV3
Differential Revision: D17810912
fbshipit-source-id: 2cc25dbe81a3c9a85108b3efe6a8e957028fc622