Nvprof not working on win10 cuda10.2

First I failed to instance nvvp session.
Get an error after clicking New Session command.

CUDA Initialization Failed:

Unable to locate CUDA libraries and establish connection with CUDA driver.

Make sure that the CUDA and CUDA runtime libraries are on your library path. See the installation guide for more information.

The Visual Profiler will now exit.

I think everything is fine. I can run nvcc to compile and run CUDA programs.

Then I noticed that nvprof command is not working.

(base) PS C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin> nvprof --help
(base) PS C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin> nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:32:27_Pacific_Daylight_Time_2019
Cuda compilation tools, release 10.2, V10.2.89

Notice that nvprof didn’t print anything

Sys info here:

Windows 10 Pro, 64-bit

DirectX : 12.0
GPU : GeForce GTX 1070
: 445.87
: Standard
Direct3D API: 12
Direct3D : 12_1
CUDA : 1920
: 1531 MHz
: 8.01 Gbps
: 256-bit
: 256.26 GB/s
: 12183MB
: 8192 MB GDDR5
: 0MB
: 3991MB
: Not used
: PCI Express x4 Gen3
ID: 10DE 1B81 36FC1458
: G411 0020

nvui.dll NVIDIA User Experience Driver Component
nvxdplcy.dll NVIDIA User Experience Driver Component
nvxdbat.dll NVIDIA User Experience Driver Component
nvxdapix.dll NVIDIA User Experience Driver Component
nvCplUIR.dll 8.1.940.0 NVIDIA Control Panel
nvCplUI.exe 8.1.940.0 NVIDIA Control Panel
nvViTvSR.dll NVIDIA Video Server
nvViTvS.dll NVIDIA Video Server
nvDispSR.dll NVIDIA Display Server
NVMCTRAY.DLL NVIDIA Media Center Library
nvDispS.dll NVIDIA Display Server
nvDevToolS.dll NVIDIA 3D Settings Server
nvWSSR.dll NVIDIA Workstation Server
nvWSS.dll NVIDIA Workstation Server
PhysX 09.19.0218 NVIDIA PhysX
NVCUDA.DLL NVIDIA CUDA 11.0.140 driver
nvGameSR.dll NVIDIA 3D Settings Server
nvGameS.dll NVIDIA 3D Settings Server

I reinstalled the toolkit and the problem is still. Any clue?


You seem to run into the issue discussed in the topic NVIDIA Visual Profiler is unable to profile application.
In short, it’s now required to set the path to the CUPTI library before launching Visual Profiler and nvprof.

It works. Thanks.