It turns out there is. Tried the following on a Ubuntu 22.04:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt install gcc-12 g++-12 gfortran-12 gcc-12-offload-nvptx
And managed to offload using OpenMP.
At first I wanted to do it with gfortran 13 but there seems to be a bug in the packaging, as I got this error when compiling a code:
x86_64-linux-gnu-accel-nvptx-none-gcc-13: fatal error: cannot read spec file ‘libgomp.spec’: No such file or directory
compilation terminated.
Which a search on google just tells me it is a missing component and that the issue seems to not have been solved so far Bug #2036593 “Compilation error: absent libgomp.spec with gcc-13...” : Bugs : gcc-13 package : Ubuntu
@jorgeg I tried compiling from source using the script you shared but I got another error
cc1plus: fatal error: gengtype-lex.cc: No such file or directory
compilation terminated.
I’ll keep this gcc-12 version for the moment.