From bce7697d64dc09d52dec468b7ed69c768967b8b6 Mon Sep 17 00:00:00 2001 From: Kawrakow Date: Fri, 27 Jun 2025 17:44:36 +0200 Subject: Remove what appears to be unnecessary asserts in ggml_cuda_cpy (#560) Co-authored-by: Iwan Kawrakow --- ggml/src/ggml-cuda/cpy.cu | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ggml/src') diff --git a/ggml/src/ggml-cuda/cpy.cu b/ggml/src/ggml-cuda/cpy.cu index 3b87cbad..312e0c09 100644 --- a/ggml/src/ggml-cuda/cpy.cu +++ b/ggml/src/ggml-cuda/cpy.cu @@ -570,8 +570,12 @@ void ggml_cuda_cpy(ggml_backend_cuda_context & ctx, const ggml_tensor * src0, gg const int64_t ne = ggml_nelements(src0); GGML_ASSERT(ne == ggml_nelements(src1)); - GGML_ASSERT(ggml_nbytes(src0) <= INT_MAX); - GGML_ASSERT(ggml_nbytes(src1) <= INT_MAX); + //if (ggml_nbytes(src0) > INT_MAX) { + // printf("%s: %s has %zu bytes\n", __func__, src0->name, ggml_nbytes(src0)); + //} + // These asserts appear to be unnecessary. Why were they added? + //GGML_ASSERT(ggml_nbytes(src0) <= INT_MAX); + //GGML_ASSERT(ggml_nbytes(src1) <= INT_MAX); const int64_t ne00 = src0->ne[0]; const int64_t ne01 = src0->ne[1]; -- cgit v1.2.3