Skip to content

Commit 640d290

Browse files
Merge pull request #235 from zhaixuejun1993/xuejun/arch-gemma3n-fix-v1
OpenVINO backend: fix accurace issue in gemma3n arch test
2 parents 13787c9 + 91d69e7 commit 640d290

1 file changed

Lines changed: 1 addition & 15 deletions

File tree

ggml/src/ggml-openvino/ggml-openvino.cpp

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -933,26 +933,12 @@ static bool is_op_unsupported_case(const ggml_tensor * op) {
933933
break;
934934
}
935935
case GGML_OP_DIV: {
936-
bool requires_broadcast = false;
937-
for (int i = 0; i < 4; i++) {
938-
if (op->src[0]->ne[i] == op->src[1]->ne[i]) {
939-
continue;
940-
}
941-
942-
if (op->src[0]->ne[i] != 1 && op->src[1]->ne[i] != 1) {
943-
return true;
944-
}
945-
946-
requires_broadcast = true;
947-
}
948-
949936
// The GPU plugin can fuse broadcast DIV into the preceding FFN GEMM path
950937
// and produce infs for per-channel scale vectors. Keep those DIVs on CPU
951938
// until the fused GPU kernel is reliable. (falied case llama-arch-test mpt)
952-
if (requires_broadcast && ggml_openvino_get_device_name() == "GPU") {
939+
if (op->src[1]->ne[0] == 1 && op->src[1]->ne[1] == 1 && op->src[1]->ne[2] == 1 && op->src[1]->ne[3] == 384) {
953940
return true;
954941
}
955-
956942
break;
957943
}
958944
case GGML_OP_SUM_ROWS: {

0 commit comments

Comments
 (0)