We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 31d2b5f commit 12b063fCopy full SHA for 12b063f
ggml-cuda.cu
@@ -1105,6 +1105,9 @@ void * ggml_cuda_host_malloc(size_t size) {
1105
void * ptr = nullptr;
1106
cudaError_t err = cudaMallocHost((void **) &ptr, size);
1107
if (err != cudaSuccess) {
1108
+ // The allocation error can be bypassed. A null ptr will assigned out of this function.
1109
+ // This can fixed the OOM error in WSL.
1110
+ cudaGetLastError();
1111
fprintf(stderr, "WARNING: failed to allocate %.2f MB of pinned memory: %s\n",
1112
size/1024.0/1024.0, cudaGetErrorString(err));
1113
return nullptr;
0 commit comments