Quantcast
Channel: AMD Developer Forums: Message List
Viewing all articles
Browse latest Browse all 4104

Re: OpenCL Maximum Buffer Size of Kernel Argument

$
0
0

himanshu.gautam wrote:

 

Kernel arguments cannot have a limit on the size of buffer. If buffer is allocated properly, kernel should run.

What is the meaning of "Max memory allocation" reported by clinfo then? I had thought that was the max buffer size. It's 512MB (536870912 bytes) for the Tahiti and FX6300 I'm running. That would fit with Stuart's point that 655 MB fails but 330MB runs.  Just noticed that Stuart posted the code. Looking at the buffer allocation:

 

cl_mem outputBuffer = clCreateBuffer(context, CL_MEM_WRITE_ONLY , (NO*NF) * sizeof(double), NULL, NULL);

 

That last argument could rather be address of error code, which one might want to examine to detect if the allocation fails.


Viewing all articles
Browse latest Browse all 4104