==ERROR== Profiling is not supported on device 0 as it uses the Windows Subsystem for Linux (WSL)

i try to use ncu CLI on WSL2(ubuntu 22.04) to profile the python target(using pytorch in python). but here comes the problem, and i have no idea how to solve it. Could you help me?

ncu cli:

ncu -o ncu_profile  python my_python_test.py

error log:

==ERROR== Profiling is not supported on device 0 as it uses the Windows Subsystem for Linux (WSL).
==PROF== Disconnected from process 1687
==WARNING== No kernels were profiled.
==WARNING== Profiling kernels launched by child processes requires the --target-processes all option.

Possibly not working, as according to WSL Compute Software Support, while Nsight Systems is supported, Nsight Compute or it’s CLI version ncu, is not mentioned.

@rs277 I try to install the latest Nsight Compute manually on my WSL2,and it seems OK.
(2022.3.0.0 → 2023.2.0.0)

Nsight Compute added support for profiling on Windows Subsystem for Linux (WSL2) in version 2022.4.

I follow the guideline installing latest cuda 12.2.1-1, latest WSL kernal vesion, latest Nsight Compute 2023.2.1.0 (build 33050884).

However, I still get this error…
What else shoud I do? is there any log I can provide?

Device 0: NVIDIA GeForce RTX 3060 Ti

==ERROR== Profiling is not supported on device 0 as it uses the Windows Subsystem for Linux (WSL). Refer to Release Notes :: Nsight Compute Documentation for more details.

What version of Windows are running on?

Here is some of my environment setting.

winver

10.0.19045.3324

wsl cat /proc/version

Linux version 5.15.90.1-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP Fri Jan 27 02:56:13 UTC 2023

$ nvcc --version

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Tue_Jul_11_02:20:44_PDT_2023
Cuda compilation tools, release 12.2, V12.2.128
Build cuda_12.2.r12.2/compiler.33053471_0

$ ncu --version

NVIDIA (R) Nsight Compute Command Line Profiler
Copyright (c) 2018-2023 NVIDIA Corporation
Version 2023.2.1.0 (build 33050884) (public-release)

$ nvidia-smi

Sun Aug 27 19:21:59 2023
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.103                Driver Version: 537.13       CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce RTX 3060 Ti     On  | 00000000:09:00.0  On |                  N/A |
|  0%   49C    P8               8W / 200W |    502MiB /  8192MiB |      3%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A        32      G   /Xwayland                                 N/A      |
+---------------------------------------------------------------------------------------+

Currently Nsight Compute only supports profiling WSL2 from Windows 11. See here:

Profiling on Windows Subsystem for Linux (WSL) is only supported with WSL version 2, NVIDIA display driver version 525 or higher and Windows 11.

Windows 10 WSL2 profiling will be added in a future version, but isn’t available at this time.

1 Like