make code looks more consistent

This commit is contained in:
Xuan Son Nguyen
2025-07-09 12:07:05 +02:00
parent 0d70ca81e8
commit 4ea74b04e5
2 changed files with 3 additions and 3 deletions

View File

@@ -26,7 +26,7 @@ void ggml_cuda_op_scale(ggml_backend_cuda_context & ctx, ggml_tensor * dst) {
float scale;
float bias;
memcpy(&scale, dst->op_params, sizeof(float));
memcpy(&scale, (float *) dst->op_params + 0, sizeof(float));
memcpy(&bias, (float *) dst->op_params + 1, sizeof(float));
scale_f32_cuda(src0_d, dst_d, scale, bias, ggml_nelements(src0), stream);

View File

@@ -2320,7 +2320,7 @@ inline void ggml_sycl_op_scale(ggml_backend_sycl_context & ctx, ggml_tensor * ds
float scale;
float bias;
memcpy(&scale, dst->op_params, sizeof(float));
memcpy(&scale, (float *) dst->op_params + 0, sizeof(float));
memcpy(&bias, (float *) dst->op_params + 1, sizeof(float));
scale_f32_sycl(src0_dd, dst_dd, scale, bias, ggml_nelements(dst->src[0]), main_stream);