gpu: generate pure host code if the schedule does not exhibit parallelism
commit01c8d1d5e797be7a98e0bd38d380bb94acd82456
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 28 Jun 2013 07:54:11 +0000 (28 09:54 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Fri, 26 Jul 2013 11:45:52 +0000 (26 13:45 +0200)
tree1b6be4e0c0bb54fc4b3c366d18ee710e92b5ceb1
parent40bbc7bdf0d2ac53f250596b2323b53636a06181
gpu: generate pure host code if the schedule does not exhibit parallelism

Ideally, we should use a cost model to determine whether we should
generate GPU code or CPU code.  However, if the computed schedule
does not exhibit any parallelism, then it is pretty clear that we
should not generate GPU code.

The absence of parallelism is detected for PolyBench benchmarks
cholesky and ludcmp because of memory based dependences induced
by a scalar variable.  The symm benchmark also has such a scalar,
but it nevertheless does exhibit some parallelism and therefore
does not trigger the generation of pure host code based on this
commit.

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