Skip to content

SSD static sidestep#5063

Draft
CharlieL7 wants to merge 8 commits into
developfrom
ssd_static_sidestep
Draft

SSD static sidestep#5063
CharlieL7 wants to merge 8 commits into
developfrom
ssd_static_sidestep

Conversation

@CharlieL7

Copy link
Copy Markdown
Collaborator

Motivation

  • Attempt to get static shape rewrite of SSD model.
  • I don't think this would be a good approach even if I cleaned it up. It's equivalent to the pad-slice method with a single maximum kernel size but significantly more convoluted because it's trying to avoid dynamic shapes.

Technical Details

  • Basically the majority of the post-processing step of the SSD model needed to be rewritten.
  • The NMS -> Gather -> TopK needs a Where mask.
  • The k calculation for the TopK needed to be moved past the Gathers after TopK and done as multiple dynamic slices at the end of the model.
  • The TopK needed to be changed to have the k value set to the maximum literal concatenated before the reduce_min of the k calculation. Otherwise it was a massive number that didn't compile.
  • Removed the MIGRAPHX_USE_DYNAMIC_NMS environment variable.

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.

@CharlieL7 CharlieL7 self-assigned this Jul 14, 2026
@gh-app-migraphx-bot-pr-write

Copy link
Copy Markdown
Test Batch New Rate (3fe3b6) Old Rate (4bcfe7) Diff Status
torchvision-resnet50 64 807.52 3,158.93 -74.44% 🔴
torchvision-resnet50_fp16 64 1,105.52 6,668.55 -83.42% 🔴
torchvision-densenet121 32 607.90 2,707.64 -77.55% 🔴
torchvision-densenet121_fp16 32 4,307.84 4,558.06 -5.49% 🔴
torchvision-inceptionv3 32 748.55 1,797.18 -58.35% 🔴
torchvision-inceptionv3_fp16 32 388.30 2,825.28 -86.26% 🔴
cadene-inceptionv4 16 154.93 822.57 -81.17% 🔴
cadene-resnext64x4 16 498.52 783.23 -36.35% 🔴
slim-mobilenet 64 7,116.21 8,423.81 -15.52% 🔴
slim-nasnetalarge 64 217.83 229.41 -5.05% 🔴
slim-resnet50v2 64 3,176.30 3,176.86 -0.02%
bert-mrpc-onnx 8 1,172.24 1,170.11 0.18%
bert-mrpc-tf 1 490.85 494.35 -0.71%
pytorch-examples-wlang-gru 1 448.07 598.80 -25.17% 🔴
pytorch-examples-wlang-lstm 1 321.05 389.11 -17.49% 🔴
torchvision-resnet50_1 1 768.38 750.26 2.42%
cadene-dpn92_1 1 332.78 438.99 -24.19% 🔴
cadene-resnext101_1 1 193.63 364.33 -46.85% 🔴
onnx-taau-downsample 1 399.49 401.95 -0.61%
dlrm-criteoterabyte 1 32.28 32.67 -1.20%
dlrm-criteoterabyte_fp16 1 52.23 52.59 -0.68%
agentmodel 1 11,724.59 7,471.94 56.91% 🔆
unet_fp16 2 50.39 57.41 -12.23% 🔴
resnet50v1_fp16 1 948.54 940.42 0.86%
resnet50v1_int8 1 396.81 950.24 -58.24% 🔴
bert_base_cased_fp16 64 1,104.38 1,102.43 0.18%
bert_large_uncased_fp16 32 347.72 346.73 0.29%
bert_large_fp16 1 204.01 203.03 0.48%
distilgpt2_fp16 16 2,100.31 2,092.22 0.39%
yolov5s 1 559.48 559.72 -0.04%
tinyllama 1 45.97 46.00 -0.07%
vicuna-fastchat 1 44.13 44.11 0.04%
whisper-tiny-encoder 1 415.25 415.41 -0.04%
whisper-tiny-decoder 1 412.66 410.21 0.60%
llama2_7b 1 20.99 20.95 0.16%
qwen1.5-7b 1 23.68 23.67 0.06%
phi3-3.8b 1 26.88 26.84 0.17%
llama3-8b 1 21.90 21.85 0.23%
whisper-large-encoder 1 10.22 10.21 0.15%
whisper-large-decoder 1 106.94 104.30 2.53%
mistral-7b 1 23.92 23.89 0.15%
FLUX.1-schnell 1 250.08 747.04 -66.52% 🔴

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
distilgpt2_fp16 🔴 FAILED: MIGraphX is not within tolerance - check verbose output
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