def test_deepspeed_multigpu_test(tmp_path):
    """Test to ensure we can use DeepSpeed with just test using ZeRO Stage 3."""
    model = ModelParallelBoringModel()
    trainer = Trainer(
        default_root_dir=tmp_path,
        strategy=DeepSpeedStrategy(stage=3),
        accelerator="gpu",
        devices=2,
        fast_dev_run=True,
        precision="16-mixed",
        enable_progress_bar=False,
        enable_model_summary=False,
    )
    trainer.test(model)
Test to ensure we can use DeepSpeed with just test using ZeRO Stage 3.
tests/tests_pytorch/strategies/test_deepspeed.py