pytorch/test/cpp
Yidi Wu b22f0f5f51 [torchbind] fix bug of mutating FakeScriptObjects twice in aot_export (#128844)
This PR does two things:
1. it duplicates the fake script object because aot_export trace the program twice. The result of tracing in the first time would cause the tracing result of second time be wrong.
2. Also add a new test for methods that return constant outputs. Before the PR, there's is no meta["val"] for these nodes because fx won't track these constants. We still need to preserve these constant return operators in the graph because torchbind objects are stateful and deleting it would remove the implicit state mutation inside of the object.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/128844
Approved by: https://github.com/angelayi
2024-06-24 23:14:34 +00:00
..
aoti_abi_check [AOTI] Add more ABI-compatiblity unit test (#123900) 2024-04-23 16:06:40 +00:00
aoti_inference [AOTI] Add ABI-compatiblity tests (#123848) 2024-04-19 00:51:24 +00:00
api Remove more unused variables in tests (#127510) 2024-05-31 03:39:45 +00:00
c10d [BE] split seq_id to collective_seq_id and p2p_seq_id (#125727) 2024-05-21 03:26:49 +00:00
common [AOTI] Add ABI-compatiblity tests (#123848) 2024-04-19 00:51:24 +00:00
dist_autograd Remove unneeded linking in CMake targets (#109192) 2023-09-15 19:43:25 +00:00
jit [torchbind] fix bug of mutating FakeScriptObjects twice in aot_export (#128844) 2024-06-24 23:14:34 +00:00
lazy Remove unused functions (#127881) 2024-06-05 05:21:24 +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 Revert " [Distributed] [7/N] Fix clang-tidy warnings in torch/csrc/distributed/c10d (#124987)" 2024-04-30 00:37:53 +00:00
tensorexpr Check unused variables in tests (#127498) 2024-06-04 05:35:25 +00:00
__init__.py