Skip to content

Conversation

@TecJesh
Copy link
Contributor

@TecJesh TecJesh commented Oct 31, 2025

The cann backend currently does not support computing cross_entropy_loss; add support for the cross_entropy_loss operator to the cann computation backend.

@github-actions github-actions bot added ggml changes relating to the ggml tensor library for machine learning Ascend NPU issues specific to Ascend NPUs labels Oct 31, 2025
@noemotiovon
Copy link
Collaborator

Could you paste your accuracy test results?

Copy link
Collaborator

@noemotiovon noemotiovon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There’s a minor issue here; I’ll review it more thoroughly later.

ggml_cann_group_norm(ctx, dst);
break;
case GGML_OP_L2_NORM:
ggml_cann_l2_norm(ctx, dst);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You’ve already added this in another PR. I’ll take a closer look at your PR after that one gets merged.

return true;
}
default:
std::cout << "Unsupported op: " << ggml_op_name(op->op) << std::endl;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this print statement was left in by mistake.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I will delete it.

@hipudding
Copy link
Collaborator

You need rebase to pass the failing test.

@TecJesh
Copy link
Contributor Author

TecJesh commented Nov 12, 2025

Backend 1/2: CANN0
Device description: Ascend910B4
Device memory: 30196 MB (29825 MB free)

new_pool_for_device: device 0 use vmm pool
CROSS_ENTROPY_LOSS(type=f32,ne=[10,5,4,3]): OK
CROSS_ENTROPY_LOSS(type=f32,ne=[30000,1,1,1]): OK
2/2 tests passed
Backend CANN0: OK
Backend 2/2: CPU
Skipping
2/2 backends passed
OK

@hipudding hipudding merged commit 97d5117 into ggml-org:master Nov 13, 2025
73 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ascend NPU issues specific to Ascend NPUs ggml changes relating to the ggml tensor library for machine learning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants