ggml : fix -Warray-bounds warning with gcc (#4231)

This commit is contained in:
Jared Van Bortel 2023-11-26 22:58:43 -05:00 committed by GitHub
parent 3e73d31d9c
commit f3b269813f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

11
ggml.c
View file

@ -15689,13 +15689,14 @@ static int ggml_get_n_tasks(struct ggml_tensor * node, int n_threads) {
{
n_tasks = 1;
} break;
case GGML_OP_COUNT:
{
GGML_ASSERT(false);
} break;
default:
{
printf("%s: op %s not implemented\n", __func__, ggml_op_name(node->op));
fprintf(stderr, "%s: op not implemented: ", __func__);
if (node->op < GGML_OP_COUNT) {
fprintf(stderr, "%s\n", ggml_op_name(node->op));
} else {
fprintf(stderr, "%d\n", node->op);
}
GGML_ASSERT(false);
} break;
}