Skip to content

Commit 863166b

Browse files
Skip GPUs without mem pool support.
1 parent 81931b2 commit 863166b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

ggml-cuda.cu

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5869,7 +5869,7 @@ void ggml_init_cublas() {
58695869
}
58705870
} else {
58715871
g_cudaMemPools[id] = nullptr;
5872-
fprintf(stderr, ", CUDA memory pool is not supported (cant load default pool)\n");
5872+
fprintf(stderr, ", CUDA memory pool is not supported (can't load default pool)\n");
58735873
}
58745874
// test alloc/dealoc
58755875
if (err == cudaSuccess) {
@@ -5887,6 +5887,8 @@ void ggml_init_cublas() {
58875887
fprintf(stderr, ", CUDA memory pool is not supported (allocation failed)\n");
58885888
}
58895889
}
5890+
} else {
5891+
fprintf(stderr, ", CUDA memory pool is not supported\n");
58905892
}
58915893
#endif
58925894
g_tensor_split[id] = total_vram;
@@ -5915,6 +5917,7 @@ void ggml_init_cublas() {
59155917
fprintf(stderr,
59165918
"Warning: Device %d doesnt support CUDA memory pool, skipping pool access config\n",
59175919
id);
5920+
continue;
59185921
}
59195922

59205923
cudaMemAccessDesc desc_device = {};
@@ -5923,13 +5926,13 @@ void ggml_init_cublas() {
59235926
desc_device.flags = cudaMemAccessFlagsProtReadWrite;
59245927
cudaError_t err = cudaMemPoolSetAccess(main_device_pool, &desc_device, 1 /* numDescs */);
59255928
if (err != cudaSuccess) {
5926-
fprintf(stderr, "Cant give access for main device memory pool to device %d\n", id);
5929+
fprintf(stderr, "Can't give access for main device memory pool to device %d\n", id);
59275930
}
59285931
cudaMemPool_t mempool;
59295932
CUDA_CHECK(cudaDeviceGetDefaultMemPool(&mempool, id));
59305933
err = cudaMemPoolSetAccess(mempool, &desc_main_device, 1 /* numDescs */);
59315934
if (err != cudaSuccess) {
5932-
fprintf(stderr, "Cant give access for device %d memory pool to main device \n", id);
5935+
fprintf(stderr, "Can't give access for device %d memory pool to main device \n", id);
59335936
}
59345937
}
59355938
} else {

0 commit comments

Comments
 (0)