Nsight System can't profile simple Python script after 2021.1.1 version

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:

import numpy

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?