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

Function is_model_parallel_parameter

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

Source from the content-addressed store, hash-verified

152
153
154def is_model_parallel_parameter(p) -> bool:
155 if hasattr(p, 'model_parallel') and p.model_parallel:
156 return True
157
158 if hasattr(p, 'tensor_model_parallel') and p.tensor_model_parallel:
159 return True
160
161 return False
162
163
164def copy_to_device(item, device, criterion_func):

Callers 11

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 2

testMethod · 0.72