Skip to content

Factor HRX vector matmul into Loom kernels - #118

Merged
AaronStGeorge merged 8 commits into
AMD-Ecosystem:hrx-graph-develop-v2from
rsuderman:main
Sep 25, 2026
Merged

AaronStGeorge merged 8 commits into
AMD-Ecosystem:hrx-graph-develop-v2from
rsuderman:main

Conversation

@rsuderman

Copy link
Copy Markdown
Collaborator

No description provided.

Move ordinary batch-size-1 matmul decode coverage to vector-shaped Loom kernels, including vector postops, packed Q6, selected-output Q6, and optional publish paths. Keep Qwen RMSNorm plus Q6 vocab projection on its fused Q8 activation route and leave skinny/tiled ownership with existing paths.

Assisted-by: Codex
Move tiled matmul kernels into composable matmul motifs and ops, route covered mul_mat and gated cases through the new names, and move LLM attention matmul wrappers under ops/llm with tiled, vector, and explicit legacy variants.

Assisted-by: Codex
Move non-rope RMSNorm exports behind a normalization op wrapper and factor the implementation bodies into normalization motifs. Update the Loom manifest and model benchmark sidecars to use the new paths while leaving the rope-linked RMSNorm kernel in the legacy file for the later attention refactor.

Assisted-by: Codex
Group ROPE and rows Loom sources under dedicated op and motif directories, fold the fused ROPE+set_rows kernel into the ROPE source, and share cache row publication helpers between set_rows and the fused path.

Update the HRX Loom manifest and checked-in benchmark program JSONs for the new source layout.

Assisted-by: Codex
Introduce a reusable test suite utility for process-isolated parallel test execution, output controls, listing, filtering, and device-aware skips.

Convert the HRX ops, buffer, backend, and Loom JIT tests to register named cases with the shared suite runner.

Assisted-by: Codex
Guard decode split reduction writes by the query row within each KV head instead of the absolute query head index. This prevents inactive rows from writing outputs for the next KV head.

Validated with controlled llamae decode A/B and the Lemonade HRX correctness sweep.

Assisted-by: Codex
Move common routed F32 mul_mat_id routes onto the staged skinny/tiled kernel family and drop the deprecated common F32 legacy symbols once the staged routes cover them. Keep the Qwen-used F16 routed kernels intact.

Assisted-by: Codex
Move common tiled and skinny matmul dispatch onto the refactored Loom routes, prune obsolete generated benchmark artifacts, and add route/correctness coverage for the migrated paths.

Validated with the Lemonade and Qwen HRX correctness gate in /home/rsuderman/codex/project-workspaces/llama.cpp/gates/hrx-lemonade-qwen-correctness-20260924T235113Z.

Assisted-by: Codex
@AaronStGeorge
AaronStGeorge merged commit 01175b6 into AMD-Ecosystem:hrx-graph-develop-v2 Sep 25, 2026
1 of 2 checks passed
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