Skip to content

[BE][CI] Fold ONNX test into 'onnx' shard of py3.10-clang18 build - #178928

Closed
malfet wants to merge 6 commits into
gh/malfet/799/basefrom
gh/malfet/799/head
Closed

malfet wants to merge 6 commits into
gh/malfet/799/basefrom
gh/malfet/799/head

Conversation

@malfet

@malfet malfet commented Mar 31, 2026 •

Copy link
Copy Markdown
Collaborator

Stack from ghstack (oldest at bottom):

As ONNX build job is now identical to the regular py3.10-clang18 build
And each ONNX tests shard take ~15 minutes total, so 2 shards are unnecessary.
Remove ONNX special case from _linux-test.yml and add path to .ci/pytorch/test.sh to call scripts/onnx/test.sh for onnx test_config shard

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Mar 31, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/178928

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 73cd58c with merge base c131134 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot Bot added the topic: not user facing topic category label Mar 31, 2026
malfet added a commit that referenced this pull request Mar 31, 2026
As ONNX build job is now identical to the regular py3.10-clang18 build
And ONNX tests take ~15 minutes total, so 2 shards is unnecessary.

Update _linux-test.yml to route TEST_CONFIG=='onnx' to .ci/onnx/test.sh
(previously only keyed off BUILD_ENVIRONMENT containing 'onnx').


ghstack-source-id: f1fa612
Pull-Request: #178928
@malfet
malfet requested a review from a team as a code owner March 31, 2026 20:42
Comment thread .github/workflows/_linux-test.yml Outdated
if [[ $TEST_CONFIG == 'multigpu' ]]; then
TEST_COMMAND=.ci/pytorch/multigpu-test.sh
elif [[ $BUILD_ENVIRONMENT == *onnx* ]]; then
elif [[ $BUILD_ENVIRONMENT == *onnx* ]] || [[ $TEST_CONFIG == 'onnx' ]]; then

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.

just for my own knowledge, what is different from test run with onnx build_env,
and with test_config?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Too many env vars, will restrict it to TEST_CONFIG

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Deleted this whole logic, deleted few more stale files

[ghstack-poisoned]
malfet added a commit that referenced this pull request Apr 1, 2026
As ONNX build job is now identical to the regular py3.10-clang18 build
And ONNX tests take ~15 minutes total, so 2 shards is unnecessary.

Update _linux-test.yml to route TEST_CONFIG=='onnx' to .ci/onnx/test.sh
(previously only keyed off BUILD_ENVIRONMENT containing 'onnx').

ghstack-source-id: 2155515
Pull-Request: #178928
[ghstack-poisoned]
malfet added a commit that referenced this pull request Apr 1, 2026
As ONNX build job is now identical to the regular py3.10-clang18 build
And ONNX tests take ~15 minutes total, so 2 shards is unnecessary.

Update _linux-test.yml to route TEST_CONFIG=='onnx' to .ci/onnx/test.sh
(previously only keyed off BUILD_ENVIRONMENT containing 'onnx').

ghstack-source-id: c97aafc
Pull-Request: #178928
[ghstack-poisoned]
malfet added a commit that referenced this pull request Apr 1, 2026
As ONNX build job is now identical to the regular py3.10-clang18 build
And ONNX tests take ~15 minutes total, so 2 shards is unnecessary.

Update _linux-test.yml to route TEST_CONFIG=='onnx' to .ci/onnx/test.sh
(previously only keyed off BUILD_ENVIRONMENT containing 'onnx').

ghstack-source-id: 16ed13a
Pull-Request: #178928
@malfet malfet changed the title [CI] Fold ONNX test into 'onnx' shard of py3.10-clang18 build [BE][CI] Fold ONNX test into 'onnx' shard of py3.10-clang18 build Apr 1, 2026
[ghstack-poisoned]
malfet added a commit that referenced this pull request Apr 1, 2026
As ONNX build job is now identical to the regular py3.10-clang18 build
And ONNX tests take ~15 minutes total, so 2 shards is unnecessary.

Update _linux-test.yml to route TEST_CONFIG=='onnx' to .ci/onnx/test.sh
(previously only keyed off BUILD_ENVIRONMENT containing 'onnx').

ghstack-source-id: 16d8fb6
Pull-Request: #178928
[ghstack-poisoned]
malfet added a commit that referenced this pull request Apr 1, 2026
As ONNX build job is now identical to the regular py3.10-clang18 build
And ONNX tests take ~15 minutes total, so 2 shards is unnecessary.

Update _linux-test.yml to route TEST_CONFIG=='onnx' to .ci/onnx/test.sh
(previously only keyed off BUILD_ENVIRONMENT containing 'onnx').

ghstack-source-id: 07e1dd2
Pull-Request: #178928
@malfet

malfet commented Apr 2, 2026

Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge -f "Let's hope everything will be green when merged to trunk"

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

IvanKobzarev pushed a commit to IvanKobzarev/pytorch that referenced this pull request Apr 3, 2026
…torch#178928)

As ONNX build job is now identical to the regular py3.10-clang18 build
And each ONNX tests shard take ~15 minutes total, so 2 shards are unnecessary.
Remove ONNX special case from `_linux-test.yml` and add path to `.ci/pytorch/test.sh` to call `scripts/onnx/test.sh` for onnx test_config shard
Pull Request resolved: pytorch#178928
Approved by: https://github.com/yangw-dev
nklshy-aws pushed a commit to nklshy-aws/pytorch that referenced this pull request Apr 7, 2026
…torch#178928)

As ONNX build job is now identical to the regular py3.10-clang18 build
And each ONNX tests shard take ~15 minutes total, so 2 shards are unnecessary.
Remove ONNX special case from `_linux-test.yml` and add path to `.ci/pytorch/test.sh` to call `scripts/onnx/test.sh` for onnx test_config shard
Pull Request resolved: pytorch#178928
Approved by: https://github.com/yangw-dev
bobrenjc93 pushed a commit to bobrenjc93/pytorch that referenced this pull request Apr 9, 2026
…torch#178928)

As ONNX build job is now identical to the regular py3.10-clang18 build
And each ONNX tests shard take ~15 minutes total, so 2 shards are unnecessary.
Remove ONNX special case from `_linux-test.yml` and add path to `.ci/pytorch/test.sh` to call `scripts/onnx/test.sh` for onnx test_config shard
Pull Request resolved: pytorch#178928
Approved by: https://github.com/yangw-dev
bobrenjc93 pushed a commit to bobrenjc93/pytorch that referenced this pull request Apr 10, 2026
…torch#178928)

As ONNX build job is now identical to the regular py3.10-clang18 build
And each ONNX tests shard take ~15 minutes total, so 2 shards are unnecessary.
Remove ONNX special case from `_linux-test.yml` and add path to `.ci/pytorch/test.sh` to call `scripts/onnx/test.sh` for onnx test_config shard
Pull Request resolved: pytorch#178928
Approved by: https://github.com/yangw-dev
@github-actions
github-actions Bot deleted the gh/malfet/799/head branch May 2, 2026 02:26
gplutop7 pushed a commit to gplutop7/pytorch that referenced this pull request Jul 15, 2026
…torch#178928)

As ONNX build job is now identical to the regular py3.10-clang18 build
And each ONNX tests shard take ~15 minutes total, so 2 shards are unnecessary.
Remove ONNX special case from `_linux-test.yml` and add path to `.ci/pytorch/test.sh` to call `scripts/onnx/test.sh` for onnx test_config shard
Pull Request resolved: pytorch#178928
Approved by: https://github.com/yangw-dev
aws-kingrj pushed a commit to amazon-contributing/upstream-to-pytorch that referenced this pull request Jul 29, 2026
…torch#178928)

As ONNX build job is now identical to the regular py3.10-clang18 build
And each ONNX tests shard take ~15 minutes total, so 2 shards are unnecessary.
Remove ONNX special case from `_linux-test.yml` and add path to `.ci/pytorch/test.sh` to call `scripts/onnx/test.sh` for onnx test_config shard
Pull Request resolved: pytorch#178928
Approved by: https://github.com/yangw-dev
huydhn added a commit that referenced this pull request Sep 28, 2026
With every workflow naming its pod, the mapper has nothing left to translate.
Its other behaviours are gone too: the ROCm and XPU passthroughs return their
input unchanged, and the H100 `mt-` forcing is now literal in the workflows.

One behaviour does disappear with it. The script dropped `config: "onnx"` from
every ARC matrix, so that job has not run since the ARC switch. The stated
reason was that onnxruntime sizes its intra-op thread pool from
`hardware_concurrency()`, which reads `_SC_NPROCESSORS_ONLN` and counts the
node rather than the pod's cpuset. The matrix entry is kept, so onnx runs
again.

To give it the best chance, onnx moves from l-x86iavx512-16-128 to
l-x86iavx512-46-85: a 46-vCPU pod on a 48-vCPU c7a.12xlarge rather than a
15-vCPU pod on a 48-vCPU node, so the two counts are close instead of off by
3x. It is not an exact match -- the node always keeps a little back for the
kubelet -- so if onnx still trips over the thread pool the fix belongs in the
session options, not in a runner label. Note this trades memory: 83Gi against
the 116Gi the old pod had.

Running it turned up a second, unrelated reason it could not have passed.
The OSDC pod exports `HF_HOME=/mnt/hf_cache`, the read-only mount, and
.ci/pytorch/test.sh is what redirects that to the writable `HF_CACHE` the
workflow prepares -- except it skipped onnx, a carve-out from #178928 when the
old .ci/onnx/test.sh (which never set HF_HOME) was folded in. On EC2 that was
harmless, since HF_HOME was simply unset and huggingface fell back to a
writable home directory; on a pod it means onnx alone writes to the read-only
mount and dies on `[Errno 30]`. The carve-out is dropped, so onnx gets the
same redirect every other config already gets.

The thread pool concern turns out to be real, but not fatal: ORT logs
`pthread_setaffinity_np failed ... index: 46` a few hundred times and carries
on. The bigger pod does not fix that -- Karpenter placed it on a 64-vCPU node,
so `hardware_concurrency()` reports 64 against a 46-CPU cpuset. As ORT's own
message says, the fix is to specify the thread count explicitly, which belongs
in the session options and in a change the onnx owners can review on its own.

arc.yaml stays: it documents the naming scheme and the EC2 correspondence,
which is still worth having as reference.

ghstack-source-id: 82a8db9
Pull-Request: #198706
huydhn added a commit that referenced this pull request Sep 28, 2026
With every workflow naming its pod, the mapper has nothing left to translate.
Its other behaviours are gone too: the ROCm and XPU passthroughs return their
input unchanged, and the H100 `mt-` forcing is now literal in the workflows.

One behaviour does disappear with it. The script dropped `config: "onnx"` from
every ARC matrix, so that job has not run since the ARC switch, on the grounds
that onnxruntime sizes its intra-op thread pool from
`hardware_concurrency()` -- which reads `_SC_NPROCESSORS_ONLN` and counts the
node rather than the pod's cpuset. Rather than leave that implicit in a
script nobody reads, the matrix entry is commented out where it lives, with
the reason next to it.

Letting it run first was worth it, because it found a second and unrelated
reason it could not have passed. The OSDC pod exports `HF_HOME=/mnt/hf_cache`,
the read-only mount, and .ci/pytorch/test.sh is what redirects that to the
writable `HF_CACHE` the workflow prepares -- except it skipped onnx, a
carve-out from #178928 when the old .ci/onnx/test.sh (which never set HF_HOME)
was folded in. On EC2 that was harmless, since HF_HOME was simply unset and
huggingface fell back to a writable home; on a pod it means onnx alone writes
to the read-only mount and dies on `[Errno 30]`. That carve-out is dropped
here: it is wrong for any config, and onnx will need it whenever it comes
back.

The thread pool concern is real and is what keeps onnx off. ORT logs
`pthread_setaffinity_np failed` once per thread past the cpuset edge -- 19k
lines of a 24k-line job log -- and a bidirectional-RNN test fails on numerics,
which a thread pool in that state is a plausible cause of. A bigger pod does
not fix it: Karpenter may place the pod on a larger node, so
`hardware_concurrency()` reported 64 against a 46-CPU cpuset. The fix is to
set `intra_op_num_threads` in the session options, as ORT's own error message
asks, and belongs in a change the onnx owners can review on its own.

arc.yaml stays: it documents the naming scheme and the EC2 correspondence,
which is still worth having as reference.

ghstack-source-id: 790cf93
Pull-Request: #198706
pytorchmergebot pushed a commit that referenced this pull request Sep 28, 2026
With every workflow naming its pod, the mapper has nothing left to translate.
Its other behaviours are gone too: the ROCm and XPU passthroughs return their
input unchanged, and the H100 `mt-` forcing is now literal in the workflows.

One behaviour does disappear with it. The script dropped `config: "onnx"` from
every ARC matrix, so that job has not run since the ARC switch, on the grounds
that onnxruntime sizes its intra-op thread pool from
`hardware_concurrency()` -- which reads `_SC_NPROCESSORS_ONLN` and counts the
node rather than the pod's cpuset. Rather than leave that implicit in a
script nobody reads, the matrix entry is commented out where it lives, with
the reason next to it.

Letting it run first was worth it, because it found a second and unrelated
reason it could not have passed. The OSDC pod exports `HF_HOME=/mnt/hf_cache`,
the read-only mount, and .ci/pytorch/test.sh is what redirects that to the
writable `HF_CACHE` the workflow prepares -- except it skipped onnx, a
carve-out from #178928 when the old .ci/onnx/test.sh (which never set HF_HOME)
was folded in. On EC2 that was harmless, since HF_HOME was simply unset and
huggingface fell back to a writable home; on a pod it means onnx alone writes
to the read-only mount and dies on `[Errno 30]`. That carve-out is dropped
here: it is wrong for any config, and onnx will need it whenever it comes
back.

The thread pool concern is real and is what keeps onnx off. ORT logs
`pthread_setaffinity_np failed` once per thread past the cpuset edge -- 19k
lines of a 24k-line job log -- and a bidirectional-RNN test fails on numerics,
which a thread pool in that state is a plausible cause of. A bigger pod does
not fix it: Karpenter may place the pod on a larger node, so
`hardware_concurrency()` reported 64 against a 46-CPU cpuset. The fix is to
set `intra_op_num_threads` in the session options, as ORT's own error message
asks, and belongs in a change the onnx owners can review on its own.

arc.yaml stays: it documents the naming scheme and the EC2 correspondence,
which is still worth having as reference.
Pull Request resolved: #198706
Approved by: https://github.com/jeanschmidt
ghstack dependencies: #198704
huydhn added a commit that referenced this pull request Sep 28, 2026
With every workflow naming its pod, the mapper has nothing left to translate.
Its other behaviours are gone too: the ROCm and XPU passthroughs return their
input unchanged, and the H100 `mt-` forcing is now literal in the workflows.

One behaviour does disappear with it. The script dropped `config: "onnx"` from
every ARC matrix, so that job has not run since the ARC switch. The entry is
removed outright here rather than left behind commented out, and the reason it
is gone -- onnxruntime sizes its intra-op thread pool from
`hardware_concurrency()`, which reads `_SC_NPROCESSORS_ONLN` and counts the
node rather than the pod's cpuset -- is recorded in #198915, which fixes that
and restores the entry.

An earlier version of this change did leave a commented-out entry with a prose
comment above it, and that is what got it reverted. A test-matrix is a literal
block scalar, interpolated verbatim into a double-quoted shell argument:

    --test-matrix "{ include: [ ... ]}"

Every `"` inside toggles shell quoting. The live entries survive because their
quotes wrap tokens with no spaces, so the fragments re-concatenate into one
argument; the comment contained a quoted phrase with a space in it, the shell
split there, and filter_test_configs.py got a stray argument:

    error: unrecognized arguments: failed in a 24k-line log, and a

Letting onnx run first was still worth it, because it found a second reason it
could not have passed. The OSDC pod exports `HF_HOME=/mnt/hf_cache`, the
read-only mount, and .ci/pytorch/test.sh is what redirects it to the writable
`HF_CACHE` the workflow prepares -- except it skipped onnx, a carve-out from
#178928 when the old .ci/onnx/test.sh (which never set HF_HOME) was folded in.
On EC2 that was harmless, since HF_HOME was unset and huggingface fell back to
a writable home; on a pod onnx alone writes to the read-only mount and dies on
`[Errno 30]`. That carve-out is dropped: it is wrong for any config.

arc.yaml stays: it documents the naming scheme and the EC2 correspondence,
which is still worth having as reference.

ghstack-source-id: c44c11d
Pull-Request: #198706
pytorchmergebot pushed a commit that referenced this pull request Sep 28, 2026
With every workflow naming its pod, the mapper has nothing left to translate.
Its other behaviours are gone too: the ROCm and XPU passthroughs return their
input unchanged, and the H100 `mt-` forcing is now literal in the workflows.

One behaviour does disappear with it. The script dropped `config: "onnx"` from
every ARC matrix, so that job has not run since the ARC switch. The entry is
removed outright here rather than left behind commented out, and the reason it
is gone -- onnxruntime sizes its intra-op thread pool from
`hardware_concurrency()`, which reads `_SC_NPROCESSORS_ONLN` and counts the
node rather than the pod's cpuset -- is recorded in #198915, which fixes that
and restores the entry.

An earlier version of this change did leave a commented-out entry with a prose
comment above it, and that is what got it reverted. A test-matrix is a literal
block scalar, interpolated verbatim into a double-quoted shell argument:

    --test-matrix "{ include: [ ... ]}"

Every `"` inside toggles shell quoting. The live entries survive because their
quotes wrap tokens with no spaces, so the fragments re-concatenate into one
argument; the comment contained a quoted phrase with a space in it, the shell
split there, and filter_test_configs.py got a stray argument:

    error: unrecognized arguments: failed in a 24k-line log, and a

Letting onnx run first was still worth it, because it found a second reason it
could not have passed. The OSDC pod exports `HF_HOME=/mnt/hf_cache`, the
read-only mount, and .ci/pytorch/test.sh is what redirects it to the writable
`HF_CACHE` the workflow prepares -- except it skipped onnx, a carve-out from
#178928 when the old .ci/onnx/test.sh (which never set HF_HOME) was folded in.
On EC2 that was harmless, since HF_HOME was unset and huggingface fell back to
a writable home; on a pod onnx alone writes to the read-only mount and dies on
`[Errno 30]`. That carve-out is dropped: it is wrong for any config.

arc.yaml stays: it documents the naming scheme and the EC2 correspondence,
which is still worth having as reference.
Pull Request resolved: #198706
Approved by: https://github.com/jeanschmidt
ghstack dependencies: #198704
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.

3 participants