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

Symbolic shape inference support for pd_op.split and builtin.split #62394

Merged
merged 13 commits into from
Mar 11, 2024

Conversation

fty1777
Copy link
Contributor

@fty1777 fty1777 commented Mar 4, 2024

PR types

Others

PR changes

Others

Description

Add Infer Symbolic Shape for pd_op.split and builtin.split

Copy link

paddle-bot bot commented Mar 4, 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 4, 2024
@CLAassistant
Copy link

CLAassistant commented Mar 4, 2024

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Contributor

@zhangbopd zhangbopd left a comment

Choose a reason for hiding this comment

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

进一步完善单测并且贴一下结果吧

fty1777 and others added 6 commits March 5, 2024 11:55
…pe/paddle_op_infer_sym.cc

Co-authored-by: Bo Zhang <105368690+zhangbopd@users.noreply.github.com>
Co-authored-by: Bo Zhang <105368690+zhangbopd@users.noreply.github.com>
Co-authored-by: Bo Zhang <105368690+zhangbopd@users.noreply.github.com>
@@ -351,7 +351,7 @@ def test_eval_symbolic(self):
np.testing.assert_equal(
sym_shape_str_list[j].find(self.expected[i][j]),
0,
f'in case i,j = {i},{j}: output shape ({sym_shape_str_list[0]}) is not expected {(self.expected[i][j])}',
f'in case i,j = {i},{j}: output shape ({sym_shape_str_list[j]}) is not expected {(self.expected[i][j])}',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

在写unittest的时候发现一些failure log打印的东西不太对,修了一下。

@fty1777 fty1777 changed the title WIP: builtin.split op infer sym shape Symbolic shape inference support for pd_op.split and builtin.split Mar 6, 2024
@zhangbopd zhangbopd merged commit e819334 into PaddlePaddle:develop Mar 11, 2024
30 checks passed
hitywt pushed a commit to hitywt/Paddle that referenced this pull request Mar 11, 2024
…addlePaddle#62394)

* WIP: builtin.split op infer sym shape

* bug fix

* Update paddle/fluid/pir/dialect/operator/interface/infer_symbolic_shape/paddle_op_infer_sym.cc

Co-authored-by: Bo Zhang <105368690+zhangbopd@users.noreply.github.com>

* Update paddle/fluid/pir/dialect/operator/ir/op_dialect.cc

Co-authored-by: Bo Zhang <105368690+zhangbopd@users.noreply.github.com>

* Update paddle/fluid/pir/dialect/operator/ir/op_dialect.cc

Co-authored-by: Bo Zhang <105368690+zhangbopd@users.noreply.github.com>

* pd_op.split followed by builtin.split

* pd_op.split infer sym shape bugfix and unittest; fix op infer sym error outputs

* recover SplitWithNumOpInferSymbolicShape Unimplemented exception raising

* code refinement

* Rewrite PADDLE_ENFORCE

* remove incorrect comments

* Rewrite PADDLE_ENFORCE

* Rewrite PADDLE_ENFORCE

---------

Co-authored-by: Bo Zhang <105368690+zhangbopd@users.noreply.github.com>
hitywt pushed a commit to hitywt/Paddle that referenced this pull request Mar 11, 2024
…addlePaddle#62394)

* WIP: builtin.split op infer sym shape

* bug fix

* Update paddle/fluid/pir/dialect/operator/interface/infer_symbolic_shape/paddle_op_infer_sym.cc

Co-authored-by: Bo Zhang <105368690+zhangbopd@users.noreply.github.com>

* Update paddle/fluid/pir/dialect/operator/ir/op_dialect.cc

Co-authored-by: Bo Zhang <105368690+zhangbopd@users.noreply.github.com>

* Update paddle/fluid/pir/dialect/operator/ir/op_dialect.cc

Co-authored-by: Bo Zhang <105368690+zhangbopd@users.noreply.github.com>

* pd_op.split followed by builtin.split

* pd_op.split infer sym shape bugfix and unittest; fix op infer sym error outputs

* recover SplitWithNumOpInferSymbolicShape Unimplemented exception raising

* code refinement

* Rewrite PADDLE_ENFORCE

* remove incorrect comments

* Rewrite PADDLE_ENFORCE

* Rewrite PADDLE_ENFORCE

---------

Co-authored-by: Bo Zhang <105368690+zhangbopd@users.noreply.github.com>
@luotao1
Copy link
Contributor

luotao1 commented Mar 13, 2024

hi, @fty1777

  • 非常感谢你对飞桨的贡献,我们正在运营一个PFCC组织,会通过定期分享技术知识与发布开发者主导任务的形式持续为飞桨做贡献,详情可见 https://github.com/luotao1 主页说明。
  • 如果你对PFCC有兴趣,请发送邮件至 ext_paddle_oss@baidu.com,我们会邀请你加入~

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

Successfully merging this pull request may close these issues.

5 participants