Skip to main content

Module device

Module device 

Source
Expand description

Device management — cudaGetDeviceCount, cudaSetDevice, cudaGetDevice, cudaGetDeviceProperties, cudaDeviceSynchronize, cudaDeviceReset.

The CUDA Runtime maintains a per-thread current device. This module stores that state in a thread-local and exposes the standard Runtime API surface on top of the underlying driver API.

Structs§

CudaDeviceProp
Subset of cudaDeviceProp exposed by the Runtime API.

Functions§

device_reset
Explicitly destroys and cleans up all resources associated with the current device in the current process.
device_synchronize
Blocks until all preceding tasks in the current device’s context complete.
get_compute_capability
Returns the compute capability as a (major, minor) pair.
get_device
Returns the ordinal of the current CUDA device for the calling thread.
get_device_count
Returns the number of CUDA-capable devices.
get_device_properties
Returns properties of the specified device.
set_device
Selects device as the current CUDA device for the calling thread.