Skip to content

Commit 08cf560

Browse files
committed
Fix cuda warning
Signed-off-by: Molly Sophia <mollysophia379@gmail.com>
1 parent 00930e6 commit 08cf560

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ggml/src/ggml-cuda/gla.cu

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ void ggml_cuda_op_gated_linear_attn(ggml_backend_cuda_context & ctx, ggml_tensor
7373
const int64_t C = dst->ne[0];
7474
const int64_t H = dst->src[0]->ne[1];
7575

76-
const float scale = ((const float*)(dst->op_params))[0];
76+
float scale;
77+
memcpy(&scale, (float*)dst->op_params, sizeof(float));
7778

7879
float * dst_d = (float *)dst->data;
7980

0 commit comments

Comments
 (0)