gpu backend: ensure each register is accessed by a single thread
commitf3d6c77b8c3ecfca937a558a857d9959f41965bb
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 16 Dec 2015 14:16:47 +0000 (16 15:16 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Fri, 18 Dec 2015 14:00:01 +0000 (18 15:00 +0100)
tree46e96ede2c203dd191521c66e4f2d5e67aec118f
parent7981f3da84b75a1cbad5e086cd8d37d382c04aa3
gpu backend: ensure each register is accessed by a single thread

Before deciding whether to put data in private memory, the code
already checks that each element is only accessed by a single thread.
However, the location where the private memory tile is copied
from global memory may subsequently be lifted to a more shallow
depth and in theory it is possible for the mapping from threads
to accessed array elements to depend on the intermediate schedule
dimensions.
Adjust the depth if needed to ensure that each array element
remains accessed by a single thread.

It is not clear if the issue mentioned above could happen in practice,
but without the new test there was no guarantee that it couldn't.

Reported-by: Darte Alain <alain.darte@ens-lyon.fr>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
gpu_group.c