Detect OpenCL 3.0 __opencl_c_subgroups in CLAccelerator and guard cl_khr_subgroups pragma

Offen
#312 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
cpp
Bereich
backend

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
C++
Sterne
37
Forks
21
Ø Merge
11 Std. 3 Min.
Gemergte PRs (30 T.)
13

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus SparseLinearAlgebra/spla

Alle Issues in SparseLinearAlgebra/spla

Ähnliche Issues

Weitere Issues zu C++

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.