Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
98
def
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
tester
Function · 0.90
pack_allreduce_split
Function · 0.85
check_exec
Method · 0.85
exec
Method · 0.85
exec
Method · 0.85
Calls
2
append
Method · 0.45
prod
Method · 0.45
Tested by
1
tester
Function · 0.72