Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions tests/common/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,24 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import os

from pytest import Config
from pytest import Parser

from tests.cross_fw.shared.logging import nncf_caplog # noqa: F401


def pytest_addoption(parser: Parser):
parser.addoption(
"--regen-ref-data",
Comment thread
AlexanderDokuchaev marked this conversation as resolved.
action="store_true",
default=False,
help="If specified, the reference files will be regenerated using the current state of the repository.",
)


def pytest_configure(config: Config) -> None:
regen_dot = config.getoption("--regen-ref-data", False)
if regen_dot:
os.environ["NNCF_TEST_REGEN_DOT"] = "1"
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
strict digraph {
"8 /Concat_with_missed_input_0" [id=8, type=Concat_with_missed_input];
"9 /Input_1_0" [id=9, type=Input_1];
"10 /Input_2_0" [id=10, type=Input_2];
"11 /Concat_with_input_0" [id=11, type=Concat_with_input];
digraph {
"8 /Concat_with_missed_input_0" [id=8, type="Concat_with_missed_input"];
"9 /Input_1_0" [id=9, type="Input_1"];
"10 /Input_2_0" [id=10, type="Input_2"];
"11 /Concat_with_input_0" [id=11, type="Concat_with_input"];
"12 /ReadVariable_0" [id=12, type=ReadVariable];
"14 /Conv_0" [id=14, type=Conv];
"16 /Conv2_0" [id=16, type=Conv2];
"17 /Add_0" [id=17, type=Add];
"18 /Final_node_0" [id=18, type=Final_node];
"9 /Input_1_0" -> "14 /Conv_0";
"10 /Input_2_0" -> "11 /Concat_with_input_0";
"12 /ReadVariable_0" -> "17 /Add_0";
"16 /Conv2_0" -> "17 /Add_0";
"17 /Add_0" -> "18 /Final_node_0";
"18 /Final_node_0" [id=18, type="Final_node"];
"9 /Input_1_0" -> "14 /Conv_0" [key=0];
"10 /Input_2_0" -> "11 /Concat_with_input_0" [key=0];
"12 /ReadVariable_0" -> "17 /Add_0" [key=0];
"16 /Conv2_0" -> "17 /Add_0" [key=0];
"17 /Add_0" -> "18 /Final_node_0" [key=0];
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
strict digraph {
"15 /Concat_with_missed_input_0" [id=15, type=Concat_with_missed_input];
"16 /Input_1_0" [id=16, type=Input_1];
"17 /Input_2_0" [id=17, type=Input_2];
"18 /Concat_with_input_0" [id=18, type=Concat_with_input];
digraph {
"15 /Concat_with_missed_input_0" [id=15, type="Concat_with_missed_input"];
"16 /Input_1_0" [id=16, type="Input_1"];
"17 /Input_2_0" [id=17, type="Input_2"];
"18 /Concat_with_input_0" [id=18, type="Concat_with_input"];
"19 /ReadVariable_0" [id=19, type=ReadVariable];
"22 /Conv_0" [id=22, type=Conv];
"25 /Conv2_0" [id=25, type=Conv2];
"26 /Add_0" [id=26, type=Add];
"27 /Final_node_0" [id=27, type=Final_node];
"16 /Input_1_0" -> "22 /Conv_0";
"17 /Input_2_0" -> "18 /Concat_with_input_0";
"19 /ReadVariable_0" -> "26 /Add_0";
"25 /Conv2_0" -> "26 /Add_0";
"26 /Add_0" -> "27 /Final_node_0";
"27 /Final_node_0" [id=27, type="Final_node"];
"16 /Input_1_0" -> "22 /Conv_0" [key=0];
"17 /Input_2_0" -> "18 /Concat_with_input_0" [key=0];
"19 /ReadVariable_0" -> "26 /Add_0" [key=0];
"25 /Conv2_0" -> "26 /Add_0" [key=0];
"26 /Add_0" -> "27 /Final_node_0" [key=0];
}
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
strict digraph {
digraph {
"0 /Const0_0" [id=0, type=Const0];
"1 /Const1_0" [id=1, type=Const1];
"2 /Const2_0" [id=2, type=Const2];
"3 /Const3_0" [id=3, type=Const3];
"4 /Const4_0" [id=4, type=Const4];
"5 /Concat_with_constant_0" [id=5, type=Concat_with_constant];
"5 /Concat_with_constant_0" [id=5, type="Concat_with_constant"];
"6 /Const5_0" [id=6, type=Const5];
"7 /Const6_0" [id=7, type=Const6];
"8 /Concat_with_missed_input_0" [id=8, type=Concat_with_missed_input];
"9 /Input_1_0" [id=9, type=Input_1];
"10 /Input_2_0" [id=10, type=Input_2];
"11 /Concat_with_input_0" [id=11, type=Concat_with_input];
"8 /Concat_with_missed_input_0" [id=8, type="Concat_with_missed_input"];
"9 /Input_1_0" [id=9, type="Input_1"];
"10 /Input_2_0" [id=10, type="Input_2"];
"11 /Concat_with_input_0" [id=11, type="Concat_with_input"];
"12 /ReadVariable_0" [id=12, type=ReadVariable];
"13 /Weights_0" [id=13, type=Weights];
"14 /Conv_0" [id=14, type=Conv];
"15 /Weights2_0" [id=15, type=Weights2];
"16 /Conv2_0" [id=16, type=Conv2];
"17 /Add_0" [id=17, type=Add];
"18 /Final_node_0" [id=18, type=Final_node];
"18 /Final_node_0" [id=18, type="Final_node"];
"19 /Weights3_0" [id=19, type=Weights3];
"20 /Weights4_0" [id=20, type=Weights4];
"21 /Conv3_0" [id=21, type=Conv3];
"22 /NodeAfterConstantConv_0" [id=22, type=NodeAfterConstantConv];
"0 /Const0_0" -> "11 /Concat_with_input_0";
"1 /Const1_0" -> "11 /Concat_with_input_0";
"2 /Const2_0" -> "5 /Concat_with_constant_0";
"3 /Const3_0" -> "5 /Concat_with_constant_0";
"4 /Const4_0" -> "5 /Concat_with_constant_0";
"6 /Const5_0" -> "8 /Concat_with_missed_input_0";
"7 /Const6_0" -> "8 /Concat_with_missed_input_0";
"9 /Input_1_0" -> "14 /Conv_0";
"10 /Input_2_0" -> "11 /Concat_with_input_0";
"12 /ReadVariable_0" -> "17 /Add_0";
"13 /Weights_0" -> "14 /Conv_0";
"15 /Weights2_0" -> "16 /Conv2_0";
"16 /Conv2_0" -> "17 /Add_0";
"17 /Add_0" -> "18 /Final_node_0";
"19 /Weights3_0" -> "21 /Conv3_0";
"20 /Weights4_0" -> "21 /Conv3_0";
"21 /Conv3_0" -> "22 /NodeAfterConstantConv_0";
"0 /Const0_0" -> "11 /Concat_with_input_0" [key=0];
"1 /Const1_0" -> "11 /Concat_with_input_0" [key=0];
"2 /Const2_0" -> "5 /Concat_with_constant_0" [key=0];
"3 /Const3_0" -> "5 /Concat_with_constant_0" [key=0];
"4 /Const4_0" -> "5 /Concat_with_constant_0" [key=0];
"6 /Const5_0" -> "8 /Concat_with_missed_input_0" [key=0];
"7 /Const6_0" -> "8 /Concat_with_missed_input_0" [key=0];
"9 /Input_1_0" -> "14 /Conv_0" [key=0];
"10 /Input_2_0" -> "11 /Concat_with_input_0" [key=0];
"12 /ReadVariable_0" -> "17 /Add_0" [key=0];
"13 /Weights_0" -> "14 /Conv_0" [key=0];
"15 /Weights2_0" -> "16 /Conv2_0" [key=0];
"16 /Conv2_0" -> "17 /Add_0" [key=0];
"17 /Add_0" -> "18 /Final_node_0" [key=0];
"19 /Weights3_0" -> "21 /Conv3_0" [key=0];
"20 /Weights4_0" -> "21 /Conv3_0" [key=0];
"21 /Conv3_0" -> "22 /NodeAfterConstantConv_0" [key=0];
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
strict digraph {
digraph {
"0 /Const0_0" [id=0, type=Const0];
"1 /AnyAfterConst0_0" [id=1, type=AnyAfterConst0];
"2 /Const1_0" [id=2, type=Const1];
Expand All @@ -9,15 +9,15 @@ strict digraph {
"7 /AnyAfterConst3_0" [id=7, type=AnyAfterConst3];
"8 /Const4_0" [id=8, type=Const4];
"9 /AnyAfterConst4_0" [id=9, type=AnyAfterConst4];
"10 /Concat_with_constant_0" [id=10, type=Concat_with_constant];
"10 /Concat_with_constant_0" [id=10, type="Concat_with_constant"];
"11 /Const5_0" [id=11, type=Const5];
"12 /AnyAfterConst5_0" [id=12, type=AnyAfterConst5];
"13 /Const6_0" [id=13, type=Const6];
"14 /AnyAfterConst6_0" [id=14, type=AnyAfterConst6];
"15 /Concat_with_missed_input_0" [id=15, type=Concat_with_missed_input];
"16 /Input_1_0" [id=16, type=Input_1];
"17 /Input_2_0" [id=17, type=Input_2];
"18 /Concat_with_input_0" [id=18, type=Concat_with_input];
"15 /Concat_with_missed_input_0" [id=15, type="Concat_with_missed_input"];
"16 /Input_1_0" [id=16, type="Input_1"];
"17 /Input_2_0" [id=17, type="Input_2"];
"18 /Concat_with_input_0" [id=18, type="Concat_with_input"];
"19 /ReadVariable_0" [id=19, type=ReadVariable];
"20 /Weights_0" [id=20, type=Weights];
"21 /AnyAfterWeights_0" [id=21, type=AnyAfterWeights];
Expand All @@ -26,39 +26,39 @@ strict digraph {
"24 /AnyAfterWeights2_0" [id=24, type=AnyAfterWeights2];
"25 /Conv2_0" [id=25, type=Conv2];
"26 /Add_0" [id=26, type=Add];
"27 /Final_node_0" [id=27, type=Final_node];
"27 /Final_node_0" [id=27, type="Final_node"];
"28 /Weights3_0" [id=28, type=Weights3];
"29 /AnyAfterWeights3_0" [id=29, type=AnyAfterWeights3];
"30 /Weights4_0" [id=30, type=Weights4];
"31 /AnyAfterWeights4_0" [id=31, type=AnyAfterWeights4];
"32 /Conv3_0" [id=32, type=Conv3];
"33 /NodeAfterConstantConv_0" [id=33, type=NodeAfterConstantConv];
"0 /Const0_0" -> "1 /AnyAfterConst0_0";
"1 /AnyAfterConst0_0" -> "18 /Concat_with_input_0";
"2 /Const1_0" -> "3 /AnyAfterConst1_0";
"3 /AnyAfterConst1_0" -> "18 /Concat_with_input_0";
"4 /Const2_0" -> "5 /AnyAfterConst2_0";
"5 /AnyAfterConst2_0" -> "10 /Concat_with_constant_0";
"6 /Const3_0" -> "7 /AnyAfterConst3_0";
"7 /AnyAfterConst3_0" -> "10 /Concat_with_constant_0";
"8 /Const4_0" -> "9 /AnyAfterConst4_0";
"9 /AnyAfterConst4_0" -> "10 /Concat_with_constant_0";
"11 /Const5_0" -> "12 /AnyAfterConst5_0";
"12 /AnyAfterConst5_0" -> "15 /Concat_with_missed_input_0";
"13 /Const6_0" -> "14 /AnyAfterConst6_0";
"14 /AnyAfterConst6_0" -> "15 /Concat_with_missed_input_0";
"16 /Input_1_0" -> "22 /Conv_0";
"17 /Input_2_0" -> "18 /Concat_with_input_0";
"19 /ReadVariable_0" -> "26 /Add_0";
"20 /Weights_0" -> "21 /AnyAfterWeights_0";
"21 /AnyAfterWeights_0" -> "22 /Conv_0";
"23 /Weights2_0" -> "24 /AnyAfterWeights2_0";
"24 /AnyAfterWeights2_0" -> "25 /Conv2_0";
"25 /Conv2_0" -> "26 /Add_0";
"26 /Add_0" -> "27 /Final_node_0";
"28 /Weights3_0" -> "29 /AnyAfterWeights3_0";
"29 /AnyAfterWeights3_0" -> "32 /Conv3_0";
"30 /Weights4_0" -> "31 /AnyAfterWeights4_0";
"31 /AnyAfterWeights4_0" -> "32 /Conv3_0";
"32 /Conv3_0" -> "33 /NodeAfterConstantConv_0";
"0 /Const0_0" -> "1 /AnyAfterConst0_0" [key=0];
"1 /AnyAfterConst0_0" -> "18 /Concat_with_input_0" [key=0];
"2 /Const1_0" -> "3 /AnyAfterConst1_0" [key=0];
"3 /AnyAfterConst1_0" -> "18 /Concat_with_input_0" [key=0];
"4 /Const2_0" -> "5 /AnyAfterConst2_0" [key=0];
"5 /AnyAfterConst2_0" -> "10 /Concat_with_constant_0" [key=0];
"6 /Const3_0" -> "7 /AnyAfterConst3_0" [key=0];
"7 /AnyAfterConst3_0" -> "10 /Concat_with_constant_0" [key=0];
"8 /Const4_0" -> "9 /AnyAfterConst4_0" [key=0];
"9 /AnyAfterConst4_0" -> "10 /Concat_with_constant_0" [key=0];
"11 /Const5_0" -> "12 /AnyAfterConst5_0" [key=0];
"12 /AnyAfterConst5_0" -> "15 /Concat_with_missed_input_0" [key=0];
"13 /Const6_0" -> "14 /AnyAfterConst6_0" [key=0];
"14 /AnyAfterConst6_0" -> "15 /Concat_with_missed_input_0" [key=0];
"16 /Input_1_0" -> "22 /Conv_0" [key=0];
"17 /Input_2_0" -> "18 /Concat_with_input_0" [key=0];
"19 /ReadVariable_0" -> "26 /Add_0" [key=0];
"20 /Weights_0" -> "21 /AnyAfterWeights_0" [key=0];
"21 /AnyAfterWeights_0" -> "22 /Conv_0" [key=0];
"23 /Weights2_0" -> "24 /AnyAfterWeights2_0" [key=0];
"24 /AnyAfterWeights2_0" -> "25 /Conv2_0" [key=0];
"25 /Conv2_0" -> "26 /Add_0" [key=0];
"26 /Add_0" -> "27 /Final_node_0" [key=0];
"28 /Weights3_0" -> "29 /AnyAfterWeights3_0" [key=0];
"29 /AnyAfterWeights3_0" -> "32 /Conv3_0" [key=0];
"30 /Weights4_0" -> "31 /AnyAfterWeights4_0" [key=0];
"31 /AnyAfterWeights4_0" -> "32 /Conv3_0" [key=0];
"32 /Conv3_0" -> "33 /NodeAfterConstantConv_0" [key=0];
}
4 changes: 2 additions & 2 deletions tests/onnx/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def pytest_addoption(parser):
"will be disable for OpenVINO.",
)
parser.addoption(
"--regen-dot",
"--regen-ref-data",
action="store_true",
default=False,
help="If specified, the reference .dot files will be regenerated using the current state of the repository.",
Expand All @@ -85,7 +85,7 @@ def pytest_addoption(parser):


def pytest_configure(config):
regen_dot = config.getoption("--regen-dot", False)
regen_dot = config.getoption("--regen-ref-data", False)
if regen_dot:
os.environ["NNCF_TEST_REGEN_DOT"] = "1"

Expand Down
Loading
Loading