I’m trying to profile the training/inference of a CNN using Nsight. The issue is that the script runs within a conda environment. How can I configure the Nsight to run the script in the designated environment?
So far I tried inserting the python interpreter in Nsight GUI but that doesn’t work
I tested the scenario you described and have concluded there is a bug in Nsight Systems 2021.1.1 that prevents the tracing of this scenario on Windows.
The bug fix will be included in the next NVIDIA Nsight Systems public release.
Note: to trace anaconda python with Nsight Systems, use a simple batch file similar to the one below. You can designate the batch file as the target app that Nsight Systems will launch for profiling. Either the CLI or the host GUI can be used to launch this batch file.
Sample batch file for launching Anaconda python scripts:
call conda activate base
Hi, Thanks for the answer!
I modified the suggested batch file to fit my environment but still Nsight Systems can’t handle it (something crashes during profiling…). On the other hand, running the my script from the default CLI works well. One minor difference between us might be that you are using the “base” environment while I’m using a regular conda environment. For comparison, my batch file is as follows:
I have the same problem in Linux right now. Even though I changed the default environment of conda, still when I use nsys command line, it does not recognize my conda environment. How can I solve this problem?