[XPU] fix bug in sigmoid_cross_entropy_with_logits and its grad #70974
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Category
Custom Device
PR Types
Bug fixes
Description
参考这个PR: #65859 ,修改了XPU下面
sigmoid_cross_entropy_with_logits_grad
和sigmoid_cross_entropy_with_logits
两个算子的计算逻辑。真正的计算步骤在XDNN算子库中,本PR主要是修改了依赖库版本,以及修改了算子绑定部分,改成调用新写的正确的函数。
改了之后,这个单测
test_binary_cross_entropy_with_logits_op
可以通过了,因此从列表中移除。