Skip to content

Commit b00126a

Browse files
committed
undo cleverness
1 parent 8956732 commit b00126a

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

ggml/src/ggml.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,14 +1151,8 @@ static const char * GGML_GLU_OP_NAME[GGML_GLU_OP_COUNT] = {
11511151
static_assert(GGML_GLU_OP_COUNT == 5, "GGML_GLU_OP_COUNT != 5");
11521152

11531153

1154-
#define GGML_ASSERT_ALIGNED_MSG_P(N, A, P, MSG) \
1155-
static_assert((N) % (A) == 0, MSG " (size=" #N ", align=" #A ", padding=" #P ")")
1156-
#define GGML_ASSERT_ALIGNED_MSG(N, A, MSG) \
1157-
GGML_ASSERT_ALIGNED_MSG_P(N, A, ((A) - (N) % (A)) % (A), MSG)
1158-
1159-
// check that the tensor and object sizes are multiples of GGML_MEM_ALIGN
1160-
GGML_ASSERT_ALIGNED_MSG(sizeof(struct ggml_object), GGML_MEM_ALIGN, "ggml_object size must be a multiple of GGML_MEM_ALIGN");
1161-
GGML_ASSERT_ALIGNED_MSG(sizeof(struct ggml_tensor), GGML_MEM_ALIGN, "ggml_tensor size must be a multiple of GGML_MEM_ALIGN");
1154+
static_assert(sizeof(struct ggml_object)%GGML_MEM_ALIGN == 0, "ggml_object size must be a multiple of GGML_MEM_ALIGN");
1155+
static_assert(sizeof(struct ggml_tensor)%GGML_MEM_ALIGN == 0, "ggml_tensor size must be a multiple of GGML_MEM_ALIGN");
11621156

11631157

11641158
////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)