Skip to content

Commit

Permalink
Fix SQ axis for convs in OV backend
Browse files Browse the repository at this point in the history
  • Loading branch information
daniil-lyakhov committed Nov 15, 2023
1 parent 608b16e commit 3263f53
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def get_activation_channel_axis(node: NNCFNode, port_id: int) -> int:
@staticmethod
def get_weight_channel_axis(node: NNCFNode) -> int:
if node.metatype != OVMatMulMetatype:
return 1 if node.metatype.const_channel_axis is None else node.metatype.const_channel_axis[0]
return 1

weights_layout = get_linear_weights_layout_from_node(node)
return weights_layout.index(OVLayoutElem.C_IN)
Expand Down
2 changes: 1 addition & 1 deletion tests/openvino/native/test_smooth_quant.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def test_get_activation_channel_axis(self, node_metatype, layer_attributes, port
OVLayoutElem.SPATIAL,
OVLayoutElem.SPATIAL,
),
0,
1,
),
),
)
Expand Down
4 changes: 2 additions & 2 deletions tests/shared/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@

class Command:
def __init__(self, cmd: str, cwd: Path = None, env: Dict = None):
self.cmd = cmd
self.cmd = f"source /home/dlyakhov/Projects/nncf/tmp_env/bin/activate; {cmd}"
self.process = None
self.exec_time = -1
self.output = [] # store output here
self.kwargs = {}
self.kwargs = {"executable": "/bin/bash"}
self.timeout = False
self.cwd = cwd
self.env = env if env is not None else os.environ.copy()
Expand Down

0 comments on commit 3263f53

Please sign in to comment.