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

Function get_partition_size

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

Source from the content-addressed store, hash-verified

240 return int(start)
241
242def get_partition_size(item):
243 global mp_rank, mp_size, mp_group
244 size = item.numel()
245 partition_size = size/mp_size
246 return int(partition_size)
247
248def get_full_inputs(tensors):
249 inputs=[]

Callers 2

get_partition_startFunction · 0.85
forwardMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected