pytorch/tools/code_analyzer
Jiakai Liu 064c478453 [pytorch] register c10 ops for static dispatch to unblock c10 boxing
Summary:
PR #32521 broke static dispatch because some ops are no longer
registered in register_aten_ops_*.cpp - it expects the c10 registers in
TypeDefault.cpp / CPUType.cpp / etc to register these ops. However, all
c10 registers are inside `#ifndef USE_STATIC_DISPATCH` section.

To measure the OSS mobile build size impact of this PR:
```
 # default build: SELECTED_OP_LIST=MobileNetV2.yaml scripts/build_pytorch_android.sh armeabi-v7a
 # mobilenetv2 custom build: scripts/build_pytorch_android.sh armeabi-v7a
```

- Before this PR, Android AAR size for arm-v7:
* default build: 5.5M;
* mobilenetv2 custom build: 3.2M;

- After this PR:
* default build: 6.4M;
* mobilenetv2 custom build: 3.3M;

It regressed default build size by ~1M because more root ops are
registered by c10 registers, e.g. backward ops which are filtered out by
gen_jit_dispatch.py for inference-only mobile build.

mobilenetv2 custom build size regressed by ~100k presumably because
the op whitelist is not yet applied to things like BackendSelectRegister.

Differential Revision: D20266240

Test Plan: Imported from OSS

Pulled By: ljk53

fbshipit-source-id: 97a9a06779f8c62fe3ff5cce089aa7fa9dee3c4a
2020-03-20 20:07:15 -07:00
..
analyzer.cpp [pytorch] convert code analyzer to a binary (#33102) 2020-02-10 14:46:29 -08:00
build.sh [pytorch] convert code analyzer to a binary (#33102) 2020-02-10 14:46:29 -08:00
CMakeLists.txt [pytorch] convert code analyzer to a binary (#33102) 2020-02-10 14:46:29 -08:00
gen_op_registration_whitelist.py [pytorch] register c10 ops for static dispatch to unblock c10 boxing 2020-03-20 20:07:15 -07:00
op_dependency.cpp [pytorch] change op dependency output to use double-quoted strings (#32464) 2020-01-24 15:27:28 -08:00
run_analyzer.sh [pytorch] update code analyzer script to cover new c10::Module::def API (#33975) 2020-02-29 10:29:45 -08:00