Skip to content

SYCL: Intel GPU kernels for pi0 and pi0.5 - #42

Merged
khanhnd61-vr merged 4 commits into
VinRobotics:mainfrom
sandlbn:main
Oct 21, 2026
Merged

khanhnd61-vr merged 4 commits into
VinRobotics:mainfrom
sandlbn:main

Conversation

@sandlbn

@sandlbn sandlbn commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

New ggml-sycl ops behind an in-tree extension hook (src/sycl/vla_sycl_ext.cpp), built as vla_sycl_ops on oneDNN:

  • BF16 activations: BF16 matmul (BF16 or F32 result), norm, rms_norm, scale.
  • FLASH_ATTN_EXT on oneDNN's fused SDPA, operands read in place (F16/BF16, arbitrary strides, batched); default on SYCL for pi0 and pi0.5.
  • Fused elementwise nodes (layers/fused_ew.h): adaRMS, gated residual, geglu, LayerNorm, RoPE + K/V cache write, GEMM with bias/GELU/residual epilogue.
  • W8A8 linear with per-token INT8 activations (layers/qlinear.h), weights quantized at load; opt-in for pi0.5 (VLA_PI05_W8A8, VLA_PI05_W4).

pi0.5 uses them for an in-place F16 K/V cache, fused projections and fused SigLIP blocks with all camera views in one pass. No CUDA, BitVLA or Evo-1 files change.

Test: test_bf16_sycl_ops.

  • [ x] Builds clean under -Wall -Wextra (first-party code)
  • [ x] ctest passes
  • [ x] Numeric output unchanged (vla_predict_check diff), or the change is
    meant to move it and a LIBERO sweep is below

Archs and backends tested:

sandlbn and others added 4 commits October 15, 2026 20:38
New ggml-sycl ops behind an in-tree extension hook (src/sycl/vla_sycl_ext.cpp),
built as vla_sycl_ops on oneDNN:

- BF16 activations: BF16 matmul (BF16 or F32 result), norm, rms_norm, scale.
- FLASH_ATTN_EXT on oneDNN's fused SDPA, operands read in place (F16/BF16,
  arbitrary strides, batched); default on SYCL for pi0 and pi0.5.
- Fused elementwise nodes (layers/fused_ew.h): adaRMS, gated residual, geglu,
  LayerNorm, RoPE + K/V cache write, GEMM with bias/GELU/residual epilogue.
- W8A8 linear with per-token INT8 activations (layers/qlinear.h), weights
  quantized at load; opt-in for pi0.5 (VLA_PI05_W8A8, VLA_PI05_W4).

pi0.5 uses them for an in-place F16 K/V cache, fused projections and fused
SigLIP blocks with all camera views in one pass. No CUDA, BitVLA or Evo-1 files change.

Test: test_bf16_sycl_ops.
@khanhnd61-vr

Copy link
Copy Markdown
Collaborator

Thanks for this, it's a really nice piece of work. We tested it on our Arc B390 (Core Ultra X7 358H) and it holds up well.

Highlights:

  • π0.5 is about 1.3x faster at the defaults, and its output got slightly closer to the CPU reference. The opt-in BF16 + W8A8/W4A8 paths reach about 4x at half the memory, for roughly 3% of the action range. We haven't measured task success with those yet, so keeping them opt-in feels right.
  • π0 is about 1.3x faster with flash attention on by default, still well within our accuracy bar.
  • --flash-attn now pays off on SmolVLA, Evo-1, GR00T and VLA-JEPA too.
  • Every other arch that reaches SYCL matches main. No output depends on the previous call, and the in-place K/V cache stays bit-for-bit repeatable when the prompt length changes.
  • An early scare on GR00T N1.5 with flash attention turned out to be sampling noise. Over 64 images the difference isn't significant, and the SDPA kernel matches exact attention to F16 rounding.

We pushed three small fixes on top:

  • fe5f86b: skip test_bf16_sycl_ops when there's no SYCL GPU. That was the build-sycl CI failure, and CI is green now.
  • 1cde1c6: the SYCL hook patch script now upgrades a tree already patched by main's version instead of silently skipping it.
  • 8a4db6d: W8A8 now loads Q8_0 GGUFs.

Full numbers are in docs/backend/sycl.md and the B390 report (docs/benchmark/core-ultra-x7-358h.md).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants