Skip to content

Commit cbc68be

Browse files
authored
cuda: fix build warnings in set-rows.cu (unused variable) (#14687)
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
1 parent bdca383 commit cbc68be

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ggml/src/ggml-cuda/set-rows.cu

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
typedef void (*set_rows_kernel_t)(const char * src, char * dst);
44

55
template<typename src_t, typename dst_t>
6-
__device__ void set_rows_1(const src_t * src_f, dst_t * dst_f) {}
6+
__device__ void set_rows_1(const src_t * src_f, dst_t * dst_f) {
7+
GGML_UNUSED(src_f);
8+
GGML_UNUSED(dst_f);
9+
}
710

811
template<>
912
__device__ __forceinline__ void set_rows_1<float, half>(const float * src_f, half * dst_h) {
@@ -53,6 +56,9 @@ static __global__ void k_set_rows(
5356
const src_t* src_elem = src0_row + i00;
5457
dst_t* dst_elem = dst_row_ptr + i00;
5558
set_rows_1(src_elem, dst_elem);
59+
60+
GGML_UNUSED(ne10);
61+
GGML_UNUSED(ne13);
5662
}
5763

5864
template<typename src_t, typename dst_t>

0 commit comments

Comments
 (0)