-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[AutoScheduler] Update layout rewrite option setting for measuring #7156
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
Changes from all commits
be46555
feff2e3
e091099
b36ed24
cee5dd0
95f8626
0060036
eadbbf0
5e82774
a4bc457
03db258
6d6c57f
37190a4
ea2b170
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -997,11 +997,20 @@ ComputeDAG ComputeDAG::RewriteLayout(Array<Step>* transform_steps, | |
| transform_steps->Set(i, std::move(step)); | ||
| } | ||
| } | ||
|
|
||
| // Add schedule for the new added transform stage | ||
| Array<Integer> to_fuse; | ||
| for (size_t i = 0; i < new_shape.size() - 1; i++) { | ||
| to_fuse.push_back(i); | ||
|
|
||
| if (new_shape.size() >= 5) { | ||
| to_fuse.push_back(0); | ||
| to_fuse.push_back(1); | ||
| to_fuse.push_back(2); | ||
| transform_steps->push_back(FuseStep(stage_id, to_fuse)); | ||
| } else if (new_shape.size() >= 3) { | ||
| to_fuse.push_back(0); | ||
| to_fuse.push_back(1); | ||
| transform_steps->push_back(FuseStep(stage_id, to_fuse)); | ||
| } | ||
| transform_steps->push_back(FuseStep(stage_id, to_fuse)); | ||
| transform_steps->push_back(AnnotationStep(stage_id, 0, IteratorAnnotation::kParallel)); | ||
| } | ||
|
|
||
|
|
@@ -1023,7 +1032,10 @@ ComputeDAG ComputeDAG::RewriteLayout(Array<Step>* transform_steps, | |
| } | ||
| original_compute_op = op; | ||
| CHECK(!new_compute_op.defined()); | ||
| new_compute_op = te::ComputeOp(pop->name, pop->tag, pop->attrs, pop->axis, new_body); | ||
| auto new_attrs = pop->attrs; | ||
| new_attrs.Set("ori_placeholder_layout", tvm::String(origin_layout)); | ||
| new_attrs.Set("new_placeholder_layout", tvm::String(new_layout)); | ||
|
Comment on lines
+1036
to
+1037
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Delete this?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would need to get the layout information when exporting the kernel to run in an environment outside the tvm.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok. We can leave them here |
||
| new_compute_op = te::ComputeOp(pop->name, pop->tag, new_attrs, pop->axis, new_body); | ||
jcf94 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| } | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.