MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / get_offsets

Function get_offsets

imperative/python/megengine/distributed/helper.py:98–105  ·  view source on GitHub ↗
(shapes)

Source from the content-addressed store, hash-verified

96
97
98def get_offsets(shapes):
99 offsets = []
100 offset = 0
101 for shape in shapes:
102 offsets.append(offset)
103 offset += int(np.prod(shape))
104 offsets.append(offset)
105 return offsets
106
107
108_enable_p2p_cache = None

Callers 5

testerFunction · 0.90
pack_allreduce_splitFunction · 0.85
check_execMethod · 0.85
execMethod · 0.85
execMethod · 0.85

Calls 2

appendMethod · 0.45
prodMethod · 0.45

Tested by 1

testerFunction · 0.72