Skip to content

Commit

Permalink
CUDA: fix variable name conflict for Windows build (#9382)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesGaessler authored Sep 9, 2024
1 parent 5ed0875 commit 8e6e2fb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions ggml/src/ggml-cuda/sum.cu
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#include "sumrows.cuh"
#include "sum.cuh"

#include <cstdint>

#if !defined(GGML_USE_HIPBLAS) && !defined(GGML_USE_MUSA)
// On Windows CUB uses libraries with variables called CC_PASCAL which conflict with the define in common.cuh.
// For this reason CUB must be included BEFORE anything else.
#include <cub/cub.cuh>
using namespace cub;
#endif // !defined(GGML_USE_HIPBLAS) && !defined(GGML_USE_MUSA)

#include "sumrows.cuh"
#include "sum.cuh"

#include <cstdint>

void sum_f32_cuda(ggml_cuda_pool & pool, const float * x, float * dst, const int64_t ne, cudaStream_t stream) {
#if !defined(GGML_USE_HIPBLAS) && !defined(GGML_USE_MUSA)
size_t tmp_size = 0;
Expand Down

0 comments on commit 8e6e2fb

Please sign in to comment.