Conversation
ROCm test containers can share a node without CPU isolation. With OpenMP unset, PyTorch can create an intra-op pool sized to the node-wide CPU count in each container, oversubscribing CPUs when test shards run concurrently. Route Python shards through test_python and set an exported, function-local OMP_NUM_THREADS for ROCm only when no override is set. Divide nproc by the greater of four and the shard count, retaining the ARC-style four-thread floor. Keeping the cap local to non-distributed Python tests preserves the caller environment and lets distributed launchers retain their defaults. Test Plan ========= Ran on the develop-based change using lintrunner 0.12.7: ```bash lintrunner -a --revision de8e76a --skip CODEOWNERS_TAXONOMY bash -n .ci/pytorch/test.sh agent_space/check_rocm_omp.sh bash agent_space/check_rocm_omp.sh git diff --check de8e76a git diff --cached --check ``` Syntax, all 31 local regression cases, whitespace checks, and the non-excluded linters passed. CODEOWNERS_TAXONOMY was excluded because the full lint run reports 15 uncovered paths in the unchanged develop baseline; the contributor explicitly directed that existing base defects stay out of scope. No CODEOWNERS or lint configuration changes are included. The regression harness is local-only and ignored, not a repository-provided test or part of this commit. A real ROCm CI/performance canary remains required before merge; distributed, Inductor, and C++ entry points are outside this change's scope. Authored with assistance from OpenAI Codex.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ignore defects or problems from the base
developbranch, which is out of scope.