Hi, I just recently learned of the VSCE of NVIDIA Nsight, and as a cuda developer working with VS code, it sounded great! I watched some of the videos, followed the installation instructions here:
but can’t seem to get any features of the extension to work (no syntax highlighting, no intellisense, debugger won’t even start). Is there any additional information on how to help set this up? The extension seems incredibly useful, but I can’t seem to get it to work, despite satisfying the indicated requirements.
My machine info is:
Ubuntu 20.04
CUDA toolkit 11.3 + GTX 1080 Ti
Driver: NVIDIA 465.19.01
VS code 1.57.1 with C/C++ extension 1.4.1
version of NSight VSCE installed: v2021.1.30087489
For additional information on the debug configuration (the main feature I hope to use in this extension), the relevant part of my launch.json is given below:
Yes, vscode-cpptools extension is installed with version 1.4.1
I have it set to auto-detect, which was apparently still seeing .cu files as C++ rather than cuda. Setting it to CUDA C++ manually does seem to address the syntax highlighting issue. It would be nicer if it would automatically know that .cu / .cuh are CUDA C++, but the manual workaround is still an improvement!
In the debug tab, I have selected the configuration corresponding to the launch.json provided above, labeled “CUDA C++: Launch”
The debug console was printing that cuda-gdb could not be found, despite it being on my PATH. But, running cuda-gdb from the command line revealed that it was missing some shared libraries. After installing those two shared libraries again (libtinfo.so.5, libncursesw.so.5), cuda-gdb from the command line works, and so does the VSCE of NVIDIA Nsight!
For the sake of completeness, I used locate libxxxx to find out that those two libraries existed in other places on my machine already. Then, I copied them to /usr/lib/x86_64_linux_gnu/ (which is in my LD_LIBRARY_PATH), and then cuda-gdb was working again.