Repository navigation
For each kernel, add a standalone path to build the cpp source. - #1
Merged
Merged
Conversation
Signed-off-by: Chen, Sheng S <sheng.s.chen@intel.com>
There was a problem hiding this comment.
🟡 Changes recommended
The runner can mask failed builds, and the GEMM test instructions build the wrong artifact.
4 open findings
What changed in this PR
Adds PyTorch-free standalone build, benchmark, and correctness paths for kernel families, plus GPU-target-specific optimizations.
Changes:
- Adds configurable standalone/PyTorch builds and CPU-reference harnesses.
- Adds aggregate standalone build/run automation and GPU target detection.
- Introduces Xe2/Battlemage conversion, reduction, and launch tuning.
| File | Description |
|---|---|
README.md |
Documents build modes and harness usage. |
kernels/run_standalone.sh |
Builds and runs all standalone harnesses. |
kernels/rotary/rotary.dp.cpp |
Separates PyTorch and standalone paths. |
kernels/rotary/rotary_qk.dp.cpp |
Adds standalone Q/K rotary path. |
kernels/rotary/rotary_qk_harness.impl |
Validates combined rotary kernels. |
kernels/rotary/rotary_harness.impl |
Validates standalone rotary. |
kernels/rotary/rope_kvwrite.dp.cpp |
Adds standalone KV-write path. |
kernels/rotary/rope_kvwrite_harness.impl |
Validates rotary cache writes. |
kernels/rotary/Makefile |
Adds rotary build modes. |
kernels/norm/rmsnorm.dp.cpp |
Guards PyTorch RMSNorm bindings. |
kernels/norm/rmsnorm_harness.impl |
Benchmarks and validates RMSNorm. |
kernels/norm/Makefile |
Adds normalization build modes. |
kernels/norm/layernorm.dp.cpp |
Guards PyTorch LayerNorm bindings. |
kernels/norm/layernorm_harness.impl |
Benchmarks and validates LayerNorm. |
kernels/gemm/test_bf16_gemm.py |
Adds extension correctness benchmark. |
kernels/gemm/qkv_gemm.dp.cpp |
Adds standalone QKV GEMM path. |
kernels/gemm/qkv_gemm_harness.impl |
Validates fused and split QKV output. |
kernels/gemm/Makefile |
Adds GEMM build modes. |
kernels/gemm/bf16_gemm.dp.cpp |
Extracts shared raw-pointer GEMM entry. |
kernels/gemm/bf16_gemm_harness.impl |
Validates standalone BF16 GEMM. |
kernels/detect_gpu_target.sh |
Detects local Intel GPU architecture. |
kernels/decode/Makefile |
Adds standalone decode build. |
kernels/decode/decode.dp.cpp |
Extracts shared decode orchestration core. |
kernels/decode/decode_harness.impl |
Validates multi-layer decode. |
kernels/common.mk |
Defines configurations and GPU tuning flags. |
kernels/attention/Makefile |
Adds attention build modes. |
kernels/attention/gqa_forward.dp.cpp |
Extracts shared forward entry and BMG tuning. |
kernels/attention/gqa_forward_harness.impl |
Validates forward attention. |
kernels/attention/gqa_backward.dp.cpp |
Extracts shared backward entries. |
kernels/attention/gqa_backward_harness.impl |
Validates attention gradients. |
kernels/activation/silu_mul.dp.cpp |
Adds standalone activation path. |
kernels/activation/silu_mul_harness.impl |
Validates SiLU multiplication. |
kernels/activation/Makefile |
Adds activation build modes. |
include/ops/warp/register/tile/reductions.dp.hpp |
Optimizes SIMD row reductions. |
include/common/base_types.dp.hpp |
Adds fast packed BF16 conversion. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+29
to
+33
| wait | ||
| build_fail=0 | ||
| for d in $DIRS; do | ||
| if grep -q -E "Error [0-9]|error:" "$d/build/standalone.log"; then | ||
| echo " $d: BUILD FAILED (see $d/build/standalone.log)"; build_fail=1 |
Move the B70 tuning (GPU target detection, large GRF, KITTENS_BMG dispatch rule, bf16_2 conversion, transposing row reduction) out of this branch; it now lives on the separate b70_tune branch. Drop kernels/gemm/test_bf16_gemm.py, which is covered by bf16_gemm_harness.impl. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Chen, Sheng S <sheng.s.chen@intel.com>
Build failure was inferred from "Error N" / "error:" in the logs, which misses failures such as "*** CONFIG must be ... Stop." and then ran executables left over from an earlier build. Wait on each background make and use its exit status; skip the binaries of any directory whose build failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Chen, Sheng S <sheng.s.chen@intel.com>
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.



No description provided.