array of pointers for batched gemms

23 views
Skip to first unread message

Joshua Finkelstein

unread,
Jun 13, 2022, 4:41:25 PMJun 13
to MAGMA User
Hi,

I am new to Magma and have been trying to play around with doing batched dgemm's. I am finding it difficult to work with arrays of pointers for using with the batched API. For example, if I want to create an array of n double pointers, double **dA_array, on the GPU, can this be allocated by calling magma_malloc((void**)dA_array, n*sizeof(double*))?

Thanks!

Josh

Mark Gates

unread,
Jun 13, 2022, 4:56:59 PMJun 13
to Joshua Finkelstein, MAGMA User
Almost. You seem to be missing & before dA_array. In your code, is n the batch count? Cf. MAGMA's batched testers such as:

testing_dposv_batched.cpp:            TESTING_CHECK( magma_malloc( (void**) &dA_array, batchCount * sizeof(double*) ));

Mark

Joshua Finkelstein

unread,
Jun 13, 2022, 5:54:04 PMJun 13
to MAGMA User, mga...@icl.utk.edu, MAGMA User, Joshua Finkelstein
Hi Mark,

Excellent! Yes, n was the batchCount. Thanks for pointing out this .cpp file. I didn't realize there was an examples folder since magma_root folder on the machine I am using (summit) doesn't show any. I should be able to get my example up and running now.
Reply all
Reply to author
Forward
0 new messages