Skip to content
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

[OneDNN][PIR] Add depthwise_conv_onednn_pass #63051

Merged

Conversation

zhanglirong1999
Copy link
Contributor

@zhanglirong1999 zhanglirong1999 commented Mar 27, 2024

PR Category

Others

PR Types

New features

Description

We rewrite depthwise_conv_onednn_pass for PIR.

Copy link

paddle-bot bot commented Mar 27, 2024

你的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 paddle-bot bot added the contributor External developers label Mar 27, 2024
@zhanglirong1999 zhanglirong1999 force-pushed the pir_depthwise_conv_pass branch from 787c75b to 0e1c434 Compare March 28, 2024 01:08
@zhanglirong1999 zhanglirong1999 changed the title [OneDNN][pir] depthwise_conv_mkldnn_pass [OneDNN][PIR] depthwise_conv_mkldnn_pass Mar 28, 2024
@zhanglirong1999 zhanglirong1999 force-pushed the pir_depthwise_conv_pass branch 7 times, most recently from 512a708 to a559af7 Compare March 28, 2024 12:45
@zhanglirong1999
Copy link
Contributor Author

zhanglirong1999 commented Mar 29, 2024

这个op不支持python测的test case,只能用c++实现。但win32下test case编译会不过,且py3的CI中似乎并没有默认开启MKLDNN,导致链接会有问题,因此暂时在Make file中过滤了win32

@zhanglirong1999 zhanglirong1999 force-pushed the pir_depthwise_conv_pass branch from a559af7 to 92813b1 Compare April 1, 2024 06:21

} // namespace pir

REGISTER_IR_PASS(depthwise_conv_mkldnn_pass, DepthwiseConvMKLDNNPass);
Copy link
Contributor

Choose a reason for hiding this comment

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

pass命名中的mkldnn和onednn是否可以统一成onednn?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好的~

@@ -0,0 +1,69 @@
// Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

使用这种方式写单测的原因是,组网时没法组出depthwise_conv算子吗?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

是的,python 端没有depthwise_conv的api支持,现有pir的test case架构应该暂时不支持这种,只能走c++侧

Copy link
Contributor

Choose a reason for hiding this comment

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

看代码逻辑,应该是需要满足一定的条件,才能组出depthwise_conv2d算子,是否可以尝试一下?
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

是可以的,已改,多谢~

@zhanglirong1999 zhanglirong1999 force-pushed the pir_depthwise_conv_pass branch 3 times, most recently from 32906b2 to f5ebb8f Compare April 2, 2024 07:36
@zhanglirong1999 zhanglirong1999 force-pushed the pir_depthwise_conv_pass branch 2 times, most recently from b122afb to 2597663 Compare April 7, 2024 05:28
yuanlehome
yuanlehome previously approved these changes Apr 8, 2024
@yuanlehome yuanlehome changed the title [OneDNN][PIR] depthwise_conv_mkldnn_pass [OneDNN][PIR] Add depthwise_conv_onednn_pass Apr 8, 2024
@yuanlehome yuanlehome merged commit af9b069 into PaddlePaddle:develop Apr 9, 2024
30 checks passed
co63oc pushed a commit to co63oc/Paddle that referenced this pull request Apr 9, 2024
* first commit of depthwise conv pass

* style fix

* add copy_onnx

* add other create to test

* check if onednn pass not register

* add ifdef PADDLE_WITH_DNNL

* add WITH_MKLDNN

* fix style bug

* add PADDLE_WITH_DNNL

* add condition in onnx

* SKIP WIN32 CI

* name change mkl to onednn

* change name

* use python ut for depthwise conv

* delete skipif

* Rename test_depthwise_conv_onednn_pass.py to test_pir_depthwise_conv_onednn_pass.py
co63oc pushed a commit to co63oc/Paddle that referenced this pull request Apr 10, 2024
* first commit of depthwise conv pass

* style fix

* add copy_onnx

* add other create to test

* check if onednn pass not register

* add ifdef PADDLE_WITH_DNNL

* add WITH_MKLDNN

* fix style bug

* add PADDLE_WITH_DNNL

* add condition in onnx

* SKIP WIN32 CI

* name change mkl to onednn

* change name

* use python ut for depthwise conv

* delete skipif

* Rename test_depthwise_conv_onednn_pass.py to test_pir_depthwise_conv_onednn_pass.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers Intel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants