cann: update cross_entropy_loss op support#16886
Conversation
|
Could you paste your accuracy test results? |
noemotiovon
left a comment
There was a problem hiding this comment.
There’s a minor issue here; I’ll review it more thoroughly later.
| @@ -1777,6 +1777,12 @@ static bool ggml_cann_compute_forward(ggml_backend_cann_context & ctx, struct gg | |||
| case GGML_OP_GROUP_NORM: | |||
| ggml_cann_group_norm(ctx, dst); | |||
| break; | |||
| case GGML_OP_L2_NORM: | |||
| ggml_cann_l2_norm(ctx, dst); | |||
There was a problem hiding this comment.
You’ve already added this in another PR. I’ll take a closer look at your PR after that one gets merged.
ggml/src/ggml-cann/ggml-cann.cpp
Outdated
| @@ -2602,6 +2610,7 @@ static bool ggml_backend_cann_supports_op(ggml_backend_dev_t dev, const ggml_ten | |||
| return true; | |||
| } | |||
| default: | |||
| std::cout << "Unsupported op: " << ggml_op_name(op->op) << std::endl; | |||
There was a problem hiding this comment.
I think this print statement was left in by mistake.
There was a problem hiding this comment.
ok, I will delete it.
|
You need rebase to pass the failing test. |
…operator that already exists in another pull request.
5a6bf29 to
1d3d26a
Compare
|
Backend 1/2: CANN0 new_pool_for_device: device 0 use vmm pool |
* update L2_NORM op support * update L2_NORM op support * remove extra whitespace * cann: update cross_entropy_loss op support * remove trailing whitespaces * rebase the latest code in the main repository and remove the l2_norm operator that already exists in another pull request. * undo the l2_norm operator deletion
* update L2_NORM op support * update L2_NORM op support * remove extra whitespace * cann: update cross_entropy_loss op support * remove trailing whitespaces * rebase the latest code in the main repository and remove the l2_norm operator that already exists in another pull request. * undo the l2_norm operator deletion
The cann backend currently does not support computing cross_entropy_loss; add support for the cross_entropy_loss operator to the cann computation backend.