Skip to content

hrx: accept empty MoE expert views when matching graphs - #140

Merged
AaronStGeorge merged 4 commits into
AMD-Ecosystem:hrx-graph-develop-v2from
AaronStGeorge:fix/qwen3-moe-empty-decode-37358385120
Oct 12, 2026
Merged

AaronStGeorge merged 4 commits into
AMD-Ecosystem:hrx-graph-develop-v2from
AaronStGeorge:fix/qwen3-moe-empty-decode-37358385120

Conversation

@AaronStGeorge

Copy link
Copy Markdown
Collaborator

Overview

Qwen3 MoE microbatches that request no output logits produce empty expert views with nonzero slot offsets. HRX rejected these valid GGML views because their offsets exceed the zero-byte source extent, preventing graph matching during prefill and decode-like perplexity evaluation.

Skip byte-span bounds checks for empty tensors while preserving storage-root and alias-offset validation. Add a regression test covering all eight empty expert views, cache reuse, and rejection of a changed alias offset.

Validation

  • Final source builds successfully; all 7 focused graph matching, cache UID, and zero-output tests pass.
  • Earlier end-to-end validation on gfx1100: Qwen3-30B-A3B Q4_K_M perplexity with -c 512 --chunks 2 -b 512 -ub 1 completes with HRX PPL 6.7431 versus Vulkan 6.7573. The original code fails graph matching.
  • Server boundary checks with -ub 256: original backend passes 256 prompt tokens and fails at 257; the repair completes 256, 257, and 513-token requests. These are execution checks, not generated-text quality checks.
  • gfx1151 is covered by host-side graph construction, not GPU execution. The reported 262144-token all-GPU context could not be tested on the local 24 GiB GPU because its KV cache did not fit.

No HRX dependency update is required.

Requirements

  • I have read and agree with the contributing guidelines.
  • AI usage disclosure: YES. Codex assisted with investigation, implementation, tests, explanatory comments, and PR preparation under human review.

@AaronStGeorge
AaronStGeorge merged commit d1b0eb2 into AMD-Ecosystem:hrx-graph-develop-v2 Oct 12, 2026
1 check 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.

1 participant