cuda_dump_memory_snapshot: Save CUDA Memory State Snapshot to File

View source: R/cuda.R

cuda_dump_memory_snapshotR Documentation

Save CUDA Memory State Snapshot to File

Description

Calls cuda_memory_snapshot() and saves the resulting binary snapshot to a specified file using writeBin. The resulting file can be visualized using the interactive snapshot viewer available at pytorch.org/memory_viz.

Usage

cuda_dump_memory_snapshot(filepath)

Arguments

filepath

Character; the path to the file where the snapshot will be saved.

Value

None; snapshot is saved directly to the file.

Examples

if (torch_is_installed()) {
## Not run: 
cuda_dump_memory_snapshot("snapshot.bin")

## End(Not run)
}

torch documentation built on Aug. 21, 2025, 5:50 p.m.