Skip to content

Commit abfdc60

Browse files
committed
address review comments
1 parent 260e192 commit abfdc60

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ggml/src/ggml-cuda/ggml-cuda.cu

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@
6161
#include <string>
6262
#include <vector>
6363
#if !defined(GGML_USE_HIP) && !defined(GGML_USE_MUSA) && !defined(_WIN32)
64-
# include <cufile.h>
65-
#endif
66-
#ifdef _WIN32
67-
#else
64+
# define GGML_USE_CUFILE
65+
#endif // !defined(GGML_USE_HIP) && !defined(GGML_USE_MUSA) && !defined(_WIN32)
66+
#ifdef GGML_USE_CUFILE
67+
#include <cufile.h>
6868
#include <fcntl.h>
6969
#include <unistd.h>
70-
#endif
70+
#endif // GGML_USE_CUFILE
7171

7272
static_assert(sizeof(half) == sizeof(ggml_fp16_t), "wrong fp16 size");
7373

@@ -3419,7 +3419,7 @@ static ggml_backend_feature * ggml_backend_cuda_get_features(ggml_backend_reg_t
34193419
}
34203420

34213421
static bool ggml_backend_cuda_buffer_load_tensor(ggml_backend_buffer_t buffer, ggml_tensor * tensor, const char * path, size_t file_offset, size_t tensor_offset, size_t size) {
3422-
#if !defined(GGML_USE_HIP) && !defined(GGML_USE_MUSA) && !defined(_WIN32)
3422+
#ifdef GGML_USE_CUFILE
34233423
static bool initialized = false;
34243424
static bool use_cufile = false;
34253425
if (!initialized) {
@@ -3477,7 +3477,7 @@ static bool ggml_backend_cuda_buffer_load_tensor(ggml_backend_buffer_t buffer, g
34773477
GGML_UNUSED(tensor_offset);
34783478
GGML_UNUSED(size);
34793479
return false;
3480-
#endif
3480+
#endif // GGML_USE_CUFILE
34813481
}
34823482

34833483
static void * ggml_backend_cuda_reg_get_proc_address(ggml_backend_reg_t reg, const char * name) {

0 commit comments

Comments
 (0)