Repository navigation
xpu: Gen12LP (Iris Xe, DG1) builds Nemotron's kernels without DPAS - #1673
Merged
Merged
Conversation
This was referenced Oct 30, 2026
Owner
…allback for its two DPAS products ocloc refuses intel_sub_group_bf16_bf16_matrix_mad_k16 for tgllp. With TF_XPU_NO_DPAS, nem_attn_dec.cl computes the same 8x16 by 16x16 bf16 product with sub-group shuffles and fp32 FMAs. -Dxpu-dpas (default off for tgllp, rkl, adl-*, dg1, gen12lp devices) passes it to every SPIR-V image's ocloc options; other devices build as before.
kernels.dpas carries -Dxpu-dpas. Without it nem_attn_dec builds from its fallback but Nemotron leaves a_dec null and decodes through attn_partial/attn_merge, which measured faster on Iris Xe (12.0 against 57.3 ms at 131k keys; the fallback spills 128 KiB of registers).
Owner
|
Thank you @jschmied. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes. |
Owner
|
Thanks @jschmied! Nemotron's kernels now build on Gen12LP GPUs (Iris Xe, DG1) in 1.2.1: https://github.com/ashhart/TensorFold/releases/tag/v1.2.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
oclocrefusesintel_sub_group_bf16_bf16_matrix_mad_k16for Gen12LP devices (tgllp,rkl,adl-*,dg1), which have no DPAS.nem_attn_dec.cluses it for Nemotron's decode attention. Sozig build xpu-spirvfailed for an Iris Xe and nothing in the XPU tree could be built there.Change
-Dxpu-dpas:-DTF_XPU_NO_DPASto every SPIR-V image'soclocoptions;kernels.dpas.nem_attn_dec.cl: withTF_XPU_NO_DPAS, the two DPAS products become a plain 8×16 by 16×16 bf16 product (sub-group shuffles, fp32 FMA). The DPAS path is unchanged.xpu_model.zig): without DPAS it leavesa_decnull and decodes throughattn_partial/attn_merge. On Iris Xe that path measured faster than the fallback kernel, which spills 128 KiB of registers (12.0 against 57.3 ms at 131k keys).Builds for DPAS devices are unchanged, since the macro is off for them.
Checks
zig build -Dxpu xpu-spirv xpu-testsbuilds;nem_attn_decfallback against an FP64 replay: max error 3.3e-3.bmgare byte-equal to main: 14 of 14 at 8b0f219 against ea3567b.zig build xpu-nativestill fails fortgllp, on main as well: the Qwen3.8-27B XPU runner is always compiled into the server, and its kernels need DPAS, 2D block loads and the nGEN headers. A Gen12LP server needs that engine made optional when-Dxpu-dpas=false; that would be a follow-up.zig build test, the contract, golden, security and fuzz steps pass;git diff --checkis clean.Stacked on #1672 (the device enumeration fix, needed to open the device on this machine).