https://github.com/halide/Halide
Revision e0b14c2de4aa28f93a8e1da289f722db6f608ce1 authored by Shubham Pawar on 13 July 2020, 20:38:17 UTC, committed by Shubham Pawar on 13 July 2020, 20:39:29 UTC
The schedule emitted by Adams2019 autoscheduler sometimes results
in a compilation error. This error is seen when the autoscheduler emits
trivial reorder (reorder of a single variable). For example, the autoscheduler
emits the following schedule snippet:

`.reorder(x1);`

There is a check inplace which prevents these reorders by verifying the
the size of vector representing the `vars` to be reorderd  is greater than 1.

https://github.com/halide/Halide/blob/master/apps/autoscheduler/AutoSchedule.cpp#L806

Though, there are some cases where this check doesn't filter out trivial reorders
(when some variables don't exist).

This patch changes the reorder() directive emitted in schedule file
by the autoscheduler.

from: .reorder(VarOrRVar x, VarOrRVar y, Args && args)

to: .reorder(std::vector<VarOrRVar>& vars)

As the former reorder syntax results in an error if the schedule file
is used, in case there is a reorder of only one variable that are
sometimes caused by the autoscheduler.
1 parent 6e25c57
History
Tip revision: e0b14c2de4aa28f93a8e1da289f722db6f608ce1 authored by Shubham Pawar on 13 July 2020, 20:38:17 UTC
Fix autoscheduler emitted schedule for reorder
Tip revision: e0b14c2
File Mode Size
apps
python_bindings
src
test
tools
tutorial
util
.clang-format -rw-r--r-- 1.5 KB
.gitattributes -rw-r--r-- 342 bytes
.gitignore -rw-r--r-- 1.0 KB
.gitmodules -rw-r--r-- 0 bytes
.travis.yml -rw-r--r-- 1.7 KB
CMakeLists.txt -rw-r--r-- 18.6 KB
CODE_OF_CONDUCT.md -rw-r--r-- 3.4 KB
Doxyfile -rw-r--r-- 103.6 KB
Doxyfile.in -rw-r--r-- 64.3 KB
LICENSE.txt -rw-r--r-- 1.1 KB
Makefile -rw-r--r-- 91.8 KB
README.md -rw-r--r-- 16.0 KB
README_cmake.md -rw-r--r-- 9.9 KB
README_rungen.md -rw-r--r-- 12.1 KB
README_webassembly.md -rw-r--r-- 10.9 KB
halide.cmake -rw-r--r-- 29.8 KB

README.md

back to top