Hi
I am working on OPS-DSL which helps to auto-generate a CUDA code
For the handling a constant variables inside a CUDA kernel, we were writing a CONSTANTS MODULE file which looks something like this
MODULE OPS_CONSTANTS
#ifdef OPS_WITH_CUDAFOR
use cudafor
integer, constant :: imax_opsconstant
integer :: imax
#else
integer :: imax
#endif
END MODULE OPS_CONSTANTS
and then use imax_opsconstant inside a CUDA kernel
I have tested this application with NVHPC/23.1 and ran on Volta architecture. It compiles and runs fine.
I was trying this same on Hopper GPU with NVHPC/23.7 but i am getting
NVFORTRAN-S-0034-Syntax error at or near constant
Is there any change in handling constant with latest release of NVHPC compiler?