llvm
0daa1144 - [SYCL] Decouple legacy selectors from device_selector under preview (#23338)

Commit
8 days ago
[SYCL] Decouple legacy selectors from device_selector under preview (#23338) Under `__INTEL_PREVIEW_BREAKING_CHANGES`, `default_selector`, `cpu_selector`, `gpu_selector` and `accelerator_selector` no longer derive from the deprecated SYCL 1.2.1 `device_selector` (`device_selector` was removed in SYCL 2020). They are now plain header-only callables (not exported) whose `operator()` forwards to the corresponding `*_selector_v`. As a result, code like ```cpp sycl::cpu_selector s; sycl::device d(s); ``` still works, but now goes through the SYCL 2020 callable-selector constructors instead of the deprecated `device(const device_selector &)` overload. Side benefit: the "no device of requested type" error message now names the device type, because `std::function::target<sycl::cpu_selector>()` in `select_device` can now match. Other changes: - `sycl-ls` no longer uses legacy selectors. It uses `*_selector_v`, and `custom_selector` is a plain callable. The `--verbose` output labels change from `gpu_selector()` etc. to `gpu_selector_v` etc., and the `sycl-ls` E2E tests are updated to match. - `DeprecatedFeatures/queue_old_interop.cpp` constructs the device with `device(Selector)` instead of `Selector.select_device()`, which no longer exists in preview mode. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Author
Parents
Loading