abi: rad_sycl.h -- what a RadStream is under the SYCL backend

A SYCL kernel library has no hipLaunchKernel for the engine to serve, so under the SYCL backend a
RadStream points to a RadSyclStream: a magic, its own version, and the engine's in-order
sycl::queue. rad_sycl_queue() hands a plugin the queue or null for any other stream. The struct is
versioned by RAD_SYCL_STREAM_VERSION rather than RAD_ABI_VERSION, since no shape an existing plugin
compiles against changes; rad_abi.h and rad_types.h say so.

The layout tests cover it: strict C11 in abi_c_test.c, and its rows in abi_layout_rows.h, where a
struct the frozen table predates is allowed without a version bump.

docs/SYCL_PROGRESS.md: D6 revised. Building everything with icpx fails in libavx (_pdep_u64 without
-mbmi2, which GCC accepts and clang refuses), so the main build stays GCC and only SYCL code is
built by icpx, as shared libraries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
This commit is contained in:
pascallinxweilerandClaude Opus 5.5 committed 2026-10-23 15:38:42 +02:00
1 parent ec4dbb6464
commit a3dc47b79a
7 files changed
+78 -6

No files matched your search

+9 -3
View File
@@ -180,9 +180,15 @@ Planned use: Milestone A = `minicpm5-2b-bf16.rad` (blocked, item 1); Milestone B
plugin's `build_target` with the device arch so libr4d rows are never selected on the B65. (§4.3)
- D5: on the SYCL backend the "host-only ops ... Not a hole" placement is fatal unless
`--debug-accept-host-ops`. (§4.4)
- D6: `RAD_SYCL=ON` builds everything with `icpx`, host code at `-ffp-model=precise` (icpx's default
is fast math); `-fsycl` only on SYCL sources. Fallback: ExternalProject for the SYCL pieces if
host results differ from GCC's. HIP + SYCL refused together at configure until a ROCm machine can
- D6 (revised 2026-10-23): ~~`RAD_SYCL=ON` builds everything with `icpx`~~. Tried: `cmake -B build-icpx
-DCMAKE_CXX_COMPILER=icpx -DCMAKE_CXX_FLAGS=-ffp-model=precise -DRAD_WITH_HIP=OFF` fails in libavx:
`avx_gemm_tile.cpp:289: always_inline function '_pdep_u64' requires target feature 'bmi2', but would
be inlined into function 'qb_codes_zp' that is compiled without support` (GCC accepts it, clang does
not), and fixing that means changing libavx. So the **main build stays GCC in every configuration**
and only the SYCL code is built and linked by `icpx`, as shared libraries in a sub-build
(`librad_sycl.so`: the device backend and the core's SYCL kernels, a C entry point and a callback
table for logging and errors; `libxe2.so`: the kernel plugin). Host code in a SYCL build is then the
default build's, byte for byte. HIP + SYCL refused together at configure until a ROCm machine can
test it. (§4.5)
- D7: `advance` and `wtab` get SYCL launchers; `xprefetch` stays off. (§4.6)
- D8: `--tp > 1` refused at startup on the SYCL backend. (§4.7)