aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorAndrew Stubbs <ams@codesourcery.com>2023-09-01 16:49:58 +0100
committerSandra Loosemore <sloosemore@baylibre.com>2025-05-15 20:25:50 +0000
commitfc4bf7b190ee2db44839c09518ca074c5cef8a3b (patch)
tree7f737e0db19fb7e30a7c09873b2d60d306ec0c50 /gcc/c
parent6ffe14f3198140918d10958702281afba863b41b (diff)
downloadgcc-fc4bf7b190ee2db44839c09518ca074c5cef8a3b.zip
gcc-fc4bf7b190ee2db44839c09518ca074c5cef8a3b.tar.gz
gcc-fc4bf7b190ee2db44839c09518ca074c5cef8a3b.tar.bz2
libgomp: parallel reverse offload
Extend OpenMP reverse offload support to allow running the host kernels on multiple threads. The device plugin API for reverse offload is now made non-blocking, meaning that running the host kernel in the wrong device context is no longer a problem. The NVPTX message passing interface now uses a ring buffer aproximately matching GCN. libgomp/ChangeLog: * config/gcn/target.c (GOMP_target_ext): Add "signal" field. Fix atomics race condition. * config/nvptx/libgomp-nvptx.h (REV_OFFLOAD_QUEUE_SIZE): New define. (struct rev_offload): Implement ring buffer. * config/nvptx/target.c (GOMP_target_ext): Likewise. * env.c (initialize_env): Read GOMP_REVERSE_OFFLOAD_THREADS. * libgomp-plugin.c (GOMP_PLUGIN_target_rev): Replace "aq" parameter with "signal" and "use_aq". * libgomp-plugin.h (GOMP_PLUGIN_target_rev): Likewise. * libgomp.h (gomp_target_rev): Likewise. * plugin/plugin-gcn.c (process_reverse_offload): Add "signal". (console_output): Pass signal value through. * plugin/plugin-nvptx.c (GOMP_OFFLOAD_openacc_async_construct): Attach new threads to the numbered device. Change the flag to CU_STREAM_NON_BLOCKING. (GOMP_OFFLOAD_run): Implement ring-buffer and remove signalling. * target.c (gomp_target_rev): Rename to ... (gomp_target_rev_internal): ... this, and change "dev_num" to "devicep". (gomp_target_rev_worker_thread): New function. (gomp_target_rev): New function (old name). * libgomp.texi: Document GOMP_REVERSE_OFFLOAD_THREADS. * testsuite/libgomp.c/reverse-offload-threads-1.c: New test. * testsuite/libgomp.c/reverse-offload-threads-2.c: New test.
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions