From d84ba6502a4996d33fc15fb1247d4180f0600a65 Mon Sep 17 00:00:00 2001 From: Matthias Cremon Date: Tue, 18 Feb 2025 10:16:46 -0800 Subject: [PATCH] Make the quantizer type a config argument (#8510) Summary: As titled, allows passing in a different quantizer through the config in CI. Differential Revision: D69704507 --- backends/cadence/aot/quantizer/quantizer.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backends/cadence/aot/quantizer/quantizer.py b/backends/cadence/aot/quantizer/quantizer.py index d6765d2ad30..585f38241a2 100644 --- a/backends/cadence/aot/quantizer/quantizer.py +++ b/backends/cadence/aot/quantizer/quantizer.py @@ -6,6 +6,7 @@ # pyre-strict +from dataclasses import dataclass from typing import List, Optional, Tuple, Union import torch @@ -177,6 +178,8 @@ def get_cadence_default_quantizers() -> List[Quantizer]: ] +# Note: need dataclass to be used in CI configs through OmegaConf and Hydra +@dataclass class CadenceQuantizer(ComposableQuantizer): """ Generic CadenceQuantizer. Although it can be used directly, it is typically a base