Skip to content

Drop compiler version checks dead with the 2026.0 minimum - #2415

Open
antonwolfy wants to merge 2 commits into
masterfrom
drop-pre-2026-compiler-checks
Open

antonwolfy wants to merge 2 commits into
masterfrom
drop-pre-2026-compiler-checks

Conversation

@antonwolfy

@antonwolfy antonwolfy commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

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:

  • removes the __SYCL_COMPILER_MAX_WORK_ITEM_SIZE_THRESHOLD check in DPCTLDevice__GetMaxWorkItemSizes (dpctl_sycl_device_interface.cpp). The macro is defined nowhere, so the #if was always true and the info::device::max_work_item_sizes branch without <dim> was never compiled.
  • removes SUPPORTS_SYCL_COMPILATION (SYCL source compilation from 2025.1 on) and the registered_kernel_names fallback for the 2025.1 to 2025.2 rename to registered_names in dpctl_sycl_kernel_bundle_interface.cpp. DPCTLKernelBundle_CreateFromSYCLSource_Available() stays in the C-API and now just returns true, so dpctl.compiler.is_sycl_source_compilation_available() works as before.
  • replaces the FIXME in check_max_clock_frequency (_device_attributes_checks.py), which asked to switch to freq > 0 after 2024.1. That change isn't possible: with OpenCL CPU runtime 2026.22 under WSL, max_clock_frequency is still 0, and 12 tests fail with freq > 0. The assert stays freq >= 0, and the comment now gives the real reason.

The workaround for the include_files constructor bug in DPC++ 2025.1 in DPCTLKernelBundle_CreateFromSYCLSource is left as is: it still works and is a separate change.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • Have you added documentation for your changes, if necessary?
  • Have you added your changes to the changelog?
  • If this PR is a work in progress, are you opening the PR as a draft?

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 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_names directly.
  • 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

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

@coveralls

coveralls commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 74.867% (-0.03%) from 74.893% — drop-pre-2026-compiler-checks into master

new_type_if_defined<syclex::registered_names,
syclex::registered_kernel_names>::type;
#endif
bool DPCTLKernelBundle_CreateFromSYCLSource_Available() { return true; }

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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

This branch has not been deployed

No deployments
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.

4 participants