pytorch/torch/csrc/jit/python
Yidi Wu 545fbd58dc [export] inline jit.scripted function in export (#155180)
When we export a scripted function, we inline the original callable stored in "_torchdynamo_inline", this is the same strategy as torch.compile path.

We do the same thing for script method, where a "\_\_wrapped\_\_" attribute points to the original callable in most cases. There are some corner cases we identified: top-level jit.scripted modules' method doesn't have a \_\_wrapped\_\_. In this case, we fall back to the original scripted approach. Maybe there're more such cases but need verification.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/155180
Approved by: https://github.com/zou3519
2025-06-10 20:34:12 +00:00
..
init.cpp [JIT] Optimize DCE by storing a MemoryLocations for an entire set<Value*> (#153645) 2025-05-19 21:04:59 +00:00
init.h
module_python.h
pybind_utils.cpp [BE][Ez] Update deprecated pybind11 functions (#154798) 2025-06-01 06:17:50 +00:00
pybind_utils.h [BE][Ez] Update deprecated pybind11 functions (#154798) 2025-06-01 06:17:50 +00:00
pybind.h
python_arg_flatten.cpp [1/N] Deprecate c10::string_view and at::string (#151972) 2025-04-29 07:23:52 +00:00
python_arg_flatten.h
python_custom_class.cpp Remove AttributeError constructor (#154808) 2025-06-03 03:49:09 +00:00
python_custom_class.h
python_dict.cpp
python_dict.h
python_interpreter.cpp
python_ir.cpp [1/N] Use internal linkage in torch/csrc C++ files. (#150930) 2025-04-11 02:19:31 +00:00
python_ir.h
python_ivalue.h
python_list.cpp
python_list.h
python_sugared_value.cpp [BE][Ez] Update deprecated pybind11 functions (#154798) 2025-06-01 06:17:50 +00:00
python_sugared_value.h
python_tracer.cpp [1/N] Use internal linkage in torch/csrc C++ files. (#150930) 2025-04-11 02:19:31 +00:00
python_tracer.h
python_tree_views.cpp [1/N] Use internal linkage in torch/csrc C++ files. (#150930) 2025-04-11 02:19:31 +00:00
python_tree_views.h
script_init.cpp [export] inline jit.scripted function in export (#155180) 2025-06-10 20:34:12 +00:00
script_init.h
update_graph_executor_opt.cpp [JIT] add GRAPH_DEBUG for setGraphExecutorOptimize (#153549) 2025-05-14 20:07:25 +00:00
update_graph_executor_opt.h
utf8_decoding_ignore.cpp
utf8_decoding_ignore.h