Skip to content

Conversation

@SigureMo
Copy link
Member

@SigureMo SigureMo commented Dec 10, 2024

PR Category

Execute Infrastructure

PR Types

Improvements

Description

添加 pass 用于删除 AssertOp,目前会在 CINN 场景使用,在 apply_cinn_pass 前调用

TODOs

  • add unittest

PCard-66972

@paddle-bot
Copy link

paddle-bot bot commented Dec 10, 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.

@SigureMo SigureMo requested a review from Copilot December 10, 2024 11:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 5 changed files in this pull request and generated no suggestions.

Files not reviewed (4)
  • paddle/cinn/hlir/dialect/operator/transforms/add_cinn_pass.cc: Language not supported
  • paddle/fluid/inference/api/analysis_predictor.cc: Language not supported
  • paddle/fluid/pir/transforms/general/delete_assert_op_pass.cc: Language not supported
  • paddle/fluid/pir/transforms/general/delete_assert_op_pass.h: Language not supported

@SigureMo SigureMo changed the title [PIR] Add delete assert op pass before apply cinn pass [PIR] Add delete assert op pass and use it before apply cinn pass Dec 13, 2024
::pir::PassManager delete_assert_op_pm(::pir::IrContext::Instance(),
config_.pm_opt_level_);
delete_assert_op_pm.AddPass(
pir::PassRegistry::Instance().Get("delete_assert_op_pass"));
Copy link
Contributor

Choose a reason for hiding this comment

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

C++层pass调用可以直接include对应pass头文件调用CreateDeleteAssertOpPass


#include "paddle/fluid/pir/transforms/general/delete_assert_op_pass.h"

#include "paddle/fluid/pir/dialect/operator/ir/control_flow_op.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

control_flow_op.h 有使用到吗

@SigureMo SigureMo merged commit ee83638 into PaddlePaddle:develop Dec 13, 2024
28 checks passed
@SigureMo SigureMo deleted the pir/add-delete-assert-op-pass branch December 13, 2024 02:59
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.

2 participants