KhronosGroup / OpenCL-Registry

OpenCL API and Extension Registry.
112 stars 42 forks source link

clEnqueueFillBuffer return error CL_INVALID_OPERATION (code -59) #73

Closed ddudenin closed 4 years ago

ddudenin commented 4 years ago

I am using version OpenCL 1.2

One particularly maddening thing that's been happening recently is clEnqueueFillBuffer returning CL_INVALID_OPERATION, which isn't even a valid error code.

Executable Code Listing:

cl::Device device = devices[device_id]; cl::Context context (device); cl::CommandQueue queue(context, device); ... size_t DataSize = m_Volume.GetDataCount() * sizeof(cl_ushort ); cl_int Res = 0; cl_ushort value = 0; tempBuff = clCreateBuffer(context(), CL_MEM_READ_WRITE, DataSize, NULL, &Res); Res= clEnqueueFillBuffer(queue(), tempBuff, &value , sizeof(cl_ushort ), 0, DataSize, 0, NULL, NULL);

bashbaug commented 4 years ago

Hi @ddudenin , this github repo contains OpenCL spec artifacts. Might I suggest filing this issue with the vendor providing your OpenCL implementation instead?

FWIW, I took a look at your example code listing and didn't see anything obviously wrong, and I agree CL_INVALID_OPERATION is not one of the standard error codes returned by clEnqueueFillBuffer.

ddudenin commented 4 years ago

@bashbaug The question was resolved, it turned out that NVIDIA has support for the functionality of OpenCL version 1.2+ only for video cards based on certain architectures (for example, Kepler, Maxwell, etc.). In my case, there is a video card based on the Fermi architecture, which does not have this support, so it gives an error CL_INVALID_OPERATION. Thank you for your assistance and success in the further development of your product.