MCPcopy Create free account
hub / github.com/THUDM/GLM / get_partition_start

Function get_partition_start

mpu/random.py:236–240  ·  view source on GitHub ↗
(item)

Source from the content-addressed store, hash-verified

234
235
236def get_partition_start(item):
237 global mp_rank, mp_size, mp_group
238 partition_size = get_partition_size(item)
239 start = partition_size * mp_rank
240 return int(start)
241
242def get_partition_size(item):
243 global mp_rank, mp_size, mp_group

Callers 1

forwardMethod · 0.85

Calls 1

get_partition_sizeFunction · 0.85

Tested by

no test coverage detected