Skip to content

Don't throw an exception when using MIGRAPHX_GPU_DUMP_BENCHMARK_MXR#5025

Open
ahsan-ca wants to merge 1 commit into
developfrom
exit-wo-exception-benchmark-mxr
Open

Don't throw an exception when using MIGRAPHX_GPU_DUMP_BENCHMARK_MXR#5025
ahsan-ca wants to merge 1 commit into
developfrom
exit-wo-exception-benchmark-mxr

Conversation

@ahsan-ca

@ahsan-ca ahsan-ca commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Motivation

We were throwing an exception when dumping benchmark-mxr files,
with MIGRAPHX_GPU_DUMP_BENCHMARK_MXR. This can be confusing
for the users. With this change, we print the message and exit without
throwing an exception.

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.

@ahsan-ca ahsan-ca self-assigned this Jun 30, 2026
@ahsan-ca ahsan-ca requested a review from causten as a code owner June 30, 2026 20:19
Copilot AI review requested due to automatic review settings June 30, 2026 20:19
@ahsan-ca ahsan-ca added the high priority A PR with high priority for review and merging. label Jun 30, 2026

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

This PR adjusts the GPU compilation flow when MIGRAPHX_GPU_DUMP_BENCHMARK_MXR is set so that, after dumping benchmark MXR files, it logs an informational message and terminates without throwing an exception.

Changes:

  • Replaced a MIGRAPHX_THROW(...) path with a log::info() message and early termination when benchmark MXR dumping is enabled.
  • Added <cstdlib> to support the new termination call.

Comment on lines +592 to 596
log::info() << "Benchmark MXR files dumped to " << mxr_path
<< ". Run the MXR files to create a problem cache, then recompile with the "
"cache.";
std::exit(0);
}
@gh-app-migraphx-bot-pr-write

Copy link
Copy Markdown
Test Batch New Rate (ba0456) Old Rate (9ad497)* Diff Status
torchvision-resnet50 64 1,165.80 3,148.35 -62.97% 🔴
torchvision-resnet50_fp16 64 1,445.93 6,662.40 -78.30% 🔴
torchvision-densenet121 32 582.17 2,707.30 -78.50% 🔴
torchvision-densenet121_fp16 32 4,358.15 4,558.12 -4.39%
torchvision-inceptionv3 32 1,793.24 1,797.44 -0.23%
torchvision-inceptionv3_fp16 32 2,799.50 2,824.56 -0.89%
cadene-inceptionv4 16 788.12 807.16 -2.36%
cadene-resnext64x4 16 411.76 387.68 6.21% 🔆
slim-mobilenet 64 8,387.56 8,283.02 1.26%
slim-nasnetalarge 64 155.08 229.53 -32.43% 🔴
slim-resnet50v2 64 2,842.84 3,177.49 -10.53% 🔴
bert-mrpc-onnx 8 516.98 1,171.12 -55.86% 🔴
bert-mrpc-tf 1 493.17 479.25 2.90%
pytorch-examples-wlang-gru 1 328.63 327.85 0.24%
pytorch-examples-wlang-lstm 1 457.39 457.62 -0.05%
torchvision-resnet50_1 1 230.36 765.65 -69.91% 🔴
cadene-dpn92_1 1 285.08 447.53 -36.30% 🔴
cadene-resnext101_1 1 124.33 366.68 -66.09% 🔴
onnx-taau-downsample 1 272.87 401.14 -31.98% 🔴
dlrm-criteoterabyte 1 32.39 32.57 -0.55%
dlrm-criteoterabyte_fp16 1 51.84 52.61 -1.47%
agentmodel 1 9,851.15 8,132.20 21.14% 🔆
unet_fp16 2 28.14 57.28 -50.88% 🔴
resnet50v1_fp16 1 932.28 932.12 0.02%
resnet50v1_int8 1 941.35 943.10 -0.19%
bert_base_cased_fp16 64 1,098.32 1,102.38 -0.37%
bert_large_uncased_fp16 32 344.63 347.33 -0.78%
bert_large_fp16 1 92.97 205.67 -54.80% 🔴
distilgpt2_fp16 16 2,096.56 2,094.34 0.11%
yolov5s 1 597.57 597.91 -0.06%
tinyllama 1 46.00 45.98 0.03%
vicuna-fastchat 1 39.96 44.11 -9.41% 🔴
whisper-tiny-encoder 1 62.04 420.33 -85.24% 🔴
whisper-tiny-decoder 1 117.63 416.77 -71.77% 🔴
llama2_7b 1 20.37 20.50 -0.67%
qwen1.5-7b 1 23.50 23.60 -0.43%
phi3-3.8b 1 26.81 26.79 0.08%
llama3-8b 1 10.98 21.77 -49.58% 🔴
whisper-large-encoder 1 10.28 10.31 -0.36%
whisper-large-decoder 1 106.07 105.11 0.92%
mistral-7b 1 23.77 23.78 -0.02%
FLUX.1-schnell 1 765.88 751.64 1.90%

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

high priority A PR with high priority for review and merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants