Skip to content

Revert "fix(compiler): refine incomplete shapes, unused Split outputs, and unit-slice copies (#1306)" - #1346

Closed
pragyam32 wants to merge 1 commit into
mainfrom
fix/revert-pr-1306
Closed

pragyam32 wants to merge 1 commit into
mainfrom
fix/revert-pr-1306

Conversation

@pragyam32

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • hip-infer-loop-body-shapes LIT
  • test_split LIT
  • test_memref_copy LIT

Cursor assisted with the revert and this pull request.

@github-actions

Copy link
Copy Markdown

Thanks for opening a PR!

This project follows LLVM's incremental-development and AI-tool-use
guidance. See CONTRIBUTING.md
for the project workflow.

Before requesting review, please check that:

  1. The change is focused. Substantial work links the relevant issue
    or design discussion.
  2. The PR documents relevant test results and updates affected
    documentation.
  3. If AI tools provided substantial assistance, the description
    explains what was assisted and how it was validated, and commit
    trailers identify the tool. The contributor has reviewed and
    understands the result.

Reviewers are assigned through
CODEOWNERS where ownership
is configured.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The revert reintroduces compiler failures, incorrect Split boundaries, and unsafe host access to device memory.

7 open issues
What changed in this PR

This PR reverts #1306 in hip-ep’s compiler, aiming to preserve stored dimensions by restricting shape inference to unranked results. It also restores earlier Split and memory-copy lowering behavior.

Changes:

  • Removes ranked-result refinement and the LeakyRelu and ConvTranspose inference additions.
  • Reverts omitted Split output handling and extent-one-aware copy detection.
  • Removes corresponding regression tests and restores earlier pitched-copy fixtures.
File Description
test/​lit/​Dialect/​hip-infer-loop-body-shapes.mlir Removes Concat, ConvTranspose, and ranked Upsample regression cases.
test/​lit/​Conversion/​onnx-to-hip/​test_split.mlir Removes omitted-output Split coverage.
test/​lit/​Conversion/​hip-to-llvm/​test_memref_copy.mlir Removes singleton-copy cases and restores batch-one fixtures.
lib/​Dialect/​Transforms/​InferLoopBodyShapesPass.cpp Restores unranked-only inference and removes added rules.
lib/​Conversion/​OnnxToHip/​ReshapeConversion.cpp Restores earlier Split sizing and result handling.
lib/​Conversion/​HipToLLVM/​MemoryLowering.cpp Restores exact-stride checks for flat device copies.

Review effort: Balanced

@pragyam32

Copy link
Copy Markdown
Contributor Author

Not needed, fix for failing case present in PR-1336

@pragyam32 pragyam32 closed this Oct 27, 2026
@github-actions

Copy link
Copy Markdown

L2 Accuracy Results (EP vs CPU)

Model Combined L2 Total Elems Skipped NaN/Inf
conv_test_hybrid 1.12256E-07 64 0
GroupQueryAttention_seq256 59.2561 2621440 0
MatMulNBits_o_seq128 259.905 368640 0
QMoE_seq128 24.2583 368640 0

Threshold: 0.01 | Run: 7973 - Commit: 8a563ce

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Binary sizes

Baseline: run 40457802257 - ae1dc4f (dll-sizes)

File This (MB) Main (MB) Delta (MB)
hipgpu.dll 59.31 59.31 0.00
custom_kernels_gfx1170.dll 5.55 5.55 0.00
custom_kernels_gfx11-generic.dll 5.79 5.79 0.00

MorphiZen EP Performance Results

Model QPS Session (s) 1st Infer (ms) CPU% Mem (MB)
full_model_seq128 8.75 7.41 434 3 1158
GroupQueryAttention_seq128 10936.70 2.56091 1 5 230
matmul_down_seq128 513.10 3.35 126 3 274

EPContext Export Performance

Model QPS Session (s) 1st Infer (ms) CPU% Mem (MB)
full_model_seq128 8.82 50.07 247 3 15506

EPContext Import Performance

Model QPS Session (s) 1st Infer (ms) CPU% Mem (MB)
full_model_seq128 8.81 10.07 247 3 15639

OGA Benchmark Results

Model Warmup Reps Prompt Len Gen Tokens TTFT (ms) TPS Peak Mem (GB) GPU Mem (GB)
gpt-oss-20b-webgpu-int4-rtn-block-32 1 5 128 128 90.9 74.3 1.25 12.24
Llama-3.1-8B-awq-g128-int4-asym-fp16-onnx-dml 1 5 128 128 119.2 47.6 1.15 5.23

OGA Wheel Smoke (Python benchmark_e2e.py)

Model TTFT (ms) TPS
Llama-3.1-8B-awq-g128-int4-asym-fp16-onnx-dml 118 47.9

VLM Benchmark Results

Model TTFT (ms) TPS Output
gemma-4-E4B-it-fp16-int4-kquant-prune-logits 4001.2 7.9 This is a high-quality, outdoor photograph featuring a beautiful, fluffy white dog, likely a West Highland White Terrier or a si
Qwen3.8-27B-fp16-ve-fp16-int4-k_quant-gs128-text-dml-onnx 4895.7 14.0 The user wants a detailed description of the image. Let me carefully observe all elements before writing. Subject: A white do

TTFT / TPS vs main

Baseline: run 40457802257 - ae1dc4f | Gate: TTFT +20% / TPS -20%

Suite Model TTFT (ms) Main Delta TPS Main Delta
oga gpt-oss-20b-webgpu-int4-rtn-block-32 90.9 91.5 -0.7% 74.3 74.2 +0.2%
oga Llama-3.1-8B-awq-g128-int4-asym-fp16-onnx-dml 119.2 116.9 +2.0% 47.6 47.6 +0.1%
vlm gemma-4-E4B-it-fp16-int4-kquant-prune-logits 4001.2 4141.2 -3.4% 7.9 7.2 +9.5%
vlm Qwen3.8-27B-fp16-ve-fp16-int4-k_quant-gs128-text-dml-onnx 4895.7 14900.2 -67.1% 14.0 14.0 +0.1%

Run: 7973 - Commit: 8a563ce

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.

4 participants