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
Operator Mechanism
PR Types
Bug fixes
Description
本计划为pairwise_distance编写全新内核实现反向梯度均分与torch进行对齐
在与torch进行比对后发现 torch也是直接调用p_norm进行计算,差异仅仅是paddle的p_norm的反向梯度没有进行均分
而之前的paddle.nn.functional.normalize测试样例中没有对无穷范数的测试,所以该问题没有暴露出来
所以直接对p_norm在p为无穷的情况下进行反向求导修改,增加均分
运行测试后均能通过
此pr和 #74197 修改相同放出性能测试


此pr:
pr74197:
由于eign库使用的是先生成表达式在进行执行 所以没啥malloc的开销
eigen库存在bug 此pr废弃