testing PR700 - #708
Closed
BoarQing wants to merge 2 commits into
Closed
testing PR700#708BoarQing wants to merge 2 commits into
BoarQing wants to merge 2 commits into
Conversation
BoarQing
requested review from
amd-bqiao,
amd-mingw,
edelaye,
fhanuman,
qianglin-amd and
wcy123
as code owners
August 13, 2026 08:31
|
Thanks for opening a PR! This project follows LLVM's incremental-development and AI-tool-use Before requesting review, please check that:
Reviewers are assigned through |
…ape operand buildExpandShapeOutputShape gave every dynamic output dim in a reassociation group the full source-dim extent. That holds only while a group covers at most one dynamic dim; when a Reshape splits one dynamic source dim into several dynamic output dims the source extent is their product and says nothing about the split, so each output dim was assigned the whole product. On Gemma-4 26B-A4B the per-layer Reshape([bs*ss, 2816] -> [bs, ss, 2816]) therefore claimed [ss, ss, 2816], and the 30 layer input norms consuming it ran over ss^2 rows: 5,036 ms of the 6,486 ms decoder prefill at 2,049 tokens, and 88 GB of shared memory at 4,097 tokens, which took the machine down. ReshapeShapeFold already folds Reshape(_, Shape(x)) into a host-visible tensor.from_elements holding the correct per-dim values, precisely so this can be recovered, but the consuming branch was never written and the conversion never read operand 1. Add it, and return nullopt when the shape operand is not host-readable so the caller falls back to tensor.reshape rather than emit an expand_shape it cannot justify. Single-dynamic groups keep the existing derivation, leaving the other expand_shape sites in the model untouched. Also make the failure loud. verifyNormAxisMatchesScale rejects at conversion time any norm whose axis does not span exactly the scale's element count, which the runtime cannot check because its ABI carries element counts rather than shapes; and the two norm wrappers that lacked the positivity and divisibility preconditions already present in wrap_layer_normalization now have them. Gemma-4 26B-A4B FP16W4-qmoe on gfx1151, TTFT at 2,049 tokens 7,865 -> 2,859 ms, decoder prefill 6,486 -> 1,520 ms, layernorm within it 5,036 -> 50 ms. 4,097 tokens now completes in 4,983 ms instead of rebooting the host. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Made-with: Cursor Co-authored-by: Cursor <cursoragent@cursor.com>
Re-wrap the countDynOutDims and buildExpandShapeOutputShape declarations and the expand_shape call site to satisfy the pinned clang-format 16.0.1. No code change; the whitespace-stripped token stream is identical to the parent commit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Made-with: Cursor Co-authored-by: Cursor <cursoragent@cursor.com>
L2 Accuracy Results (EP vs CPU)
Threshold: 0.01 | Run: 4599 - Commit: |
MorphiZen EP Performance Results
EPContext Export Performance
EPContext Import Performance
OGA Benchmark Results
OGA Wheel Smoke (Python benchmark_e2e.py)
Run: 4599 - Commit: |
Contributor
Author
|
Superseded by branch |
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.
Testing PR: the changes from #700 stacked on top of #599 so they can be exercised together.
dc6f87c,8b68f4c) cherry-picked; the resulting diff against est/gemma4 is byte-for-byte identical to fix(onnx-to-hip): take multi-dynamic expand_shape extents from the shape operand (-64% TTFT on Gemma-4 26B-A4B) #700's diff against its base.Made with Cursor