magma_queue with priorty

7 views
Skip to first unread message

aran nokan

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

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,
A.N.

Stanimire Tomov

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

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.

Stan
> --
> 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 magma-user+...@icl.utk.edu.
> To view this discussion on the web visit https://groups.google.com/a/icl.utk.edu/d/msgid/magma-user/CAKHt_Ya-ssY-tREjgT89fXpT%2B65muU7PJ4v%2BGwGQH5SU94jtTg%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages