Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
siddhant-0707 committed Oct 19, 2023
1 parent cfbf2a5 commit 986629b
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ graph {
tensor_type {
elem_type: 7 # INT64
shape {
dim {
dim_value: 1
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ graph {
type: INT
}
attribute {
name: "symmetric"
name: "periodic"
i: 0 # Set to 1 for periodic, 0 for non-periodic
type: INT
}
Expand All @@ -23,9 +23,6 @@ graph {
tensor_type {
elem_type: 7 # INT64
shape {
dim {
dim_value: 1
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ graph {
tensor_type {
elem_type: 7 # INT64
shape {
dim {
dim_value: 1
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ graph {
tensor_type {
elem_type: 7 # INT64
shape {
dim {
dim_value: 1
}
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions src/frontends/onnx/tests/models/hannwindow_periodic.prototxt
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ graph {
tensor_type {
elem_type: 7 # INT64
shape {
dim {
dim_value: 1
}
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions src/frontends/onnx/tests/models/hannwindow_symmetric.prototxt
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ graph {
tensor_type {
elem_type: 7 # INT64
shape {
dim {
dim_value: 1
}
}
}
}
Expand Down
46 changes: 38 additions & 8 deletions src/frontends/onnx/tests/onnx_import.in.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6725,7 +6725,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_blackmanwindow_periodic) {
auto test_case = ov::test::TestCase(function, s_device);

test_case.add_input<int64_t>({10});
test_case.add_expected_output(Shape{10},
test_case.add_expected_output<float>(Shape{10},
{-0.000000014901161f,
0.040212844f,
0.20077012f,
Expand All @@ -6737,7 +6737,12 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_blackmanwindow_periodic) {
0.20077008f,
0.040212862f});

test_case.run_with_tolerance_as_fp();
// GPU has an accuracy drop, need to use different tolerance
if("${BACKEND_NAME}" != "IE_GPU") {
test_case.run_with_tolerance_as_fp();
} else {
test_case.run_with_tolerance_as_fp(0.01f);
}
}

OPENVINO_TEST(${BACKEND_NAME}, onnx_model_blackmanwindow_symmetric) {
Expand All @@ -6748,7 +6753,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_blackmanwindow_symmetric) {
auto test_case = ov::test::TestCase(function, s_device);

test_case.add_input<int64_t>({10});
test_case.add_expected_output(Shape{10},
test_case.add_expected_output<float>(Shape{10},
{-0.00000001f,
0.05086961f,
0.25800052f,
Expand All @@ -6760,7 +6765,12 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_blackmanwindow_symmetric) {
0.05086958f,
-0.00000001f});

test_case.run_with_tolerance_as_fp();
// GPU has an accuracy drop, need to use different tolerance
if("${BACKEND_NAME}" != "IE_GPU") {
test_case.run_with_tolerance_as_fp();
} else {
test_case.run_with_tolerance_as_fp(0.01f);
}
}

OPENVINO_TEST(${BACKEND_NAME}, onnx_model_hammingwindow_periodic) {
Expand All @@ -6783,7 +6793,12 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_hammingwindow_periodic) {
0.4024696f,
0.17418906f});

test_case.run_with_tolerance_as_fp();
// GPU has an accuracy drop, need to use different tolerance
if("${BACKEND_NAME}" != "IE_GPU") {
test_case.run_with_tolerance_as_fp();
} else {
test_case.run_with_tolerance_as_fp(0.01f);
}
}

OPENVINO_TEST(${BACKEND_NAME}, onnx_model_hammingwindow_symmetric) {
Expand All @@ -6806,7 +6821,12 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_hammingwindow_symmetric) {
0.19381064f,
0.08695650f});

test_case.run_with_tolerance_as_fp();
// GPU has an accuracy drop, need to use different tolerance
if("${BACKEND_NAME}" != "IE_GPU") {
test_case.run_with_tolerance_as_fp();
} else {
test_case.run_with_tolerance_as_fp(0.01f);
}
}

OPENVINO_TEST(${BACKEND_NAME}, onnx_model_hannwindow_periodic) {
Expand All @@ -6829,7 +6849,12 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_hannwindow_periodic) {
0.34556198f,
0.09554043f});

test_case.run_with_tolerance_as_fp();
// GPU has an accuracy drop, need to use different tolerance
if("${BACKEND_NAME}" != "IE_GPU") {
test_case.run_with_tolerance_as_fp();
} else {
test_case.run_with_tolerance_as_fp(0.01f);
}
}

OPENVINO_TEST(${BACKEND_NAME}, onnx_model_hannwindow_symmetric) {
Expand All @@ -6852,5 +6877,10 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_hannwindow_symmetric) {
0.11703071f,
0.00000000f});

test_case.run_with_tolerance_as_fp();
// GPU has an accuracy drop, need to use different tolerance
if("${BACKEND_NAME}" != "IE_GPU") {
test_case.run_with_tolerance_as_fp();
} else {
test_case.run_with_tolerance_as_fp(0.01f);
}
}
6 changes: 0 additions & 6 deletions src/frontends/onnx/tests/tests_python/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,12 +376,6 @@ def expect_fail(test_case_path, xfail): # type: (str) -> None
),
(
xfail_issue_90649,
"OnnxBackendNodeModelTest.test_blackmanwindow_cpu",
"OnnxBackendNodeModelTest.test_blackmanwindow_symmetric_cpu",
"OnnxBackendNodeModelTest.test_hammingwindow_cpu",
"OnnxBackendNodeModelTest.test_hammingwindow_symmetric_cpu",
"OnnxBackendNodeModelTest.test_hannwindow_cpu",
"OnnxBackendNodeModelTest.test_hannwindow_symmetric_cpu",
"OnnxBackendNodeModelTest.test_melweightmatrix_cpu",
"OnnxBackendNodeModelTest.test_sequence_map_add_1_sequence_1_tensor_cpu",
"OnnxBackendNodeModelTest.test_sequence_map_add_2_sequences_cpu",
Expand Down

0 comments on commit 986629b

Please sign in to comment.