-
Notifications
You must be signed in to change notification settings - Fork 5.9k
【PIR OpTest Fix No.34】 fix test_rank_attention_op #62900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kangguangli
merged 14 commits into
PaddlePaddle:develop
from
CJ77Qi:test_rank_attention_op
Mar 27, 2024
Merged
Changes from 12 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
d743a5f
test_rank_attention_op
CJ77Qi 9c55154
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
CJ77Qi 98f882e
fix test_rank_attention_op
CJ77Qi d925286
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
CJ77Qi 6b68c2c
fix test_rank_attention_op
CJ77Qi 32ef6a2
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
CJ77Qi a2f5ab0
Update backward.cc
CJ77Qi 81b075f
Update paddle/fluid/pir/dialect/operator/ir/ops.yaml
CJ77Qi b53b65b
Update ops.yaml
CJ77Qi d09ea6f
fix ops.yaml & backward.cc
CJ77Qi 4c2891c
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
CJ77Qi 6a9fdff
fix ops.yaml
CJ77Qi 0902838
fix ops.yaml
CJ77Qi 7898762
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
CJ77Qi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1044,6 +1044,19 @@ void PsroiPoolGradInferMeta(const MetaTensor& x, | |
| dx->share_meta(x); | ||
| } | ||
|
|
||
| void RankAttentionGradInferMeta(const MetaTensor& x, | ||
| const MetaTensor& rank_offset, | ||
| const MetaTensor& rank_param, | ||
| const MetaTensor& input_help, | ||
| const MetaTensor& ins_rank, | ||
| const MetaTensor& out_grad, | ||
| int max_rank, | ||
| int max_size, | ||
| MetaTensor* rank_param_grad) { | ||
| rank_param_grad->set_dims(rank_param.dims()); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这里需要设置一下rank_param_grad的dtype |
||
| rank_param_grad->set_dtype(rank_param.dtype()); | ||
| } | ||
|
|
||
| void RealAndImagGradInferMeta(const MetaTensor& out_grad, MetaTensor* dx) { | ||
| dx->set_dims(out_grad.dims()); | ||
| dx->set_dtype(dtype::ToComplex(out_grad.dtype())); | ||
|
|
||
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.