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

[SOT] merge PaddleSOT into Paddle #57824

Merged
merged 28 commits into from
Oct 13, 2023

Conversation

SigureMo
Copy link
Member

@SigureMo SigureMo commented Sep 27, 2023

PR types

New features

PR changes

Others

Description

将 PaddleSOT 并入 Paddle 主仓库,目录结构对应关系如下:

  • PaddleSOT/sot -> Paddle/python/paddle/jit/sot
  • PaddleSOT/tests -> Paddle/test/sot (sot 相关 import 需要修改)

SOT 相关修改:

  • 将环境变量 LOG_LEVEL 改为 SOT_LOG_LEVEL,并删除设置 level 为 2 的操作,现在默认不会再打印很多 log,PTS 现在也支持设置环境变量,合入后和 QA 和新 IR 同学同步环境变量变动即可
  • 修复路径分隔符硬编码为 /,而 Windows 上为 \\ 的问题,导致无法正常 skip paddle API,使用 os.sep 即可

Paddle 相关修改:

  • PR-CI-SOT 流水线接入合入后的 paddle.jit.sot 而不是 clone 的 PaddleSOT
  • 动转静单测开启 SOT 测试,现在会同时跑 SOT 和原来的 AST 版本的,并设置了相关的环境变量(COST_MODEL 等)
  • 动转静单测添加新的 dygraph_to_static_utils_new,允许细粒度 disable 某一个单测,并方便之后开启 PIR 动转静最终态单测,目前 SOT + PIR 会出现问题,@kangguangli 正在修复([PIR] fix share_buffer translation #58075),将会在之后打开,目前仅仅针对报错单测开启这个,新旧并行,将会在之后同 @gouzil 推全新的机制
  • 修复 to_tensor 静态图分支在 Windows 上默认 dtype 为 int32 导致的问题

一些 TODOs:

  • 接口形态的确认,是否切默认,使用什么 flag 切换 SOT/AST 模式
  • to_static 里 import sot 目前在函数中使用了动态 import,之后可以考虑重构部分代码以确保在没有 circular import 的前提下将其放到顶层
  • 单测新机制(dygraph_to_static_utils_new)的推全
  • SOT 目录结构重构,避免目录结构层次过深的问题
  • 仅修改部分目录才触发 PR-CI-SOT [SOT][ci] add check file run #58051
  • SOT 单测优化,可以考虑是否接入 ctest,使得运行方式一致(但要保留直接 python 跑的方式)

PCard-66972

PaddleSOT is a Bytecode level Implementation of Symbolic OpCode Translator For PaddlePaddle.

We originally developed in [PaddleSOT](https://github.com/PaddlePaddle/PaddleSOT), and to ensure consistency in Paddle versions, we are now merging PaddleSOT into Paddle.

Thanks to all the contributors of this project!

See more details in https://github.com/PaddlePaddle/PaddleSOT/graphs/contributors

---

Co-authored-by: xiongkun <xiongkun03@baidu.com>
Co-authored-by: feifei-111 <2364819892@qq.com>
Co-authored-by: 0x45f <23097963+0x45f@users.noreply.github.com>
Co-authored-by: gouzil <66515297+gouzil@users.noreply.github.com>
Co-authored-by: 六个骨头 <46243324+zrr1999@users.noreply.github.com>
Co-authored-by: Aurelius84 <zhangliujie@baidu.com>
Co-authored-by: Wang Xin <xinwang614@gmail.com>
Co-authored-by: haozi <64006169+NotHaozi@users.noreply.github.com>
Co-authored-by: RedContritio <RedContritio@qq.com>
Co-authored-by: Sanbu <96160062+sanbuphy@users.noreply.github.com>
Co-authored-by: Difer <c7070655110@gmail.com>
Co-authored-by: cyberslack_lee <luhputu0815@gmail.com>
Co-authored-by: jjyaoao <jjyaoao@126.com>
Co-authored-by: PuQing <me@puqing.work>
Co-authored-by: Ran chongzhi <57489288+ranchongzhi@users.noreply.github.com>
Co-authored-by: Zhenghai Zhang <65210872+ccsuzzh@users.noreply.github.com>
@paddle-bot
Copy link

paddle-bot bot commented Sep 27, 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.

@SigureMo SigureMo changed the title [SOT] merge PaddleSOT into Paddle [WIP][SOT] merge PaddleSOT into Paddle Sep 27, 2023
@paddle-ci-bot
Copy link

paddle-ci-bot bot commented Oct 5, 2023

Sorry to inform you that 49933ae's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

@SigureMo SigureMo marked this pull request as ready for review October 10, 2023 10:05
@SigureMo SigureMo changed the title [WIP][SOT] merge PaddleSOT into Paddle [SOT] merge PaddleSOT into Paddle Oct 13, 2023
Copy link
Contributor

@XieYunshen XieYunshen left a comment

Choose a reason for hiding this comment

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

LGTM
单测超时时间设置

Copy link
Contributor

@risemeup1 risemeup1 left a comment

Choose a reason for hiding this comment

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

LGTM for setup.py

Copy link
Contributor

@zyfncg zyfncg left a comment

Choose a reason for hiding this comment

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

LGTM for setup.py.in

Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 left a comment

Choose a reason for hiding this comment

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

LGTM

@SigureMo SigureMo merged commit a49ee53 into PaddlePaddle:develop Oct 13, 2023
28 checks passed
@SigureMo SigureMo deleted the sot/merge-into-paddle branch October 13, 2023 13:57
Frida-a pushed a commit to Frida-a/Paddle that referenced this pull request Oct 14, 2023
PaddleSOT is a Bytecode level Implementation of Symbolic OpCode Translator For PaddlePaddle.

We originally developed in [PaddleSOT](https://github.com/PaddlePaddle/PaddleSOT), and to ensure consistency in Paddle versions, we are now merging PaddleSOT into Paddle.

Thanks to all the contributors of this project!

See more details in https://github.com/PaddlePaddle/PaddleSOT/graphs/contributors

---------

Co-authored-by: xiongkun <xiongkun03@baidu.com>
Co-authored-by: feifei-111 <2364819892@qq.com>
Co-authored-by: 0x45f <23097963+0x45f@users.noreply.github.com>
Co-authored-by: gouzil <66515297+gouzil@users.noreply.github.com>
Co-authored-by: 六个骨头 <46243324+zrr1999@users.noreply.github.com>
Co-authored-by: Aurelius84 <zhangliujie@baidu.com>
Co-authored-by: Wang Xin <xinwang614@gmail.com>
Co-authored-by: haozi <64006169+NotHaozi@users.noreply.github.com>
Co-authored-by: RedContritio <RedContritio@qq.com>
Co-authored-by: Sanbu <96160062+sanbuphy@users.noreply.github.com>
Co-authored-by: Difer <c7070655110@gmail.com>
Co-authored-by: cyberslack_lee <luhputu0815@gmail.com>
Co-authored-by: jjyaoao <jjyaoao@126.com>
Co-authored-by: PuQing <me@puqing.work>
Co-authored-by: Ran chongzhi <57489288+ranchongzhi@users.noreply.github.com>
Co-authored-by: Zhenghai Zhang <65210872+ccsuzzh@users.noreply.github.com>
jiahy0825 pushed a commit to jiahy0825/Paddle that referenced this pull request Oct 16, 2023
PaddleSOT is a Bytecode level Implementation of Symbolic OpCode Translator For PaddlePaddle.

We originally developed in [PaddleSOT](https://github.com/PaddlePaddle/PaddleSOT), and to ensure consistency in Paddle versions, we are now merging PaddleSOT into Paddle.

Thanks to all the contributors of this project!

See more details in https://github.com/PaddlePaddle/PaddleSOT/graphs/contributors

---------

Co-authored-by: xiongkun <xiongkun03@baidu.com>
Co-authored-by: feifei-111 <2364819892@qq.com>
Co-authored-by: 0x45f <23097963+0x45f@users.noreply.github.com>
Co-authored-by: gouzil <66515297+gouzil@users.noreply.github.com>
Co-authored-by: 六个骨头 <46243324+zrr1999@users.noreply.github.com>
Co-authored-by: Aurelius84 <zhangliujie@baidu.com>
Co-authored-by: Wang Xin <xinwang614@gmail.com>
Co-authored-by: haozi <64006169+NotHaozi@users.noreply.github.com>
Co-authored-by: RedContritio <RedContritio@qq.com>
Co-authored-by: Sanbu <96160062+sanbuphy@users.noreply.github.com>
Co-authored-by: Difer <c7070655110@gmail.com>
Co-authored-by: cyberslack_lee <luhputu0815@gmail.com>
Co-authored-by: jjyaoao <jjyaoao@126.com>
Co-authored-by: PuQing <me@puqing.work>
Co-authored-by: Ran chongzhi <57489288+ranchongzhi@users.noreply.github.com>
Co-authored-by: Zhenghai Zhang <65210872+ccsuzzh@users.noreply.github.com>
danleifeng pushed a commit to danleifeng/Paddle that referenced this pull request Nov 14, 2023
PaddleSOT is a Bytecode level Implementation of Symbolic OpCode Translator For PaddlePaddle.

We originally developed in [PaddleSOT](https://github.com/PaddlePaddle/PaddleSOT), and to ensure consistency in Paddle versions, we are now merging PaddleSOT into Paddle.

Thanks to all the contributors of this project!

See more details in https://github.com/PaddlePaddle/PaddleSOT/graphs/contributors

---------

Co-authored-by: xiongkun <xiongkun03@baidu.com>
Co-authored-by: feifei-111 <2364819892@qq.com>
Co-authored-by: 0x45f <23097963+0x45f@users.noreply.github.com>
Co-authored-by: gouzil <66515297+gouzil@users.noreply.github.com>
Co-authored-by: 六个骨头 <46243324+zrr1999@users.noreply.github.com>
Co-authored-by: Aurelius84 <zhangliujie@baidu.com>
Co-authored-by: Wang Xin <xinwang614@gmail.com>
Co-authored-by: haozi <64006169+NotHaozi@users.noreply.github.com>
Co-authored-by: RedContritio <RedContritio@qq.com>
Co-authored-by: Sanbu <96160062+sanbuphy@users.noreply.github.com>
Co-authored-by: Difer <c7070655110@gmail.com>
Co-authored-by: cyberslack_lee <luhputu0815@gmail.com>
Co-authored-by: jjyaoao <jjyaoao@126.com>
Co-authored-by: PuQing <me@puqing.work>
Co-authored-by: Ran chongzhi <57489288+ranchongzhi@users.noreply.github.com>
Co-authored-by: Zhenghai Zhang <65210872+ccsuzzh@users.noreply.github.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