(compile_spec: ArmCompileSpec)
| 49 | |
| 50 | |
| 51 | def 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") |