diff options
author | Robyn <robyngraf@users.noreply.github.com> | 2023-06-25 04:10:29 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-24 20:10:29 +0200 |
commit | 5ec8dd5a3c6a9a109351d2257bb9d53869bd0a94 (patch) | |
tree | 571f9f195508ff20b7d23aa698c2660d0d0f8ab5 /ggml.c | |
parent | 65bdd52a867539691007f85c5508146d507f72c1 (diff) |
#1869 Fix null reference errors when training from scratch with CUDA (#1907)
* #1869 Fix null reference errors when training from scratch with CUDA build
Calling ggml_compute_forward when node->src0 was null was causing train-text-from-scratch.exe to terminate unexpectedly.
* ggml : do not dereference src0 if NULL
---------
Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
Diffstat (limited to 'ggml.c')
-rw-r--r-- | ggml.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -14911,7 +14911,7 @@ static void ggml_compute_forward(struct ggml_compute_params * params, struct ggm if (skip_cpu) { return; } - GGML_ASSERT(tensor->src0->backend == GGML_BACKEND_CPU); + GGML_ASSERT(tensor->src0 == NULL || tensor->src0->backend == GGML_BACKEND_CPU); GGML_ASSERT(tensor->src1 == NULL || tensor->src1->backend == GGML_BACKEND_CPU); #endif // GGML_USE_CUBLAS |