Skip to content

Commit 0a76b11

Browse files
committed
Rename function parameter of fastmodulo
`modulo_consts` is more fitting/descriptive
1 parent 7414652 commit 0a76b11

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ggml/src/ggml-cuda/common.cuh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -593,9 +593,9 @@ static const uint3 init_fastmodulo_values(uint32_t d) {
593593
return make_uint3(fastdiv.x, fastdiv.y, d);
594594
}
595595

596-
static __device__ __forceinline__ uint32_t fastmodulo(uint32_t n, const uint3 div_consts_divisor) {
597-
// expects div_consts_divisor to contain <mp, L, divisor> in <x, y, z>
598-
return n - fastdiv(n, make_uint2(div_consts_divisor.x, div_consts_divisor.y)) * div_consts_divisor.z;
596+
static __device__ __forceinline__ uint32_t fastmodulo(uint32_t n, const uint3 modulo_consts) {
597+
// expects modulo_consts to contain <mp, L, divisor> in <x, y, z> (see init_fastmodulo_values function)
598+
return n - fastdiv(n, make_uint2(modulo_consts.x, modulo_consts.y)) * modulo_consts.z;
599599
}
600600

601601
typedef void (*dequantize_kernel_t)(const void * vx, const int64_t ib, const int iqs, float2 & v);

0 commit comments

Comments
 (0)