Skip to content

Commit 8e6e2fb

Browse files
CUDA: fix variable name conflict for Windows build (ggml-org#9382)
1 parent 5ed0875 commit 8e6e2fb

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

ggml/src/ggml-cuda/sum.cu

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
#include "sumrows.cuh"
2-
#include "sum.cuh"
3-
4-
#include <cstdint>
5-
61
#if !defined(GGML_USE_HIPBLAS) && !defined(GGML_USE_MUSA)
2+
// On Windows CUB uses libraries with variables called CC_PASCAL which conflict with the define in common.cuh.
3+
// For this reason CUB must be included BEFORE anything else.
74
#include <cub/cub.cuh>
85
using namespace cub;
96
#endif // !defined(GGML_USE_HIPBLAS) && !defined(GGML_USE_MUSA)
107

8+
#include "sumrows.cuh"
9+
#include "sum.cuh"
10+
11+
#include <cstdint>
12+
1113
void sum_f32_cuda(ggml_cuda_pool & pool, const float * x, float * dst, const int64_t ne, cudaStream_t stream) {
1214
#if !defined(GGML_USE_HIPBLAS) && !defined(GGML_USE_MUSA)
1315
size_t tmp_size = 0;

0 commit comments

Comments
 (0)