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

Function is_zero_param

deepspeed/runtime/zero/utils.py:142–145  ·  view source on GitHub ↗
(parameter)

Source from the content-addressed store, hash-verified

140
141
142def is_zero_param(parameter):
143 if not torch.is_tensor(parameter):
144 return False
145 return hasattr(parameter, 'ds_id')
146
147
148def apply_to_tensors_only(function, value, warning_msg_fn=None):

Callers 12

backwardMethod · 0.90
wrapped_fn_to_applyMethod · 0.90
_post_init_methodMethod · 0.90
__init__Method · 0.90
extra_reprMethod · 0.90
_source_param_shapeFunction · 0.90
apply_to_tensors_onlyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected