gpu backend: create single kernel for entire subtree without permutable bands
commit0855698566dadc10e342bbe7f952c05c34e33b89
authorSven Verdoolaege <skimo@kotnet.org>
Tue, 15 Dec 2015 13:37:09 +0000 (15 14:37 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Sun, 20 Dec 2015 13:17:33 +0000 (20 14:17 +0100)
tree78b067e53da30db8ec83dd57994be0e93e20e91c
parent0661762fe86a0f0c126908b347ab91a1fcd69e2b
gpu backend: create single kernel for entire subtree without permutable bands

The gpu backend looks for a subtree of the schedule with permutable bands
and then maps the outermost permutable bands in that tree to the device.
There may however be further subtrees of the selected subtree that do
not contain any permutable band.  In this case, the leaves of those
subtrees are mapped to the device.  If those leaves have outer
(non-permutable) bands in the selected subtrees, then that means
that a kernel is invoked for each instance of those bands.
Since kernel invocation comes with some overhead, it should be
more efficient to map the entire subtree without permutable bands
to the device as a whole.  The resulting kernel will not be very
efficient, but it should be better than repeatedly invoking
a smaller inefficient kernel.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
gpu.c