7171 SharedQspecQuantizer ,
7272)
7373from executorch .backends .arm .vgf import VgfCompileSpec
74+ from executorch .exir ._warnings import experimental
7475from torch .fx import GraphModule , Node
7576from torchao .quantization .pt2e import (
7677 FakeQuantize ,
@@ -441,14 +442,26 @@ def _for_each_filtered_node(
441442
442443
443444class TOSAQuantizer (Quantizer ):
444- """Manage quantization annotations for TOSA-compatible backends."""
445+ """Manage quantization annotations for TOSA-compatible backends.
446+
447+ .. warning::
448+ Setting ``use_composable_quantizer=True`` enables an experimental API
449+ surface that may change without notice.
450+
451+ """
445452
446453 def __init__ (
447454 self ,
448455 compile_spec_or_tosa_spec ,
449456 use_composable_quantizer : bool = False ,
450457 ) -> None :
451- """Create a TOSA quantizer from a TOSA spec or Arm compile spec."""
458+ """Create a TOSA quantizer from a TOSA spec or Arm compile spec.
459+
460+ .. warning::
461+ Setting ``use_composable_quantizer=True`` enables an experimental
462+ API surface that may change without notice.
463+
464+ """
452465 self .use_composable_quantizer = use_composable_quantizer
453466 self .quantizer : _TOSAQuantizerV1 | _TOSAQuantizerV2
454467 if use_composable_quantizer :
@@ -606,6 +619,10 @@ def set_io(
606619 self .quantizer .set_io (quantization_config )
607620 return self
608621
622+ @experimental (
623+ "This API is experimental and may change without notice. "
624+ "It is only available when use_composable_quantizer=True."
625+ )
609626 def add_quantizer (self , quantizer : Quantizer ) -> TOSAQuantizer :
610627 """Insert a quantizer with highest precedence."""
611628 if self .use_composable_quantizer :
@@ -614,6 +631,10 @@ def add_quantizer(self, quantizer: Quantizer) -> TOSAQuantizer:
614631 "add_quantizer is only supported in the composable quantizer implementation."
615632 )
616633
634+ @experimental (
635+ "This API is experimental and may change without notice. "
636+ "It is only available when use_composable_quantizer=True."
637+ )
617638 def set_node_finder (
618639 self , quantization_config : Optional [QuantizationConfig ], node_finder : NodeFinder
619640 ) -> TOSAQuantizer :
@@ -631,6 +652,10 @@ def set_node_finder(
631652 "set_node_finder is only supported in the composable quantizer implementation."
632653 )
633654
655+ @experimental (
656+ "This API is experimental and may change without notice. "
657+ "It is only available when use_composable_quantizer=True."
658+ )
634659 def set_node_target (
635660 self , node_target : OpOverload , quantization_config : Optional [QuantizationConfig ]
636661 ) -> TOSAQuantizer :
@@ -641,6 +666,10 @@ def set_node_target(
641666 "set_node_target is only supported in the composable quantizer implementation."
642667 )
643668
669+ @experimental (
670+ "This API is experimental and may change without notice. "
671+ "It is only available when use_composable_quantizer=True."
672+ )
644673 def set_node_name (
645674 self , node_name : str , quantization_config : Optional [QuantizationConfig ]
646675 ) -> TOSAQuantizer :
@@ -1167,6 +1196,10 @@ def set_io(
11671196class EthosUQuantizer (TOSAQuantizer ):
11681197 """Quantizer supported by the Arm Ethos-U backend.
11691198
1199+ .. warning::
1200+ Setting ``use_composable_quantizer=True`` enables an experimental API
1201+ surface that may change without notice.
1202+
11701203 Args:
11711204 compile_spec (EthosUCompileSpec): Backend compile specification for
11721205 Ethos-U targets.
@@ -1185,6 +1218,10 @@ def __init__(
11851218class VgfQuantizer (TOSAQuantizer ):
11861219 """Quantizer supported by the Arm Vgf backend.
11871220
1221+ .. warning::
1222+ Setting ``use_composable_quantizer=True`` enables an experimental API
1223+ surface that may change without notice.
1224+
11881225 Args:
11891226 compile_spec (VgfCompileSpec): Backend compile specification for Vgf
11901227 targets.
0 commit comments