Trying to get GPU Coder to convert Matlab code to CUDA code to upload to a Jetson TX2

So I am trying to get GPU coder to convert a lane detection script from Matlab to CUDA to upload the a Jetson board. But as I run this command, coder.checkGpuInstall(‘cudnn’), to check that I have everything installed properly I keep getting this failure:

cuDNN Environment : FAILED (A ‘NVIDIA_CUDNN’ environment variable was not found. Set ‘NVIDIA_CUDNN’ to point to the root directory of a NVIDIA cuDNN installation.)

ans =

struct with fields:

    host: 0
     tk1: 0
     tx1: 0
     tx2: 0
     gpu: 0
 codegen: 0
codeexec: 0
   cudnn: 0

I have already gone through several other threads to make sure that I copied the cudnn files to the proper locations in my C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2 folder.

I have the environment variable CUDA_PATH with value C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2

Is there something else I am missing? Please help!!

Have you set the NVIDIA_CUDNN environment variable? I’m not familiar with the Windows Installation procedure for CUDA + CUDNN but this looks to me like that variable either hasn’t been set or is pointing to a different directory.

How do I set that variable? I haven’t found any documentation on that.

I googled “matlab NVIDIA_CUDNN” and this was returned in the top 5 hits:

https://www.mathworks.com/help/gpucoder/gs/setting-up-the-toolchain.html