Skip to content

Commit 815bf1a

Browse files
prop.memoryPoolsSupported cant be found in cuda 17. Revert back to basic error check.
1 parent c42ca8f commit 815bf1a

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

ggml-cuda.cu

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5851,16 +5851,13 @@ void ggml_init_cublas() {
58515851
fprintf(stderr, " Device %d: %s, compute capability %d.%d", id, prop.name, prop.major, prop.minor);
58525852
#if defined(CUDA_USE_MEMORY_POOL)
58535853
// configure memory pool
5854-
if (prop.memoryPoolsSupported == 1) {
5855-
cudaError_t err = cudaDeviceGetMemPool(&g_cudaMemPools[id], id);
5856-
if (err == cudaSuccess) {
5857-
size_t treshold = UINT64_MAX;
5858-
CUDA_CHECK(cudaMemPoolSetAttribute(g_cudaMemPools[id], cudaMemPoolAttrReleaseThreshold, &treshold));
5859-
fprintf(stderr, ", CUDA memory pool is supported\n");
5860-
} else {
5861-
g_cudaMemPools[id] = nullptr;
5862-
}
5854+
cudaError_t err = cudaDeviceGetMemPool(&g_cudaMemPools[id], id);
5855+
if (err == cudaSuccess) {
5856+
size_t treshold = UINT64_MAX;
5857+
CUDA_CHECK(cudaMemPoolSetAttribute(g_cudaMemPools[id], cudaMemPoolAttrReleaseThreshold, &treshold));
5858+
fprintf(stderr, ", CUDA memory pool is supported\n");
58635859
} else {
5860+
g_cudaMemPools[id] = nullptr;
58645861
fprintf(stderr, ", CUDA memory pool is not supported\n");
58655862
}
58665863
#endif

0 commit comments

Comments
 (0)