Skip to content

Commit b6e5d19

Browse files
fix format issue
Signed-off-by: HU Yuan2 <[email protected]>
1 parent 0cf277a commit b6e5d19

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

src/common/transformations/tests/common_optimizations/fuse_rotary_positional_embeddings.cpp

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -333,17 +333,14 @@ static std::shared_ptr<ov::Model> buildROPE_VIT(const int seq_length,
333333
makeOP<ov::opset1::Multiply>({slice_right_part, Constant_396096}, {{"auto_broadcast", "numpy"}});
334334
cat_Concat = makeOP<ov::opset1::Concat>({neg_Multiply, slice_left_part}, {{"axis", -1}});
335335
} else if (split_op_type == "StridedSlice") {
336-
auto slice_right_part = makeOP<ov::opset1::StridedSlice>({input, {0, 0, rotary_ndims / 2},
337-
{0, 0, INT_MAX},
338-
{1, 1, 1}},
339-
{{"begin_mask", {1, 1, 0}},
340-
{"end_mask", {1, 1, 0}},
341-
{"new_axis_mask", {}},
342-
{"shrink_axis_mask", {}},
343-
{"ellipsis_mask", {}}});
344-
auto slice_left_part = makeOP<ov::opset1::StridedSlice>({input, {0, 0, 0},
345-
{0, 0, rotary_ndims / 2},
346-
{1, 1, 1}},
336+
auto slice_right_part =
337+
makeOP<ov::opset1::StridedSlice>({input, {0, 0, rotary_ndims / 2}, {0, 0, INT_MAX}, {1, 1, 1}},
338+
{{"begin_mask", {1, 1, 0}},
339+
{"end_mask", {1, 1, 0}},
340+
{"new_axis_mask", {}},
341+
{"shrink_axis_mask", {}},
342+
{"ellipsis_mask", {}}});
343+
auto slice_left_part = makeOP<ov::opset1::StridedSlice>({input, {0, 0, 0}, {0, 0, rotary_ndims / 2}, {1, 1, 1}},
347344
{{"begin_mask", {1, 1, 0}},
348345
{"end_mask", {1, 1, 0}},
349346
{"new_axis_mask", {}},
@@ -353,7 +350,7 @@ static std::shared_ptr<ov::Model> buildROPE_VIT(const int seq_length,
353350
makeOP<ov::opset1::Multiply>({slice_right_part, Constant_396096}, {{"auto_broadcast", "numpy"}});
354351
cat_Concat = makeOP<ov::opset1::Concat>({neg_Multiply, slice_left_part}, {{"axis", -1}});
355352
} else {
356-
return nullptr;
353+
return nullptr;
357354
}
358355
auto mul_sin_Multiply = makeOP<ov::opset1::Multiply>({cat_Concat, param_sin}, {{"auto_broadcast", "numpy"}});
359356
auto mul_cos_Multiply = makeOP<ov::opset1::Multiply>({input, param_cos}, {{"auto_broadcast", "numpy"}});
@@ -782,6 +779,7 @@ TEST_P(ConvertToROPETestVIT, ConvertToROPE_qwen) {
782779
const int rotary_ndims = 80;
783780
const std::string split_op_type = GetParam();
784781
model = buildROPE_VIT(seq_len, num_heads, rotary_ndims, split_op_type);
782+
ASSERT_TRUE(model != nullptr);
785783
manager.register_pass<ov::pass::RoPEFusionVIT3D>();
786784
{
787785
auto input =

src/tests/functional/plugin/shared/src/subgraph/rotary_pos_emb.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ void RoPETestQwenVL::SetUp() {
177177
InputShape sin_shape_value = {sin_shape, {Shape{80, 1, 80}}};
178178
init_input_shapes({input_shape_value, cos_shape_value, sin_shape_value});
179179
function = buildROPE_QwenVL(element_type, input_shape, cos_shape, sin_shape, splip_op_type);
180+
ASSERT_TRUE(function != nullptr);
180181
}
181182

182183
std::string RoPETestQwenVL::getTestCaseName(const testing::TestParamInfo<rope_params_qwenvit>& obj) {

0 commit comments

Comments
 (0)