suggestions from coderabbit
This commit is contained in:
parent
b22708fd90
commit
c8d89317c9
|
|
@ -2210,7 +2210,7 @@ static bool ggml_backend_cann_supports_op(ggml_backend_dev_t dev,
|
||||||
case GGML_OP_COUNT_EQUAL:
|
case GGML_OP_COUNT_EQUAL:
|
||||||
return true;
|
return true;
|
||||||
case GGML_OP_SCALE:
|
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
|
return bias == 0.0f; // TODO: support bias != 0.0f
|
||||||
case GGML_OP_SOFT_MAX:
|
case GGML_OP_SOFT_MAX:
|
||||||
// TODO: support broadcast
|
// TODO: support broadcast
|
||||||
|
|
|
||||||
|
|
@ -404,13 +404,13 @@ inline static void ggml_vec_mad1_f32(const int n, float * y, const float s, cons
|
||||||
|
|
||||||
// leftovers
|
// leftovers
|
||||||
for (int i = np; i < n; ++i) {
|
for (int i = np; i < n; ++i) {
|
||||||
y[i] = y[i]*s + b;
|
y[i] = y[i]*s + b;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
// scalar
|
// scalar
|
||||||
for (int i = 0; i < n; ++i) {
|
for (int i = 0; i < n; ++i) {
|
||||||
y[i] *= y[i]*s + b;
|
y[i] = y[i]*s + b;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue