diff options
Diffstat (limited to 'pplx_embed.c')
| -rw-r--r-- | pplx_embed.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pplx_embed.c b/pplx_embed.c index 35bd739..2c0ade6 100644 --- a/pplx_embed.c +++ b/pplx_embed.c @@ -388,8 +388,11 @@ static int tensor_has_supported_shape(const safetensors_file_t *sf, } size_t bytes; - if (mul_size(numel, elem_size, &bytes) != 0 || - t->data_size != bytes) { + if (mul_size(numel, elem_size, &bytes) != 0) { + fprintf(stderr, "pplx: tensor data too large for %s\n", name); + return 0; + } + if (t->data_size != bytes) { fprintf(stderr, "pplx: bad data size for %s: got %zu, expected %zu\n", name, t->data_size, bytes); return 0; |
