pytorch/c10
Shivam Raikundalia 5b3ea75895 [Mem Snapshot] Add Metadata Field (#165490)
Summary:
The implementation adds the ability to:

Set custom metadata strings that will be attached to all subsequent allocations
Clear or change the metadata at any point
View the metadata in memory snapshots via _dump_snapshot()

Test Plan: Added test in test_cuda.py and check manually in snapshot to see that metadata was added.

Differential Revision: D84654933

Pull Request resolved: https://github.com/pytorch/pytorch/pull/165490
Approved by: https://github.com/yushangdi
2025-10-16 22:54:27 +00:00
..
benchmark Set RUNPATH so installed tests can find the required shared libraries (#136627) 2024-10-25 09:38:08 +00:00
core Restore AcceleratorAllocatorConfig to avoid potential regression (#165129) 2025-10-16 15:26:17 +00:00
cuda [Mem Snapshot] Add Metadata Field (#165490) 2025-10-16 22:54:27 +00:00
hip Use torch_compile_options for c10 libraries (#147821) 2025-03-18 01:54:23 +00:00
macros Move c10/macros/Macros.h to headeronly (#158365) 2025-07-16 18:46:52 +00:00
metal [MPS] Add igamma/igammac ops (#161927) 2025-09-02 20:52:02 +00:00
mobile [2/N] Fix extra warnings brought by clang-tidy-17 (#137459) 2024-10-08 19:05:02 +00:00
test Restore AcceleratorAllocatorConfig to avoid potential regression (#165129) 2025-10-16 15:26:17 +00:00
util [2/N] Mark unused parameters in C++ code (#165121) 2025-10-15 03:04:39 +00:00
xpu Refine XPU allocator message when OOM (#165509) 2025-10-16 05:47:49 +00:00
BUCK.oss Migrate c10/macros/cmake_macros.h.in to torch/headeronly (#158035) 2025-07-15 19:52:59 +00:00
BUILD.bazel
build.bzl Remove non-header-only dep from c10_headers target (#155858) 2025-06-16 21:41:25 +00:00
CMakeLists.txt Migrate c10/macros/cmake_macros.h.in to torch/headeronly (#158035) 2025-07-15 19:52:59 +00:00
ovrsource_defs.bzl Revert "Consistently use c10_ovrsource in arvr mode everywhere (#164128)" 2025-09-30 14:43:52 +00:00