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.
1718 Discussions

Are atomics supported or not?

peastman
Beginner
812 Views
I've just begun testing my code under Intel OpenCL, and I've found what appears to be a bug. If I queryCL_DEVICE_EXTENSIONS, it returns the following:

cl_khr_fp64 cl_khr_icd cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomicscl_khr_byte_addressable_store cl_intel_printf cl_ext_device_fission cl_intel_exec_by_local_thread cl_khr_gl_sharing cl_intel_dx9_media_sharing

Notice the third one listed:cl_khr_global_int32_base_atomics. But when I try to compile a kernel that uses that extension, it gives the following warning:

:9:61: warning: OpenCL extension 'cl_khr_global_int32_base_atomics' is not supported - ignoring

So is it really supported or not? This is on Windows 7, with an Ivy Bridge processor and using the CPU device.
Peter
0 Kudos
9 Replies
Brijender_B_Intel
812 Views

Hi,
which device are you checking for - CPU or HD4000?

Just curious, do you have a usecase to use global atomics? I have not seen many people using it.
thanks

0 Kudos
peastman
Beginner
812 Views
It's on the CPU. Yes, I use global atomics extensively.
Peter
0 Kudos
Raghupathi_M_Intel
812 Views
Hi Peter,

What driver version and SDK are you using. Using the latest SDK and driver (both internal)I couldnt reproduce the warning.

Thanks,
Raghu
0 Kudos
peastman
Beginner
812 Views
The graphics driver is 8.15.10.2696. The SDK version is 2.0.

Peter
0 Kudos
peastman
Beginner
812 Views
Do any Intel engineers read this forum? Is there a better place to ask questions?

Peter
0 Kudos
Raghupathi_M_Intel
812 Views
Sorry for the delay in responding. Our engineers were buried in other tasks.

I found out that we do support atomics but I am trying to find out why the warning is generated. Other than the warning do you see incorrect behavior using atomics?

Thanks,
Raghu
0 Kudos
peastman
Beginner
812 Views
Thanks. Aside from the warning, it appears to be working.

Peter
0 Kudos
Guy_B_Intel
Employee
812 Views

Hi Peter,
Sorry again for the delay.
This atomic extension became a core feature since OpenCL 1.1, and that's why you do not need to use the extension pragma on our product, whichcomplies with theOpenCL 1.1 specification.

Thanks,
Guy Benyei

0 Kudos
EvgeniyPeshkov
New Contributor I
812 Views
HiGuy,
Sorry, but in my opinion it doesn't solve the problem with generated warnings. According to OpenCL 1.1 specification this atomic extensions must be supported by all devices that support OpenCL 1.1 C to provide backwardscompatibility. In other case you can not use programs written in OpenCL 1.0 C using extentions that became a core features in later versions of OpenCL. So it'sdeviation from standard.
By the way enablingcl_intel_printf extension causes warning too. See this thread for more informationhttp://software.intel.com/en-us/forums/showthread.php?t=106028
0 Kudos
Reply