magma_queue with priorty

Skip to first unread message

aran nokan

Aug 1, 2021, 1:47:18 PM8/1/21
to MAGMA User

I am seeing that cuda is supporting streams with priority, but in MAGMA documentation I am not seeing anything. Is it possible to have a MAGMA queue with priority here or is it possible to create a stream with priority by CUDA and convert it into a magma queue structure?

Best regards,

Stanimire Tomov

Aug 1, 2021, 2:38:22 PM8/1/21
to aran nokan, MAGMA User

MAGMA indeed is not using streams with priorities - because there has been no need
so far internally for the magma algorithms (and users have not required it yet).

The magma queue is a structure that holds a few things, including a cuda stream
that gets created when you call magma_queue_create. You can get the stream
through this function:

cudaStream_t magma_queue_get_cuda_stream( magma_queue_t queue );

and set priority to it. This should be OK with the magma functionality and it will work
if CUDA gives you this interface to change the stream priority after creation.

If CUDA only allows setting priority during stream creation, you can create a stream
the way you like and use it to initialize the magma queue through
magma_queue_create_from_cuda( device, cuda_stream, cublas_handle, cusparse_handle, queue_ptr )
so in this case you would need the cuda stream, cublas handle, and cusparse handle.

> --
> You received this message because you are subscribed to the Google Groups "MAGMA User" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> To view this discussion on the web visit

Reply all
Reply to author
0 new messages