]> git.ipfire.org Git - thirdparty/gcc.git/commit
Allow libgomp 'cbuf' buffering with OpenACC 'async' for 'ephemeral' data
authorThomas Schwinge <thomas@codesourcery.com>
Mon, 27 Feb 2023 15:41:17 +0000 (16:41 +0100)
committerThomas Schwinge <thomas@codesourcery.com>
Fri, 10 Mar 2023 15:19:53 +0000 (16:19 +0100)
commit2b2340e236c0bba8aaca358ea25a5accd8249fbd
treea884e74a54c0cac5564c271ce4b937c4a4e614d3
parent199867d07be65cb0227a318ebf42b8376ca09313
Allow libgomp 'cbuf' buffering with OpenACC 'async' for 'ephemeral' data

This does *allow*, but under no circumstances is this currently going to be
used: all potentially applicable data is non-'ephemeral', and thus not
considered for 'gomp_coalesce_buf_add' for OpenACC 'async'.  (But a use will
emerge later.)

Follow-up to commit r12-2530-gd88a6951586c7229b25708f4486eaaf4bf4b5bbe
"Don't use libgomp 'cbuf' buffering with OpenACC 'async'", addressing this
TODO comment:

    TODO ... but we could allow CBUF usage for EPHEMERAL data?  (Open question:
    is it more performant to use libgomp CBUF buffering or individual device
    asyncronous copying?)

Ephemeral data is small, and therefore individual device asyncronous copying
does seem dubious -- in particular given that for all those, we'd individually
have to allocate and queue for deallocation a temporary buffer to capture the
ephemeral data.  Instead, just let the 'cbuf' *be* the temporary buffer.

libgomp/
* target.c (gomp_copy_host2dev, gomp_map_vars_internal): Allow
libgomp 'cbuf' buffering with OpenACC 'async' for 'ephemeral'
data.
libgomp/target.c