OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
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.
1687 Discussions

too big max_constant_buffer_size on Intel HD Graphics



We use OpenCL in our applications ( via pyopencl. I am trying to figure out where originates the segmentation fault that I am getting on Intel HD Graphics 620 but not on the other two devices in my list. By looking at device.max_constant_buffer_size I get:

- 64 KB on GeForce 940MX
2097152 KB (!) on Intel(R) HD Graphics 620
- 128 KB on Intel(R) Core(TM) i7-7500U CPU

Notice the 2nd value is so much different from the other two. Can you please confirm this value is correct. I first asked at pyopencl, they confirm that this value is merely passed by pyopencl and not created there.


For reference: OpenCL Platforms and Devices
Platform - Name:  NVIDIA CUDA
Platform - Vendor:  NVIDIA Corporation
Platform - Version:  OpenCL 1.2 CUDA 9.1.104
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
Platform - Profile:  FULL_PROFILE
    Device - Name:  GeForce 940MX
    Device - Vendor:  NVIDIA Corporation
    Device - Type:  GPU
    Device - Max Clock Speed:  1241 Mhz
    Device - Compute Units:  3
    Device - Local Memory:  48 KB
    Device - Constant Memory:  64 KB
    Device - Global Memory: 2 GB
    Device - FP:  63
Platform - Name:  Intel(R) OpenCL
Platform - Vendor:  Intel(R) Corporation
Platform - Version:  OpenCL 2.1 
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
Platform - Profile:  FULL_PROFILE
    Device - Name:  Intel(R) HD Graphics 620
    Device - Vendor:  Intel(R) Corporation
    Device - Type:  GPU
    Device - Max Clock Speed:  1050 Mhz
    Device - Compute Units:  24
    Device - Local Memory:  64 KB
    Device - Constant Memory:  2097152 KB
    Device - Global Memory: 6 GB
    Device - FP:  63
    Device - Name:  Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
    Device - Vendor:  Intel(R) Corporation
    Device - Type:  CPU
    Device - Max Clock Speed:  2700 Mhz
    Device - Compute Units:  4
    Device - Local Memory:  32 KB
    Device - Constant Memory:  128 KB
    Device - Global Memory: 16 GB
    Device - FP:  63
0 Kudos
2 Replies

This value is expected.

It is upper limit for kernel arguments declared with  __constant qualifier.

This is done to allow big buffers to be passed as __constant kernel arguments, they will be treated as read only surfaces.



Why this is device specific and not platform specific? In other words, why isn't true for CPU?