Skip to content

Commit bd56886

Browse files
set nullptr to memory pool element if it failed during initialization.
1 parent ce4df17 commit bd56886

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ggml-cuda.cu

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5853,6 +5853,8 @@ void ggml_init_cublas() {
58535853
size_t treshold = UINT64_MAX;
58545854
CUDA_CHECK(cudaMemPoolSetAttribute(g_cudaMemPools[id], cudaMemPoolAttrReleaseThreshold, &treshold));
58555855
fprintf(stderr, ", CUDA memory pool is supported\n");
5856+
} else {
5857+
g_cudaMemPools[id] = nullptr;
58565858
}
58575859
} else {
58585860
fprintf(stderr, ", CUDA memory pool is not supported\n");

0 commit comments

Comments
 (0)