MCPcopy Create free account
hub / github.com/AIS-SNU/Smart-Infinity / __init__

Method __init__

DeepSpeedExample/megatron/memory.py:132–137  ·  view source on GitHub ↗
(self, name, num_buffers, numel, dtype, track_usage)

Source from the content-addressed store, hash-verified

130 """A ring of memory buffers."""
131
132 def __init__(self, name, num_buffers, numel, dtype, track_usage):
133 self.num_buffers = num_buffers
134 self.buffers = [
135 allocate_mem_buff(name+' {}'.format(i), numel, dtype, track_usage)
136 for i in range(num_buffers)]
137 self._index = -1
138
139
140 def get_next_buffer(self):

Callers

nothing calls this directly

Calls 1

allocate_mem_buffFunction · 0.85

Tested by

no test coverage detected