Skip to content

Commit e2e9a6c

Browse files
committed
update position id tensor size check in GGML_OP_ROPE
1 parent ef7f74b commit e2e9a6c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3026,7 +3026,9 @@ static void ggml_metal_encode_node(
30263026
} break;
30273027
case GGML_OP_ROPE:
30283028
{
3029-
GGML_ASSERT(ne10 == ne02);
3029+
// make sure we have one or more position id(ne10) per token(ne02)
3030+
GGML_ASSERT(ne10 % ne02 == 0);
3031+
GGML_ASSERT(ne10 >= ne02);
30303032

30313033
const int nth = MIN(1024, ne00);
30323034

0 commit comments

Comments
 (0)