Kernels: attach a driver
k[grid, block](...) on arrays placed on "atreides-hw" goes
through the driver, and LaunchResult.status is built from the Counters
it returns. Raise sf.SFDeviceError from launch for a device fault.
To get the generated C for the compiler (sf16 only):
void sf_kernel(int64_t *arg0, int64_t arg0__size, ..., int64_t gx, gy, gz, sf_counters *C)
with pointers first, scalars after, each pointer followed by its element
count. src/sf/kernels/sf16_builtins.h is the reference for what the
builtins must compute.
Built-ins (Stage 1.1 arrays, Stage 2 models): register a device
src/sf/_device.py (MockAtreides, MockAtreidesFlags) for the
exact run contract and the op names.
Running the suite against it
The Stage 3 tests take the target from theDEV constant at the top of
tests/test_3_kernels.py and tests/test_review_findings_3.py; the Stage
1.1 device tests use the mock names in tests/test_1_1_3_matmul_device.py.
Point those at your device name and run pytest. Every assertion compares
integer codes and event counts, so any difference from the host reference
is a real disagreement between the hardware and the spec.