Skip to content

Commit c8d8931

Browse files
committed
suggestions from coderabbit
1 parent b22708f commit c8d8931

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ggml/src/ggml-cann/ggml-cann.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2210,7 +2210,7 @@ static bool ggml_backend_cann_supports_op(ggml_backend_dev_t dev,
22102210
case GGML_OP_COUNT_EQUAL:
22112211
return true;
22122212
case GGML_OP_SCALE:
2213-
float bias = ((const float *)(dst->op_params))[1];
2213+
float bias = ((const float *)(op->op_params))[1];
22142214
return bias == 0.0f; // TODO: support bias != 0.0f
22152215
case GGML_OP_SOFT_MAX:
22162216
// TODO: support broadcast

ggml/src/ggml-cpu/vec.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,13 +404,13 @@ inline static void ggml_vec_mad1_f32(const int n, float * y, const float s, cons
404404

405405
// leftovers
406406
for (int i = np; i < n; ++i) {
407-
y[i] = y[i]*s + b;
407+
y[i] = y[i]*s + b;
408408
}
409409
#endif
410410
#else
411411
// scalar
412412
for (int i = 0; i < n; ++i) {
413-
y[i] *= y[i]*s + b;
413+
y[i] = y[i]*s + b;
414414
}
415415
#endif
416416
}

0 commit comments

Comments
 (0)