Skip to content

Commit 183e240

Browse files
committed
Mark all outer loops as GPU block
1 parent 5202a42 commit 183e240

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/autoschedulers/mullapudi2016/AutoSchedule.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,6 +1105,7 @@ class GPUTilingDedup {
11051105
}
11061106

11071107
void mark_gpu_threads(AutoSchedule &sched) const {
1108+
bool is_gpu_block_marked = false;
11081109
for (const auto &v : ordering) {
11091110

11101111
const auto &v_name = v.name();
@@ -1115,17 +1116,17 @@ class GPUTilingDedup {
11151116
continue;
11161117
}
11171118

1119+
// Skip all gpu_blocks if the current Stage is "compute_at" another
1120+
// stage, in which the gpu_blocks are already specified.
11181121
if (is_compute_at) {
11191122
continue;
11201123
}
11211124

1122-
// Skip all gpu_blocks if the current Stage is "compute_at" another
1123-
// stage, in which the gpu_blocks are already specified.
1124-
if (is_outer(v_name)) {
1125+
if (is_outer(v_name) || is_gpu_block_marked) {
11251126
// Mark as gpu blocks;
11261127
f.gpu_blocks(v);
11271128
sched.push_schedule(f.name(), stage_num, "gpu_blocks(" + v_name + ")", {v_name});
1128-
continue;
1129+
is_gpu_block_marked = true;
11291130
}
11301131
}
11311132
}

0 commit comments

Comments
 (0)