Skip to content

Commit 1e075f6

Browse files
committed
ggml-openvino: Add the stateful check to make the gate safer
1 parent e78d7ff commit 1e075f6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎ggml/src/ggml-openvino/openvino/op/mulmat.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ OutputVector translate_mulmat(const NodeContext & context) {
6464
const auto * A_reshape = ov::as_type<ov::op::v1::Reshape>(A.get_node());
6565
const auto * A_target =
6666
A_reshape != nullptr ? ov::as_type<ov::op::v0::Constant>(A_reshape->get_input_node_ptr(1)) : nullptr;
67-
if (A_target != nullptr && A_reshape->get_special_zero() &&
67+
if (context.is_stateful() && A_target != nullptr && A_reshape->get_special_zero() &&
6868
A_target->cast_vector<int64_t>() == std::vector<int64_t>{0, batch_large, -1, 0} &&
6969
A_reshape->get_input_partial_shape(0)[1] == batch_small) {
7070
A_grouped = A_reshape->input_value(0);

0 commit comments

Comments
 (0)