pushCLDatas()

11 views
Skip to first unread message

rapatel

unread,
Jul 18, 2011, 7:43:21 PM7/18/11
to clpp
Hi,

I am trying to sort data that is already allocated on my device. I am
trying to use pushCLDatas instead of pushDatas to do this by directly
passing my device cl_mem object. Is this the correct way to approach
it? If it is, I am getting errors at runtime during the queuing of
radixLocal kernel call saying "Access violation writing location".

Also, is there any documentation on clpp I can refer to?

Thanks,
Ritesh

kr...@polarlights.net

unread,
Jul 19, 2011, 3:43:42 AM7/19/11
to cl...@googlegroups.com
Yes, it is the correct way but as you know it is still in beta.
I will try to fix it and let you know.

rapatel

unread,
Jul 19, 2011, 1:51:34 PM7/19/11
to clpp
Thanks for the info. However, I found that the issue was on my side. I
was creating two command queues and so my kernels/reads/writes from
device were totally out of synch. I am fairly new to OpenCL and have
been using CUDA so I'm not used to using the command queue feature.

Thanks,
Ritesh

rapatel

unread,
Jul 19, 2011, 1:53:45 PM7/19/11
to clpp
By the way, I fixed this issue by simply using the same command queue
as I am using for the CLPP library functions. I was trying to call a
kernel that I had written, and then run the radixSort from clpp.
However, since I had two separate command queues, my ordering was
wrong. Now, I am using the same cmd queue for both steps and this has
solved my issue.

Ritesh

rapatel

unread,
Jul 19, 2011, 6:09:58 PM7/19/11
to clpp
I noticed that for Scan, CLPP uses function overloading instead of
pushCLDatas() for pushing buffers that already exist on the device
side. However, in Radix Sort, pushCLDatas() is used. Any reason for
this?

Thanks,
Ritesh

kr...@polarlights.net

unread,
Jul 20, 2011, 1:41:42 AM7/20/11
to cl...@googlegroups.com
About which function overloading are you talking about (file+line) ?


Thanks

-----Original Message-----
From: "rapatel" <rite...@gmail.com>

kr...@polarlights.net

unread,
Jul 20, 2011, 2:00:03 AM7/20/11
to cl...@googlegroups.com
I've found ! Yes, you're right. It should be pushCLDatas :-)

Thanks

-----Original Message-----
From: "rapatel" <rite...@gmail.com>

Sent: Tuesday, July 19, 2011 6:09pm
To: "clpp" <cl...@googlegroups.com>
Subject: Re: pushCLDatas()

rapatel

unread,
Jul 20, 2011, 8:02:08 PM7/20/11
to clpp
Be cautious that there will be additional changes you'll have to make
to the code if you do not use functional overloading. For example in
the file 'clppSort_RadixSort.cpp' near line 154:

_scan->pushDatas(_clBuffer_radixHist1, 16 * numBlocks);

will need to become:

_scan->pushCLDatas(_clBuffer_radixHist1, 16 * numBlocks);

This is just one instance where a change will need to be made. Not
sure how many more there may be. I would recommend sticking with the
function overloading of pushDatas() and perhaps remove pushCLDatas()
from the library. What do you think?

Ritesh

kr...@polarlights.net

unread,
Jul 22, 2011, 3:30:45 AM7/22/11
to cl...@googlegroups.com
It is done, now the new method is 'pushCLDatas'. I will commit later.

Thanks Rapatel

-----Original Message-----
From: "rapatel" <rite...@gmail.com>

Reply all
Reply to author
Forward
0 new messages