OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1722 Discussions

Can't get default device queue after clRetain* and clRelease

Jakub_S_
Beginner
1,132 Views

Hi,

I can't get default device queue using clGetCommandQueueInfo(.., CL_QUEUE_DEVICE_DEFAULT, ..) if before that command I increase and decrease reference counter of that default device queue. I get CL_INVALID_VALUE error. I don't get any errors from clRetainCommandQueue() and clReleaseCommandQueue().

 clGetCommandQueueInfo(.., CL_QUEUE_DEVICE_DEFAULT, ..) works just fine if I don't change reference counter of the default device queue.

Test case in the attachment (just adjust intel platform index INTEL_PLATFORM_ID).

0 Kudos
4 Replies
Jakub_S_
Beginner
1,132 Views

Can anyone confirm that it is a bug? (I don't need a fix now) I haven't check the spec if there is some special case for device queues.

0 Kudos
Ben_A_Intel
Employee
1,132 Views

I think I've reproduced this issue.  Can you confirm that the behavior is limited to the CPU OpenCL device, and that you get no CL_INVALID_VALUE with the GPU OpenCL device?  Thanks!

0 Kudos
Jakub_S_
Beginner
1,132 Views

Ben Ashbaugh (Intel) wrote:

I think I've reproduced this issue.  Can you confirm that the behavior is limited to the CPU OpenCL device, and that you get no CL_INVALID_VALUE with the GPU OpenCL device?  Thanks!

Unfortunately, I can't confirm that, because my iGPU does not support OpenCL 2.1. Currently, I only have access to Experimental OpenCL 2.1 CPU Only Platform (Intel Core i5-6600K CPU), and, IIRC, I would need Intel Kaby Lake processor to run OpenCL 2.1 on the GPU OpenCL device.

I understand that you tested it on Kaby Lake processor (non-experimental Intel OpenCL 2.1 platform) and the bug does not occur on GPU, but it does on CPU, yes?

0 Kudos
Ben_A_Intel
Employee
1,132 Views

Jakub S. wrote:

I understand that you tested it on Kaby Lake processor (non-experimental Intel OpenCL 2.1 platform) and the bug does not occur on GPU, but it does on CPU, yes?

Yes, that is correct.

I will pass this information along to our CPU folks

Thanks for the excellent reproducer!

 

0 Kudos
Reply