This adds memory profiling support for the CPU pinned memory (host)
allocator, so that torch.cuda.memory._snapshot() can include pinned
memory allocations alongside CUDA device memory.
To enable, pass record_host=True to _record_memory_history().
Host data appears in the host_segments and host_traces keys of
the snapshot dict. Disabling with _record_memory_history(None)
turns off both CUDA and host recording. The memory_viz visualizer
does not yet support host memory data.
Implementation: the CachingHostAllocatorImpl gains the same
profiling infrastructure as the CUDA DeviceCachingAllocator:
context gathering, trace recording via a RingBuffer, and
getSegments()/getTraces() APIs. The RingBuffer class is
extracted from CUDACachingAllocator.cpp into c10/core/RingBuffer.h
for reuse. Timestamp conversion is done inside getTraces() rather
than at snapshot collection time.
Authored by Claude.
Signed-off-by: Edward Z. Yang <ezyangmeta.com>
[ghstack-poisoned]
Community-Analysen & Experten-Meinungen 0
Verwandte Story-Cluster & Quellen (Vektor-KI)
Ähnliche Beiträge
Auch interessante Nachrichten ciflow/trunk/182407: Update on "Support memory snapshot for CPU pinned memory"
Thematisch verwandte Begriffe: ciflowtrunk182407, Update, quotSupport, memory · 6 Treffer
How to Evaluate Live & Voice Agents in ADK
Black Box: The Chatbots | 14 days | Ep 2 – podcast
Black Box: The Chatbots | Life Raft | Ep 4 – podcast
Videos werden geladen ...
Beiträge werden geladen ...
Videos werden geladen ...
Beiträge werden geladen ...
Videos werden geladen ...
Beiträge werden geladen ...
Videos werden geladen ...
Beiträge werden geladen ...
Videos werden geladen ...
SOCIAL SHARE CARD GENERATOR