]> git.ipfire.org Git - thirdparty/gcc.git/commit
[og9] Improve async serialize implementation for AMD GCN libgomp plugin
authorJulian Brown <julian@codesourcery.com>
Sun, 8 Sep 2019 23:04:54 +0000 (16:04 -0700)
committerThomas Schwinge <thomas@codesourcery.com>
Tue, 3 Mar 2020 11:51:25 +0000 (12:51 +0100)
commit21fb2da78b20efced0d15ebe1ae51c3bd728244f
tree004d1c1c1f4199423ff6dcbef92aa14c0d12e0bc
parentd244bdcbcf9dfc638e1b5a65446cec79ae172519
[og9] Improve async serialize implementation for AMD GCN libgomp plugin

libgomp/
* plugin/plugin-gcn.c (struct placeholder, struct asyncwait_info,
enum entry_type): New.
(queue_entry): Use entry_type enum for tag.  Add asyncwait and
placeholder event type fields.
(wait_for_queue_nonfull): New function.
(queue_push_launch): Use above function instead of raising a fatal
error on queue-full condition.  Use KERNEL_LAUNCH instead of hardwired
0.
(queue_push_callback): Use wait_for_queue_nonfull instead of open-coded
wait sequence.  Use CALLBACK instead of hardwired 1.
(queue_push_asyncwait, queue_push_placeholder): New.
(execute_queue_entry): Implement ASYNC_WAIT and ASYNC_PLACEHOLDER event
types.
(GOMP_OFFLOAD_openacc_async_serialize): Use queue_push_placeholder and
queue_push_asyncwait instead of host-synchronized wait_queue calls.
* testsuite/libgomp.oacc-c-c++-common/data-2-lib.c (main): Add missing
asynchronous waits.
* testsuite/libgomp.oacc-c-c++-common/data-2.c (main): Likewise.

(cherry picked from openacc-gcc-9-branch commit
714b46df96da40f15b38757bc8900451892f32be)
libgomp/ChangeLog.omp
libgomp/plugin/plugin-gcn.c
libgomp/testsuite/libgomp.oacc-c-c++-common/data-2-lib.c
libgomp/testsuite/libgomp.oacc-c-c++-common/data-2.c