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

【New IR] Concat python api and vjp #56316

Merged
merged 37 commits into from Aug 21, 2023

Conversation

xiaoguoguo626807
Copy link
Contributor

@xiaoguoguo626807 xiaoguoguo626807 commented Aug 15, 2023

PR types

Others

PR changes

Others

Description

1.补充concat python api 到 concat_vjp 全部调用层代码,涉及可变attribute; vectorType 特殊处理
2.补充builtin_split op定义及执行前处理函
3.增加backward相关测试样例,验证concat 构建过程

pcard-67164

@paddle-bot
Copy link

paddle-bot bot commented Aug 15, 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 xiaoguoguo626807 changed the title Concat vjp 【New IR] Concat python api and vjp Aug 17, 2023
@@ -1120,6 +1120,10 @@ def concat(x, axis=0, name=None):
input = [t for t in input if t.shape.count(0) == 0]
return _C_ops.concat(input, axis)
else:
if paddle.ir.core._use_new_ir_api():
if not isinstance(input, Variable):
Copy link
Contributor

Choose a reason for hiding this comment

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

新IR下传入的input不可能是Variable,这里判断逻辑是不是有问题

Copy link
Contributor Author

Choose a reason for hiding this comment

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

此处下个pr修改为Value

Copy link
Contributor

Choose a reason for hiding this comment

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

I approve this PR, But after modification in another PR, please write the PR number here.

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

@jeff41404 jeff41404 left a comment

Choose a reason for hiding this comment

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

LGTM

@xiaoguoguo626807 xiaoguoguo626807 merged commit 1da20aa into PaddlePaddle:develop Aug 21, 2023
24 of 26 checks passed
@xiaoguoguo626807 xiaoguoguo626807 deleted the concat_vjp branch August 24, 2023 06:58
BeingGod pushed a commit to BeingGod/Paddle that referenced this pull request Sep 9, 2023
* support ir api form prim

* convert vector of int to intarray

* support ir api for prim

* Add more gen api

* concat python api to concat_grad

* fix gen conflict

* support vjp prim mode in new ir

* remove useless code

* add vjp autogen v1.0

* add test for prim

* resolve type conflict

* modify utils

* remove useless code

* add split op and modify some bug of vectorType

* fix conflict

* add concat python test

---------

Co-authored-by: cyber-pioneer <chenzhuo@tju.edu.cn>
Co-authored-by: Charles-hit <wanghao107@baidu.com>
Co-authored-by: 0x45f <wangzhen45@baidu.com>
Co-authored-by: chenzhiyang <1792266893@qq.com>
Co-authored-by: Chen Zhiyang <chenzhiyang99@126.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.

None yet

9 participants