Status: current · line numbers checked 2026-10-08.
Configure decides whether CPU device code is compiled (BATCHLAS_HAS_CPU_TARGET) and drops what depends on it. Logic: cmake/BatchLASDetectSYCL.cmake. Options: cmake/BatchLASOptions.cmake.
A GPU-only DPC++ may have no CPU backend. Without a CPU entry in -fsycl-targets, code that submits kernels to a CPU device (the NETLIB SYCL helpers, Queue("cpu") work that is not host LAPACK) fails to compile or finds no kernel at run time.
Stage 1: detect_sycl_cpu_target() (cmake/BatchLASDetectSYCL.cmake:490) may append a CPU target to BATCHLAS_SYCL_TARGETS:
| BATCHLAS_CPU_TARGET | Effect |
|---|---|
| none | No CPU target; OFF. |
| native_cpu or spir64_x86_64 | Appended; ON. |
| auto (default, cmake/BatchLASOptions.cmake:165) | sycl-ls lists [opencl:cpu] or [host:cpu]: append spir64_x86_64. Lists [native_cpu:cpu]: append native_cpu. Otherwise, or if sycl-ls is missing or fails: OFF. |
| Anything else | Configure WARNING, then treated as auto. |
Stage 2: the final gate (cmake/BatchLASDetectSYCL.cmake:643-666) runs after -- Using SYCL targets: ... is printed. It decides from the compile flags, not from device detection.
The result is exported as BATCHLAS_HAS_CPU_TARGET (cmake/backend_config.h.in, #cmakedefine01) and to Python as compiled_features()["has_cpu_target"].
Note: Other test binaries still build (for example ormqr_cta_tests, syev_cta_tests, sytrd_cta_tests), because their GPU kernels compile and host LAPACK needs no SYCL kernel. Their NETLIB cases are absent. Benchmarks have no base and CPU-dependent split.