You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
你的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.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Category
CINN
PR Types
Improvements
Description
Pcard-76996
Done in this PR
实现新的多下游融合方案,利用 Loop/Value 轴之间的依赖路径来推导出上下游 Pattern 融合需要进行的循环变换,以下是该方案中的几个关键数据结构:
LoopAxisMapping
数据结构:保存 Pattern Loop 到每个输入/输出 Value 之间轴的变换及相应的逆变换,其中 Loop 对应了后端 Lowering 时的 Expr 表示,同时在构建每个初始 Op 的LoopAxisMapping
时会考虑 0-d 的情况以及 1-size axis 的情况,如一个 ReduceOp 的LoopAxisMapping
表示如下:LoopAxisMapping
融合:从上下游 Pattern 的LoopAxisMapping
通过 Value 连接的路径推导出融合 Pattern 地LoopAxisMapping
SimplifyTransformRoute
:通过模拟实现变换路径的简化,能够避免后期融合 Pattern 推导出来的变换路径太长影响编译性能GetValidLoopTransformRoute
:尝试获取多下游融合中上下游之间有效的循环变换路径,从而判断是否能够进行融合,以及如何对进行变换融合Todo