[PyTorch] Extract parseOperator() into a standalone source file (#65179)
authorMengwei Liu <larryliu@fb.com>
Fri, 17 Sep 2021 19:57:48 +0000 (12:57 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 17 Sep 2021 20:31:59 +0000 (13:31 -0700)
commiteaf85fad626ce03e70392e45993187cb0f365bd7
tree82459b1f2c3e4d5805fbc4020c025a39b50d6da2
parent35084ee4517cfdbc928523f50d5cfa8cc2e89e2f
[PyTorch] Extract parseOperator() into a standalone source file (#65179)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/65179

This is following up this PR: https://github.com/pytorch/pytorch/pull/61862. The purpose is to modularize operator parsing so that it can be used as needed without pulling the whole `import.cpp` into build.

Test Plan: Added a unit test in `test_lite_predictor.cpp` called `ParseOperators`, similar to `ParseBytecode`.

Reviewed By: iseeyuan

Differential Revision: D31006555

fbshipit-source-id: c38e221800af4cf72963a353c452c5437f56a0ac
caffe2/CMakeLists.txt
test/cpp/jit/test_lite_interpreter.cpp
tools/build_variables.bzl
torch/csrc/jit/mobile/import.cpp
torch/csrc/jit/mobile/import.h
torch/csrc/jit/mobile/parse_operators.cpp [new file with mode: 0644]
torch/csrc/jit/mobile/parse_operators.h [new file with mode: 0644]