From 99892be4907c51a03d37296f4e12834c6a051703 Mon Sep 17 00:00:00 2001 From: Justine Tunney Date: Wed, 31 Jan 2024 08:20:53 -0800 Subject: [PATCH] Fix out of bounds memory clobber in GGML_OP_ROPE --- ggml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml.c b/ggml.c index ee994c875..541c19135 100644 --- a/ggml.c +++ b/ggml.c @@ -17151,7 +17151,7 @@ struct ggml_cplan ggml_graph_plan(const struct ggml_cgraph * cgraph, int n_threa case GGML_OP_SOFT_MAX: case GGML_OP_ROPE: { - cur = ggml_type_size(GGML_TYPE_F32) * node->ne[0] * n_tasks; + cur = ggml_type_size(GGML_TYPE_F32) * (node->ne[0] + CACHE_LINE_SIZE_F32) * n_tasks; } break; case GGML_OP_CONV_TRANSPOSE_1D: {