mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 00:21:07 +01:00
While loading deserialized dynamo states back from disk, precompile will need a direct way to access ExtraState and populate guarded bytecode as cache entries. This diff adds two API at code level to load precompiled guard + bytecode entries. 1. _load_precompile_entry() will append an entry to a precompile entry list per code object. This precompile entry will be looked up before normal compiled entries. 2. _reset_precompile_entries() will clean up all the installed existing entries. This is useful to prevent a case where user call loading multiple times and explode the number of entries on the list. Differential Revision: [D76083247](https://our.internmc.facebook.com/intern/diff/D76083247/) Pull Request resolved: https://github.com/pytorch/pytorch/pull/155329 Approved by: https://github.com/jamesjwu, https://github.com/jansel |
||
|---|---|---|
| .. | ||
| cache_entry.cpp | ||
| cache_entry.h | ||
| compiled_autograd.cpp | ||
| compiled_autograd.h | ||
| cpp_shim.cpp | ||
| cpp_shim.h | ||
| cpython_defs.c | ||
| cpython_defs.h | ||
| cpython_includes.h | ||
| debug_macros.h | ||
| eval_frame_cpp.cpp | ||
| eval_frame_cpp.h | ||
| eval_frame.c | ||
| eval_frame.h | ||
| extra_state.cpp | ||
| extra_state.h | ||
| framelocals_mapping.cpp | ||
| framelocals_mapping.h | ||
| guards.cpp | ||
| guards.h | ||
| init.cpp | ||
| init.h | ||
| python_compiled_autograd.cpp | ||
| python_compiled_autograd.h | ||
| utils.cpp | ||
| utils.h | ||