- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
#include <iostream> #define CL_TARGET_OPENCL_VERSION 220 #include <CL/cl.h> int main(int argc, char* argv[]) { cl_platform_id platform; clGetPlatformIDs(1, &platform, nullptr); cl_device_id devices[2]; clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, 1, &devices[0], nullptr); clGetDeviceIDs(platform, CL_DEVICE_TYPE_CPU, 1, &devices[1], nullptr); auto context = clCreateContext(nullptr, 2, devices, nullptr, nullptr, nullptr); auto pipe = clCreatePipe(context, 0, sizeof(float), 256, nullptr, nullptr); }
This code segfaults for some reason.
Also I have 2 intel platforms for some reason.
Platform count = 3 ++++++++++++++++++platform+++++++++++++++++++ PLATFORM_NAME = Intel(R) OpenCL PLATFORM_PROFILE = FULL_PROFILE PLATFORM_VERSION = OpenCL 2.1 PLATFORM_VENDOR = Intel(R) Corporation PLATFORM_EXTENSIONS = cl_intel_dx9_media_sharing cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_d3d11_sharing cl_khr_depth_images cl_khr_dx9_media_sharing cl_khr_fp64 cl_khr_gl_sharing cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_icd cl_khr_image2d_from_buffer cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_spir Device count = 2 =============device============= DEVICE TYPE = CL_DEVICE_TYPE_GPU MAX_GROUP_SIZE = 256 LOCAL_MEM_SIZE = 65536 MAX_COMPUTE_UNITS = 24 MAX_WORK_ITEM_DIMENSIONS = 3 dim[0] = 256 dim[1] = 256 dim[2] = 256 =============device============= DEVICE TYPE = CL_DEVICE_TYPE_CPU MAX_GROUP_SIZE = 8192 LOCAL_MEM_SIZE = 32768 MAX_COMPUTE_UNITS = 8 MAX_WORK_ITEM_DIMENSIONS = 3 dim[0] = 8192 dim[1] = 8192 dim[2] = 8192 ++++++++++++++++++platform+++++++++++++++++++ PLATFORM_NAME = Intel(R) OpenCL PLATFORM_PROFILE = FULL_PROFILE PLATFORM_VERSION = OpenCL 2.1 PLATFORM_VENDOR = Intel(R) Corporation PLATFORM_EXTENSIONS = cl_intel_dx9_media_sharing cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_d3d11_sharing cl_khr_depth_images cl_khr_dx9_media_sharing cl_khr_fp64 cl_khr_gl_sharing cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_icd cl_khr_image2d_from_buffer cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_spir Device count = 2 =============device============= DEVICE TYPE = CL_DEVICE_TYPE_GPU MAX_GROUP_SIZE = 256 LOCAL_MEM_SIZE = 65536 MAX_COMPUTE_UNITS = 24 MAX_WORK_ITEM_DIMENSIONS = 3 dim[0] = 256 dim[1] = 256 dim[2] = 256 =============device============= DEVICE TYPE = CL_DEVICE_TYPE_CPU MAX_GROUP_SIZE = 8192 LOCAL_MEM_SIZE = 32768 MAX_COMPUTE_UNITS = 8 MAX_WORK_ITEM_DIMENSIONS = 3 dim[0] = 8192 dim[1] = 8192 dim[2] = 8192 ++++++++++++++++++platform+++++++++++++++++++ PLATFORM_NAME = NVIDIA CUDA PLATFORM_PROFILE = FULL_PROFILE PLATFORM_VERSION = OpenCL 1.2 CUDA 10.0.150 PLATFORM_VENDOR = NVIDIA Corporation PLATFORM_EXTENSIONS = cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_d3d10_sharing cl_khr_d3d10_sharing cl_nv_d3d11_sharing cl_nv_copy_opts cl_nv_create_buffer Device count = 1 =============device============= DEVICE TYPE = CL_DEVICE_TYPE_GPU MAX_GROUP_SIZE = 1024 LOCAL_MEM_SIZE = 49152 MAX_COMPUTE_UNITS = 4 MAX_WORK_ITEM_DIMENSIONS = 3 dim[0] = 1024 dim[1] = 1024 dim[2] = 64
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi IgorS,
Thanks for the write up.
The two Intel platforms detected are for the production and the experimental runtimes respectively. The experimental runtime is meant only for development purposes. The Intel(R) OpenCL platform is the production platform, under which CPU and Intel Graphics devices are accessible. The production platform on Windows has both implementations available as part of the graphics driver.
I ran the above example on a i5-6300U Windows system and didn't observe any issues.
Edit: system was run with preNEO branch driver... see followup post (20181008)
Curious what Intel processor you're running on? Can you share the model? What version of Intel Graphics Driver are you on?
Do you know from where you've obtained your OpenCL.dll? Did you try using the one in the icd folder of the SDK hierarchy? Can you share the other OpenCL capable devices in the system?
Are you sure the example isn't picking up a device that isn't Pipe capable (OCL 2.0)? Your enumeration ordering could be different.
-MichaelC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Michael. Thank you for your answer.
The processor is Intel® Core™ i7-7820HQ CPU @ 2.90GHz.
I have latest intel graphics driver - Intel® HD Graphics 630 - 24.20.100.6286
Speaking about opencl.dll. I've tied different ones because original one from system32 was missing functions clCreateProgramWithIL and clEnqueueSVMMigrateMem(probably after nvidia update). I tried opencl.dll from intel sdk(opencl 2.1) and built it myself from khronos repository(opencl 2.2) - no difference.
Yes, I have other opencl device - nvidia gforce 940 mx, you can see it as "OpenCL 1.2 CUDA 10.0.150" in my log.
Yes, I'm sure i'm running on intel opencl 2.1. I'm printing devices. The first one is "OpenCL 2.1 NEO" and the second is "OpenCL 2.1 (Build 716)".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi IgorS,
Aside from triple checking the opencl dll search order I don't see any obvious discrepancies. Is it possible to try a reinstall of OCL enabling components including Intel graphics driver...
Do you observe the issue with using one device for the context?
what does the vendors area look like on this system:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors
Someone with a similar system configuration may be able to identify something there.
-MichaelC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors
C:\windows\System32\DriverStore\FileRepository\igdlh64.inf_amd64_2f24486b42920c1d\IntelOpenCL64.dll
C:\windows\system32\nvopencl.dll
IntelOpenCLProfiler.dll
If i use one device then no segfault but it;' pretty much useless.
Is it possible to get debug symbols for intel opencl?
I debugged opencl.dll and segfault happens during call "context->dispatch->clCreatePipe" which is part of IntelOpenCL64.dll.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi IgorS,
- It's not currently possible to distribute symbols.
- I'll file a sighting for the devs to take a look at a kaby lake system like yours to see if there's any risk to such platforms.
- Thanks for adding the stack trace.
- Is there any particular reason the src uses the CL_TARGET_OPENCL_VERSION 220 ?
Internal filing number id:1407941343
-MichaelC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, Michael.
CL_TARGET_OPENCL_VERSION doesn't matter, It can be 200 too.
I also tried older drivers - "24.20.100.6094", "24.20.100.6025" - same segfault.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi IgorS,
Thanks again for the write up and example.
Update for a previous post... Reproductions were observed on 24.20.100.6286 on ntel® Core™ i7-6770HQ for clCreatePipe with the shared context.
- Sharing CPU and GFX context is not recommended and is not currently anticipated as a feature that will be built into upcoming CPU and GFX distributions.
- Using clCreatePipe on Intel® Graphics Technology is also not currently recommended.
These features were observed to be more functional on previous OpenCL™ implementations prior to the 'NEO' branch designation. Please see Device Version from clGetDeviceInfo to confirm such a platform. Ex: Intel® Core™ i7-6770HQ Device Version reports 'OpenCL 2.1 NEO'
Via downloadcenter.intel.com... currently the only Intel® Graphics Technology driver for Windows* OS that is branched to 'NEO' are the 24.20.100.xxxx branches.
Internal filing number id:1407941343
-MichaelC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks MICHAEL.
The only problem is segfault and confusion. When i see opencl 2.0 I suppose it has pipe functionality.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi IgorS,
Thanks for the constructive criticism. I'll get in touch with the right folks to reduce api confusion.
Comments for other thread observers:
- OpenCL™ implementations for specific devices may be independently designed, from different vendors etc.. In general, attempting to create a shared context between different device types in some cases may have unintended expectations... Particularly amongst shared contexts for devices from multiple vendors.
- Pipes are not encouraged for better performance Intel® Graphics Technology.
- Pipe functionality is available for OpenCL™ 2.0 contexts for devices exposed by the NEO implementation and use on Intel® Graphics Technology.
- Details:
- Look for NEO string in the device version flag from clGetDeviceInfo(...)... :
- 24.20.100.xxxx or 25.xx.xxx.xxxx Windows* OS driver based OpenCL™ deployments from downloadcenter.intel.com)
- Intel® Graphics Compute Runtime for OpenCL™ Driver Windows* OS (NEO)
- Intel® Graphics Compute Runtime for OpenCL™ Driver Linux* OS (NEO)
- Pre-NEO implementations:
- SRB5.0 linux
- Graphics Driver Packages after the 15.33 branch but before 24.20.xxx.xxxx & 25.20.xx.xxxx on downloadcenter.intel.com
- 24.20.100.xxxx or 25.xx.xxx.xxxx Windows* OS driver based OpenCL™ deployments from downloadcenter.intel.com)
- Look for NEO string in the device version flag from clGetDeviceInfo(...)... :
- For updates on these types of issues, follow the releases page on the NEO githhub. They have the latest feature announcements.
- Also take a look at the release notes for Intel® CPU Runtime for OpenCL™ Applications 18.1.
-MichaelC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Internal filing number id:1407941343 has been updated.
-MichaelC
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page