Hi! On 2021-07-27T12:01:18+0200, I wrote: > On 2021-06-29T16:42:03-0700, Julian Brown wrote: >> This patch fixes several places in libgomp/target.c where "ephemeral" data >> (on the stack or in temporary heap locations) may be used as the source of >> an asynchronous host-to-device copy that may not complete before the host >> data disappears. Versions of the patch have been posted several times >> before, but this one (at Chung-Lin Tang's prior suggesion, IIRC) moves >> all logic into target.c rather than pushing it out to each target plugin. > > Thanks for the re-work! >> +/* Copy host memory to an offload device. In asynchronous mode (if AQ is >> + non-NULL), when the source data is stack or may otherwise be deallocated >> + before the asynchronous copy takes place, EPHEMERAL must be passed as >> + TRUE. The CBUF isn't used for non-ephemeral asynchronous copies, because >> + the host data might not be computed yet (by an earlier asynchronous compute >> + region). */ >> + >> [gomp_copy_host2dev] > > Code changes related to the latter sentence have moved into a separate > "Don't use libgomp 'cbuf' buffering with OpenACC 'async'", pushed to > master branch in commit d88a6951586c7229b25708f4486eaaf4bf4b5bbe, [...] Re 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?) */ Pushed to master branch commit 2b2340e236c0bba8aaca358ea25a5accd8249fbd "Allow libgomp 'cbuf' buffering with OpenACC 'async' for 'ephemeral' data", see attached. Grüße Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955