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] Optimize parallel compiler and support dumping more compilation information #55590

Merged
merged 31 commits into from
Aug 21, 2023

Conversation

FisherWY
Copy link
Contributor

@FisherWY FisherWY commented Jul 20, 2023

PR types

Others

PR changes

Others

Description

Pcard-73602

  1. graph_compiler_util.h/cc
    • 整合GraphCompilerParallelCompiler共同持有的数据结构CompilationStageCompilationStatusCompilationContextCompilationResult
  2. Parallel Compiler
    • 整合数据结构至CompilationContext
    • 支持分阶段编译,通过指定CompilationContext::Stage
    • 添加编译状态信息,包括状态CompilationResult::Status和信息CompilationResult::message
    • 一个Task对应一个fusion_group,每一阶段编译完成后,将编译结果放入CompilationResult数组的对应下标中,删去原Task中内部的局部变量,省去了MergeResult
  3. Graph Compiler
    • 丰富CompilationResult,提供编译各阶段的中间结果
    • 整合数据结构至CompilationContext
    • 添加编译状态信息,包括状态CompilationResult::Status和信息CompilationResult::message
    • 启用单测
  4. 其他:相关单测、前端接口、paddle2cinn适配CompilationContext

FisherWY added 4 commits July 17, 2023 11:13
1. Unify FLAGS_cinn_parallel_compile_size and FLAGS_cinn_parallel_compile_thread
2. Add more flags to dump more compile info
3. Support dump lower_func, source_code, ptx and instruction
4. Return more compile info from parallel compiler to graph compiler
5. Refactor graph visualization
6. Refactor parallel compiler's task split
@paddle-bot
Copy link

paddle-bot bot commented Jul 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.

@paddle-bot paddle-bot bot added contributor External developers status: proposed labels Jul 20, 2023
FisherWY added 23 commits July 21, 2023 02:59
paddle/cinn/hlir/framework/parallel_compiler.cc Outdated Show resolved Hide resolved
paddle/cinn/hlir/framework/graph_compiler_test.cc Outdated Show resolved Hide resolved
paddle/cinn/hlir/framework/graph_compiler.cc Outdated Show resolved Hide resolved
paddle/cinn/hlir/framework/graph_compiler.cc Outdated Show resolved Hide resolved
paddle/cinn/hlir/framework/graph_compiler.cc Show resolved Hide resolved
@FisherWY FisherWY requested a review from BiynXu August 17, 2023 03:10
A task corresponds to a fusion group, which is assigned to available threads
Skip test case on op constant
Copy link
Member

@zhhsplendid zhhsplendid 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

@BiynXu BiynXu 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

@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 2d34514 into PaddlePaddle:develop Aug 21, 2023
BeingGod pushed a commit to BeingGod/Paddle that referenced this pull request Sep 9, 2023
…n information (PaddlePaddle#55590)

graph_compiler_util.h/cc:
整合GraphCompiler与ParallelCompiler共同持有的数据结构CompilationStage、CompilationStatus、CompilationContext、CompilationResult
Parallel Compiler:
整合数据结构至CompilationContext
支持分阶段编译,通过指定CompilationContext::Stage
添加编译状态信息,包括状态CompilationResult::Status和信息CompilationResult::message
一个Task对应一个fusion_group,每一阶段编译完成后,将编译结果放入CompilationResult数组的对应下标中,删去原Task中内部的局部变量,省去了MergeResult
Graph Compiler:
丰富CompilationResult,提供编译各阶段的中间结果
整合数据结构至CompilationContext
添加编译状态信息,包括状态CompilationResult::Status和信息CompilationResult::message
启用单测
其他:相关单测、前端接口、paddle2cinn适配CompilationContext
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.

4 participants