Remove what appears to be unnecessary asserts in ggml_cuda_cpy (#560)

Co-authored-by: Iwan Kawrakow <iwan.kawrakow@gmail.com>
This commit is contained in:
Kawrakow
2025-06-27 17:44:36 +02:00
committed by GitHub
parent 17d2db910f
commit 305fe4b160

View File

@@ -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];