Repository navigation
Drop compiler version checks dead with the 2026.0 minimum - #2415
antonwolfy wants to merge 2 commits into
Conversation
DPC++ 2026.0 is now the minimum compiler, so: - DPCTLDevice__GetMaxWorkItemSizes always uses info::device::max_work_item_sizes<dim>. The __SYCL_COMPILER_MAX_WORK_ITEM_SIZE_THRESHOLD macro it checked was defined nowhere, so the #else branch was dead code. - The SUPPORTS_SYCL_COMPILATION check for 2025.1 and the fallback to registered_kernel_names (renamed to registered_names in 2025.2) are removed. DPCTLKernelBundle_CreateFromSYCLSource_Available() stays in the C-API and returns true. The FIXME in check_max_clock_frequency to assert freq > 0 after 2024.1 is replaced with the actual reason: the OpenCL CPU device still reports 0 under WSL with runtime 2026.22.
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the obsolete compiler-compatibility cleanup.
No open issues 🎉
What changed in this PR
Removes obsolete compiler compatibility branches now that dpctl requires DPC++ 2026.0, while preserving the existing C API.
Changes:
- Removes legacy SYCL source-compilation guards and uses
registered_namesdirectly. - Uses the dimension-specific
max_work_item_sizes<dim>query unconditionally. - Clarifies why the clock-frequency test permits zero and records the cleanup in the changelog.
| File | Description |
|---|---|
libsyclinterface/source/dpctl_sycl_kernel_bundle_interface.cpp |
Removes older-compiler fallbacks; retains the availability API returning true. |
libsyclinterface/source/dpctl_sycl_device_interface.cpp |
Removes the obsolete work-item-size query branch. |
dpctl/tests/_device_attributes_checks.py |
Updates the explanatory comment without changing the assertion. |
CHANGELOG.md |
Documents removal of obsolete compiler checks. |
Review effort: Balanced
|
View rendered docs @ https://intelpython.github.io/dpctl/pulls/2415/index.html |
| new_type_if_defined<syclex::registered_names, | ||
| syclex::registered_kernel_names>::type; | ||
| #endif | ||
| bool DPCTLKernelBundle_CreateFromSYCLSource_Available() { return true; } |
There was a problem hiding this comment.
For the sake of AdaptiveCpp builds, we will need to keep some conditions in here gating from extensions polluting the build unguarded.
May be fine to make that work in the AdaptiveCpp build PR though
| # The value may be 0, e.g. the OpenCL CPU device (runtime 2026.22) reports | ||
| # 0 under WSL, where /sys/devices/system/cpu/*/cpufreq is not available |
There was a problem hiding this comment.
This comment pins the zero value on a specific runtime version and WSL, which will go stale and is unrelated to dropping compiler checks. Maybe just say the value may be 0 on some devices, e.g. when the CPU frequency is not exposed by the OS
DPC++ 2026.0 is the minimum compiler (
__SYCL_COMPILER_VERSION_REQUIRED 20260331,find_package(IntelSyclCompiler 2026.0.0 REQUIRED)), so a few version checks for older compilers are dead code.This PR:
__SYCL_COMPILER_MAX_WORK_ITEM_SIZE_THRESHOLDcheck inDPCTLDevice__GetMaxWorkItemSizes(dpctl_sycl_device_interface.cpp). The macro is defined nowhere, so the#ifwas always true and theinfo::device::max_work_item_sizesbranch without<dim>was never compiled.SUPPORTS_SYCL_COMPILATION(SYCL source compilation from 2025.1 on) and theregistered_kernel_namesfallback for the 2025.1 to 2025.2 rename toregistered_namesindpctl_sycl_kernel_bundle_interface.cpp.DPCTLKernelBundle_CreateFromSYCLSource_Available()stays in the C-API and now just returnstrue, sodpctl.compiler.is_sycl_source_compilation_available()works as before.check_max_clock_frequency(_device_attributes_checks.py), which asked to switch tofreq > 0after 2024.1. That change isn't possible: with OpenCL CPU runtime 2026.22 under WSL,max_clock_frequencyis still 0, and 12 tests fail withfreq > 0. The assert staysfreq >= 0, and the comment now gives the real reason.The workaround for the
include_filesconstructor bug in DPC++ 2025.1 inDPCTLKernelBundle_CreateFromSYCLSourceis left as is: it still works and is a separate change.