MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / is_model_parallel_parameter

Function is_model_parallel_parameter

deepspeed/runtime/utils.py:142–149  ·  view source on GitHub ↗
(p)

Source from the content-addressed store, hash-verified

140
141
142def is_model_parallel_parameter(p) -> bool:
143 if hasattr(p, 'model_parallel') and p.model_parallel:
144 return True
145
146 if hasattr(p, 'tensor_model_parallel') and p.tensor_model_parallel:
147 return True
148
149 return False
150
151
152def copy_to_device(item, device, criterion_func):

Callers 12

testMethod · 0.90
get_grads_for_normMethod · 0.90
get_grad_norm_directMethod · 0.90
get_grad_norm_directMethod · 0.90
clip_grad_norm_Function · 0.85
get_grad_zerosFunction · 0.85
get_weight_normFunction · 0.85

Calls

no outgoing calls

Tested by 3

testMethod · 0.72