Skip to content

Commit

Permalink
Revert changes (#2827)
Browse files Browse the repository at this point in the history
### Changes

Revert some changes from
#2802
  • Loading branch information
andrey-churkin authored Jul 19, 2024
1 parent 2a83751 commit 43d3300
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions nncf/onnx/graph/node_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,11 @@ def is_port_quantized(node: NNCFNode, nncf_graph: NNCFGraph, port_id: int) -> bo
:param port_id: Input port id of a node.
:return: True if a port_id is quantized - have ONNXDequantizeLinearMetatype as a parent node.
"""
edge = nncf_graph.get_input_edge_by_port_id(node, port_id)
return edge.from_node.metatype == ONNXDequantizeLinearMetatype
input_nodes = [edge.from_node for edge in nncf_graph.get_input_edges(node)]
if len(input_nodes) > port_id:
weight_node = input_nodes[port_id]
return weight_node.metatype == ONNXDequantizeLinearMetatype
return False


def get_weight_quantization_axis(node: NNCFNode, port_id: int) -> int:
Expand Down

0 comments on commit 43d3300

Please sign in to comment.