-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[TIR] Add utility for anchor block extraction #13194
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
Conversation
|
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.
Generated by tvm-bot |
ff9689f to
0ba3873
Compare
| throw; | ||
| } | ||
|
|
||
| const PrimFuncNode* FindEntryFunc(const IRModule& mod, GlobalVar* result_g_var) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to src/tir/analysis/stmt_finding.cc
| * \param result_g_var The result GlobalVar of the entry function. | ||
| * \return The entry function. | ||
| */ | ||
| const PrimFuncNode* FindEntryFunc(const IRModule& mod, GlobalVar* result_g_var); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to include/tir/analysis.h
junrushao
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I'm working on enabling "anchor block" tuning for MS. This is a utility to extract anchor blocks. I define the "anchor block" to be the block (1) with an init statement and (2) having the biggest flops count. The latter condition is only used when there are multiple blocks with an init statement. For example, if the input module is conv2d + fused spatial blocks, conv2d is the anchor block. A module created from winograd convolution has multiple blocks with an init statement (input transform, batched GEMM, and output transform). We use the second condition, the flops count, to determine that the batched GEMM block is the anchor block.
I'm working on enabling "anchor block" tuning for MS. This is a utility to extract anchor blocks. I define the "anchor block" to be the block (1) with an init statement and (2) having the biggest flops count. The latter condition is only used when there are multiple blocks with an init statement. For example, if the input module is conv2d + fused spatial blocks, conv2d is the anchor block. A module created from winograd convolution has multiple blocks with an init statement (input transform, batched GEMM, and output transform). We use the second condition, the flops count, to determine that the batched GEMM block is the anchor block.
I'm working on enabling "anchor block" tuning for MS. This is a utility to extract anchor blocks.
I define the "anchor block" to be the block (1) with an init statement and (2) having the biggest flops count. The latter condition is only used when there are multiple blocks with an init statement.
For example, if the input module is conv2d + fused spatial blocks, conv2d is the anchor block. A module created from winograd convolution has multiple blocks with an init statement (input transform, batched GEMM, and output transform). We use the second condition, the flops count, to determine that the batched GEMM block is the anchor block.
cc @junrushao @Hzfengsy