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

[PIR]Add Fused dropout add pass #58272

Merged

Conversation

xiaoguoguo626807
Copy link
Contributor

PR types

Others

PR changes

Others

Description

pcard-67164
添加dropout + add ; dropout + add + add_grad + dropoutgrad 的pass

xiaoguoguo626807 and others added 30 commits August 30, 2023 01:44
@paddle-bot
Copy link

paddle-bot bot commented Oct 20, 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.

xiaoguoguo626807 and others added 2 commits October 23, 2023 11:31
Co-authored-by: Yuanle Liu <yuanlehome@163.com>
Co-authored-by: Yuanle Liu <yuanlehome@163.com>
@Aurelius84 Aurelius84 changed the title 【pir】Add Fused dropout add pass [PIR]Add Fused dropout add pass Oct 23, 2023
Aurelius84
Aurelius84 previously approved these changes Oct 23, 2023
Copy link
Contributor

@Aurelius84 Aurelius84 left a comment

Choose a reason for hiding this comment

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

LGTM

public:
void operator()(pir::drr::DrrPatternContext *ctx) const override {
pir::drr::SourcePattern pat = ctx->SourcePattern();
const auto &dropout = pat.Op("pd_op.dropout",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const auto &dropout = pat.Op("pd_op.dropout",
const auto &dropout = pat.Op(paddle::dialect::DropoutOp::name(),

其实更推荐这样来写

Copy link
Contributor Author

Choose a reason for hiding this comment

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

后续可以统一修改

Copy link
Contributor

@sunzhongkai588 sunzhongkai588 left a comment

Choose a reason for hiding this comment

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

no doc changes. LGTM

@xiaoguoguo626807 xiaoguoguo626807 merged commit cc6d16a into PaddlePaddle:develop Oct 23, 2023
28 checks passed
@xiaoguoguo626807 xiaoguoguo626807 deleted the fused_dropout_add branch October 23, 2023 10:53
hitywt pushed a commit to hitywt/Paddle that referenced this pull request Oct 24, 2023
* tmp

* fix flashattn compile bug

* modify unsqueeze

* modify part complex bug

* modify

* modify cpu

* [PIR]Migrate maximum into pir

* Polish code

* add ir_grad of static_gradient

* add test

* modify bug

* modify

* test_with_pir

* close one test

* add_math_op_patch

* modify

* modify

* add mean fill_constant test

* modify cpu int32 test

* get_shape_tensor

* delete

* add default place

* add dropout unittest

* Update test/legacy_test/test_elementwise_div_op.py

* modify review comment

* modify add test

* modify logic and sub

* modify

* add fused_gemm_epilogue pass

* polish code

* udate cmake

* fused_dropout_add_pass

* modify cmake

* modify

* Update test/cpp/pir/pattern_rewrite/CMakeLists.txt

* Update paddle/fluid/pir/transforms/fusion/fused_dropout_add_pass.cc

Co-authored-by: Yuanle Liu <yuanlehome@163.com>

* Update paddle/fluid/pir/transforms/fusion/fused_dropout_add_pass.cc

Co-authored-by: Yuanle Liu <yuanlehome@163.com>

* Update paddle/fluid/pybind/pir.cc

* Update test/ir/new_ir/fused_pass/test_fused_dropout_add.py

* Update test/ir/new_ir/fused_pass/test_fused_dropout_add.py

* Update paddle/fluid/pir/transforms/fusion/fused_dropout_add_pass.cc

* add ci converage

---------

Co-authored-by: zyfncg <zhangyunfei07@baidu.com>
Co-authored-by: 0x45f <wangzhen45@baidu.com>
Co-authored-by: Yuanle Liu <yuanlehome@163.com>
jiahy0825 pushed a commit to jiahy0825/Paddle that referenced this pull request Oct 26, 2023
* tmp

* fix flashattn compile bug

* modify unsqueeze

* modify part complex bug

* modify

* modify cpu

* [PIR]Migrate maximum into pir

* Polish code

* add ir_grad of static_gradient

* add test

* modify bug

* modify

* test_with_pir

* close one test

* add_math_op_patch

* modify

* modify

* add mean fill_constant test

* modify cpu int32 test

* get_shape_tensor

* delete

* add default place

* add dropout unittest

* Update test/legacy_test/test_elementwise_div_op.py

* modify review comment

* modify add test

* modify logic and sub

* modify

* add fused_gemm_epilogue pass

* polish code

* udate cmake

* fused_dropout_add_pass

* modify cmake

* modify

* Update test/cpp/pir/pattern_rewrite/CMakeLists.txt

* Update paddle/fluid/pir/transforms/fusion/fused_dropout_add_pass.cc

Co-authored-by: Yuanle Liu <yuanlehome@163.com>

* Update paddle/fluid/pir/transforms/fusion/fused_dropout_add_pass.cc

Co-authored-by: Yuanle Liu <yuanlehome@163.com>

* Update paddle/fluid/pybind/pir.cc

* Update test/ir/new_ir/fused_pass/test_fused_dropout_add.py

* Update test/ir/new_ir/fused_pass/test_fused_dropout_add.py

* Update paddle/fluid/pir/transforms/fusion/fused_dropout_add_pass.cc

* add ci converage

---------

Co-authored-by: zyfncg <zhangyunfei07@baidu.com>
Co-authored-by: 0x45f <wangzhen45@baidu.com>
Co-authored-by: Yuanle Liu <yuanlehome@163.com>
danleifeng pushed a commit to danleifeng/Paddle that referenced this pull request Nov 14, 2023
* tmp

* fix flashattn compile bug

* modify unsqueeze

* modify part complex bug

* modify

* modify cpu

* [PIR]Migrate maximum into pir

* Polish code

* add ir_grad of static_gradient

* add test

* modify bug

* modify

* test_with_pir

* close one test

* add_math_op_patch

* modify

* modify

* add mean fill_constant test

* modify cpu int32 test

* get_shape_tensor

* delete

* add default place

* add dropout unittest

* Update test/legacy_test/test_elementwise_div_op.py

* modify review comment

* modify add test

* modify logic and sub

* modify

* add fused_gemm_epilogue pass

* polish code

* udate cmake

* fused_dropout_add_pass

* modify cmake

* modify

* Update test/cpp/pir/pattern_rewrite/CMakeLists.txt

* Update paddle/fluid/pir/transforms/fusion/fused_dropout_add_pass.cc

Co-authored-by: Yuanle Liu <yuanlehome@163.com>

* Update paddle/fluid/pir/transforms/fusion/fused_dropout_add_pass.cc

Co-authored-by: Yuanle Liu <yuanlehome@163.com>

* Update paddle/fluid/pybind/pir.cc

* Update test/ir/new_ir/fused_pass/test_fused_dropout_add.py

* Update test/ir/new_ir/fused_pass/test_fused_dropout_add.py

* Update paddle/fluid/pir/transforms/fusion/fused_dropout_add_pass.cc

* add ci converage

---------

Co-authored-by: zyfncg <zhangyunfei07@baidu.com>
Co-authored-by: 0x45f <wangzhen45@baidu.com>
Co-authored-by: Yuanle Liu <yuanlehome@163.com>
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.

8 participants