Hi, so I installed the latest Nsight 2021.5.1 and tried to profile some Python code it just hangs when I try and start profiling. I narrowed down a simple repro. If I create a python file with just:
Then profile that in the UI, I specify the full path to Python and this file then I see a window open, print Hello and all is well. If I however put this in the file:
Then when I start profiling we just hang and never get going. I tried going back versions and the last time I could get this to work was on the 2021.1.1 version of Nsight System.
Any ideas? I obviously have a workaround for this case in being able to use the old version for now, but it seems a bit problematic, but I think when I tried to profile what I actually wanted on my real code that version had trouble turning on CUDA profiling. Thanks
@liuyis does this look like the other python issue?
@rperkins Which system were you using? Was that Windows 10 or Windows 11?
@hwilper We have an internal ticket opened about python hanging at
import numpy when being profiled by Nsys, but that’s on Windows 11. This looks very similiar to it.
It is indeed Windows 11 on the latest insider builds.
Got it, that’s the same issue then. Still thanks for reporting it. We’re currently investigating it and making a fix. I’ll let you know when a fix is publicly available.
Great, thanks for confirming. Is there any known ways to work around this on that platform before then?
@dofek Do you know any WAR for this?
I’m new to NVIDIA/NSight tools and am struggling to even get it to run. My simple test just happened to include NumPy, is this the reason nothing is working? I’m using 2022.4.1, does that still not work with any Python that includes NumPy?
I’m going to presume that you are on Win 11 as well?
@dofek, can you respond?
I tested the scenario you described on Win11 64bit and could not reproduce the problem.
Can you share more details about your environment?
- Windows version
- Python version
- NumPy version
- Nsight Systems project settings - which features did you include in the trace?
- NVIDIA driver version
Also, could you follow these steps to capture a log file and upload it here?
- Please copy the file
C:\Program Files\NVIDIA Corporation\Nsight Systems 2022.4.1\host-windows-x64\nvlog.config.template to the python folder (e.g. C:\Users<your-user-name>\AppData\Local\Programs\Python\Python39), and rename the new file to
- Run Nsight Systems and capture a trace session (either by the
nsys-ui host or
- A log file named
nsys-ui.log should appear in the python folder. Please share it here.
@dofek I literally can’t even work out what text I’m supposed to type into what box in the interface to get a Python file to run and have the results logged. All the online help is about the command line, nothing seems to explain this with a nice simple example. I can get it to pop up a black window, but should I expect to be able to see my print statements show up in that window so that I can troubleshoot? Just some screenshots of it actually working would be incredibly helpful.