MAGMA 2.9.0
Matrix Algebra for GPU and Multicore Architectures
Loading...
Searching...
No Matches
Device management

Functions

magma_int_t magma_getdevice_arch ()
 Returns CUDA architecture capability for the current device.
 
void magma_getdevices (magma_device_t *devices, magma_int_t size, magma_int_t *num_dev)
 Fills in devices array with the available devices.
 
void magma_getdevice (magma_device_t *device)
 Get the current device.
 
void magma_setdevice (magma_device_t device)
 Set the current device.
 
magma_int_t magma_getdevice_multiprocessor_count ()
 Returns the multiprocessor count for the current device.
 
magma_int_t magma_getdevice_num_threads_block ()
 Returns the maximum number of threads per block for the current device.
 
magma_int_t magma_getdevice_num_threads_multiprocessor ()
 Returns the maximum number of threads per multiprocessor for the current device.
 
size_t magma_getdevice_shmem_block ()
 Returns the maximum shared memory per block (in bytes) for the current device.
 
size_t magma_getdevice_shmem_block_optin ()
 Returns the maximum shared memory per block (in bytes) with a special opt-in for the current device.
 
size_t magma_getdevice_shmem_multiprocessor ()
 Returns the maximum shared memory multiprocessor (in bytes) for the current device.
 
void magma_device_sync ()
 

Detailed Description

Function Documentation

◆ magma_getdevice_arch()

magma_int_t magma_getdevice_arch ( )

Returns CUDA architecture capability for the current device.

This requires magma_init() to be called first to cache the information. Version is an integer xyz, where x is major, y is minor, and z is micro, the same as CUDA_ARCH. Thus for architecture 1.3.0 it returns 130.

Returns
CUDA_ARCH for the current device.

◆ magma_getdevices()

void magma_getdevices ( magma_device_t * devices,
magma_int_t size,
magma_int_t * num_dev )

Fills in devices array with the available devices.

(This makes much more sense in OpenCL than in CUDA.)

Parameters
[out]devicesArray of dimension (size). On output, devices[0, ..., num_dev-1] contain device IDs. Entries >= num_dev are not touched.
[in]sizeDimension of the array devices.
[out]num_devNumber of devices, limited to size.

◆ magma_getdevice()

void magma_getdevice ( magma_device_t * device)

Get the current device.

Parameters
[out]deviceOn output, device ID of the current device. Each thread has its own current device.

◆ magma_setdevice()

void magma_setdevice ( magma_device_t device)

Set the current device.

Parameters
[in]deviceDevice ID to set as the current device. Each thread has its own current device.

◆ magma_getdevice_multiprocessor_count()

magma_int_t magma_getdevice_multiprocessor_count ( )

Returns the multiprocessor count for the current device.

This requires magma_init() to be called first to cache the information.

Returns
the multiprocessor count for the current device.

◆ magma_getdevice_num_threads_block()

magma_int_t magma_getdevice_num_threads_block ( )

Returns the maximum number of threads per block for the current device.

This requires magma_init() to be called first to cache the information.

Returns
the maximum number of threads per block for the current device.

◆ magma_getdevice_num_threads_multiprocessor()

magma_int_t magma_getdevice_num_threads_multiprocessor ( )

Returns the maximum number of threads per multiprocessor for the current device.

This requires magma_init() to be called first to cache the information.

Returns
the maximum number of threads per multiprocessor for the current device.

◆ magma_getdevice_shmem_block()

size_t magma_getdevice_shmem_block ( )

Returns the maximum shared memory per block (in bytes) for the current device.

This requires magma_init() to be called first to cache the information.

Returns
the maximum shared memory per block (in bytes) for the current device.

◆ magma_getdevice_shmem_block_optin()

size_t magma_getdevice_shmem_block_optin ( )

Returns the maximum shared memory per block (in bytes) with a special opt-in for the current device.

This requires magma_init() to be called first to cache the information.

Returns
the maximum shared memory per block (in bytes) with a special opt-in for the current device.

◆ magma_getdevice_shmem_multiprocessor()

size_t magma_getdevice_shmem_multiprocessor ( )

Returns the maximum shared memory multiprocessor (in bytes) for the current device.

This requires magma_init() to be called first to cache the information.

Returns
the maximum shared memory per multiprocessor (in bytes) for the current device.

◆ magma_device_sync()

void magma_device_sync ( )
Deprecated
Synchronize the current device. This functionality does not exist in OpenCL, so it is deprecated for CUDA, too.