-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[PIR]Add Fused dropout add pass #58272
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
Co-authored-by: Yuanle Liu <yuanlehome@163.com>
Co-authored-by: Yuanle Liu <yuanlehome@163.com>
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.
LGTM
public: | ||
void operator()(pir::drr::DrrPatternContext *ctx) const override { | ||
pir::drr::SourcePattern pat = ctx->SourcePattern(); | ||
const auto &dropout = pat.Op("pd_op.dropout", |
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.
const auto &dropout = pat.Op("pd_op.dropout", | |
const auto &dropout = pat.Op(paddle::dialect::DropoutOp::name(), |
其实更推荐这样来写
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.
后续可以统一修改
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.
no doc changes. LGTM
* 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>
* 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>
* 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>
PR types
Others
PR changes
Others
Description
pcard-67164
添加dropout + add ; dropout + add + add_grad + dropoutgrad 的pass