Skip to content

Commit b6fc9f0

Browse files
committed
ggml-metal : supports_op returns false for ternary types
Maybe not the cleanest way, but hopefully temporary.
1 parent 946796f commit b6fc9f0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

ggml/src/ggml-metal/ggml-metal.m

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,6 +1081,18 @@ static bool ggml_metal_supports_op(const struct ggml_backend_metal_device_contex
10811081
}
10821082
}
10831083
}
1084+
// TODO: remove once proper support is added.
1085+
for (size_t i = 0, n = 3; i < n; ++i) {
1086+
if (op->src[i] != NULL) {
1087+
switch (op->src[i]->type) {
1088+
case GGML_TYPE_TQ1_0:
1089+
case GGML_TYPE_TQ2_0:
1090+
return false;
1091+
default:
1092+
break;
1093+
}
1094+
}
1095+
}
10841096

10851097
switch (op->op) {
10861098
case GGML_OP_UNARY:

0 commit comments

Comments
 (0)