pytorch/test/cpp
Mu-Chu Lee 80527c0cf2 [AOTInductor] Double buffering for Weights (#114446)
Summary:
This adds function to model container doing weight swapping with double buffering.

There are 2 parts for double buffering
a) Write constants into inactive buffer
b) Swap active buffer

For (a), we write the constants into the buffer that's currently not in use, and store the information in both constants map and the corresponding constant array to read.
For (b), we obtain the lock, and activate the constant map/constant array that is inactive, and flag the one that's currently in use to inactive.

Test Plan:
test/cpp/aot_inductor/test.cpp

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D51543732](https://our.internmc.facebook.com/intern/diff/D51543732)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/114446
Approved by: https://github.com/chenyang78, https://github.com/eellison
2023-12-05 22:31:56 +00:00
..
aot_inductor [AOTInductor] Double buffering for Weights (#114446) 2023-12-05 22:31:56 +00:00
api Add the appropriate check on div_value to the cpp frontend (#114671) 2023-12-04 01:28:11 +00:00
c10d Switch env variable use in test harnesses to the non-deprecated names to fix warnings (#114880) 2023-12-01 20:08:23 +00:00
common
dist_autograd Remove unneeded linking in CMake targets (#109192) 2023-09-15 19:43:25 +00:00
jit [PyTorch] Redirect c10::optional to std::optional (#101995) 2023-11-30 02:46:41 +00:00
lazy test_lazy: skip HashTest.Scalar (#112747) 2023-11-16 01:22:58 +00:00
lite_interpreter_runtime [2/N] Cleanup header inclusions in torch_cpu by iwyu (#109964) 2023-11-19 20:56:32 +00:00
monitor
profiler [c10] Move profiler clock to libc10 for timestamps (#111972) 2023-10-27 16:18:40 +00:00
rpc Fix typo under test directory (#111304) 2023-10-16 23:06:06 +00:00
tensorexpr [ROCm] remove HCC references (#111975) 2023-10-26 02:39:10 +00:00
__init__.py