Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] cannot use local RAFT in get_raft.cmake for building cuML this support is broken #3972

Open
Tracked by #4131
mdoijade opened this issue Jun 10, 2021 · 7 comments
Labels
bug Something isn't working CMake inactive-90d

Comments

@mdoijade
Copy link
Contributor

Describe the bug
I am adding this set(CPM_raft_SOURCE "/data/devtech_compute/raft") in get_raft.cmake as per the comment in it but it fails in cmake configure with error below.

  • Configuring done
    CMake Error at CMakeLists.txt:356 (add_library):
    Target "cuml" links to target "raft::raft" but the target was not found.
    Perhaps a find_package() call is missing for an IMPORTED target, or an
    ALIAS target is missing?
    CMake Error at CMakeLists.txt:211 (add_library):
    Target "cuml++" links to target "raft::raft" but the target was not found.
    Perhaps a find_package() call is missing for an IMPORTED target, or an
    ALIAS target is missing?
    CMake Error at test/CMakeLists.txt:149 (add_executable):
    Target "prims" links to target "raft::raft" but the target was not found.
    Perhaps a find_package() call is missing for an IMPORTED target, or an
    ALIAS target is missing?
    CMake Error at test/CMakeLists.txt:149 (add_executable):
    Target "prims" links to target "raft::raft" but the target was not found.
    Perhaps a find_package() call is missing for an IMPORTED target, or an
    ALIAS target is missing?

Steps/Code to reproduce bug
set(CPM_raft_SOURCE "/path/to/your_raft") in get_raft.cmake and perform cmake as below
cmake -DCMAKE_INSTALL_PREFIX=. -DCMAKE_CUDA_ARCHITECTURES=NATIVE ../cpp

Expected behavior
cmake should enable using RAFT from given local dir

Environment details (please complete the following information):

  • Environment location: [Bare-metal, Docker, Cloud(specify cloud provider)] - All
  • Linux Distro/Architecture: [Ubuntu 16.04 amd64] - All
  • GPU Model/Driver: [V100 and driver 396.44]
  • CUDA: [11.0 - 11.2]
  • Method of cuDF & cuML install: [from source] -

Additional context
Add any other context about the problem here.

@mdoijade mdoijade added ? - Needs Triage Need team to review and classify bug Something isn't working labels Jun 10, 2021
@mdoijade
Copy link
Contributor Author

@dantegd @teju85 for visibility.

@trxcllnt
Copy link
Collaborator

trxcllnt commented Jun 10, 2021

@mdoijade CPM should be doing this for you, but as a work around you can configure your local copy of RAFT then use its build dir as the raft_ROOT:

cmake -S /data/devtech_compute/raft/cpp \
      -B /data/devtech_compute/raft/cpp/build

cmake -S /data/devtech_compute/cuml/cpp \
      -B /data/devtech_compute/cuml/cpp/build \
      -D raft_ROOT=/data/devtech_compute/raft/cpp/build

@trxcllnt
Copy link
Collaborator

trxcllnt commented Jun 10, 2021

@mdoijade looking at it again, I think your path to the RAFT source is wrong. It should be the path to the cpp dir like this:

cmake -S /data/devtech_compute/cuml/cpp \
      -B /data/devtech_compute/cuml/cpp/build \
      -D CPM_raft_SOURCE=/data/devtech_compute/raft/cpp

@mdoijade
Copy link
Contributor Author

@trxcllnt I am getting same error as reported in description with "-D CPM_raft_SOURCE=/data/devtech_compute/raft/cpp".
I figured a temporary way to let cuML use my local raft, by setting FETCHCONTENT_SOURCE_DIR_RAFT:PATH in CMakeCache.txt

@hcho3 hcho3 removed the ? - Needs Triage Need team to review and classify label Jun 11, 2021
@dantegd
Copy link
Member

dantegd commented Jun 21, 2021

@mdoijade I'm having trouble reproducing the issue when using the CMake variable and the path to RAFT's cpp folder as Paul suggested, for example:

(ns0621) ➜  build git:(branch-21.08) ✗ pwd
/home/galahad/RAPIDS/21.08/cuml/fix-raftpath/cpp/build
(ns0621) ➜  build git:(branch-21.08) ✗ cmake .. -DCMAKE_CUDA_ARCHITECTURES="NATIVE" -DCPM_raft_SOURCE=/home/galahad/RAPIDS/21.08/cuml/raft/cpp
-- The CXX compiler identification is GNU 9.3.0
-- The CUDA compiler identification is NVIDIA 11.2.152
...

-- CPM: adding package raft@ (/home/galahad/RAPIDS/21.08/cuml/raft/cpp)
-- RAFT: No CMAKE_INSTALL_PREFIX argument detected, setting to: /home/galahad/miniconda3/envs/ns0621
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
...

-- Generating done
-- Build files have been written to: /home/galahad/RAPIDS/21.08/cuml/fix-raftpath/cpp/build

can you try using the variable from the command line like the above, clearing the build folder (to be sure) as opposed to using set to see if this still happens?

@dantegd dantegd added the CMake label Jun 21, 2021
@mdoijade
Copy link
Contributor Author

@dantegd using the "-DCPM_raft_SOURCE=/home/galahad/RAPIDS/21.08/cuml/raft/cpp" is working now for me.
I don't recall why it hadn't worked with @trxcllnt had suggested the same.

@github-actions
Copy link

This issue has been labeled inactive-90d due to no recent activity in the past 90 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CMake inactive-90d
Projects
None yet
Development

No branches or pull requests

4 participants