Skip to content

Commit 247e5c6

Browse files
authored
cuda : fix buffer type check with integrated GPUs (#14069)
1 parent 5787b5d commit 247e5c6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

ggml/src/ggml-cuda/ggml-cuda.cu

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,6 @@ typedef void (*ggml_cuda_op_mul_mat_t)(
11441144
static cudaError_t ggml_cuda_cpy_tensor_2d(
11451145
void * dst, const struct ggml_tensor * src, int64_t i3, int64_t i2, int64_t i1_low, int64_t i1_high, cudaStream_t stream) {
11461146

1147-
GGML_ASSERT(ggml_backend_buffer_is_cuda(src->buffer));
11481147
const char * src_ptr = (const char *) src->data;
11491148
char * dst_ptr = (char *) dst;
11501149

@@ -1427,8 +1426,6 @@ static void ggml_cuda_op_mul_mat(
14271426
const int64_t nb2 = dst->nb[2];
14281427
const int64_t nb3 = dst->nb[3];
14291428

1430-
GGML_ASSERT(ggml_backend_buffer_is_cuda(dst->buffer));
1431-
GGML_ASSERT(ggml_backend_buffer_is_cuda(src1->buffer));
14321429
ggml_backend_cuda_buffer_context * src1_ctx = (ggml_backend_cuda_buffer_context *) src1->buffer->context;
14331430
ggml_backend_cuda_buffer_context * dst_ctx = (ggml_backend_cuda_buffer_context *) dst->buffer->context;
14341431

@@ -1750,7 +1747,7 @@ static void ggml_cuda_mul_mat_batched_cublas(ggml_backend_cuda_context & ctx, co
17501747
GGML_ASSERT(!ggml_is_transposed(src0));
17511748
GGML_ASSERT(!ggml_is_transposed(src1));
17521749

1753-
GGML_ASSERT(ggml_backend_buffer_is_cuda(src0->buffer));
1750+
GGML_ASSERT(!ggml_backend_buft_is_cuda_split(src0->buffer->buft));
17541751
GGML_ASSERT(src0->type == GGML_TYPE_F16);
17551752

17561753
// Byte offsets and tensor dimensions are currently used in an inconsistent way for dst.

0 commit comments

Comments
 (0)