[slice]add IndexPutWithSortKernel in index_elementwise_get_grad slice…#74344
Merged
xiaoguoguo626807 merged 4 commits intoPaddlePaddle:developfrom Aug 5, 2025
Merged
[slice]add IndexPutWithSortKernel in index_elementwise_get_grad slice…#74344xiaoguoguo626807 merged 4 commits intoPaddlePaddle:developfrom
xiaoguoguo626807 merged 4 commits intoPaddlePaddle:developfrom
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
xiaoguoguo626807
previously approved these changes
Aug 1, 2025
Contributor
xiaoguoguo626807
left a comment
There was a problem hiding this comment.
LGTM, PR 提升了tesnor 索引case的反向性能,前向性能降低,可暂时豁免slice ci , 后续补充优化前向case
d45326e to
698330b
Compare
qingqing01
previously approved these changes
Aug 4, 2025
zyfncg
reviewed
Aug 4, 2025
| accumulate); | ||
| } | ||
|
|
||
| const bool is_combined = (index_size == 1) ? false : true; |
Contributor
Author
There was a problem hiding this comment.
is_combined用来区分是普通索引还是组合索引,如果仅有一个普通索引反向时会采用性能更好的IndexPutWithSortKernel。新增了注释。
paddle/phi/ops/yaml/op_compat.yaml
Outdated
| backward : index_elementwise_get_grad, index_elementwise_get_double_grad | ||
| inputs : | ||
| {x : x, index : index, input_dims : input_dims, input_strides : input_strides, index_dims : index_dims, index_stride : index_stride, slice_offset : slice_offset, accumulate : accumulate} | ||
| {x : x, index : index, input_dims : input_dims, input_strides : input_strides, index_dims : index_dims, index_stride : index_stride, slice_offset : slice_offset, accumulate : accumulate, is_combined : is_combined} |
Contributor
Author
|
/re-run all-failed |
zyfncg
approved these changes
Aug 4, 2025
Contributor
Author
|
/re-run all-failed |
1 similar comment
Contributor
Author
|
/re-run all-failed |
4cebc8c
into
PaddlePaddle:develop
135 of 145 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Execute Infrastructure
PR Types
Improvements
Description
GPUIndexElementwiseGetGrad性能:

IndexPutWithSortKernel性能:

torch性能:

pcard-67164