How gatmannes/xdna2- works
This is an experimental Windows XDNA2/AIE2P kernel-development and runtime research project. Its documented workflow takes a workload through execution planning and AIE kernel generation, compiles XCLBINs and instruction streams, runs them on NPU hardware, then checks correctness and measures performance; those observations can inform later planning. The graph includes the sampled emitter/operator and wrapper, plus README-documented planner and validation stages. Planner internals and runtime wiring are not shown in the excerpts, so those links are documented at a high level rather than inferred from unsampled code.
Main entry points: f3best_emit.py F3Best emitter · op.py Decode operator · kernels XCLBIN and instructions · reproductible Hardware measurements
Components 16
Planning and workloads
- Workload specification
ref/modeling_qwen3_5.py - Adaptive planner
- Execution plans
- Hardware cost model
Kernel generation
- F3Best emitter
AM101_kernels_20260815/runtime_modifs/f3best_emit.py - No-KV emitter
AM101_kernels_20260815/runtime_modifs/f3best_emit_nokv.py - Decode operator
AM101_kernels_20260815/runtime_modifs/op.py - Broadcast GEMV wrapper
AM101_kernels_20260815/sources/layer_fused_bcast_wrapper.cc - Broadcast assembly kernels
AM101_kernels_20260815/sources/layer_fused_bcast_kc256.s - XCLBIN and instructions
kernels
Runtime execution
- Windows runtime
AM101_kernels_20260815/runtime_modifs/ggml-xdna.cpp - XDNA2 NPU
Validation and research
- Correctness checks
reproductible - Hardware measurements
reproductible - PDI analysis tools
AM101_kernels_20260815/scripts_pdi
Other components
- Workload engineer
Connections 17
- Workload engineer → Workload specification: defines workload
README.md - Workload specification → Adaptive planner: plans execution
README.md - Adaptive planner → Execution plans: ranks candidates
README.md - Execution plans → Decode operator: configures compile
- Decode operator → F3Best emitter: generates MLIR
AM101_kernels_20260815/runtime_modifs/op.py - F3Best emitter → No-KV emitter: inherits emitter
AM101_kernels_20260815/runtime_modifs/f3best_emit.py - Decode operator → XCLBIN and instructions: compiles artifacts
AM101_kernels_20260815/runtime_modifs/op.py - F3Best emitter → Broadcast GEMV wrapper: calls GEMV
- Broadcast GEMV wrapper → Broadcast assembly kernels: calls assembly
AM101_kernels_20260815/sources/layer_fused_bcast_wrapper.cc - XCLBIN and instructions → Windows runtime: loads programs
README.md - Windows runtime → XDNA2 NPU: executes kernels
README.md - XDNA2 NPU → Correctness checks: checks outputs
README.md - XDNA2 NPU → Hardware measurements: measures performance
README.md - Correctness checks → Hardware measurements: gates results
README.md - Hardware measurements → Hardware cost model: informs costs
README.md - Hardware cost model → Adaptive planner: ranks plans
README.md - XCLBIN and instructions → PDI analysis tools: inspects PDI