Hi sorry for the late response
It still does not seem to be working.
Here’s what I found out
my nsys version is
NVIDIA Nsight Systems version 2024.6.2.225-246235244400v0
whereas the helper guide seems to be showcasing the information for 2025.1 Thus I am not sure whether the fix would apply or not
In any case, when I tried running the first command
it seems to be unable to recognize the -z flag
aryan2004~/learning_cuda/cuda-course/05_Writing_your_First_Kernels/03 Profiling$ mkdir -p "$(dirname "$(nsys -Z)")"
Unknown command: -Z
mkdir: cannot create directory ‘ usage: nsys [--version] [--help] <command> [<args>] [application] [<application args>]\n\n The most commonly used nsys commands are:\n\tprofile Run an application and capture its profile into a nsys-rep file.\n\tlaunch Launch an application ready to be profiled.\n\tstart Start a profiling session.\n\tstop Stop a profiling session and capture its profile into a nsys-rep file.\n\tcancel Cancel a profiling session and discard any collected data.\n\tservice Launch the Nsight Systems data service.\n\tstats Generate statistics from an existing nsys-rep or SQLite file.\n\tstatus Provide current status of CLI or the collection environment.\n\tshutdown Disconnect launched processes from the profiler and shutdown the profiler.\n\tsessions list List active sessions.\n\texport Export nsys-rep file into another format.\n\tanalyze Identify optimization opportunities in a nsys-rep or SQLITE file.\n\trecipe Run a recipe for multi-node analysis.\n\tnvprof Translate nvprof switches to nsys switches and execute collection.\n\n Use 'nsys --help <command>' for more information about a specific command.\n\n To run a basic profiling session: nsys profile .’: File name too long
aryan2004~/learning_cuda/cuda-course/05_Writing_your_First_Kernels/03 Profiling$
Thus, I tried the following workarounds
mkdir -p ~/.nsight-systems
echo 'CuptiUseRawGpuTimestamps=false' >> ~/.nsight-systems/config
cat ~/.nsight-systems/config
I even tried exporting
export NSYS_CUPTI_SYNC=1
but that had no luck.
Unfortunately i cannot run it with sudo since all my cuda toolkit is on user mode and thus sudo does not recognize nsys
When I run it in powershell however, while gpu data is recognized
it seems to have a failure to link lnvtoolsext (so kernel profiling doesnt work)
even though it says that cuda toolkit should include nvtx
Thus, any advice for either
fixing it on wsl
rectifying the issue on powershell
PS C:\Users\aryan\Downloads\cuda_project> nvcc -o 00 "00_nvtx_matmul.cu" -lnvToolsExt
nvcc warning : Support for offline compilation for architectures prior to '<compute/sm/lto>_75' will be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
00_nvtx_matmul.cu
tmpxft_00001450_00000000-10_00_nvtx_matmul.cudafe1.cpp
LINK : fatal error LNK1181: cannot open input file 'nvToolsExt.lib'
PS C:\Users\aryan\Downloads\cuda_project>
Would be very helpful
EDIT for POWERSHELL: forgot to add this information, but when i tried looking through the cuda installer nvtx is nowhere to be found and the github for nvtx does not have a lib section at all because nvtx is apparently all headers now, so if powershell is the way to go (and wsl wont work), then some help for fixing this would also be very helpful!