Skip to content

Dynamic concat gpu support#5032

Draft
turneram wants to merge 9 commits into
developfrom
dynamic-concat-pointwise
Draft

Dynamic concat gpu support#5032
turneram wants to merge 9 commits into
developfrom
dynamic-concat-pointwise

Conversation

@turneram

@turneram turneram commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Motivation

Dynamic concat is required to run dynamic kv-cache

Technical Details

Adds changes needed to run concat with dynamic shape inputs on gpu.

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.

Comment on lines +100 to +102
std::transform(args.begin(), args.end(), std::back_inserter(gpu_args), [&](const argument& arg) {
return ensure_gpu_arg(arg, temps);
});

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.

[format.py] reported by reviewdog 🐶

Suggested change
std::transform(args.begin(), args.end(), std::back_inserter(gpu_args), [&](const argument& arg) {
return ensure_gpu_arg(arg, temps);
});
std::transform(args.begin(),
args.end(),
std::back_inserter(gpu_args),
[&](const argument& arg) { return ensure_gpu_arg(arg, temps); });

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

Copy link
Copy Markdown
Test Batch New Rate (d02ac3) Old Rate (939a41)* Diff Status
torchvision-resnet50 64 1,830.01 3,137.65 -41.68% 🔴
torchvision-resnet50_fp16 64 2,310.82 6,664.17 -65.32% 🔴
torchvision-densenet121 32 2,490.76 2,696.53 -7.63% 🔴
torchvision-densenet121_fp16 32 5,044.53 4,546.91 10.94% 🔆
torchvision-inceptionv3 32 1,139.23 1,789.44 -36.34% 🔴
torchvision-inceptionv3_fp16 32 3,826.82 2,837.26 34.88% 🔆
cadene-inceptionv4 16 650.03 820.89 -20.81% 🔴
cadene-resnext64x4 16 784.40 584.90 34.11% 🔆
slim-mobilenet 64 7,087.85 7,391.43 -4.11%
slim-nasnetalarge 64 86.46 208.95 -58.62% 🔴
slim-resnet50v2 64 2,065.93 2,401.77 -13.98% 🔴
bert-mrpc-onnx 8 200.99 888.28 -77.37% 🔴
bert-mrpc-tf 1 78.06 369.82 -78.89% 🔴
pytorch-examples-wlang-gru 1 147.03 482.91 -69.55% 🔴
pytorch-examples-wlang-lstm 1 93.59 436.18 -78.54% 🔴
torchvision-resnet50_1 1 140.66 699.41 -79.89% 🔴
cadene-dpn92_1 1 51.24 442.31 -88.42% 🔴
cadene-resnext101_1 1 46.64 364.07 -87.19% 🔴
onnx-taau-downsample 1 248.96 401.79 -38.04% 🔴
dlrm-criteoterabyte 1 22.77 31.86 -28.53% 🔴
dlrm-criteoterabyte_fp16 1 44.91 51.73 -13.19% 🔴
agentmodel 1 7,467.59 12,642.67 -40.93% 🔴
unet_fp16 2 13.33 57.08 -76.65% 🔴
resnet50v1_fp16 1 237.10 943.42 -74.87% 🔴
resnet50v1_int8 1 232.10 935.85 -75.20% 🔴
bert_base_cased_fp16 64 818.17 1,072.35 -23.70% 🔴
bert_large_uncased_fp16 32 240.00 342.15 -29.86% 🔴
bert_large_fp16 1 50.78 80.24 -36.71% 🔴
distilgpt2_fp16 16 1,232.49 859.88 43.33% 🔆
yolov5s 1 43.09 526.66 -91.82% 🔴
tinyllama 1 8.74 45.81 -80.91% 🔴
vicuna-fastchat 1 15.63 44.09 -64.55% 🔴
whisper-tiny-encoder 1 292.91 412.40 -28.97% 🔴
whisper-tiny-decoder 1 147.27 410.21 -64.10% 🔴
llama2_7b 1 18.84 20.70 -8.97% 🔴
qwen1.5-7b 1 23.66 23.58 0.32%
phi3-3.8b 1 10.77 26.47 -59.31% 🔴
llama3-8b 1 14.68 21.78 -32.61% 🔴
whisper-large-encoder 1 8.07 10.16 -20.56% 🔴
whisper-large-decoder 1 106.74 105.84 0.85%
mistral-7b 1 9.67 23.72 -59.23% 🔴
FLUX.1-schnell 1 178.19 771.10 -76.89% 🔴

Regressions detected 🔴

* No develop baseline was found for this PR's branch point; compared against the latest available develop run instead.

@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

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