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>
[Medium impact] The PR appears safe to merge; the previous coverage issue is fixed. SummaryThe PR runs selected PyTorch and JAX tests with one worker per GPU.
Reviews (5) · Last reviewed commit: "Note how to run multi-GPU JAX tests in t..." · 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>
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: