Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[tests] Enable snippets tests for MSVC build in debug mode (#27606)

Pawel Raasz8d52c0663a45
diff --git a/src/common/snippets/tests/src/pass/mha_tokenization.cpp b/src/common/snippets/tests/src/pass/mha_tokenization.cpp
index 040982feb4e..c5932ed690d 100644
--- a/src/common/snippets/tests/src/pass/mha_tokenization.cpp
+++ b/src/common/snippets/tests/src/pass/mha_tokenization.cpp
@@ -169,10 +169,6 @@ TEST_F(TokenizeMHASnippetsTests, smoke_Snippets_MHA3D_SplitM) {
}
TEST_F(TokenizeMHASnippetsTests, smoke_Snippets_MHA3D_SplitM_withMul) {
-#if defined(WIN32) && !defined(NDEBUG)
- test_skipped = true;
- GTEST_SKIP() << "Skipping on Windows in Debug mode due to Issue 155258.";
-#endif
const auto& f = MHASplitMFunction(std::vector<PartialShape>{{128, 12, 64}, {128, 12, 64}, {12, 128, 128}, {128, 12, 64}},
std::vector<ov::element::Type>({ov::element::f32, ov::element::f32, ov::element::f32, ov::element::f32}),
std::vector<Shape>{{2, 64, 12, 64}, {128, 12, 1, 64}, {12, 2, 64, 128}, {1, 128, 12, 64}, {128, 12, 64}},
@@ -195,10 +191,6 @@ TEST_F(TokenizeMHASnippetsTests, smoke_Snippets_MHA4D_SplitM) {
}
TEST_F(TokenizeMHASnippetsTests, smoke_Snippets_MHA4D_SplitM_withMul) {
-#if defined(WIN32) && !defined(NDEBUG)
- test_skipped = true;
- GTEST_SKIP() << "Skipping on Windows in Debug mode due to Issue 155258.";
-#endif
const auto& f = MHASplitMFunction(std::vector<PartialShape>{{1, 384, 16, 64}, {1, 384, 16, 64}, {1, 1, 1, 384}, {1, 384, 16, 64}},
std::vector<ov::element::Type>({ov::element::f32, ov::element::f32, ov::element::f32, ov::element::f32}),
std::vector<Shape>{{1, 6, 64, 16, 64}, {1, 384, 16, 1, 64}, {1, 1, 1, 1, 384}, {1, 1, 384, 16, 64}, {1, 384, 16, 64}},
diff --git a/src/tests/ov_helpers/ov_snippets_models/src/subgraph_mha.cpp b/src/tests/ov_helpers/ov_snippets_models/src/subgraph_mha.cpp
index 34f42ec838a..5f854326a47 100644
--- a/src/tests/ov_helpers/ov_snippets_models/src/subgraph_mha.cpp
+++ b/src/tests/ov_helpers/ov_snippets_models/src/subgraph_mha.cpp
@@ -82,7 +82,8 @@ std::shared_ptr<ov::Model> MHAFunction::initOriginal() const {
auto softmax_out = add->output(0);
if (with_reshape) {
const auto interm_shape = add->get_output_shape(0);
- const auto batch = std::accumulate(interm_shape.cbegin(), interm_shape.cbegin() + rank - 1, 1, std::multiplies<size_t>());
+ const auto batch =
+ std::accumulate(interm_shape.cbegin(), interm_shape.cbegin() + (rank - 1), 1, std::multiplies<size_t>());
const auto reshape0ConstData = std::vector<int64_t>{ batch, -1 };
const auto reshape1ConstData = interm_shape;
const auto reshape0Const = ov::op::v0::Constant::create(ov::element::i64, ov::Shape{reshape0ConstData.size()}, reshape0ConstData);
@@ -204,7 +205,7 @@ std::shared_ptr<ov::Model> MHASplitMFunction::initReference() const {
if (ov::shape_size(shape) > 1) {
ov::Shape reshape_shape = shape;
- reshape_shape.insert(reshape_shape.cbegin() + rank - 3, 1);
+ reshape_shape.insert(reshape_shape.cbegin() + (rank - 3), 1);
const auto mulReshape = make_reshape(mulConst, reshape_shape);
const auto mulParam = std::make_shared<ov::opset1::Parameter>(precisions[1], mulReshape->get_shape());
matmul_parent1 = std::make_shared<ov::op::v1::Multiply>(transpose1, mulParam);
@@ -288,7 +289,8 @@ std::shared_ptr<ov::Model> MHAMatMul0TransposeFunction::initOriginal() const {
auto softmax_out = add->output(0);
if (with_reshape) {
const auto interm_shape = add->get_output_shape(0);
- const auto batch = std::accumulate(interm_shape.cbegin(), interm_shape.cbegin() + rank - 1, 1, std::multiplies<size_t>());
+ const auto batch =
+ std::accumulate(interm_shape.cbegin(), interm_shape.cbegin() + (rank - 1), 1, std::multiplies<size_t>());
const auto reshape0ConstData = std::vector<int64_t>{ batch, -1 };
const auto reshape1ConstData = interm_shape;
const auto reshape0Const = ov::op::v0::Constant::create(ov::element::i64, ov::Shape{reshape0ConstData.size()}, reshape0ConstData);