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

[CINN] Bucket compilation #59165

Merged
merged 5 commits into from Nov 23, 2023

Conversation

BiynXu
Copy link
Contributor

@BiynXu BiynXu commented Nov 20, 2023

PR types

Others

PR changes

Others

Description

Pcard-73602

主要内容:

  1. 为OpLowerer添加BucketLower()接口,返回vector<pair<SymbolicCondition, IR>>,内部调用DynamicShapeGroupScheduler得到桶
  2. 为ir::Module添加predicate子节点,接收BucketLower的结果
  3. 修改SplitCudaAndHostModule(),在此处将host端的IR生成
  4. 修改CodegenCudaHost逻辑,支持host端带有if的LoweredFunc codegen到llvm ir

Copy link

paddle-bot bot commented Nov 20, 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.

Copy link
Contributor

@Aurelius84 Aurelius84 left a comment

Choose a reason for hiding this comment

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

Great job!

@Aurelius84
Copy link
Contributor

另外,我看这里是适配的旧的Build接口,我另一个PR:#59258 在计划清理旧接口了,计划只保留理想态BuildCUDAJITInfo接口(会正式化为Build接口),想问下后续这里的BucketLower对于理想态是计划要怎么适配?

@BiynXu
Copy link
Contributor Author

BiynXu commented Nov 22, 2023

另外,我看这里是适配的旧的Build接口,我另一个PR:#59258 在计划清理旧接口了,计划只保留理想态BuildCUDAJITInfo接口(会正式化为Build接口),想问下后续这里的BucketLower对于理想态是计划要怎么适配?

这里主要是Instruction的问题,BuildCUDAJITInfo中直接调用device kernel的函数指针,但是BucketLower下来后,需要对应codegen和编译出一个host函数指针,分桶的if条件会写入host函数中,未来希望Instruction中放的是host函数指针。

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

@zhhsplendid zhhsplendid merged commit 17db8c8 into PaddlePaddle:develop Nov 23, 2023
28 checks passed
6clc pushed a commit to 6clc/Paddle that referenced this pull request Nov 27, 2023
主要内容:

为OpLowerer添加BucketLower()接口,返回vector<pair<SymbolicCondition, IR>>,内部调用DynamicShapeGroupScheduler得到桶
为ir::Module添加predicate子节点,接收BucketLower的结果
修改SplitCudaAndHostModule(),在此处将host端的IR生成
修改CodegenCudaHost逻辑,支持host端带有if的LoweredFunc codegen到llvm ir
SecretXV pushed a commit to SecretXV/Paddle that referenced this pull request Nov 28, 2023
主要内容:

为OpLowerer添加BucketLower()接口,返回vector<pair<SymbolicCondition, IR>>,内部调用DynamicShapeGroupScheduler得到桶
为ir::Module添加predicate子节点,接收BucketLower的结果
修改SplitCudaAndHostModule(),在此处将host端的IR生成
修改CodegenCudaHost逻辑,支持host端带有if的LoweredFunc codegen到llvm ir
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

4 participants