fix cann compile error

This commit is contained in:
Xuan Son Nguyen
2025-07-09 11:52:58 +02:00
parent c8d89317c9
commit 265cb43538

View File

@@ -2210,7 +2210,8 @@ 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 *)(op->op_params))[1];
float bias;
memcpy(&bias, (float*)op->op_params + 1, sizeof(float));
return bias == 0.0f; // TODO: support bias != 0.0f
case GGML_OP_SOFT_MAX:
// TODO: support broadcast