Skip to content

fix for intra op threads issue#4810

Merged
causten merged 3 commits intodevelopfrom
ort-affinity-flood-intra-op-threads
Apr 23, 2026
Merged

fix for intra op threads issue#4810
causten merged 3 commits intodevelopfrom
ort-affinity-flood-intra-op-threads

Conversation

@aarushjain29
Copy link
Copy Markdown
Contributor

@aarushjain29 aarushjain29 commented Apr 21, 2026

Motivation

Adds a new CLI option to the accuracy checker to control ONNX Runtime session threading, intended to mitigate intra-op thread affinity issues.

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 April 21, 2026 03:52
@aarushjain29 aarushjain29 requested a review from causten as a code owner April 21, 2026 03:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new CLI option to the accuracy checker to control ONNX Runtime session threading, intended to mitigate intra-op thread affinity issues (notably in container/cgroup cpuset environments).

Changes:

  • Add --ort-intra-op-num-threads CLI flag to set onnxruntime.SessionOptions.intra_op_num_threads.
  • When the flag is provided, also set SessionOptions.inter_op_num_threads = 1 alongside intra-op threads.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tools/accuracy/accuracy_checker.py
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4810   +/-   ##
========================================
  Coverage    92.49%   92.49%           
========================================
  Files          583      583           
  Lines        29562    29562           
========================================
  Hits         27343    27343           
  Misses        2219     2219           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@causten
Copy link
Copy Markdown
Collaborator

causten commented Apr 21, 2026

Test Batch New Rate (92020d) Old Rate (0681c6) Diff Status
torchvision-resnet50 64 3,124.97 3,166.53 -1.31%
torchvision-resnet50_fp16 64 6,510.15 6,820.89 -4.56%
torchvision-densenet121 32 2,623.38 2,422.10 8.31% 🔆
torchvision-densenet121_fp16 32 4,378.43 4,086.15 7.15% 🔆
torchvision-inceptionv3 32 1,799.51 1,658.01 8.53% 🔆
torchvision-inceptionv3_fp16 32 2,774.00 2,677.22 3.61%
cadene-inceptionv4 16 826.45 789.08 4.74%
cadene-resnext64x4 16 779.02 790.86 -1.50%
slim-mobilenet 64 8,322.37 8,521.12 -2.33%
slim-nasnetalarge 64 228.14 218.37 4.48%
slim-resnet50v2 64 3,271.98 3,288.39 -0.50%
bert-mrpc-onnx 8 1,123.23 1,108.72 1.31%
bert-mrpc-tf 1 454.57 456.31 -0.38%
pytorch-examples-wlang-gru 1 359.95 338.72 6.27% 🔆
pytorch-examples-wlang-lstm 1 468.17 452.66 3.43%
torchvision-resnet50_1 1 758.83 748.69 1.35%
cadene-dpn92_1 1 438.41 403.71 8.60% 🔆
cadene-resnext101_1 1 366.33 323.10 13.38% 🔆
onnx-taau-downsample 1 397.99 391.86 1.57%
dlrm-criteoterabyte 1 32.70 31.56 3.61%
dlrm-criteoterabyte_fp16 1 51.98 50.03 3.92%
agentmodel 1 11,618.03 10,347.89 12.27% 🔆
unet_fp16 2 56.22 55.66 1.01%
resnet50v1_fp16 1 962.35 994.78 -3.26%
resnet50v1_int8 1 926.81 943.47 -1.77%
bert_base_cased_fp16 64 1,111.39 1,086.36 2.30%
bert_large_uncased_fp16 32 345.47 338.39 2.09%
bert_large_fp16 1 200.10 198.67 0.72%
distilgpt2_fp16 16 2,103.80 2,066.44 1.81%
yolov5s 1 553.28 549.43 0.70%
tinyllama 1 45.44 43.80 3.75%
vicuna-fastchat 1 43.66 42.63 2.43%
whisper-tiny-encoder 1 413.58 406.13 1.83%
whisper-tiny-decoder 1 406.92 395.21 2.96%
llama2_7b 1 20.22 19.10 5.89% 🔆
qwen1.5-7b 1 23.24 23.42 -0.77%
phi3-3.8b 1 26.41 26.63 -0.82%
llama3-8b 1 21.51 21.68 -0.74%
whisper-large-encoder 1 10.22 10.12 0.99%
whisper-large-decoder 1 102.07 101.03 1.03%
mistral-7b 1 23.80 23.64 0.70%
FLUX.1-schnell 1 752.17 737.25 2.02%

Check flagged results 🔆

@causten
Copy link
Copy Markdown
Collaborator

causten commented Apr 21, 2026

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 ERROR - check error output
traceback
Traceback (most recent call last):
File "/src/AMDMIGraphX/tools/accuracy/accuracy_checker.py", line 377, in
main()
File "/src/AMDMIGraphX/tools/accuracy/accuracy_checker.py", line 224, in main
model = migraphx.parse_onnx(model_name, default_dim_value=batch)
RuntimeError: /src/AMDMIGraphX/src/include/migraphx/op/convolution.hpp:103: normalize_compute_shape: CONVOLUTION: mismatched channel numbers
whisper-large-decoder PASSED: MIGraphX meets tolerance
mistral-7b PASSED: MIGraphX meets tolerance
FLUX.1-schnell PASSED: MIGraphX meets tolerance

@causten
Copy link
Copy Markdown
Collaborator

causten commented Apr 21, 2026

The distilgpt2_fp16 accuracy check is a real accuracy failure. Can you review your PR

Comment thread tools/accuracy/accuracy_checker.py Outdated
@causten causten merged commit f732eba into develop Apr 23, 2026
18 of 19 checks passed
@causten causten deleted the ort-affinity-flood-intra-op-threads branch April 23, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants