Each example contains:
verify),sycl/ (the target end state, with no dpct helpers),task.json for the agent loop (oneapi-agent loop --config examples/<name>/task.json).| Example | What it is | Inputs | verify mode |
|---|---|---|---|
fuzz/ |
tanh soft-clip fuzz waveshaper (drive + gain) | WAV | audio null test, ≤ -96 dBFS |
fir/ |
64-tap windowed-sinc low-pass FIR; __constant__ taps plus a __shared__ tile |
WAV | audio null test, ≤ -96 dBFS |
saxpy/ |
y = a*x + y, the HPC baseline |
generated in-program | array, atol 1e-6 |
softmax_hecbench/ |
HeCBench softmax-cuda: two kernels, one with cooperative-groups warp reductions |
generated in-program | array, atol 1e-6 |
gemm_cublas/ |
cuBLAS cublasSgemm (column-major, alpha/beta) → oneMath oneapi::math::blas::column_major::gemm |
generated in-program | array, atol 2e-3 (worst-case float32 dot-product bound; see task.json) |
stencil1d_hecbench/ |
HeCBench stencil1d-cuda: __shared__ tile with a halo of 7 on each side and __syncthreads |
generated in-program | array (f64), exact |
matrix_rotate_hecbench/ |
HeCBench matrix-rotate-cuda: in-place 90-degree rotation, one thread per layer |
generated in-program | array (f32), exact |
atomic_reduction_hecbench/ |
HeCBench atomicReduction-cuda (AMD, MIT): five grid-stride kernels ending in atomicAdd, four block sizes |
generated in-program | array (f64), exact |
scan_hecbench/ |
HeCBench scan-cuda: Blelloch block scan in __shared__ memory, plain and bank-conflict-avoiding |
generated in-program | array (f64), exact |
adam_hecbench/ |
HeCBench adam-cuda: Adam optimizer, 10 steps per parameter |
generated in-program | array (f32), atol 1e-5 + rtol 1e-4 (derivation in task.json) |
gemm_cublas needs two libraries:
oneapi::mkl::.Install both with WITH_ONEMATH=1 scripts/install-toolchain.sh. scripts/oneapi-env.sh sets ONEMKL_PREFIX and ONEMATH_PREFIX, which its task.json flags expand.
The audio inputs are generated procedurally (python examples/gen_inputs.py):
No audio files are committed.
source scripts/oneapi-env.sh # or: source /opt/intel/oneapi/setvars.sh
python examples/gen_inputs.py
python examples/run_pipeline.py # every example, real tools → examples/RESULTS.md
oneapi-agent loop --dry-run --config examples/saxpy/task.json # scripted model, real tools
examples/RESULTS.md holds the actual output. Highlights:
softmax_hecbench compiles but fails verify: 22,156 of 524,288 elements differ by up to 4.1e-6 (3,473 float32 ULP).
expf to sycl::native::exp, a reduced-precision builtin, and emitted no DPCT warning for it.sycl::exp in an otherwise unchanged copy brings max abs error down to 9.3e-8, a PASS.CL_CONFIG_CPU_TARGET_ARCH=skx reproduces it). On AVX2 (corei7-avx, or GitHub’s AMD EPYC 7763 runners) the same binary’s max error is 6.9e-7, just inside atol 1e-6. The substitution itself is the same everywhere, so CI asserts it (scripts/check_claims.py) and asserts the verify failure only on AVX-512 hosts.scan_helpers now reports sycl::native:: math as a native_math advisory.softmax also carries [[sycl::reqd_sub_group_size(32)]], a CUDA warp-size assumption. The idiomatic port uses one work-group per slice with sycl::reduce_over_group, which works for any sub-group size.fuzz, fir and saxpy, the raw c2s output already verified against the reference (fuzz -138.5 dBFS, fir -135.0 dBFS residual peaks; saxpy max abs err 4.8e-7). It still carries 22, 14 and 11 dpct helper uses respectively; the hand-written ports remove all of them and verify identically.The only SYCL device in the build sandbox is the OpenCL CPU device (Intel Xeon @ 2.80GHz, 4 vCPU). No GPU was available.
benchmark reports whole-process wall time.
The programs’ own kernel_ms (captured with report_regex) is the fairer kernel number. For softmax, kernel_ms is timed with std::chrono around the first launch, so it also includes JIT compilation.
These numbers say nothing about GPU performance. AOT compilation (-fsycl-targets=spir64_x86_64) and repeated runs are on the roadmap.
softmax_hecbench/ adapts src/softmax-cuda/main.cu from HeCBench (commit f0c817aa).
softmax_hecbench/LICENSE.HeCBench.rand(), results are written to a file, and the argument order changed.stencil1d_hecbench/, matrix_rotate_hecbench/, scan_hecbench/ and adam_hecbench/ adapt the HeCBench programs named in each task.json (same commit), under the same BSD 3-Clause License; see each LICENSE.HeCBench. The CUDA kernels are unchanged.atomic_reduction_hecbench/ adapts HeCBench atomicReduction-cuda, whose code is Copyright (c) 2015-2016 Advanced Micro Devices, Inc., under the MIT License; see atomic_reduction_hecbench/LICENSE.AMD.task.json files and all other examples (fuzz, fir, saxpy, gemm_cublas) were written for this repository and are covered by its license (AGPL-3.0 from the license change on; see the top-level README).