cuda_record_memory_history | R Documentation |
Enables recording of stack traces associated with memory allocations, allowing users to identify the source of memory allocation in CUDA snapshots.
cuda_record_memory_history(
enabled,
context = "all",
stacks = "all",
max_entries = 1
)
enabled |
Character or
|
context |
Character or
|
stacks |
Character. Defines the stack trace frames to include. Options:
|
max_entries |
Integer. The maximum number of allocation/free events to retain. |
Alongside tracking stack traces for each current allocation and free event, this function can also keep a historical log of all allocation and free events.
Use cuda_memory_snapshot()
to retrieve recorded information. Visualization
can be performed using pytorch.org/memory_viz.
None; function invoked for side effects.
if (torch_is_installed()) {
## Not run:
cuda_record_memory_history(enabled = 'all', context = 'all', stacks = 'all', max_entries = 10000)
## End(Not run)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.