From 967a0146faf774a60e2fb2b294bbc6d7f52b2f1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=A4=C3=9Fler?= Date: Wed, 20 Dec 2023 14:53:09 +0100 Subject: [PATCH] Update ggml-cuda.cu Co-authored-by: slaren --- ggml-cuda.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml-cuda.cu b/ggml-cuda.cu index 6ef3387630da5..9f4b188cbb0d6 100644 --- a/ggml-cuda.cu +++ b/ggml-cuda.cu @@ -9434,7 +9434,7 @@ bool ggml_cuda_compute_forward(struct ggml_compute_params * params, struct ggml_ return false; } - if (tensor->src[0]->backend == GGML_BACKEND_GPU_SPLIT) { + if (tensor->src[0] != nullptr && tensor->src[0]->backend == GGML_BACKEND_GPU_SPLIT) { ggml_cuda_set_peer_access(tensor->src[1]->ne[1]); }