Skip to content

Commit 22bd9fe

Browse files
Tsai, Chun-I (Joey)GitHub Enterprise
authored andcommitted
[Minor fix] (#93)
- Add TODO to remove the source_fn_stack - Fix the comment of fold_qdq pass - Remove redundant ops in annotate_quant_attrs
1 parent 612499b commit 22bd9fe

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

backends/qualcomm/passes/annotate_quant_attrs.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ class AnnotateQuantAttrs(ExportPass):
3333
"""
3434

3535
q_ops = {
36-
torch.ops.quantized_decomposed.quantize_per_channel.default,
37-
torch.ops.quantized_decomposed.quantize_per_tensor.default,
3836
exir_ops.edge.quantized_decomposed.quantize_per_channel.default,
3937
exir_ops.edge.quantized_decomposed.quantize_per_tensor.default,
4038
exir_ops.edge.quantized_decomposed.quantize_per_tensor.tensor,

backends/qualcomm/passes/fold_qdq.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
class FoldQDQ(ExportPass):
1313
"""
14-
Erase QDQ pattern and store encodings into corresponding graph nodes.
14+
Erase QDQ pattern.
1515
"""
1616

1717
q_ops = {
@@ -45,6 +45,7 @@ def _fold(self, graph_module: torch.fx.GraphModule) -> torch.fx.GraphModule:
4545
to_be_removed = [n]
4646
source_n = n.args[0]
4747

48+
# TODO: remove this hack as source_fn_stack is internal implementation detail of torch.export.
4849
# To make constant value/tensor be tagged as delegatable during partition
4950
if source_n.op == "get_attr":
5051
source_n.meta["source_fn_stack"] = list(n.users.keys())[0].meta.get(

0 commit comments

Comments
 (0)