![]() |
MAGMA
2.7.1
Matrix Algebra for GPU and Multicore Architectures
|
Classes | |
struct | magma_queue |
Define magma_queue structure, which wraps around CUDA and OpenCL queues. More... | |
Macros | |
#define | magma_queue_create(device, queue_ptr) |
magma_queue_create( device, queue_ptr ) is the preferred alias to this function. More... | |
#define | magma_queue_create_from_cuda(device, cuda_stream, cublas_handle, cusparse_handle, queue_ptr) |
Warning: non-portable outside of CUDA. More... | |
#define | magma_queue_create_from_hip(device, hip_stream, hipblas_handle, hipsparse_handle, queue_ptr) |
Warning: non-portable outside of CUDA. More... | |
#define | magma_queue_destroy(queue) |
Destroys a queue, freeing its resources. More... | |
#define | magma_queue_sync(queue) |
Synchronizes with a queue. More... | |
Functions | |
size_t | magma_mem_size (magma_queue_t queue) |
magma_int_t | magma_queue_get_device (magma_queue_t queue) |
cudaStream_t | magma_queue_get_cuda_stream (magma_queue_t queue) |
cublasHandle_t | magma_queue_get_cublas_handle (magma_queue_t queue) |
cusparseHandle_t | magma_queue_get_cusparse_handle (magma_queue_t queue) |
magma_queue_create | ( | device, | |
queue_ptr | |||
) |
magma_queue_create( device, queue_ptr ) is the preferred alias to this function.
Creates a new MAGMA queue, with associated CUDA stream, cuBLAS handle, and cuSparse handle.
This is the MAGMA v2 version which takes a device ID.
[in] | device | Device to create queue on. |
[out] | queue_ptr | On output, the newly created queue. |
magma_queue_create_from_cuda | ( | device, | |
cuda_stream, | |||
cublas_handle, | |||
cusparse_handle, | |||
queue_ptr | |||
) |
Warning: non-portable outside of CUDA.
Use with discretion.
Creates a new MAGMA queue, using the given CUDA stream, cuBLAS handle, and cuSparse handle. The caller retains ownership of the given stream and handles, so must free them after destroying the queue; see magma_queue_destroy().
MAGMA sets the stream on the cuBLAS and cuSparse handles, and assumes it will not be changed while MAGMA is running.
[in] | device | Device to create queue on. |
[in] | cuda_stream | CUDA stream to use, even if NULL (the so-called default stream). |
[in] | cublas_handle | cuBLAS handle to use. If NULL, a new handle is created. |
[in] | cusparse_handle | cuSparse handle to use. If NULL, a new handle is created. |
[out] | queue_ptr | On output, the newly created queue. |
magma_queue_create_from_hip | ( | device, | |
hip_stream, | |||
hipblas_handle, | |||
hipsparse_handle, | |||
queue_ptr | |||
) |
Warning: non-portable outside of CUDA.
Use with discretion.
Creates a new MAGMA queue, using the given CUDA stream, cuBLAS handle, and cuSparse handle. The caller retains ownership of the given stream and handles, so must free them after destroying the queue; see magma_queue_destroy().
MAGMA sets the stream on the cuBLAS and cuSparse handles, and assumes it will not be changed while MAGMA is running.
[in] | device | Device to create queue on. |
[in] | cuda_stream | CUDA stream to use, even if NULL (the so-called default stream). |
[in] | cublas_handle | cuBLAS handle to use. If NULL, a new handle is created. |
[in] | cusparse_handle | cuSparse handle to use. If NULL, a new handle is created. |
[out] | queue_ptr | On output, the newly created queue. |
magma_queue_destroy | ( | queue | ) |
Destroys a queue, freeing its resources.
If the queue was created with magma_queue_create_from_cuda(), the CUDA stream, cuBLAS handle, and cuSparse handle given there are NOT freed – the caller retains ownership. However, if MAGMA allocated the handles, MAGMA will free them here.
[in] | queue | Queue to destroy. |
magma_queue_sync | ( | queue | ) |
Synchronizes with a queue.
The CPU blocks until all operations on the queue are finished.
[in] | queue | Queue to synchronize. |
size_t magma_mem_size | ( | magma_queue_t | queue | ) |
[in] | queue | Queue to query. |
magma_int_t magma_queue_get_device | ( | magma_queue_t | queue | ) |
[in] | queue | Queue to query. |
cudaStream_t magma_queue_get_cuda_stream | ( | magma_queue_t | queue | ) |
[in] | queue | Queue to query. |
cublasHandle_t magma_queue_get_cublas_handle | ( | magma_queue_t | queue | ) |
[in] | queue | Queue to query. |
cusparseHandle_t magma_queue_get_cusparse_handle | ( | magma_queue_t | queue | ) |
[in] | queue | Queue to query. |