Archived
device: the SYCL backend -- Intel GPUs through oneAPI over Level Zero
A fourth DeviceBackend, in librad_sycl.so: in-order sycl::queues on one context, events as barriers, copies and fills on the queue, gates as a spin kernel on a pinned flag, and the core's advance and weight-table kernels as SYCL twins of their .hip files. RadStreams are RadSyclStreams (abi/rad_sycl.h). Pinned host memory is page-aligned memory registered for device copies, since O_DIRECT cannot read into SYCL's malloc_host pages; event timing is opt-in (RADIANCE_SYCL_TIMING=1) because profiling queues cost ~20 us of host time a submission. The SYCL code is its own CMake project, sycl/, configured with icpx through ExternalProject, so the engine and every host plugin stay on the main compiler: a SYCL build's host code is the default build's. RAD_SYCL (default OFF), build.sh --sycl, the sycl presets; HIP and SYCL in one build are refused at configure. On the SYCL backend --tp > 1 and ops resolved only to host kernels stop the start, since the Intel backend runs on one card and never puts an op on the CPU. A SYCL build that sees no GPU warns that it runs on the CPU and names the missing oneAPI environment. device_test runs on the Arc Pro B65 as device_test_sycl (label sycl): 36 cases pass, 12 skip (elastic memory, not provided; host-backend-only cases). Host tests hide Level Zero GPUs with ONEAPI_DEVICE_SELECTOR. The host tier is the baseline's in both the default and the SYCL build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
This commit is contained in:
1 parent
17524c95bd
commit
8addda231b
19 files changed
+1302
-39
No files matched your search
@@ -93,6 +93,21 @@ std::string temp_path(const char* tag) {
|
||||
|
||||
/* ------------------------------------------------------------------ identity */
|
||||
|
||||
/* RAD_TEST_BACKEND names the backend a run is registered for (the sycl-labelled entries set it).
|
||||
* A run that fell back to another backend, typically the host one for want of a driver
|
||||
* environment, fails here instead of passing every case on the CPU. */
|
||||
TEST(the_backend_is_the_one_the_run_names) {
|
||||
const char* want = std::getenv("RAD_TEST_BACKEND");
|
||||
if (!want || !*want) return;
|
||||
if (std::strcmp(rad::device_backend_name(), want) != 0)
|
||||
fprintf(stderr, " RAD_TEST_BACKEND=%s but the %s backend is running: %s\n", want,
|
||||
rad::device_backend_name(),
|
||||
std::strcmp(want, "sycl") == 0
|
||||
? "load the oneAPI environment (. /opt/intel/oneapi/setvars.sh)"
|
||||
: "is the device visible?");
|
||||
CHECK_EQ(std::string(rad::device_backend_name()), std::string(want));
|
||||
}
|
||||
|
||||
TEST(backend_reports_itself) {
|
||||
const char* name = rad::device_backend_name();
|
||||
CHECK(name && *name);
|
||||
|
||||
Reference in new issue
Block a user