Hi, the Nsight Plugin for JupyterLab breaks when Jupyterlab is launched in any directory other than “.”
A really simple reproduce case is this:
- Set up clean Python environment and install jupyterlab
python3 -m venv .venv
source .venv/bin/activate
pip3 install jupyterlab torch jupyterlab-nvidia-nsight nvtx
- Create a test directory
mkdir test
- Run jupyterlab while passing a directory (in this case I’m passing “…”)
cd test
jupyter lab ..
- In the UI navigate to the “test” directory.
- Create a new notebook
- Enable profiilng using the plugin (either Nsight Systems or Nsight Compute)
- Profile a simple operation that uses the GPU, e.g
import torch
a = torch.randn([1024,1024], device='cuda')
a @ a
This should fail for both Nsight Systems and Nsight Compute profiling. The cell will be profiled, but then the file will not be copied to the correct location. You can still find the file in /tmp/, but this is difficult to do (more so for Nsight Compute, less so for Nsight Systems).
The bug is that it doesn’t take into account the directory where jupyter lab was launched. E.g. it works when running with “jupyter lab .” instead of “jupyter lab …”
Since you will often want to pass this argument (e.g. if you want to keep the installation of jupyterlab separate from your normal working directory), and since it’s a normal argument to jupyterlab, I think this should be supported.