Copy
tensorplay.cuda
torch.cuda
Context-manager that selects a given stream. |
|
Check if peer access between two devices is possible. |
|
Raise an error if the result of a CUDA runtime API call is not success. |
|
Return cublasHandle_t pointer to current cuBLAS handle |
|
Return cusolverDnHandle_t pointer to current cuSOLVER handle |
|
Return the index of a currently selected device. |
|
Return the currently selected |
|
Retrieves the CUDA runtime API module. |
|
Return the default |
|
Context-manager that changes the selected device. |
|
Return the number of GPUs available. |
|
Return used global (device) memory in bytes as given by nvidia-smi. |
|
Context-manager that changes the current device to that of given object. |
|
Return list CUDA architectures this library was compiled for. |
|
Get the cuda capability of a device. |
|
Get the name of a device. |
|
Get the properties of a device. |
|
Return NVCC gencode flags this library was compiled with. |
|
Return a |
|
Return current value of debug mode for cuda synchronizing operations. |
|
Initialize TensorPlay's CUDA state. |
|
Force collects GPU memory after it has been released by CUDA IPC. |
|
Return a bool indicating if CUDA is currently available. |
|
Return a bool indicating if the current CUDA device supports dtype bfloat16. |
|
Return whether TensorPlay's CUDA state has been initialized. |
|
Return a bool indicating if the current CUDA device supports dtype tf32. |
|
Return the percent of time over the past sample period during which global (device) memory was being read or written as given by nvidia-smi. |
|
Set the current device. |
|
Set the current stream. This is a wrapper API to set the stream. |
|
Set the debug mode for cuda synchronizing operations. |
|
Wrap around the Context-manager StreamContext that selects a given stream. |
|
Wait for all kernels in all streams on a CUDA device to complete. |
|
Return the percent of time over the past sample period during which one or more kernels was executing on the GPU as given by nvidia-smi. |
|
Return the average temperature of the GPU sensor in Degrees C (Centigrades). |
|
Return the average power draw of the GPU sensor in mW (MilliWatts) over the past sample period as given by nvidia-smi for Fermi or newer fully supported devices. |
|
Return the clock speed of the GPU SM in MHz (megahertz) over the past sample period as given by nvidia-smi. |
|
Random Number Generator
Return the random number generator state of the specified GPU as a ByteTensor. |
|
Return a list of ByteTensor representing the random number states of all devices. |
|
Set the random number generator state of the specified GPU. |
|
Set the random number generator state of all devices. |
|
Set the seed for generating random numbers for the current GPU. |
|
Set the seed for generating random numbers on all GPUs. |
|
Set the seed for generating random numbers to a random number for the current GPU. |
|
Set the seed for generating random numbers to a random number on all GPUs. |
|
Return the current random seed of the current GPU. |
Streams and events
Wrapper around a CUDA stream. |
|
Wrapper around an externally allocated CUDA stream. |
|
Wrapper around a CUDA event. |
Graphs (beta)
Return True if CUDA graph capture is underway on the current thread. |
|
Return an opaque token representing the id of a graph memory pool. |
|
Wrapper around a CUDA graph, mirroring |
|
Context-manager that captures CUDA work into a |
|
Callables that run per-iteration with CUDA graph capture (not supported). |
|
Export the last captured CUDA graph to a DOT file. |
|
Serialize a captured CUDA graph into a dictionary of node data. |
Graph Kernel Annotations (prototype)
Whether graph-kernel annotation recording is supported (always |
|
Tag the GPU work captured within its scope with user metadata. |
|
Return the recorded kernel annotations mapping. |
|
Clear all recorded kernel annotations. |
Memory management
Context manager that temporarily disables the CUDA caching allocator. |
|
Enable or disable the CUDA memory allocator. |
|
Route allocations to a MemPool (not supported by this build). |
|
Returns the version of the NCCL. |
|
Enable profiling. |
|
Starts cuda profiler data collection. |
|
Stops cuda profiler data collection. |
NVIDIA Tools Extension (NVTX)
Describe an instantaneous event that occurred at some point. |
|
Push a range onto a stack of nested range span. |
|
Pop a range off of a stack of nested range spans. |
|
Context manager / decorator that pushes an NVTX range at the beginning of its scope, and pops it at the end. |
|
Mark the end of a range for a given range_id. |
|
Mark the start of a range with string message. |
GPUDirect Storage (prototype)
A GDS file handle (not supported by this TensorPlay build). |
Green Contexts (experimental)
TensorPlay-specific additions
CUDA memory allocator plugin (not supported by this TensorPlay build). |
|
MemPool context (not supported by this TensorPlay build). |
|
Perform a memory allocation using the CUDA memory allocator. |
|
Delete memory allocated using the CUDA memory allocator. |
|
Change the currently used memory allocator (not supported by this build). |
|
Release all unoccupied cached memory currently held by the caching allocator so that those can be used in other GPU application and visible in nvidia-smi. |
|
Returns the active allocator backend as a string. |
|
Get memory fraction for a process. |
|
Return a dictionary of pinned (host) allocator statistics. |
|
Return the result of |
|
Return whether GDS is available. |
|
Return a human-readable printout of the running processes and their GPU memory use for a given device. |
|
Return the maximum GPU memory occupied by tensors in bytes for a given device. |
|
Deprecated; see |
|
Return the maximum GPU memory managed by the caching allocator in bytes for a given device. |
|
Return the global free and total GPU memory for a given device using cudaMemGetInfo. |
|
Return the current GPU memory occupied by tensors in bytes for a given device. |
|
Deprecated; see |
|
Return the current GPU memory managed by the caching allocator in bytes for a given device. |
|
Return a snapshot of the CUDA memory allocator state across all devices. |
|
Return a dictionary of CUDA memory allocator statistics for a given device. |
|
Return the result of |
|
Return a human-readable printout of the current memory allocator statistics for a given device. |
|
Reset the "accumulated" (historical) stats tracked by the host memory allocator. |
|
Reset the "accumulated" (historical) stats tracked by the CUDA memory allocator. |
|
Reset the starting point in tracking maximum GPU memory occupied by tensors for a given device. |
|
Reset the starting point in tracking maximum GPU memory managed by the caching allocator for a given device. |
|
Reset the "peak" stats tracked by the host memory allocator. |
|
Reset the "peak" stats tracked by the CUDA memory allocator. |
|
Set memory fraction for a process. |
Help improve this page
Found an error, an unclear step, or a missing example?
