NVIDIA / nsight-vscode-edition

A Visual Studio Code extension for building and debugging CUDA applications.
Other
68 stars 11 forks source link

[Off-topic?] Nsight compute conda installation broken #42

Closed safelix closed 3 months ago

safelix commented 3 months ago

Hi there,

I guess this question is a bit off-topic, but maybe you could forward this internally?

Problem: After installing the nsight compute through conda, it doesn't launch with the error message:

ERROR : nsight-compute directory is not found under <conda-path>/../ or /opt/nvidia. Nsight Compute is not installed on your system.

Solution: The problem seems that the installation directory structure only accounts for the nsight-compute-<version> instead of the nsight-compute/<version> format. To fix this, I simply added the following code to the $CUDA_TOOLKIT_BIN_DIR/../ncu and $CUDA_TOOLKIT_BIN_DIR/../ncu-ui bash files on line 47:

# If installed with cuda, nsight-compute tools will be under nsight-compute/<version> folder. e.g nsight-compute/2019.4.0
for nsight_compute_tool_dir_path in "$CUDA_TOOLKIT_BIN_DIR"/../nsight-compute/*; do
    if [ ! -e "$nsight_compute_tool_dir_path" ]; then
        # Glob didn't match anything. Let's skip this single iteration.
        continue
    fi
    setLatestNsightComputeToolDir "$(basename "$nsight_compute_tool_dir_path")" "$nsight_compute_tool_dir_path"
done

The only mention of this issue I found is here: https://github.com/HazyResearch/ThunderKittens/blob/main/docs/conda_setup.md

Best, Felix

sanannavyaa commented 3 months ago

For questions related to Nsight Compute, please reach out to them via their forum https://forums.developer.nvidia.com/c/developer-tools/nsight-compute/114