Skip to content

Commit

Permalink
Improve parsing of functional layers arguments. Support nn.functional…
Browse files Browse the repository at this point in the history
….layer_norm and substract
  • Loading branch information
Idan-BenAmi committed Jan 16, 2024
1 parent aad03b4 commit afa4436
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 57 deletions.
1 change: 0 additions & 1 deletion model_compression_toolkit/core/pytorch/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
OP_CALL_ARGS = 'op_call_args'
OP_CALL_KWARGS = 'op_call_kwargs'
INPUTS_AS_LIST = 'inputs_as_list'
OP_CALL_ARGS_ORDER = 'op_call_args_order'
INPLACE = 'inplace'
HARDTANH_MIN_VAL = 'min_val'
HARDTANH_MAX_VAL = 'max_val'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,4 +264,4 @@ def edges_builder(model: GraphModule,
edges.append(
Edge(fx_node_2_graph_node[node], fx_node_2_graph_node[out_node], src_index, dst_index))

return edges
return edges
47 changes: 0 additions & 47 deletions tests/pytorch_tests/model_tests/feature_models/sub_net_test.py

This file was deleted.

8 changes: 0 additions & 8 deletions tests/pytorch_tests/model_tests/test_feature_models_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import model_compression_toolkit as mct
from model_compression_toolkit.gptq.common.gptq_config import RoundingType
from tests.pytorch_tests.model_tests.feature_models.add_net_test import AddNetTest
from tests.pytorch_tests.model_tests.feature_models.sub_net_test import SubNetTest
from tests.pytorch_tests.model_tests.feature_models.layer_norm_net_test import LayerNormNetTest
from tests.pytorch_tests.model_tests.feature_models.conv2d_replacement_test import DwConv2dReplacementTest
from tests.pytorch_tests.model_tests.feature_models.mixed_precision_bops_test import MixedPrecisionBopsBasicTest, \
Expand Down Expand Up @@ -123,13 +122,6 @@ def test_add_net(self):
"""
AddNetTest(self).run_test()

def test_sub_net(self):
"""
This tests check the subtraction operations.
Both with different layers and with constants.
"""
SubNetTest(self).run_test()

def test_layer_norm_net(self):
"""
This tests check the nn.functional.layer_norm operations.
Expand Down

0 comments on commit afa4436

Please sign in to comment.