Skip to content

Skip fuse_horizontal pass on dynamic shaped inputs#5017

Open
CharlieL7 wants to merge 5 commits into
developfrom
skip_dynamic_horiz_fusion
Open

Skip fuse_horizontal pass on dynamic shaped inputs#5017
CharlieL7 wants to merge 5 commits into
developfrom
skip_dynamic_horiz_fusion

Conversation

@CharlieL7

Copy link
Copy Markdown
Collaborator

Motivation

  • Hitting an error when compiling dynamic shapes model with fuse_horizontal calling lens() on a dynamic shape.

Technical Details

Changelog Category

Add a CHANGELOG.md entry for any option other than Not Applicable

    • Added: New functionality.
    • Changed: Changes to existing functionality.
    • Removed: Functionality or support that has been removed. (Compared to a previous release)
    • Optimized: Component performance that has been optimized or improved.
    • Resolved Issues: Known issues from a previous version that have been resolved.
    • Not Applicable: This PR is not to be included in the changelog.

Copilot AI review requested due to automatic review settings June 26, 2026 18:24
@CharlieL7 CharlieL7 requested a review from causten as a code owner June 26, 2026 18:24
@CharlieL7 CharlieL7 requested review from ahsan-ca and kahmed10 June 26, 2026 18:24

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.

Pull request overview

Skips fuse_horizontal gather fusion candidates when any input shape is dynamic, avoiding compilation-time errors from calling lens() on dynamic shapes during horizontal fusion.

Changes:

  • Add a dynamic-shape guard in same_table_gather_horizontal_fusion::is_candidate.
  • Add the same guard in gather_horizontal_fusion::is_candidate.

Comment thread src/fuse_horizontal.cpp Outdated
Comment thread src/fuse_horizontal.cpp Outdated
CharlieL7 and others added 2 commits June 26, 2026 14:30
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5017      +/-   ##
===========================================
+ Coverage    92.69%   92.72%   +0.03%     
===========================================
  Files          596      596              
  Lines        31603    31739     +136     
===========================================
+ Hits         29292    29427     +135     
- Misses        2311     2312       +1     
Files with missing lines Coverage Δ
src/fuse_horizontal.cpp 99.28% <100.00%> (+0.03%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gh-app-migraphx-bot-pr-write

gh-app-migraphx-bot-pr-write Bot commented Jun 26, 2026

Copy link
Copy Markdown
Test Batch New Rate (1656cf) Old Rate (90b175) Diff Status
torchvision-resnet50 64 2,976.90 886.14 235.94% 🔆
torchvision-resnet50_fp16 64 5,731.84 1,735.02 230.36% 🔆
torchvision-densenet121 32 1,595.41 700.76 127.67% 🔆
torchvision-densenet121_fp16 32 4,530.26 1,439.55 214.70% 🔆
torchvision-inceptionv3 32 1,778.18 538.77 230.04% 🔆
torchvision-inceptionv3_fp16 32 2,770.97 182.21 1420.72% 🔆
cadene-inceptionv4 16 819.22 205.30 299.03% 🔆
cadene-resnext64x4 16 783.36 179.33 336.82% 🔆
slim-mobilenet 64 4,691.70 1,806.11 159.77% 🔆
slim-nasnetalarge 64 226.18 115.20 96.34% 🔆
slim-resnet50v2 64 2,413.30 1,029.11 134.50% 🔆
bert-mrpc-onnx 8 570.39 137.82 313.87% 🔆
bert-mrpc-tf 1 231.65 17.79 1202.14% 🔆
pytorch-examples-wlang-gru 1 181.32 35.57 409.70% 🔆
pytorch-examples-wlang-lstm 1 250.66 145.48 72.30% 🔆
torchvision-resnet50_1 1 241.07 45.24 432.86% 🔆
cadene-dpn92_1 1 414.17 27.50 1406.06% 🔆
cadene-resnext101_1 1 81.88 28.35 188.84% 🔆
onnx-taau-downsample 1 137.69 103.47 33.06% 🔆
dlrm-criteoterabyte 1 19.66 23.55 -16.51% 🔴
dlrm-criteoterabyte_fp16 1 47.88 28.67 67.01% 🔆
agentmodel 1 12,372.99 640.03 1833.18% 🔆
unet_fp16 2 56.60 12.84 340.89% 🔆
resnet50v1_fp16 1 1,001.77 186.82 436.23% 🔆
resnet50v1_int8 1 938.84 150.02 525.82% 🔆
bert_base_cased_fp16 64 953.68 424.43 124.70% 🔆
bert_large_uncased_fp16 32 346.52 191.64 80.81% 🔆
bert_large_fp16 1 202.97 203.46 -0.24%
distilgpt2_fp16 16 2,090.55 791.60 164.09% 🔆
yolov5s 1 176.68 157.53 12.15% 🔆
tinyllama 1 45.99 28.67 60.43% 🔆
vicuna-fastchat 1 44.13 33.14 33.16% 🔆
whisper-tiny-encoder 1 417.60 418.36 -0.18%
whisper-tiny-decoder 1 413.11 128.92 220.44% 🔆
llama2_7b 1 10.07 11.70 -13.86% 🔴
qwen1.5-7b 1 23.59 15.16 55.57% 🔆
phi3-3.8b 1 25.64 13.69 87.31% 🔆
llama3-8b 1 21.64 15.19 42.47% 🔆
whisper-large-encoder 1 10.28 5.78 77.83% 🔆
whisper-large-decoder 1 34.57 31.17 10.92% 🔆
mistral-7b 1 19.11 21.52 -11.18% 🔴
FLUX.1-schnell 1 767.34 586.06 30.93% 🔆

Regressions detected 🔴

@gh-app-migraphx-bot-pr-write

gh-app-migraphx-bot-pr-write Bot commented Jun 26, 2026

Copy link
Copy Markdown
Test Status Result
bert-mrpc-onnx PASSED: MIGraphX meets tolerance
bert-mrpc-tf PASSED: MIGraphX meets tolerance
pytorch-examples-wlang-gru PASSED: MIGraphX meets tolerance
pytorch-examples-wlang-lstm PASSED: MIGraphX meets tolerance
dlrm-criteoterabyte PASSED: MIGraphX meets tolerance
agentmodel PASSED: MIGraphX meets tolerance
unet PASSED: MIGraphX meets tolerance
resnet50v1 PASSED: MIGraphX meets tolerance
bert_base_cased_fp16 PASSED: MIGraphX meets tolerance
bert_large_uncased_fp16 🔴 FAILED: MIGraphX is not within tolerance - check verbose output
bert_large PASSED: MIGraphX meets tolerance
yolov5s PASSED: MIGraphX meets tolerance
tinyllama PASSED: MIGraphX meets tolerance
vicuna-fastchat PASSED: MIGraphX meets tolerance
whisper-tiny-encoder PASSED: MIGraphX meets tolerance
whisper-tiny-decoder PASSED: MIGraphX meets tolerance
distilgpt2_fp16 PASSED: MIGraphX meets tolerance
llama2_7b PASSED: MIGraphX meets tolerance
qwen1.5-7b PASSED: MIGraphX meets tolerance
phi3-3.8b PASSED: MIGraphX meets tolerance
llama3-8b PASSED: MIGraphX meets tolerance
whisper-large-encoder PASSED: MIGraphX meets tolerance
whisper-large-decoder PASSED: MIGraphX meets tolerance
mistral-7b PASSED: MIGraphX meets tolerance
FLUX.1-schnell PASSED: MIGraphX meets tolerance

@ahsan-ca ahsan-ca 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.

Looks good. A unit test might be helpful.

@CharlieL7 CharlieL7 changed the title Skip horizontal fusion on dynamic shaped inputs Skip fuse_horizontal pass on dynamic shaped inputs Jun 29, 2026
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