Miguel
Miguel

Reputation: 44

Opencl kernel + ClMagma arrays

I'm little newbie whit OpenCl and i wanna try the following, using ClMagma and opencl kernel:

cl_mem A_k, B_k;
magma_malloc(&A_k, col*row*sizeof(double));
magma_malloc(&B_k, col*row*sizeof(double));

magma_dgemm(MagmaNoTrans, MagmaTrans, row, row, col, alpha, A_k, size, row, A_k, size, row, beta, B_k, size, row, queue);

And them i want use A_k and B_k inside a OpenCl kernel, but if i use something like:

status = clSetKernelArg(k_test, 0, sizeof(cl_mem), &A_k);

I receive a "CL_INVALID_MEM_OBJECT" so how i can use A_k array inside OpenCl kernel whitout moving it to Host and then to Device again (making new array with clCreateBuffer).

Alredy tried "clEnqueueCopyBuffer" and didn't work

Any help will be much apreciated, Thx!

Upvotes: 0

Views: 120

Answers (1)

Miguel
Miguel

Reputation: 44

In case any with same problem as me, you can find the answer here: http://icl.cs.utk.edu/magma/forum/viewtopic.php?f=2&t=1351&sid=fa4fe6ef9bbed60604251583dc936d50

(if any mod see this, you can close this thread, thx)

Upvotes: 0

Related Questions