Skip to content

Commit 949e4fa

Browse files
committed
assign L to constant and use size_t instead of int
1 parent c7d4d45 commit 949e4fa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ggml/src/ggml-cuda/ssm-scan.cu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ __global__ void __launch_bounds__(splitD, 2)
1616
const int src0_nb1, const int src0_nb2, const int src1_nb1, const int src1_nb2,
1717
const int src1_nb3, const int src2_nb1, const int src2_nb2, const int src3_nb1,
1818
const int src4_nb1, const int src4_nb2, const int src5_nb1, const int src5_nb2,
19-
float *__restrict__ dst, const int64_t L)
19+
float *__restrict__ dst, const int64_t L_param)
2020
{
21-
21+
const size_t L = L_param;
2222
const float *s0_block = (const float *)((const char *)src0 + blockIdx.x * src0_nb2 + blockIdx.y * splitD * src0_nb1);
2323
const float *x_block = (const float *)((const char *)src1 + (blockIdx.x * src1_nb2) + blockIdx.y * splitD * sizeof(float));
2424
const float *dt_block = (const float *)((const char *)src2 + (blockIdx.x * src2_nb2) + blockIdx.y * splitD * sizeof(float));
@@ -62,7 +62,7 @@ __global__ void __launch_bounds__(splitD, 2)
6262
}
6363
#endif
6464

65-
for (int i = 0; i < L; i++)
65+
for (size_t i = 0; i < L; i++)
6666
{
6767
if (threadIdx.x < N)
6868
{

0 commit comments

Comments
 (0)