pytorch/torch/csrc/inductor
Mu-Chu Lee 60a45eb862 [AOTInductor] Introduce MaybeOwningAtenTensorHandle for ConstantMap (#150275)
Summary:
We used RAIIAtenTensorHandle for ConstantMap, where RAIIAtenTensorHandle
is a unique_ptr, indicating that all memory handling is by the
AOTInductor internally.

In this PR, we introduce ConstantAtenTensorHandle which replaces
RAIIATenTensorHandle. This class holds a raw AtenTensorHandle, and also
owns a RAIIAtenTensorHandle if user decides to delegate memory
management to AOTInductor.

This is a prerequisite for user managed buffer, this PR, however only
introduces this class and make sure it works with existing AOTInductor
and has the default behavior identical as using RAIIAtenTensorHandle.

Test Plan:
Existing tests. No change should be introduced within this PR.

Reviewers:

Subscribers:

Tasks:

Tags:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/150275
Approved by: https://github.com/chenyang78, https://github.com/desertfire
2025-04-05 06:00:35 +00:00
..
aoti_eager Fix for AOTI + CUDAGraphs when calling from Python (#148601) 2025-03-08 02:44:14 +00:00
aoti_include cpp_wrapper: reduce memory usage by removing unneeded temporaries (#147403) 2025-03-06 16:08:16 +00:00
aoti_package [reland] Support torchbind in OSS proxy executor (#150196) 2025-03-29 03:36:55 +00:00
aoti_runner [AOTInductor] Add function for users to extract constants in container (#150163) 2025-03-29 03:36:12 +00:00
aoti_runtime [AOTInductor] Introduce MaybeOwningAtenTensorHandle for ConstantMap (#150275) 2025-04-05 06:00:35 +00:00
aoti_torch Revert "Add torch._scaled_mm for CPU (#150410)" 2025-04-04 06:52:54 +00:00
cpp_wrapper cpp_wrapper: precompile a few more commonly used headers, and improve RAIIPyObject interface (#149350) 2025-04-02 09:54:27 +00:00
array_ref_impl.h cpp_wrapper: Move #includes to per-device header files (#145932) 2025-01-29 21:08:45 +00:00
inductor_ops.cpp [Reland] [1/N] Fix clang-tidy warnings in inductor (#134544) 2024-08-28 04:05:06 +00:00
inductor_ops.h [2/N] Fix clang-tidy warnings in inductor (#132040) 2024-07-29 18:41:24 +00:00
resize_storage_bytes.cpp [Reland] [1/N] Fix clang-tidy warnings in inductor (#134544) 2024-08-28 04:05:06 +00:00
static_cuda_launcher.cpp [StaticCudaLauncher] Support sharedMemBytes > 48KB (#149657) 2025-03-27 17:00:18 +00:00
static_cuda_launcher.h [Reland] First version of statically compiled launcher for triton compiled CUDA kernels (#149238) 2025-03-15 15:06:46 +00:00