Page 1 of 1

magmamic

Posted: Thu Mar 05, 2015 3:51 am
by dalal
Hi,

I am using magmamic to port a code to mic, I have few questions.
What is the benefit of having queue for each magmamic call ?
Is the streams only for copying data between cpu and mic ?
Also how to pipline the calls in my code, if I have two calls which are independent of each other, how to run them at the same time ?
I note for some calls, such as dtrsm, the cpu is doing nothing. I know that magma_dtrsm is calling mkl_dtrsm on mic, but I would like to run part of my code on the cpu while mic is busy with a call that run totally on mic.
What is the difference between magma_dtrsm and magma_dtrsmgemm ?
I read in magmamic presentation that the schedular can be static or dynamic using QUARK, how to set the sheduler?

Any help or answer for any of the questions is appreciated
Thanks

Re: magmamic

Posted: Thu Mar 05, 2015 6:14 pm
by mgates3
At the moment, the queues are for compatibility with the OpenCL and CUDA versions of MAGMA. Currently, we have only one execution queue. Therefore, it is not currently possible to do two simultaneous calls on the MIC using MAGMA.

All this may change in the future, as we improve our runtime and as Intel develops MIC features.

-mark

Re: magmamic

Posted: Sun Mar 08, 2015 8:50 am
by dalal
Thanks for reply.
What about the streams. Is the streams on mic equivalent to the streams on the GPU? What is equivalent to magmablasSetKernelStream(stream[igpu][1]) on mic ?
Thanks

Re: magmamic

Posted: Mon Mar 09, 2015 12:03 pm
by mgates3
Queues and streams are the same thing, just different names on different architectures. CUDA calls them streams. OpenCL calls them queues. MAGMA uses both terms interchangeably. No similar construct currently exists for the Xeon Phi.
-mark

Re: magmamic

Posted: Tue Mar 31, 2015 11:42 am
by dalal
Is there any function to copy data from mic to mic.
Thanks

Re: magmamic

Posted: Tue Mar 31, 2015 4:23 pm
by mgates3
No, there is no function to copy between two different MIC cards. There is a function magma_zcopy to copy within a single MIC.
-mark

Re: magmamic

Posted: Wed Apr 01, 2015 3:17 am
by dalal
Thanks for your answer.

How to make two mics run simultaneously ? Is the following loop will run on multiple mics or I need to add anything else ? Also if I uncomment magma_kernel_sync() in the for loop is this will affect on the execution on multiple mics ?

for(j = 0; j < num_mics; j++){
call_function; // call function on mic(j)
//magma_kernel_sync();
}

Appreciate your help
Thanks