MCPcopy
hub / github.com/deepspeedai/DeepSpeed / to

Method to

deepspeed/ops/fp_quantizer/quantize.py:100–105  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

98 return out
99
100 def to(self, *args, **kwargs):
101 # Intermediate tensors may need to be moved to different devices
102 if hasattr(self, 'input_q'):
103 self.input_q = self.input_q.to(*args, **kwargs)
104 if hasattr(self, 'scale'):
105 self.scale = self.scale.to(*args, **kwargs)
106
107 def get_scales(self):
108 return fp_quant_module.get_scales(self.scale, self.num_groups)

Callers 15

__init__Method · 0.45
test_compile.pyFile · 0.45
f_geluFunction · 0.45
bias_geluFunction · 0.45
bias_tanhFunction · 0.45
get_gpt2_modelFunction · 0.45
f_geluFunction · 0.45
bias_geluFunction · 0.45
bias_tanhFunction · 0.45
forwardMethod · 0.45
train_cifarFunction · 0.45
_compare_optimizersFunction · 0.45

Calls

no outgoing calls

Tested by 15

__init__Method · 0.36
_compare_optimizersFunction · 0.36
test_fused_lion_equalMethod · 0.36
get_q_propsFunction · 0.36
run_float_quantizeFunction · 0.36
run_float_dequantizeFunction · 0.36
test_float_quantizeFunction · 0.36
quantize_dequantize_refFunction · 0.36
test_fake_quant_dequantFunction · 0.36
create_modelsFunction · 0.36
create_modelsFunction · 0.36
test_bias_addFunction · 0.36