From e2fdc1b9884b99379d5d9f7bcbea0c6311ef3165 Mon Sep 17 00:00:00 2001 From: Cavus Mustafa Date: Tue, 29 Jul 2025 17:55:15 -0700 Subject: [PATCH] mulmat input conversion fix --- ggml/src/ggml-openvino/openvino/op/mulmat.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ggml/src/ggml-openvino/openvino/op/mulmat.cpp b/ggml/src/ggml-openvino/openvino/op/mulmat.cpp index 57fd476f0a..6905777a09 100644 --- a/ggml/src/ggml-openvino/openvino/op/mulmat.cpp +++ b/ggml/src/ggml-openvino/openvino/op/mulmat.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include "../node_context.hpp" @@ -29,8 +30,10 @@ OutputVector translate_mulmat(const NodeContext& context) { ov::Output res; ov::Output B = context.get_input(0); ov::Output A = context.get_input(1); - if (context.get_input_type(0) != context.get_input_type(1)) { + if (ov::op::util::is_constant(B.get_node()) && context.get_input_type(0) != context.get_input_type(1)) { B = std::make_shared(context.get_input(0), context.get_input_type(1)); + } else if (context.get_input_type(0) != context.get_input_type(1)) { + A = std::make_shared(context.get_input(1), context.get_input_type(0)); } auto B_shape = context.get_input_shape(0).to_shape();