Configuring PC to Run cuDNN Methods

I would like to request help in configuring my PC so that cuDNN methods run correctly. Below I’ve included a very simple CUDA program, and a Makefile. As written, the program runs correctly. The program uses CUDA methods to copy an integer to GPU memory, “sets the device to be used for GPU executions”, and declares a cudnnHandle_t object. If I uncomment the cudnnCreate method, the program will obstensibly run, but will throw a CUDA_ERROR_NOT_FOUND when run by NSight Compute.

I’ve tried a few different things. I’ve tried toggling the “INCLUDE_DIRECTORIES” line in the Makefile (as well as the appropriate recipe). I’ve tried adding and removing “C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\lib\x64” from my system PATH. I’ve verified that I’ve installed up-to-date NVIDIA drivers, CUDA 10.2, and cuDNN 7.6.5 per NVIDIA guidance. Would you recommend other steps?

NgNet.cu

#include <cudnn.h>

int main()
{
int integer_host = 7;
int* integer_GPU;
cudaMalloc(&integer_GPU, sizeof(int));
cudaMemcpy(integer_GPU, &integer_host, sizeof(int), cudaMemcpyHostToDevice);

cudaSetDevice(0);

cudnnHandle_t cudnnHandle;
//cudnnCreate(&cudnnHandle);

return 0;

}

Makefile

SOURCE_FILES must be in format [FILENAME][SPACE][FILENAME][SPACE][FILENAME]…

[FILENAME] cannot be in quotes.

SOURCE_FILES = NgNet.cu

HEADER_FILES must be in format [FILENAME][SPACE][FILENAME][SPACE][FILENAME]…

[FILENAME] cannot be in quotes.

#HEADER_FILES =

INCLUDE_DIRECTORIES must be in format [PATH],[PATH],[PATH]…

[PATH] may be written without quotes if [PATH] does not contain a space.

For uniformity, I have enclosed all paths in quotes.

#INCLUDE_DIRECTORIES = “C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include”

LIBRARIES_TO_LINK must be in the format [PARTIAL_PATH],[PARTIAL_PATH],[PARTIAL_PATH]…

[PARTIAL_PATH] consists of path to directory of library and prefix of library filename.

[PARTIAL_PATH] may be written without quotes.

For uniformity, I have enclosed all partial paths in quotes.

[PARTIAL_PATH] cannot have spaces.

My workaround was to add “C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\lib\x64” to

Control Panel -> System and Security -> System -> Change Settings -> Advanced ->

Environmental Variables -> System Variables -> Path -> New.

LIBRARIES_TO_LINK = “cudnn”

PREFIX_OF_OUTPUT_FILE_NAME may be written without quotes.

I do not write filenames with spaces.

PREFIX_OF_NAME_OF_OUTPUT_FILE = “NgNet”

Make output file whenever a source file or a header file changes.

Use the nvcc compiler.

Output severe, significant, production-quality, and informational compiler warnings.

Reference include directories (i.e., directories of header files).

Reference directories of libraries.

Specify the prefix of the name of the output file.

#makeNgNet: (SOURCE_FILES) (HEADER_FILES)
nvcc --compiler-options -W4 (SOURCE_FILES) -I (INCLUDE_DIRECTORIES) -l (LIBRARIES_TO_LINK) -o (PREFIX_OF_NAME_OF_OUTPUT_FILE)
makeNgNet: (SOURCE_FILES) nvcc --compiler-options -W4 (SOURCE_FILES) -l (LIBRARIES_TO_LINK) -o (PREFIX_OF_NAME_OF_OUTPUT_FILE)