Skip to content

[OMNIML-6228] Shrink the input of the conv/IsInf ONNX test model - #2947

Merged
shengliangxu merged 1 commit into
mainfrom
shengliangx/ci-flaky-conv-isinf
Oct 23, 2026
Merged

shengliangxu merged 1 commit into
mainfrom
shengliangx/ci-flaky-conv-isinf

Conversation

@shengliangxu

@shengliangxu shengliangxu commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

Type of change: Bug fix (tests)

build_conv_isinf_model builds a 6x32x900x256 fp32 input (177 MB per activation, and the Conv/Cast/IsInf/Where chain keeps several). The three tests that use it (test_conv_isinf_conversion[13|21] in tests/unit/onnx/autocast/test_autocast.py, test_conv_isinf_int8 in tests/unit/onnx/quantization/test_qdq_rules_int8.py) check node dtypes and QDQ placement, never values. The input is now 1x32x64x64; the assertions are unchanged.

Measured as the peak summed RSS of the pytest process tree (imports included) on a CPU host, run per file:

file before after time
test_autocast.py 2,579 MiB 1,349 MiB 5.0 s to 1.5 s
test_qdq_rules_int8.py 2,304 MiB 1,524 MiB 5.1 s to 3.5 s

Why it matters: since the unit tests run under pytest-xdist (#2845), four workers run files at once on a 4-vCPU runner, and each worker that has used cpu_dist_workers keeps a two-rank pool alive. Across the 251 unit files run alone, these two are the 9th and 10th largest (the eight above them are six pool-based quantization/export files, test_gptq.py and test_distill.py). The multi-version (unit-3.12(torch_28, ...)) job has been stopped by the runner ("The runner has received a shutdown signal", no failed test) 22 times since xdist merged: 15% of its 146 runs, 4 of 65 on branches other than the hfep stack, and no other torch version. It was reported on hfep #2752 five attempts in a row. These stops come from the whole job's memory (the CI speed-up work measured 14,608-15,708 MiB at the peak with --dist loadfile and is working on the structural part, the pool kept per worker), so this PR removes one 0.8-1.2 GiB spike, not the whole cause.

Usage

N/A

Testing

  • tests/unit/onnx/autocast/test_autocast.py and tests/unit/onnx/quantization/test_qdq_rules_int8.py: 31 passed on current main with the change applied.
  • Memory and time: the table above (CPU host, torch 2.10, each file alone).
  • Not a GPU change; nothing to run on GPU.

Before your PR is "Ready for review"

  • Is this change backward compatible?: ✅
  • If you copied code from any other sources or added a new PIP dependency, did you follow guidance in CONTRIBUTING.md: N/A
  • Did you write any new necessary tests?: N/A (smaller input for existing tests)
  • Did you update Changelog?: N/A
  • Did you get Claude approval on this PR?: ❌ (to be run)

Summary by CodeRabbit

  • Tests
    • Updated a test model to use smaller tensor dimensions. This changes the test data size; no end-user behavior is affected.

build_conv_isinf_model builds a 6x32x900x256 fp32 input (177 MB per activation, and the
Conv/Cast/IsInf/Where chain keeps several of them), but the three tests that use it check node
dtypes and QDQ placement, never values. Measured as the peak summed RSS of the pytest process tree
(imports included) on a CPU host, test_autocast.py peaks at 2.6 GB and test_qdq_rules_int8.py at
2.3 GB; with a 1x32x64x64 input they peak at 1.3 GB and 1.5 GB and run 3.5 s and 1.6 s faster.
The assertions are unchanged.

Under pytest-xdist the memory adds up: four workers run files at once, and each worker that has
used cpu_dist_workers keeps its two-rank pool alive. Of the 251 unit test files run alone, these
two are the 9th and 10th largest; the eight above them (2.9-3.6 GB) are six files that use the
pool, test_gptq.py (it spawns its own processes) and test_distill.py. A transient spike of 0.8-1.2 GB
in one worker is what tips a 4-vCPU runner over: the hfep PRs' torch_28 unit jobs were stopped by
the runner ("received a shutdown signal") with these tests in flight in 9 of 33 runs.

Signed-off-by: Shengliang Xu <shengliangx@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Oct 22, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
📥 Commits

Reviewing files that changed from the base of the PR and between 5945aa8 and 842d5c9.

📒 Files selected for processing: 1
  • tests/_test_utils/onnx/lib_test_models.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

📝 Walkthrough

The build_conv_isinf_model test model now uses smaller input and output tensor shapes. A comment states that the test checks node dtypes rather than values.

Changes: ONNX test model

Layer / File(s) Summary
Update convolution test model shape
tests/_test_utils/onnx/lib_test_models.py
build_conv_isinf_model changes its input and output shapes from (6, 32, 900, 256) to (1, 32, 64, 64). A comment states that the test checks node dtypes rather than values.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Suggested reviewers: gcunhase

Merge Risk: ⚪ Minimal · up to 842d5

This test-only shape reduction has no established merge-blocking risk.

Pre-merge checks: Passed 5 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 5 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: reducing the input size of the conv/IsInf ONNX test model.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Security Anti-Patterns Passed PASS. The pull request changes only tests/_test_utils/onnx/lib_test_models.py, outside the modelopt package and examples Python paths covered by this check. The diff only changes ONNX test tenso…
Full details: Security Anti-Patterns

Explanation

PASS. The pull request changes only tests/_test_utils/onnx/lib_test_models.py, outside the modelopt package and examples Python paths covered by this check. The diff only changes ONNX test tensor shapes and adds a comment. It adds no torch.load, numpy.load, trust_remote_code, eval, exec, # nosec, or dependency changes.

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@shengliangxu

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.18%. Comparing base (92a3cd5) to head (842d5c9).
⚠️ Report is 36 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2947      +/-   ##
==========================================
+ Coverage   70.08%   78.18%   +8.10%     
==========================================
  Files         659      659              
  Lines       74089    77529    +3440     
==========================================
+ Hits        51923    60619    +8696     
+ Misses      22166    16910    -5256     
Flag Coverage Δ
examples-diffusers 20.04% <ø> (ø)
examples-gpt-oss 13.51% <ø> (ø)
examples-hf_ptq 23.18% <ø> (-0.04%) ⬇️
examples-llm_distill 13.59% <ø> (-0.01%) ⬇️
examples-llm_eval 17.23% <ø> (ø)
examples-llm_qat 17.48% <ø> (-0.01%) ⬇️
examples-llm_sparsity 15.76% <ø> (ø)
examples-megatron_bridge 26.40% <ø> (-0.18%) ⬇️
examples-specdec_bench 13.29% <ø> (ø)
examples-speculative_decoding 17.47% <ø> (ø)
examples-torch_onnx 21.39% <ø> (ø)
examples-torch_trt 15.24% <ø> (ø)
examples-vllm_serve 15.08% <ø> (ø)
gpu 59.24% <ø> (+37.11%) ⬆️
regression 15.10% <ø> (-0.01%) ⬇️
unit 61.05% <ø> (+0.55%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shengliangxu
shengliangxu marked this pull request as ready for review October 22, 2026 20:21
@shengliangxu
shengliangxu requested a review from a team as a code owner October 22, 2026 20:21

@meenchen meenchen 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.

Bot review (gpt-6.1-sol) — DM the bot to share feedback.

LGTM: the smaller fixture preserves graph topology and all dtype/QDQ assertions; human sign-off is required for the justified existing-test fixture edit.

Needs action:

  • Confirm the fixture-size reduction in tests/_test_utils/onnx/lib_test_models.py; all three callers check structure and precision, not large-shape behavior.

@shengliangxu
shengliangxu merged commit 3a34d65 into main Oct 23, 2026
57 checks passed
@shengliangxu
shengliangxu deleted the shengliangx/ci-flaky-conv-isinf branch October 23, 2026 00:47
@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-23 00:47 UTC

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.

2 participants