Skip to content

Commit e76604e

Browse files
committed
Qualcomm AI Engine Direct - fixed missing import in custom op example
1 parent 7824373 commit e76604e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

examples/qualcomm/custom_op/custom_ops_1.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ def annotate_custom(gm: torch.fx.GraphModule) -> None:
7070
This function is specific for custom op.
7171
The source_fn of the rewritten nn module turns out to be "my_ops.mul3.default"
7272
"""
73-
from executorch.backends.qualcomm.quantizer.annotators import _is_annotated
74-
7573
from executorch.backends.qualcomm.quantizer.qconfig import (
7674
get_ptq_per_channel_quant_config,
7775
)
@@ -85,7 +83,7 @@ def annotate_custom(gm: torch.fx.GraphModule) -> None:
8583
continue
8684

8785
# skip annotation if it is already annotated
88-
if _is_annotated([node]):
86+
if Q_ANNOTATION_KEY in node.meta and node.meta[Q_ANNOTATION_KEY]._annotated:
8987
continue
9088

9189
input_qspec_map = {}

0 commit comments

Comments
 (0)