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

Class QuantizerBuilder

op_builder/quantizer.py:9–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7
8
9class QuantizerBuilder(CUDAOpBuilder):
10 BUILD_VAR = "DS_BUILD_QUANTIZER"
11 NAME = "quantizer"
12
13 def __init__(self, name=None):
14 name = self.NAME if name is None else name
15 super().__init__(name=name)
16
17 def absolute_name(self):
18 return f'deepspeed.ops.quantizer.{self.NAME}_op'
19
20 def sources(self):
21 return [
22 'csrc/quantization/pt_binding.cpp',
23 'csrc/quantization/quantize.cu',
24 'csrc/quantization/quantize_intX.cu',
25 'csrc/quantization/dequantize.cu',
26 'csrc/quantization/swizzled_quantize.cu',
27 'csrc/quantization/quant_reduce.cu',
28 ]
29
30 def include_paths(self):
31 return ['csrc/includes']

Callers 2

run_quantize_dsFunction · 0.90
run_dequantize_dsFunction · 0.90

Calls

no outgoing calls

Tested by 2

run_quantize_dsFunction · 0.72
run_dequantize_dsFunction · 0.72