suggestions from coderabbit

This commit is contained in:
Xuan Son Nguyen
2025-07-09 00:06:53 +02:00
parent b22708fd90
commit c8d89317c9
2 changed files with 3 additions and 3 deletions

View File

@@ -2210,7 +2210,7 @@ static bool ggml_backend_cann_supports_op(ggml_backend_dev_t dev,
case GGML_OP_COUNT_EQUAL:
return true;
case GGML_OP_SCALE:
float bias = ((const float *)(dst->op_params))[1];
float bias = ((const float *)(op->op_params))[1];
return bias == 0.0f; // TODO: support bias != 0.0f
case GGML_OP_SOFT_MAX:
// TODO: support broadcast

View File

@@ -404,13 +404,13 @@ inline static void ggml_vec_mad1_f32(const int n, float * y, const float s, cons
// leftovers
for (int i = np; i < n; ++i) {
y[i] = y[i]*s + b;
y[i] = y[i]*s + b;
}
#endif
#else
// scalar
for (int i = 0; i < n; ++i) {
y[i] *= y[i]*s + b;
y[i] = y[i]*s + b;
}
#endif
}