Skip to content

Commit a142ddf

Browse files
Min Guofacebook-github-bot
authored andcommitted
log expand_copy info
1 parent 5c47ab6 commit a142ddf

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

backends/qualcomm/builders/op_expand.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
@register_node_visitor
1919
class Expand(NodeVisitor):
20-
target = ["aten.expand_copy.default"]
20+
target = ["aten.expand_copy.default", "aten.expand.default"]
2121

2222
def __init__(self, *args) -> None:
2323
super().__init__(*args)
@@ -27,6 +27,8 @@ def define_node(
2727
node: torch.fx.Node,
2828
nodes_to_wrappers: Dict[torch.fx.Node, PyQnnWrapper.TensorWrapper],
2929
) -> PyQnnWrapper.PyQnnOpWrapper:
30+
print("expand node meta", node.meta)
31+
print("expand node args", node.target, node.args, node.kwargs)
3032
input_node = node.args[0]
3133
input_tensor = self.get_tensor(input_node, node)
3234
input_tensor_wrapper = self.define_tensor(

backends/qualcomm/quantizer/annotators.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,11 +741,13 @@ def annotate_index_put(node: Node, quantization_config: QuantizationConfig) -> N
741741
)
742742

743743

744-
@register_annotator([torch.ops.aten.expand.default])
744+
@register_annotator([torch.ops.aten.expand.default, torch.ops.aten.expand_copy.default])
745745
def annotate_expand(node: Node, quantization_config: QuantizationConfig) -> None:
746+
print("before annotate_expand\n", node.meta)
746747
annotate_in_out_obs_sharing_op(node, quantization_config)
747748
if not _is_annotated([node]):
748749
annotate_single_in_single_out(node, quantization_config)
750+
print("after annotate_expand\n", node.meta)
749751

750752

751753
@register_annotator([torch.ops.aten.group_norm.default])

backends/qualcomm/runtime/backends/QnnLogger.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ QnnLogger::QnnLogger(
6767
default:
6868
QNN_EXECUTORCH_LOG_ERROR("Unknown logging level %d", log_level);
6969
}
70+
qnn_log_level = QNN_LOG_LEVEL_VERBOSE;
7071
QNN_EXECUTORCH_LOG_INFO("create QNN Logger with log_level %d", log_level);
7172
Qnn_ErrorHandle_t error =
7273
qnn_interface.qnn_log_create(callback, qnn_log_level, &handle_);

0 commit comments

Comments
 (0)