Skip to content

Conversation

@wanghuancoder
Copy link
Contributor

@wanghuancoder wanghuancoder commented Dec 7, 2023

PR types

Others

PR changes

Others

Description

MKLDNN改造

清理python端对use_mkldnn的标记,原则上,use_mkldnn是由pass来决定的,Python端不应该处理use_mkldnn。

本PR删除BF16情况下,Python端对Program的特殊处理。因为新IR将无法兼容这种使用方法。
之所以在BF16下强行让能走MKLDNN的kernel尽量走MKLDNN,是因为CPU kernel有很多不支持BF16。因此本PR改成如果CPU kernel不支持BF16的情况下,而MKLDNN kernel支持,则改用MKLDNN kernel。

但在修改后发生一些CI case报错发现是:

  1. no need buffer情况下,PrepareData,如果输入是OneDNN,而kernel是非OneDNN。均应把Tensor::layout改成PaddleLayout。否则向后做InferMeta会错误传递Layout信息。
  2. OneDNN concat kernel处理有遗漏。

Pcard-67164

@paddle-bot
Copy link

paddle-bot bot commented Dec 7, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

1 similar comment
@paddle-bot
Copy link

paddle-bot bot commented Dec 7, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot
Copy link

paddle-bot bot commented Dec 7, 2023

❌ The PR is not created using PR's template. You can refer to this Demo.
Please use PR's template, it helps save our maintainers' time so that more developers get helped.

@wanghuancoder wanghuancoder changed the title delete use mkldnn for bf16 test [PIR] delete use mkldnn for bf16 test Dec 12, 2023
@wanghuancoder wanghuancoder changed the title [PIR] delete use mkldnn for bf16 test [PIR] delete use mkldnn for bf16 Dec 12, 2023
Copy link
Contributor

@vivienfanghuagood vivienfanghuagood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wanghuancoder wanghuancoder merged commit c4a3d8c into PaddlePaddle:develop Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants