Skip to content

Commit f829a24

Browse files
weight dim > 3 assert is removed
1 parent 6c1d2e6 commit f829a24

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

src/nncf/quantization/algorithms/weight_compression/algorithm.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,11 +1262,6 @@ def get_statistic_points(
12621262
input_channel_axis = input_channel_axis % n_dims
12631263
reduction_axes = tuple(i for i in range(n_dims) if i != input_channel_axis)
12641264

1265-
if any(weight_dim > 3 for weight_dim in all_weight_dims):
1266-
max_val = max(weight_dim for weight_dim in all_weight_dims)
1267-
msg = f"Compression with {max_val} dimentional weight is not supported"
1268-
raise nncf.InternalError(msg)
1269-
12701265
# For 3D weights, keep the batch dimention
12711266
if any(weight_dim == 3 for weight_dim in all_weight_dims):
12721267
assert len(reduction_axes) == 2

src/nncf/torch/node_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def get_activation_channel_axis(node: NNCFNode, port_id: int) -> int:
2424
:param port_id: Port ID for input.
2525
:return: Channel axis number.
2626
"""
27-
if node.metatype not in op.CONVOLUTION_METATYPES + op.MATMUL_METATYPES + op.UNIFICATION_PRODUCING_METATYPES:
27+
if node.metatype not in op.CONVOLUTION_METATYPES + op.MATMUL_METATYPES:
2828
msg = f"Activation channel axis retrieval from node with metatype {node.metatype} is not supported"
2929
raise nncf.InternalError(msg)
3030

tests/torch/test_node_utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"metatype,port_id,ref_out",
2222
(
2323
(op.PTLinearMetatype, 0, -1),
24-
(op.PTModuleLinearMetatype, 0, -1),
2524
(op.PTConv2dMetatype, 0, 1),
2625
(op.PTDepthwiseConv2dSubtype, 0, 1),
2726
(op.PTConvTranspose2dMetatype, 0, 1),

0 commit comments

Comments
 (0)