MCPcopy Create free account
hub / github.com/PRIME-RL/PRIME / zero

Method zero

training/verl/utils/memory_buffer.py:36–38  ·  view source on GitHub ↗

Reset the buffer to zero.

(self)

Source from the content-addressed store, hash-verified

34 self.data = torch.zeros(self.numel_padded, dtype=self.dtype, device='cuda', requires_grad=False)
35
36 def zero(self):
37 """Reset the buffer to zero."""
38 self.data.zero_()
39
40 def get(self, shape, start_index):
41 """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