Skip to content

Commit 65bf062

Browse files
committed
ggml: move ggml_assert location
Signed-off-by: Aaron Teo <[email protected]>
1 parent 25c971d commit 65bf062

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ggml/src/gguf.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,13 +354,13 @@ struct gguf_context * gguf_init_from_file_impl(FILE * file, struct gguf_init_par
354354
* the last 4 hexadecimal digit to check if the model is the same
355355
* endianness as the host system.
356356
*/
357-
GGML_ASSERT(ctx->version > 0 && ctx->version <= 65535);
358357
if ((ctx->version & 0x0000FFFF) == 0x00000000) {
359358
GGML_LOG_ERROR("%s: failed to load model: host and model endian mismatch, please use a model compiled with the same endian as your host system\n", __func__);
360359
gguf_free(ctx);
361360
return nullptr;
362361
}
363362

363+
GGML_ASSERT(ctx->version > 0 && ctx->version <= 65535);
364364
if (ctx->version == 1) {
365365
GGML_LOG_ERROR("%s: GGUFv1 is no longer supported, please use a more up-to-date version\n", __func__);
366366
ok = false;

0 commit comments

Comments
 (0)