Profile python script with pytorch in linux target

hi sir.
I am new in using nsight compute. Recently, I want to profile my network performance. I run the network in a docker server. I have gotten the privellige in the docker server, so I could catch some information in the gpu and cpu.
when I profile the python script from ncu windows host. I set the parameter like this



When I launch, I get this error

I don’ t know how to fix it.
And in the application executable line, I select the python.exe in my python environment, is it right?
I will do appreciate it if you could give me some help.
Good day.

The problematic part is the “No section files found in search paths”, due to which none of the selected sections, such as LaunchStats, can be found.

Section files are text-based files shipped with Nsight Compute that list the metrics to collect and their representation in the UI. During remote profiling, the UI deploys the command line and support files, including these sections, to the remote machine. It appears that most files are listed as present and up-to-date on the remote system, as indicated by the “Checking file deployment” output.

Which version of Nsight Compute are you using? if you haven’t yet, could you try the latest available, i.e. 2022.1?

In the connection settings (i.e. the part you redacted), please check to which directory the command line and sections files are deployed. Then check on the remote system if the files are truly present and accessible by the selected user. One thing I noticed about the Command Line shown in the Profile activity window is that the --section-folder option is present there, which may explain why it doesn’t work on the remote system where this path wouldn’t be valid.

1 Like

The version of Nsight compute which I use is the newest version
image
I saw that you mention ’ I noticed about the Command Line shown in the Profile activity window is that the --section-folder option is present there, which may explain why it doesn’t work on the remote system where this path wouldn’t be valid. ’ I try to copy .section file to the folder
image
and give them permission


but then it report

The directory in question is the one specified in the connection dialog. You should confirm that you have write access there.

image

image
image
Is that right?

It does look correct, yes. Maybe it’s worth trying with the default target deployment directory, to see if that makes a difference in your case.

I tried, but it didn’ t work too.


And it say the folder isn’t a writable folder, so I give the perssion like this
image
image
I need a tool to profile my network performance on the gpu, such as gpu L2 cache miss.
So any other suggestion could you give?

It is fine if it can’t deploy files to your local documents directory, as it would fallback to the default sections dir. That’s why it is only a warning. For some reason, this fallback fails. It would be useful for you to check if the sections were properly deployed to /tmp/var/sections.

1 Like

When I launch, it would create /target/linux-desktop-glibc_2_11_3-x64, and it has these files:



it doesn’t has *.section file and section folder

And I has another question, because I am using a docker server, I can’ t see the system screen.In this case,could I download the Linux Desktop file

and using in the command line to profile a python script with pytorch

I tried to populate it in advance, but it failed again


It still appears there are permission issues within the docker container to access this directory. It’s not clear from your previous descriptions if you mount the target deployment directory into the container, or if it’s a separate directory from within the container, can you clarify?

My recommendations for you would be the following:

  • First option is to simply mount your host’s Nsight Compute installation into the container file system and then run the ncu CLI from within the container. Have this generate a report file with -o and then analyze this report file with either the CLI within/outside the container, or map/copy it back to the host OS to open it in the UI.
  • Understand and solve the directory permission issues. It’s not clear if the permission info you’ve shown earlier if from within the container or from the host. Note that by default, user permissions don’t match, as the UID in the container will differ from your host user ID. You can tell docker to map your host user to your docker user to solve this, please refer to the docker documentation on how to do this. A way to confirm that this likely is the issue could be to start the container and then ssh into it with the same user/credentials you passed to Nsight Compute during the remote connection. I would expect that this user also couldn’t touch (Linux command) any files in the deployment directory, e.g. /tmp/var/sections. Yet another option could be to ssh into the container (with Nsight Compute) as root, even though that would potentially require to enable ssh for root and may not be what you want.

For further info on using Nsight Compute in container, also see: