Skip to content

Fix Deprecated FindCUDA and Hardcoded Paths in CMake #2

@debashishc

Description

@debashishc

Ran into a couple of issues with the current CMakeLists.txt:

  1. Deprecated FindCUDA.cmake: The project uses the old find_package(CUDA) command, which is no longer supported in newer CMake versions. This causes errors or warnings during the build on updated systems.

  2. Hardcoded Conda Path: The CMake file has a hardcoded path to a specific Conda environment (/home/ksharma/anaconda3/envs/cuda-learn), which makes it non-portable. Developers have to manually change this path to match their setup.

  3. Manual wget for libtorch: The commented-out wget command for downloading libtorch requires manual uncommenting.

Suggested Fixes:

  • Switch to native CUDA support (enable_language(CUDA)) and remove the old find_package(CUDA).
  • Replace the hardcoded Conda path with dynamic detection using the CONDA_PREFIX environment variable.
  • Check if the download is required, automate the download and extraction of libtorch directly in the CMake process to streamline setup.

These changes will make the project easier to build and more portable. The pull request #1 updates these issues if you see it relevant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions