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

Method _plain

tests/unit/runtime/test_runtime_utils.py:96–99  ·  view source on GitHub ↗
(self, value, device)

Source from the content-addressed store, hash-verified

94 return param
95
96 def _plain(self, value, device):
97 param = torch.nn.Parameter(torch.zeros(4, device=device))
98 param.grad = torch.full((4, ), value, device=device)
99 return param
100
101 def test_experts_idle_on_one_rank_do_not_deadlock(self):
102 """A rank whose experts got no tokens must take the same collectives (#8469).

Calls 1

fullMethod · 0.80

Tested by

no test coverage detected