Unclear if #581 two-pass compilation of nvidia GPU builds works on nvhpc 22.X or 23.X (known working on 24.X). Should first check if this is the case or not (can change this line to FALSE in CMakeLists.txt:
set(NVHPC_USE_TWO_PASS_IPO TRUE)
and if this feature does not work, add a check in CMakeLists.txt to disable this feature if an old nvhpc is found.
Update: NVHPC 23.11 works. Older versions do not.