Register operators of CV models in PyTorch mobile (#27609)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/27609
It's a fix to PR27379, where it failed in Windows CI.
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
load the torch script model
run the model to get reference results
save and load the mobile module using torch::jit::module._save_for_mobile() and torch::jit::_load_for_mobile().
run the mobile module by run_method() and compare the results to reference results.
Tested models:
Lenet
XrayMobileV3
Differential Revision: D17832709
fbshipit-source-id: 51e44fa95240b241da85cb67dc2302878742903c