/* xe2_rows.cpp -- libxe2's plugin exports: identity and the kernel rows the engine selects from. * * libxe2 is radiance's kernel library for Intel Xe2 GPUs (the Arc Pro B65, Battlemage G31) through * SYCL. It defines no op schemas of its own: every op it serves is in the conventional vocabulary, * whose schemas libref fixes (docs/OPS.md). All rows are device-domain; an op libxe2 lacks has no * row here, and on the SYCL backend the engine stops at startup naming it (docs/SYCL_PORTING.md * ยง4.4). */ #include "rad_abi.h" #include "xe2_ops.h" namespace { /* Rows by field name (C++20 designated initialisers must follow declaration order, so the compiler * checks it), unlike a positional table where a shifted field can still compile. */ const RadKernelInfo kKernels[] = { { .name = "xe2_add", .op = "add", .family = "elem", .computes = "elementwise sum, b broadcast along rows when it is one row; optional div", .shape = "any n and row count; rows may be padded, the last axis dense", .dtypes = "any float dtype in and out (bf16, f16, f32, fp8), f32 arithmetic, rounded as libref", .domain = RAD_DOMAIN_DEVICE, .priority = 0, .launch = xe2::add }, }; const RadPluginInfo kInfo = { RAD_PLUGIN_KERNEL, "libxe2", "0.1", "Intel Xe2 (Battlemage) kernels in SYCL, checked against libref", "intel_gpu_bmg_g31", }; } // namespace extern "C" { __attribute__((visibility("default"))) uint32_t rad_plugin_abi_version(void) { return RAD_ABI_VERSION; } __attribute__((visibility("default"))) const RadPluginInfo* rad_plugin_info(void) { return &kInfo; } __attribute__((visibility("default"))) int rad_kernel_schema_count(void) { return 0; } __attribute__((visibility("default"))) const RadOpSchema* rad_kernel_schema_at(int) { return nullptr; } __attribute__((visibility("default"))) int rad_kernel_count(void) { return (int)(sizeof kKernels / sizeof kKernels[0]); } __attribute__((visibility("default"))) const RadKernelInfo* rad_kernel_at(int i) { return i >= 0 && i < rad_kernel_count() ? &kKernels[i] : nullptr; } } // extern "C"