]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
cuda: fix build warnings in set-rows.cu (unused variable) (#14687)
authorR0CKSTAR <redacted>
Tue, 15 Jul 2025 07:28:53 +0000 (15:28 +0800)
committerGitHub <redacted>
Tue, 15 Jul 2025 07:28:53 +0000 (15:28 +0800)
Signed-off-by: Xiaodong Ye <redacted>
ggml/src/ggml-cuda/set-rows.cu

index 3fade72b84eca383de576e65e7280c4a48a39f4b..58cee9244018fa90c172454f4159f13da0057b70 100644 (file)
@@ -3,7 +3,10 @@
 typedef void (*set_rows_kernel_t)(const char * src, char * dst);
 
 template<typename src_t, typename dst_t>
-__device__ void set_rows_1(const src_t * src_f, dst_t * dst_f) {}
+__device__ void set_rows_1(const src_t * src_f, dst_t * dst_f) {
+    GGML_UNUSED(src_f);
+    GGML_UNUSED(dst_f);
+}
 
 template<>
 __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(
     const src_t* src_elem = src0_row + i00;
     dst_t* dst_elem = dst_row_ptr + i00;
     set_rows_1(src_elem, dst_elem);
+
+    GGML_UNUSED(ne10);
+    GGML_UNUSED(ne13);
 }
 
 template<typename src_t, typename dst_t>