-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[PIR] pir onednn support mul #61662
Merged
wanghuancoder
merged 12 commits into
PaddlePaddle:develop
from
wanghuancoder:pir_onednn_mul
Feb 26, 2024
Merged
[PIR] pir onednn support mul #61662
wanghuancoder
merged 12 commits into
PaddlePaddle:develop
from
wanghuancoder:pir_onednn_mul
Feb 26, 2024
Conversation
This file contains 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
你的PR提交成功,感谢你对开源项目的贡献! |
… pir_onednn_mul
… pir_onednn_mul
… pir_onednn_mul
zhangbo9674
previously approved these changes
Feb 23, 2024
kangguangli
reviewed
Feb 23, 2024
Comment on lines
1457
to
1461
#ifdef PADDLE_WITH_DNNL | ||
if (op_desc.GetAttrIfExists<bool>("use_mkldnn")) { | ||
return OpTranscriber::LookUpOpInfo(ctx, op_desc); | ||
} | ||
#endif |
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.
推荐重载下 operator() 方法,像这样分发试试,不需要修改其他函数
pir::Operation* OpTranscriber::operator()(pir::IrContext* ctx,
TranslationContext* param_map,
const OpDesc& op_desc,
pir::Block* block) {
if (op_desc.GetAttrIfExists<bool>("use_mkldnn")) {
return static_cast<OpTranscriber>(*this).operator()(ctx, param_map, op_desc, block);
}
return OpTranscriber::operator()(ctx, param_map, op_desc, block);
}
kangguangli
approved these changes
Feb 26, 2024
zhangbo9674
approved these changes
Feb 26, 2024
phlrain
approved these changes
Feb 26, 2024
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 types
New features
PR changes
Others
Description
Pcard-67164
pir onednn 支持mul。PIR中还没有mul的yaml信息,新增yaml配置。
由于PIR非OneDNN的的mul,在op_translator中,翻译为matmul来实现。但经试验,OneDNN无法使用OneDNN的matmul替代mul。因此,修改op_translator,在OneDNN且use_mkldnn=True情况下,将Program的mul翻译为onednn_op.mul。
OneDNN matmul替代OneDNN mul的原因有:
过程中发现PIR机制错误获取fluid_op_name的bug,在本PR中修复。