update position id tensor size check in GGML_OP_ROPE

This commit is contained in:
HimariO 2024-12-13 19:31:34 +08:00
parent ef7f74bddd
commit e2e9a6caf7

View file

@ -3026,7 +3026,9 @@ static void ggml_metal_encode_node(
} break; } break;
case GGML_OP_ROPE: case GGML_OP_ROPE:
{ {
GGML_ASSERT(ne10 == ne02); // make sure we have one or more position id(ne10) per token(ne02)
GGML_ASSERT(ne10 % ne02 == 0);
GGML_ASSERT(ne10 >= ne02);
const int nth = MIN(1024, ne00); const int nth = MIN(1024, ne00);