MCPcopy Create free account
hub / github.com/pytorch/executorch / create_quantizer

Function create_quantizer

backends/arm/util/_factory.py:51–59  ·  view source on GitHub ↗
(compile_spec: ArmCompileSpec)

Source from the content-addressed store, hash-verified

49
50
51def create_quantizer(compile_spec: ArmCompileSpec):
52 if isinstance(compile_spec, TosaCompileSpec):
53 return TOSAQuantizer(compile_spec)
54 elif isinstance(compile_spec, EthosUCompileSpec):
55 return EthosUQuantizer(compile_spec)
56 elif isinstance(compile_spec, VgfCompileSpec):
57 return VgfQuantizer(compile_spec)
58 else:
59 raise ValueError("compile spec doesn't target any Arm Quantizer")

Callers 4

create_quantize_stageFunction · 0.90
quantizeMethod · 0.90
__init__Method · 0.90
quantizeFunction · 0.90

Calls 3

TOSAQuantizerClass · 0.90
EthosUQuantizerClass · 0.90
VgfQuantizerClass · 0.90

Tested by 2

quantizeMethod · 0.72
__init__Method · 0.72