Skip to content

Commit 47bb7b4

Browse files
CUDA: fix DEBUG_CUDA_MALLOC (#5729)
1 parent c4d7f81 commit 47bb7b4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ggml-cuda.cu

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8079,8 +8079,8 @@ static void * ggml_cuda_pool_malloc_leg(int device, size_t size, size_t * actual
80798079
*actual_size = look_ahead_size;
80808080
g_cuda_pool_size[device] += look_ahead_size;
80818081
#ifdef DEBUG_CUDA_MALLOC
8082-
fprintf(stderr, "%s[%d]: %d buffers, max_size = %u MB, pool_size = %u MB, requested %u MB\n", __func__, id, nnz,
8083-
(uint32_t)(max_size/1024/1024), (uint32_t)(g_cuda_pool_size[id]/1024/1024), (uint32_t)(size/1024/1024));
8082+
fprintf(stderr, "%s[%d]: %d buffers, max_size = %u MB, pool_size = %u MB, requested %u MB\n", __func__, device, nnz,
8083+
(uint32_t)(max_size/1024/1024), (uint32_t)(g_cuda_pool_size[device]/1024/1024), (uint32_t)(size/1024/1024));
80848084
#endif
80858085
return ptr;
80868086
}
@@ -8166,7 +8166,7 @@ static void * ggml_cuda_pool_malloc_vmm(int device, size_t size, size_t * actual
81668166
g_cuda_pool_used[device] += size;
81678167

81688168
#ifdef DEBUG_CUDA_MALLOC
8169-
printf("cuda pool[%d]: allocated %llu bytes at %llx [%s]\n", id, (unsigned long long) size, ptr);
8169+
printf("cuda pool[%d]: allocated %llu bytes at %llx\n", device, (unsigned long long) size, ptr);
81708170
#endif
81718171

81728172
return ptr;
@@ -8176,7 +8176,7 @@ static void ggml_cuda_pool_free_vmm(int device, void * ptr, size_t size) {
81768176
scoped_spin_lock lock(g_cuda_pool_lock);
81778177

81788178
#ifdef DEBUG_CUDA_MALLOC
8179-
printf("cuda pool[%d]: freed %llu bytes at %llx\n", id, (unsigned long long) size, ptr);
8179+
printf("cuda pool[%d]: freed %llu bytes at %llx\n", device, (unsigned long long) size, ptr);
81808180
#endif
81818181

81828182
g_cuda_pool_used[device] -= size;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy