Skip to content

Add dynamic support to Shape and Expand#5074

Open
turneram wants to merge 7 commits into
developfrom
dynamic-expand-shape
Open

Add dynamic support to Shape and Expand#5074
turneram wants to merge 7 commits into
developfrom
dynamic-expand-shape

Conversation

@turneram

Copy link
Copy Markdown
Contributor

Motivation

To enable dynamic shape support for operators upstream from dynamic kv-cache.

Technical Details

Updates how Expand and Shape are parsed and dispatched so that dynamic past-sequence-length can propagate from input to attention.

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.

Follow the LLVM AI Tool Use Policy for contributions using AI.

@turneram
turneram requested a review from causten as a code owner July 17, 2026 16:17
@gh-app-migraphx-bot-pr-write

gh-app-migraphx-bot-pr-write Bot commented Jul 17, 2026

Copy link
Copy Markdown
Test Batch New Rate (d13df3) Old Rate (1a5bb6) Diff Status
torchvision-resnet50 64 3,264.96 3,265.81 -0.03%
torchvision-resnet50_fp16 64 7,550.67 7,548.56 0.03%
torchvision-densenet121 32 2,451.54 2,481.85 -1.22%
torchvision-densenet121_fp16 32 5,006.37 4,975.40 0.62%
torchvision-inceptionv3 32 2,050.01 2,060.05 -0.49%
torchvision-inceptionv3_fp16 32 4,412.99 4,414.40 -0.03%
cadene-inceptionv4 16 821.09 584.00 40.60% 🔆
cadene-resnext64x4 16 783.25 782.84 0.05%
slim-mobilenet 64 8,388.05 7,190.62 16.65% 🔆
slim-nasnetalarge 64 198.77 222.84 -10.80% 🔴
slim-resnet50v2 64 3,108.00 2,017.65 54.04% 🔆
bert-mrpc-onnx 8 1,107.56 1,168.85 -5.24% 🔴
bert-mrpc-tf 1 501.75 487.56 2.91%
pytorch-examples-wlang-gru 1 480.38 477.33 0.64%
pytorch-examples-wlang-lstm 1 447.10 387.83 15.28% 🔆
torchvision-resnet50_1 1 1,041.21 1,038.23 0.29%
cadene-dpn92_1 1 471.70 449.51 4.94%
cadene-resnext101_1 1 364.92 365.36 -0.12%
onnx-taau-downsample 1 846.34 844.73 0.19%
dlrm-criteoterabyte 1 13.94 17.44 -20.07% 🔴
dlrm-criteoterabyte_fp16 1 26.81 31.21 -14.08% 🔴
agentmodel 1 8,913.13 5,880.42 51.57% 🔆
unet_fp16 2 23.25 52.15 -55.42% 🔴
resnet50v1_fp16 1 1,394.91 1,385.99 0.64%
resnet50v1_int8 1 1,825.84 1,657.40 10.16% 🔆
bert_base_cased_fp16 64 439.17 1,022.83 -57.06% 🔴
bert_large_uncased_fp16 32 124.42 339.30 -63.33% 🔴
bert_large_fp16 1 204.47 205.64 -0.57%
distilgpt2_fp16 16 2,083.34 2,086.12 -0.13%
yolov5s 1 557.44 560.85 -0.61%
tinyllama 1 22.65 45.80 -50.56% 🔴
vicuna-fastchat 1 16.92 44.03 -61.56% 🔴
whisper-tiny-encoder 1 412.50 328.75 25.48% 🔆
whisper-tiny-decoder 1 414.62 214.20 93.57% 🔆
llama2_7b 1 6.10 14.70 -58.50% 🔴
qwen1.5-7b 1 10.14 23.49 -56.85% 🔴
phi3-3.8b 1 18.33 26.78 -31.54% 🔴
llama3-8b 1 19.05 21.70 -12.20% 🔴
whisper-large-encoder 1 10.20 8.77 16.32% 🔆
whisper-large-decoder 1 105.50 109.89 -3.99%
mistral-7b 1 23.53 23.65 -0.50%
FLUX.1-schnell 1 770.95 172.94 345.80% 🔆

Regressions detected 🔴

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

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
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

turneram and others added 5 commits July 17, 2026 17:56
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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