pytorch/torch/cuda
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
..
amp Add pyrefly suppressions (3/n) (#164588) 2025-10-03 22:03:03 +00:00
__init__.py Revert "[CUDA] Add experimental green context support for SM carveout (#159104)" 2025-10-07 20:51:22 +00:00
_device_limits.py [torch][cuda][device_limits] Library for querying device hardware limits for flops and bandwidth (#162942) 2025-09-23 04:48:19 +00:00
_gpu_trace.py [4/N] Apply ruff UP035 rule to python code (#164206) 2025-10-01 19:05:53 +00:00
_memory_viz.py [BE][PYFMT] migrate PYFMT for torch/[a-c]*/ to ruff format (#144554) 2025-07-03 18:56:07 +00:00
_pin_memory_utils.py [dcp] add new checkpoint staging to preserve storage sharing and support mutable state_dicts (#155192) 2025-06-19 02:04:21 +00:00
_sanitizer.py [2/N] Fix ruff warnings (#164460) 2025-10-04 03:40:32 +00:00
_utils.py Add pyrefly suppressions (3/n) (#164588) 2025-10-03 22:03:03 +00:00
comm.py
gds.py [4/N] Apply ruff UP035 rule to python code (#164206) 2025-10-01 19:05:53 +00:00
graphs.py Add pyrefly suppressions (3/n) (#164588) 2025-10-03 22:03:03 +00:00
jiterator.py [4/N] Apply ruff UP035 rule to python code (#164206) 2025-10-01 19:05:53 +00:00
memory.py [Mem Snapshot] Add Metadata Field (#165490) 2025-10-16 22:54:27 +00:00
nccl.py PEP585 update - torch/_higher_order_ops torch/_subclasses torch/backends torch/compiler torch/cuda torch/masked torch/mtia torch/nested (#145202) 2025-01-20 22:37:26 +00:00
nvtx.py Add pyrefly suppressions (3/n) (#164588) 2025-10-03 22:03:03 +00:00
profiler.py
random.py Avoid unnecessary clone in torch.cuda.set_rng_state (#149283) 2025-03-18 20:47:57 +00:00
sparse.py
streams.py error message for instantiating CUDA Stream if CUDA not available (#159868) 2025-10-11 23:21:35 +00:00
tunable.py [ROCm][tunableop] Improvements to tunableop Numerical Check (#163079) 2025-10-15 22:26:47 +00:00