On 10/03/2025 21:48, Tobias Burnus wrote:
This patch requires the to be submitted GOMP_interop patch, which
handles the generic libgomp parts. But once it is available, this
patch adds support for the foreign runtimes cuda/cuda_driver/hip
for nvptx and hip/hsa for gcn.
The patch is based on my old RFC patch
https://gcc.gnu.org/pipermail/gcc-patches/2024-August/661207.html
with minor updates and tons of bugs fixed.
The patch has been lightly tested by the included test case on
nvptx and gcn – and, for nvptx, using the example from the OpenMP
example document.
I intent to commit this patch relatively soonish after the
libgomp patch has been committed, but I expect that more extensive
testing (+ adding more tests to libgomp/testsuite) will find bugs
that have to be fixed.
Comments, remarks, suggestions regarding this patch or my plans?
It needs some user documentation (what's implemented/not, fallback
cases, queue sizes/modes, etc.), but otherwise it looks reasonable to me.
Andrew
Tobias
PS: I surely will re-run the tests once the libgomp patch is in
and before I commit this patch.
PPS: Besides tests, one follow up task will be documentation;
cf. old draft patch at
https://gcc.gnu.org/pipermail/gcc-patches/2024-August/661365.html
Post-post-post script: We could think of making some of the features
tunable (e.g. queue size). That could be easily added via the 'attr'
feature (without any compatibility issues). However, currently we
don't and I didn't see any of evaluated importance. (Comments welcome.)