[Bug middle-end/107517] [OpenMP][5.0] 'target update' with strides — for C/C++ and Fortran

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Nov 3 13:48:05 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107517

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
OpenMP 4.5 had:
"If a list item is an array section it must specify contiguous storage."
restriction on target update, which got dropped in 5.0.
For the implementation, I think we have multiple possibilities.
One is to do what we'll need to do e.g. for map clause with iterators (that is
5.1 feature which we still don't implement), so basically arrange for having a
VLA for GOMP_target* arrays and fill them with runtime loops.
Or add some new GOMP_MAP_* to represent record that will describe some strided
mapping or to/from update, perhaps pointing to arguments like
omp_target_memcpy_rect has to describe, and let the library handle it.
Or a mixture thereof.
If it is easily describable, advantage of handling it on the library side would
be that we could use some smarter host to device or vice versa copying if a
plugin supports them (I think Cuda has some support but I think we don't use it
even for omp_target_memcpy_rect).


More information about the Gcc-bugs mailing list