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

Method to

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

Source from the content-addressed store, hash-verified

108 return out
109
110 def to(self, *args, **kwargs):
111 # These start as None and are only allocated by quantize(). Moving the
112 # parameter to a device calls this before that allocation.
113 if isinstance(self.input_q, torch.Tensor):
114 self.input_q = self.input_q.to(*args, **kwargs)
115 if isinstance(self.scale, torch.Tensor):
116 self.scale = self.scale.to(*args, **kwargs)
117
118 def get_scales(self):
119 return fp_quant_module.get_scales(self.scale, self.num_groups)

Callers 15

gpt_sample_tokensFunction · 0.45
bert_sample_tokensFunction · 0.45
attention_bwdFunction · 0.45
forwardMethod · 0.45
compute_attentionMethod · 0.45
compute_attentionMethod · 0.45
_fwd_kernelFunction · 0.45
_fp_matmulFunction · 0.45
matmul_4d_kernelFunction · 0.45
_flash_packed_kernelFunction · 0.45
softmax_kernelFunction · 0.45
masked_softmax_kernelFunction · 0.45

Calls

no outgoing calls

Tested by 1