MCPcopy Create free account
hub / github.com/BeastyZ/ConvSearch-R1 / zero

Method zero

verl/verl/utils/memory_buffer.py:39–41  ·  view source on GitHub ↗

Reset the buffer to zero.

(self)

Source from the content-addressed store, hash-verified

37 self.data = torch.zeros(self.numel_padded, dtype=self.dtype, device='cuda', requires_grad=False)
38
39 def zero(self):
40 """Reset the buffer to zero."""
41 self.data.zero_()
42
43 def get(self, shape, start_index):
44 """Return a tensor with the input `shape` as a view into the

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected