What problem does it solve?
Writing fast Triton kernels for Intel XPU GPUs requires deep knowledge of XPU-specific patterns like tensor descriptors, GRF mode, and tile swizzling, plus repeated manual benchmarking to find the best configuration. This Skill automates that loop: it analyzes a PyTorch baseline, generates and validates Triton kernel variants, benchmarks each on XPU hardware, profiles with VTune, and tracks a branching trial tree until the fastest correct kernel is found.
Core Features & Use Cases
- Xe-Forge Optimization Loop: A structured analyze → validate → benchmark → profile → finalize workflow driven by CLI tools (analyze_kernel.py, validate_triton.py, benchmark.py, xpu_profiler.py, trial_manager.py) with a configurable max_trials budget.
- XPU-Specific Kernel Patterns: A knowledge base covering tensor descriptors, GRF 256 mode, register-spill-aware autotune pruning, tile swizzling, bf16 inputs with fp32 accumulation, and fusion rules for GEMM, reductions, and Flash Attention.
- Correctness and Performance Verification: Benchmarks kernels against PyTorch or Triton baselines via ai-bench, checking numerical equivalence and reporting per-variant speedups.
- Use Case: Given a KernelBench-style fused kernel like GEMM+Sigmoid+Scaling+ResidualAdd in PyTorch, run the trial loop to produce a numerically equivalent Triton kernel that is measurably faster on an Intel Battlemage G21 / Arc Pro B50 GPU.
Quick Start
Optimize my PyTorch GEMM baseline file into a faster Triton kernel for Intel XPU using the analyze, validate, benchmark, and finalize workflow.