First *ping* (two weeks old but all during the holiday season).

Side note, for what it is worth: Thomas K regarded the Fortran part as reasonable/OK – but those OpenACC changes also affect C/C++/omp-low.c/libgomp :-) – cf. https://gcc.gnu.org/ml/gcc-patches/2019-12/msg01596.html

Cheers,

Tobias

On 12/24/19 3:23 PM, Tobias Burnus wrote:
On the front-end side, adding "if" and "if_present" to the  "acc host_data" directive is simple as other directives already support those clauses.

The 'if_present' status has to be passed along the use_device_ptr flag; for this a new flag has been introduced, using the gap in the gomp_map_kind enum (16 was still free; now used for GOMP_MAP_USE_DEVICE_PTR_IF_PRESENT, use_device_ptr has 14).

There was some forth and back whether a new enum should be used or a flag (passed in the device argument, as OpenACC only uses host and device and not a device number). Initial version was with new enum, then with flag and now again a new enum.

On the libgomp side, one simply needs to skip the if-not-present error and otherwise handle it as use_device_ptr.

Build on x86-64-gnu-linux without offloading and with nvptx offloading.
OK for the trunk?

Cheers,

Tobias

PS: History: The initial version (not public) used an enum but Thomas was wondering whether a flag is not the better solution, cf. discussion at https://gcc.gnu.org/ml/gcc/2018-12/msg00118.htmlHence, the first public version has switched to a flag and submitted for the OG8 (openacc-gcc-8-branch GIT) branch at https://gcc.gnu.org/ml/gcc-patches/2018-12/msg01559.html and has been committed as Rev. b52c8d006581b2a657ac3d81ab2527bb398b6615 (this commit is also part of OG9. — A minor fix was committed to OG8?/OG9 as Rev. 995f9680a46c3a7246fe465faa847f8009e47ed8.

Thomas now wonders whether the flag will be future safe, hence, it now uses again an enum as in the original version.

PPS: Changes to OG9: Using again an enum; Fortran run-time test and rediffs.

Reply via email to