Skip to content

Commit ff5d58f

Browse files
authored
Fix compile error on Windows CUDA (#2207)
1 parent b782422 commit ff5d58f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

ggml-cuda.cu

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,9 @@ static __global__ void mul_f32(const float * x, const float * y, float * dst, co
267267
dst[i] = x[i] * y[i%ky];
268268
}
269269

270-
static const float GELU_COEF_A = 0.044715f;
271-
static const float SQRT_2_OVER_PI = 0.79788456080286535587989211986876f;
272-
273270
static __global__ void gelu_f32(const float * x, float * dst, const int k) {
271+
const float GELU_COEF_A = 0.044715f;
272+
const float SQRT_2_OVER_PI = 0.79788456080286535587989211986876f;
274273
const int i = blockDim.x*blockIdx.x + threadIdx.x;
275274

276275
if (i >= k) {
@@ -2300,7 +2299,7 @@ inline void ggml_cuda_op_add(
23002299
const int64_t ne00 = src0->ne[0];
23012300
const int64_t i01_diff = i01_high - i01_low;
23022301

2303-
const int64_t ne10 = src1->ne[0];
2302+
// const int64_t ne10 = src1->ne[0];
23042303

23052304
// compute
23062305
if (src0->type == GGML_TYPE_F32 && dst->type == GGML_TYPE_F32) {

0 commit comments

Comments
 (0)