Closed gdaisukesuzuki closed 4 months ago
Before applying this patch, a message like the following appeared, causing the compilation to fail. (Of course, I have set the paths for the CUDA libraries, header files, etc.)
FAILED: pylibcugraph/components/CMakeFiles/_connectivity.dir/_connectivity.cxx.o
/usr/bin/c++ -DNO_CUGRAPH_OPS -D_connectivity_EXPORTS -isystem /usr/include/python3.11 -march=rocketlake -mtune=native -O3 -pipe -fno-plt -fexceptions -I/opt/cuda/include -DSPDLOG_FMT_EXTERNAL -DFMT_USE_CONSTEXPR -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2,-D_GLIBCXX_ASSERTIONS -fstack-clash-protection -freport-bug -fcf-protection -O3 -DNDEBUG -fPIC -MD -MT pylibcugraph/components/CMakeFiles/_connectivity.dir/_connectivity.cxx.o -MF pylibcugraph/components/CMakeFiles/_connectivity.dir/_connectivity.cxx.o.d -o pylibcugraph/components/CMakeFiles/_connectivity.dir/_connectivity.cxx.o -c /home/dai/PKGBUILD/python-cugraph/src/cugraph/python/pylibcugraph/build/cp311-cp311-manylinux_2_39_x86_64/pylibcugraph/components/_connectivity.cxx
In file included from /home/dai/PKGBUILD/python-cugraph/src/cugraph/python/pylibcugraph/build/cp311-cp311-manylinux_2_39_x86_64/pylibcugraph/components/_connectivity.cxx:1217:
/usr/include/rmm/cuda_stream_view.hpp:67:30: error: ‘cuda’ has not been declared
67 | constexpr cuda_stream_view(cuda::stream_ref stream) noexcept : stream_{stream.get()} {}
| ^~~~
/usr/include/rmm/cuda_stream_view.hpp:67:46: error: expected ‘)’ before ‘stream’
67 | constexpr cuda_stream_view(cuda::stream_ref stream) noexcept : stream_{stream.get()} {}
| ~ ^~~~~~~
| )
/usr/include/rmm/cuda_stream_view.hpp:67:88: error: expected unqualified-id before ‘{’ token
67 | constexpr cuda_stream_view(cuda::stream_ref stream) noexcept : stream_{stream.get()} {}
| ^
/usr/include/rmm/cuda_stream_view.hpp:88:22: error: ‘cuda’ does not name a type; did you mean ‘cudaPos’?
88 | constexpr operator cuda::stream_ref() const noexcept { return value(); }
| ^~~~
| cudaPos
In file included from /usr/include/raft/util/memory_pool-ext.hpp:18,
from /usr/include/raft/util/memory_pool.hpp:19,
from /usr/include/raft/util/cudart_utils.hpp:21,
from /usr/include/raft/core/interruptible.hpp:23,
from /usr/include/raft/core/resource/cuda_stream.hpp:18,
from /usr/include/raft/core/resource/cublas_handle.hpp:19,
from /usr/include/raft/core/device_resources.hpp:24,
from /usr/include/raft/core/handle.hpp:19,
from /home/dai/PKGBUILD/python-cugraph/src/cugraph/python/pylibcugraph/build/cp311-cp311-manylinux_2_39_x86_64/pylibcugraph/components/_connectivity.cxx:1219:
/usr/include/rmm/mr/device/device_memory_resource.hpp:347:59: error: ‘cuda’ has not been declared
347 | friend void get_property(device_memory_resource const&, cuda::mr::device_accessible) noexcept {}
| ^~~~
/usr/include/rmm/mr/device/device_memory_resource.hpp:396:15: error: ‘cuda’ has not been declared
396 | static_assert(cuda::mr::async_resource_with<device_memory_resource, cuda::mr::device_accessible>);
| ^~~~
/usr/include/rmm/mr/device/device_memory_resource.hpp:396:67: error: expected primary-expression before ‘,’ token
396 | static_assert(cuda::mr::async_resource_with<device_memory_resource, cuda::mr::device_accessible>);
| ^
/usr/include/rmm/mr/device/device_memory_resource.hpp:396:69: error: expected string-literal before ‘cuda’
396 | static_assert(cuda::mr::async_resource_with<device_memory_resource, cuda::mr::device_accessible>);
| ^~~~
/usr/include/rmm/mr/device/device_memory_resource.hpp:396:68: error: expected ‘)’ before ‘cuda’
396 | static_assert(cuda::mr::async_resource_with<device_memory_resource, cuda::mr::device_accessible>);
| ~ ^~~~~
| )
In file included from /usr/include/rmm/mr/device/pool_memory_resource.hpp:27,
from /usr/include/raft/util/memory_pool-inl.hpp:24,
from /usr/include/raft/util/memory_pool.hpp:22:
/usr/include/rmm/resource_ref.hpp:32:29: error: ‘cuda’ does not name a type; did you mean ‘cudaPos’?
32 | using device_resource_ref = cuda::mr::resource_ref<cuda::mr::device_accessible>;
| ^~~~
| cudaPos
....
This looks due to an improper rmm
installation. The rmm package will export the requirement ( https://github.com/rapidsai/rmm/blob/branch-24.04/CMakeLists.txt#L97 ) which will be transitively picked up by since it is a PUBLIC dependency of the cugraph::cugraph
target.
It looks like you have a system installed rmm
under /usr
it would be good to see what the contents of rmm-targets.cmake
is ( /usr/lib/cmake/rmm/
)
@gdaisukesuzuki , have you had a chance to check your rmm
installation as @robertmaynard suggested?
reopen if this is still an issue.
Version
24.04
Which installation method(s) does this occur on?
Source
Describe the bug.
Some files under folder "python" cannot be built because the namespace "cuda" is not explicitly declared.
Solution: In the CMakeLists.txt related to the associated files, define the macro "LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE" to explicitly declare the namespace "cuda". The specific patch is as follows:
Minimum reproducible example
No response
Relevant log output
Refer to the following comment
Environment details
Linux 6.8.1 glibc 2.39 gcc 13.2 cuda 12.4 cmake 3.28.3
Other/Misc.
No response
Code of Conduct