Please improve the documentation of -gpu=cudaX.Y option

Hi,

this is about the -gpu=cudaX.Y option of the HPC SDK compilers. The documentation for this states:

       -gpu=option
              Use the following sub-options to tailor the compilation of target accelerator regions:
[...]
              cudaX.Y
                  Use CUDA X.Y Toolkit compatibility, where installed.

However, Mat Colgrove wrote that this will only ever switch between the CUDA versions that are bundled with the SDK. That is a bit surprising to me and not clear from the docs. Can this be updated in the respective documentation so the actual effect is clearer? Maybe including a hint to the variable he mentions, or potentially just flat out deprecating this in favour of this variable if that makes sense? His quote in: Using CUDA 12 with NV HPC SDK 22.11 - #2 by MatColgrove

Hi cassfalg,

I can run this by some folks, though we do document which CUDA versions are available in the Release notes. For example: NVIDIA HPC SDK Release Notes — HPC SDK Release Notes 25.1 documentation

Is this sufficient?

-Mat

No. I think it’s relatively common for people to have the HPC SDK installed along side a regular CUDA toolkit? I may not have the multi-version of the HPC SDK installed but still have a 10.8 toolkit. This documentation gives absolutely no hint that I can not specify the 10.8 regular toolkit.

As I said before, I really dislike that you have two (3 if we include the container toolkit) repositories for packages on Ubuntu and that there is an embedded toolkit in the hpc sdk in addition to the “regular” one. To me that is just confusing. That the documentation then does not deal with this peculiarity in the slightest does not help.

Let’s say I have the non-multi 25.1 hpc sdk installed and the regular 10.8 toolkit. I want my nvhpc compiled software to be compatible with a 10.8 regular toolkit only host. How would I know that setting -gpu=cuda10.8 does not work and why?

The minimum I’d say is to change this from Use CUDA X.Y Toolkit compatibility, where installed. to something like Use CUDA X.Y embedded Toolkit compatibility, where cuda-multi package is installed.. That would at least hint that there is something unintuitive and weird going on?

I talked with our product manager. Since the Reference Guide doesn’t usually change from release to release, he doesn’t like the idea of putting the particular CUDA version in there. Plus the full details on the CUDA versioning is found in the section 5.8 of the User’s Guide which does include the current versions. But he agrees that the “where installed” can be improved.

My suggestion is something like " Use CUDA X.Y Toolkit compatibility, as co-installed with the HPC SDK"

Would that work for you?

I don’t need a particular cuda version anywhere so this works, yes.

It is the absolute bare minimum though. I would really like the web version at least to mention the env variable somewhere so it contains all the information from your original post.