Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor OpenCL integration using maintained OpenCL C++ interface #60

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jcfr
Copy link
Contributor

@jcfr jcfr commented Dec 1, 2022

  • Add OpenCL-(CLHPP|Headers|ICD-Loader} external projects
  • Refactor Autoscoper OpenCL classes to use cl::* object

References

Notes:

  • on macOS, we will likely have to integrate OpenCL-SDK likely because (?) the system OpenCL header available on macOS only support an older OpenCL version.

@jcfr jcfr marked this pull request as draft December 1, 2022 15:41
CL_TARGET_OPENCL_VERSION=${Autoscoper_CL_TARGET_OPENCL_VERSION}
CL_HPP_TARGET_OPENCL_VERSION=${Autoscoper_CL_TARGET_OPENCL_VERSION}
CL_HPP_MINIMUM_OPENCL_VERSION=${Autoscoper_CL_TARGET_OPENCL_VERSION}
CL_HPP_ENABLE_EXCEPTIONS
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They may want to disable this and only rely on error checking (at least while we are refactoring the Autoscoper API)

@NicerNewerCar
Copy link
Contributor

NicerNewerCar commented Jan 4, 2023

Currently the C++ conversion is crashing at OpenCL.cppL741 (upon creation of the context) with the error -32 - CL_INVALID_PLATFORM

Here is a quick comparison of the same platform from the C/C++ APIs:

Field C C++
Name NVIDIA RTX A2000 Laptop GPU NVIDIA RTX A2000 Laptop GPU
Type GPU GPU
Compute Cores 20 20
Core Freq. 1824 Mhz 1824 Mhz
Vendor NVIDIA Corporation NIVIDIA Corporation
Vendor ID 4318 4318
Version OpenCL 3.0 CUDA OpenCL 3.0 CUDA
Driver Version 527.27 527.27
Available Yes Yes
Max Items (1024,1024,64) (1024,1024,64)
Max Group 1024 1024
Max Constant 65536 kB 65536 kB
Max Constants 9 9
Local Mem 48 kB 48 kB
Global Mem 65536 kB 65536 kB
Global Cache 573440 B 573440 B
Image Support 1 1
Max 2D Image (32768,32768) (1024,1024)
Max 3D Image (16384,16384,16384) (1024,1024,64)
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_3d_image_writes 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_khr_gl_event cl_nv_create_buffer cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_nv_kernel_attribute cl_khr_device_uuid cl_khr_pci_bus_info cl_khr_external_semaphore cl_khr_external_memory cl_khr_external_semaphore_win32 cl_khr_external_memory_win32 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_3d_image_writes 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_khr_gl_event cl_nv_create_buffer cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_nv_kernel_attribute cl_khr_device_uuid cl_khr_pci_bus_info cl_khr_external_semaphore cl_khr_external_memory cl_khr_external_semaphore_win32 cl_khr_external_memory_win32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants