Detect OpenCL 3.0 __opencl_c_subgroups in CLAccelerator and guard cl_khr_subgroups pragma

Đang mở
#312 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp
Lĩnh vực
backend

Hướng nghiên cứu

Start with src/opencl/cl_accelerator.cpp and inspect how CLAccelerator::set_device detects OpenCL C versions and subgroup support, keeping the stated OpenCL C++ 1.2 compatibility in mind. Then review the three named .cl files and their generated headers under src/opencl/generated/auto_*.hpp. Done means the OpenCL 3.0 subgroup feature is detected, the extension pragmas are guarded, and the named tests compile and pass on an OpenCL 3.0 device.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

task

Problem: CLAccelerator::set_device in src/opencl/cl_accelerator.cpp only checks CL_DEVICE_OPENCL_C_VERSION (>= 2.0) and cl_khr_subgroups in CL_DEVICE_EXTENSIONS, which fails on OpenCL 3.0 devices like Intel UHD Graphics (NEO) where CL_DEVICE_OPENCL_C_VERSION reports OpenCL C 1.2 and subgroups are exposed as the OpenCL 3.0 feature __opencl_c_subgroups (CL_DEVICE_OPENCL_C_ALL_VERSIONS / CL_DEVICE_OPENCL_C_FEATURES / CL_DEVICE_MAX_NUM_SUB_GROUPS), leaving SPLA_HAS_SUBGROUPS == 0 everywhere including tests. Update CLAccelerator::set_device (compatible with CL_HPP_TARGET_OPENCL_VERSION 120) to detect OpenCL 3.0 C support and __opencl_c_subgroups alongside the OpenCL 2.x cl_khr_subgroups check, guard #pragma OPENCL EXTENSION cl_khr_subgroups : enable with #ifdef cl_khr_subgroups in block_scan.cl, mxm_compute_spgemm_part.cl, and sort_and_combine_device.cl (regenerating src/opencl/generated/auto_*.hpp), and verify in tests/test_opencl_block_scan.cpp / test_opencl_sort_and_combine.cpp / test_opencl_compute_spgemm_part.cpp that SPLA_HAS_SUBGROUPS == 1 compiles and passes on OpenCL 3.0 devices.

Ngôn ngữ chính
C++
Star
37
Fork
21
Merge trung bình
11 giờ 3 phút
Pull request đã merge (30 ngày)
13

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của SparseLinearAlgebra/spla

Tất cả issue của SparseLinearAlgebra/spla

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.