Repository navigation
Conversation
On multi-GPU nodes, run selected PyTorch and JAX L0 test files with one pytest-xdist worker per GPU. A small pytest plugin gives each worker its own GPU. Only files whose tests don't share files on disk, don't depend on test order and need a single GPU opt in; the rest run as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Confidence Score: 5/5
[Medium impact] The PR appears safe to merge; the latest change restores the missing cross-GPU checks. SummaryRuns selected PyTorch and JAX tests across GPUs, with one GPU per pytest worker.
Reviews (10) · Last reviewed commit: "Run different-GPU JAX attention checks w..." · Reviewed by Greptile |
|
/te-ci |
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
|
/te-ci |
|
Looking at the CI timings, I do not see a lot of speedup coming from this on 8 GPU B200 node, with some tests taking nearly exactly the same amount of time - do you know why that is? |
@ptrendx I compared https://gitlab-master.nvidia.com/dl/transformerengine/transformerengine/-/jobs/562748639 (parallel) and https://gitlab-master.nvidia.com/dl/transformerengine/transformerengine/-/jobs/560421016 (serial from some other PR) and the comparsion: These are only a subset of all tests and for other tests they assume they run in serial and will edit files, which is a bit tricky to parallelize so I left them for now. I don't fully know why grouped MLP isn't faster which is weird. I also don't understand how gitlab CI's "Duration" is calculated. Does it also including queuing time? |
|
Hum I can't reproduce |
Every worker's OpenMP pool defaulted to all physical cores, so eight workers ran 896 threads on 224 CPUs and small CPU ops such as float64 reference computations slowed down by orders of magnitude. Give each worker an equal share of the CPUs unless OMP_NUM_THREADS is already set. On 8x B200, this cuts the split L0 PyTorch commands from 1001s to 603s (test_grouped_mlp.py: 307s to 97s); the JAX commands are unaffected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
|
OK I also evenly split the CPU resources on the pytest processes. This should make |
|
/te-ci |
Signed-off-by: Kaining Zhong <kainingz@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com> # Conflicts: # qa/L0_pytorch_unittest/test.sh
The mxfp4 tests seed themselves, share no state or files and need only one GPU. Reword the $SPLIT_ACROSS_GPUS comment to encourage using it for new test commands that meet those conditions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
The different_gpus cases of the StableHLO process-independence tests need two visible GPUs, so they were silently skipped when each xdist worker sees only one. Exclude them from the split run and run them in a separate command with all GPUs visible. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
|
/te-ci |
On multi-GPU nodes, run selected PyTorch and JAX L0 test files with one pytest-xdist worker per GPU. A small pytest plugin gives each worker its own GPU. Only files whose tests don't share files on disk, don't depend on test order and need a single GPU opt in; the rest run as before.
Description
For a subset of python tests (both pytorch and jax), they are safe to run in parallel on multiple GPUs if they are available. By parallelizing these tests CI can run faster.
Note: there are some tests that assume that they will run in serial and will share files like
test_attention.py. These cannot be parallelized and I skipped them.Type of change
Changes
Please list the changes introduced in this PR:
Checklist: