pytorch
1772e26f - [PyTorch] Move selected_mobile_ops.h codegen function to tools (#53786)

Commit
3 years ago
[PyTorch] Move selected_mobile_ops.h codegen function to tools (#53786) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/53786 To generate `selected_mobile_ops.h` in OSS, move the header file codegen functions to `tools/lite_interpreter/gen_selected_mobile_ops_header.py` file, so OSS can reuse these functions. ghstack-source-id: 123754437 Test Plan: ``` buck test //xplat/caffe2:supported_mobile_models_test ``` ``` buck run //xplat/caffe2:gen_oplist -- --model_file_list_path @/data/users/chenlai/data/pytorch/oplist_folder/file_list_path.macro --allow_include_all_overloads --output_dir /home/chenlai/local/data/pytorch/oplist_folder ``` `file_list_path.macro` content is: ``` chenlai@devvm2090:~/fbsource(45a9b7888)$ cat /data/users/chenlai/data/pytorch/oplist_folder/file_list_path.macro /data/users/chenlai/fbsource/buck-out/gen/aab7ed39/xplat/caffe2/supported_mobile_models_test_op_list/model_operators.yaml ``` In output folder `/home/chenlai/local/data/pytorch/oplist_folder`, these files are generated: ``` selected_mobile_ops.h selected_operators.yaml SupportedMobileModelsRegistration.cpp ``` the generated files are the same as before. {P282056731} {P282055046} Reviewed By: dhruvbird, iseeyuan Differential Revision: D26907868 fbshipit-source-id: 9ba786f9c5674a72cad237ae7baadbe4642c51d5
Author
Parents
Loading