How to create a queue for the batched routines

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
Post Reply
manic
Posts: 1
Joined: Thu Apr 21, 2016 12:11 am

How to create a queue for the batched routines

Post by manic » Thu Apr 21, 2016 12:15 am

Hi,

It appears that the batch routines such as magma_dgesv_batched require an argument which routines such as magma_dgesv dont, which is of the type:

magma_queue_t queue

How do I create this queue?

Thanks,
Mani

mgates3
Posts: 918
Joined: Fri Jan 06, 2012 2:13 pm

Re: How to create a queue for the batched routines

Post by mgates3 » Thu Apr 21, 2016 2:57 pm

Use:

Code: Select all

    #include <magma_v2.h>

    int device = 0;  // CUDA device ID
    magma_queue_t queue;
    magma_queue_create( device, &queue );
Or, in the older v1 interface,

Code: Select all

    #include <magma.h>

    int device = 0;  // CUDA device ID
    magma_queue_t queue;
    magma_setdevice( device );
    magma_queue_create( &queue );

Post Reply