MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / _step

Function _step

tests/unit/runtime/zero/test_zero_numel_param_shape.py:111–115  ·  view source on GitHub ↗
(engine, case)

Source from the content-addressed store, hash-verified

109
110
111def _step(engine, case):
112 _, dtype = CONFIGS[case]
113 loss = engine(torch.randn(1, HIDDEN, device=engine.device, dtype=dtype))
114 engine.backward(loss)
115 engine.step()
116
117
118@pytest.mark.parametrize("case", list(CONFIGS))

Callers 2

Calls 2

backwardMethod · 0.45
stepMethod · 0.45

Tested by

no test coverage detected