cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

spectral
Adept II

buffer allocation problem

Hi,

I try to allocate a "local" buffer for a kernel (on the CPU), its size is 1024 bytes.

My buffer is the "temp" buffer. When I set the kernel argument I receive an error code (-50) which mean "Invalid argument value". Does someone has an idea ?

If I use "__global" I have no error !!! It works on a poor graphic card (from another company than ATI). So, I'm surprise to receive this error on the CPU !

__kernel void kernel__ExclusivePrefixScan(..., __local T* temp, ...)

0 Likes
4 Replies
himanshu_gautam
Grandmaster

Are you getting error in clSetKernelArg? Do you pass any data pointer in it?

 

0 Likes
nou
Exemplar

how do you set a argument? you should pass NULL as value to clSetKernelArg()

0 Likes

Yes,

I do this : 

clStatus  = clSetKernelArg(_kernel_Scan, 2, _workgroupSize * 2 * sizeof(int), 0);

 

The project is here : http://code.google.com/p/clpp/

It is for the "scan" primitive !

0 Likes

Are you able to allocate this memory on GPU. Have you tried to use some different size, maybe smaller that 1024 bytes.

Also provide the system details: CPU,GPU,SDK,Catalyst, OS.

0 Likes