def METHOD_NAME(self):
    pg = DummyProcessGroup(0, 1)
    scaler = ShardedGradScaler(init_scale=2.0, process_group=pg, enabled=True)
    loss = torch.full((1,), 4.0, dtype=torch.float32, device="cpu")
    t0 = torch.tensor([float("inf")], dtype=torch.float32, device="cpu")
    t0.grad = t0.clone()
    opt = torch.optim.SGD([t0], lr=1.0)
    scaler.scale(loss)
    ret_val = scaler.step(opt)
    self.assertTrue(ret_val is None)