You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Benchmarks: Add pytorch-simplenet model and support CPU-only DDP over gloo - #907
Description
Adds a lightweight pytorch-simplenet model benchmark and makes torch.distributed mode work for CPU-only
training over gloo. Together they allow a small PyTorch DDP check that runs on CPU-only nodes (multi-node,
gloo) as well as on GPU nodes (single node, NCCL/RCCL), using the standard sb run flow.
Today, torch.distributed mode always passes distributed_backend=nccl, and PytorchBase always passes device_ids to DDP. Both break CPU-only training.
Major Revision
Add the pytorch-simplenet model benchmark: the small CNN from the PyTorch CIFAR-10 tutorial (2 conv + 3 FC
layers), trained on synthetic 3x32x32 images with 10 classes. Image size is fixed at 32; other sizes fail with MODEL_CREATION_FAILURE.
Runner: in torch.distributed mode, use the distributed_backend set in the benchmark's parameters,
defaulting to nccl, instead of always forcing nccl.
PytorchBase: only pass device_ids/output_device to DistributedDataParallel when a GPU is used. DDP rejects
them for CPU modules.
Minor Revision
Docs: list simplenet in the model list and document distributed_backend: gloo + no_gpu: yes for CPU-only torch.distributed runs.
Tests: SimpleNet on GPU, on CPU, CPU DDP over gloo, invalid image size, and the runner backend selection
(gloo / default nccl / missing benchmark). The new CPU DDP test fails with PyTorch's device_ids error without
the pytorch_base.py fix.
Validation
Unit tests: 20 passed, 1 skipped (GPU-only); flake8 and yapf clean.
Container check: installed this branch over superbench/main:cuda13.0 and ran sb run -l localhost --no-docker
in two containers as a 2-node gloo DDP job. Rank 0 reported training throughput, both nodes returned 0, and sb result diagnosis with a failure_check rule passed.
…r gloo
Add the pytorch-simplenet model benchmark: the small CIFAR-10 CNN from the
PyTorch tutorial on synthetic 3x32x32 images, used for lightweight DDP
smoke tests.
Make torch.distributed DDP work on CPU-only nodes:
- runner: use distributed_backend from the benchmark parameters in
torch.distributed mode instead of always forcing nccl.
- pytorch_base: do not pass device_ids/output_device to
DistributedDataParallel for CPU modules, which PyTorch rejects.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Nguyen Vuong (normanvuong)
changed the title
Add Manifold Simplenet setup
Benchmarks: Add pytorch-simplenet model and support CPU-only DDP over gloo
Nov 30, 2026
…istributed mode
Null benchmark parameters or a null distributed_backend now default to nccl instead of raising AttributeError or passing distributed_backend=None, matching the executor skipping null values.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Invalid image sizes in inference leave the model unset, causing a runtime exception instead of MODEL_CREATION_FAILURE and skipping normal cleanup; the failure path also lacks inference test coverage.
With --model_action inference --image_size 64 --precision float32 --no_gpu, returning False here does not produce MODEL_CREATION_FAILURE: the inherited ModelBenchmark.__inference ignores the return value, and PytorchCNN._inference_step calls .eval() on the still-None model. This produces RUNTIME_EXCEPTION_ERROR instead and skips normal cleanup. Please make the inference launcher handle _create_model failure as the training launcher does, and extend the invalid-image-size test to cover inference.
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
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.
Description
Adds a lightweight
pytorch-simplenetmodel benchmark and makestorch.distributedmode work for CPU-onlytraining over gloo. Together they allow a small PyTorch DDP check that runs on CPU-only nodes (multi-node,
gloo) as well as on GPU nodes (single node, NCCL/RCCL), using the standard
sb runflow.Today,
torch.distributedmode always passesdistributed_backend=nccl, andPytorchBasealways passesdevice_idsto DDP. Both break CPU-only training.Major Revision
pytorch-simplenetmodel benchmark: the small CNN from the PyTorch CIFAR-10 tutorial (2 conv + 3 FClayers), trained on synthetic 3x32x32 images with 10 classes. Image size is fixed at 32; other sizes fail with
MODEL_CREATION_FAILURE.torch.distributedmode, use thedistributed_backendset in the benchmark'sparameters,defaulting to
nccl, instead of always forcingnccl.PytorchBase: only passdevice_ids/output_devicetoDistributedDataParallelwhen a GPU is used. DDP rejectsthem for CPU modules.
Minor Revision
simplenetin the model list and documentdistributed_backend: gloo+no_gpu: yesfor CPU-onlytorch.distributedruns.(gloo / default nccl / missing benchmark). The new CPU DDP test fails with PyTorch's
device_idserror withoutthe
pytorch_base.pyfix.Validation
superbench/main:cuda13.0and ransb run -l localhost --no-dockerin two containers as a 2-node gloo DDP job. Rank 0 reported training throughput, both nodes returned 0, and
sb result diagnosiswith afailure_checkrule passed.Example config: