MCPcopy Index your code
hub / github.com/PRIME-RL/PRIME / __init__

Method __init__

training/verl/utils/memory_buffer.py:30–34  ·  view source on GitHub ↗
(self, numel: int, numel_padded: int, dtype: torch.dtype)

Source from the content-addressed store, hash-verified

28 """
29
30 def __init__(self, numel: int, numel_padded: int, dtype: torch.dtype):
31 self.numel = numel
32 self.numel_padded = numel_padded
33 self.dtype = dtype
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."""

Callers 1

__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected