mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Summary: Add an api to backport a model vn to model vi. It accept an input model (file or buffer) and output a model (file or buffer) with an expected bytecode version. In this change, the input is a model and it can come from a file or buffer. The output is a model and can be either file path or buffer. When backport fails, function return false with a warning message : ``` /Users/chenlai/pytorch/cmake-build-debug/bin/test_jit --gtest_filter=LiteInterpreterTest.BackPortByteCodeModelV4:LiteInterpreterTest/*.BackPortByteCodeModelV4:*/LiteInterpreterTest.BackPortByteCodeModelV4/*:*/LiteInterpreterTest/*.BackPortByteCodeModelV4 --gtest_color=no Testing started at 2:32 PM ... CUDA not available. Disabling CUDA and MultiCUDA tests [W backport.cpp:419] Warning: Backport doesn't support backport to version3 (function _backport_for_mobile_impl) Process finished with exit code 0 ``` ## Test 1. Run both `caffe2/test/cpp/jit/test_lite_interpreter.cpp` and `caffe2/test/mobile/test_bytecode.py`. 2. Run all prod models with backport api. Pull Request resolved: https://github.com/pytorch/pytorch/pull/56802 ghstack-source-id: 128425510 Test Plan: CI Reviewed By: raziel, iseeyuan Differential Revision: D27844651 fbshipit-source-id: 8a803cf6c76433ee0a3049b1a5570585d569f8d6 |
||
|---|---|---|
| .. | ||
| init.cpp | ||
| init.h | ||
| module_python.h | ||
| pybind_utils.cpp | ||
| pybind_utils.h | ||
| pybind.h | ||
| python_arg_flatten.cpp | ||
| python_arg_flatten.h | ||
| python_custom_class.cpp | ||
| python_custom_class.h | ||
| python_interpreter.cpp | ||
| python_ir.cpp | ||
| python_ir.h | ||
| python_ivalue.h | ||
| python_sugared_value.cpp | ||
| python_sugared_value.h | ||
| python_tracer.cpp | ||
| python_tracer.h | ||
| python_tree_views.cpp | ||
| python_tree_views.h | ||
| script_init.cpp | ||
| script_init.h | ||
| update_graph_executor_opt.cpp | ||
| update_graph_executor_opt.h | ||