-
Notifications
You must be signed in to change notification settings - Fork 203
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
Fix compile failure on RTX 4090 #2076
Conversation
/ok to test |
Hi, cjnolet. I see a - * Copyright (c) 2023, NVIDIA CORPORATION.
+ * Copyright (c) 2023-2024, NVIDIA CORPORATION. or waiting for the raft group to replace all the copyright information? |
@JieFengWang Yes, if you could go ahead and update the header, that would be much appreciated. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix.
I have a couple of questions since we don't have 4090's as part of of our general CI and testing process.
-
After compiling the template project with this change, does it also run without error on the 4090 hardware?
-
Did you also compile the libraft shared library from source or did it work with the pre-installed libraft from conda/pip?
Holding this open for now because sm_89 requires a larger discussion across RAPIDS infrastructure. RAPIDS only builds for sm_80 and sm_86, which should be able to run on sm_89 hardware but this has not been officially tested for RAFT yet. It will be helpful to know if it works for you.
Please feel free to build with this change in the meantime!
@JieFengWang an easy way to make sure your commits always pass the style checker is to use Of course, you can always make the change manually but pre-commit tends to make the process much easier. |
[100%] Linking CUDA executable CAGRA_EXAMPLE
[100%] Built target CAGRA_EXAMPLE
jfwang@ubuntu:~/proj/learn_raft$ ./build/CAGRA_EXAMPLE
Building CAGRA index (search graph)
CAGRA index has 10000 vectors
CAGRA graph has degree 64, graph size [10000, 64]
Query 0 neighbor indices: =[4229,5859,4754,6069,7114,6124,6994,2289,5354,1864,5544,6589];
Query 0 neighbor distances: =[2169.71,2186.09,2205.57,2213.63,2216.48,2217.08,2223.38,2224.23,2224.99,2225.29,2226.21,2228.28];
Query 1 neighbor indices: =[4229,1864,5859,6069,8219,5354,4754,2289,4129,7114,5154,2309];
Query 1 neighbor distances: =[2206.34,2236.74,2237.02,2240.71,2246.73,2248.51,2248.52,2249.27,2249.59,2251.96,2255.32,2256.21];
|
…sue (rapidsai#2073) Signed-off-by: jeff <[email protected]>
bac6351
to
bb6aca8
Compare
Got it. I have modified it manually since I am new to |
/ok to test |
Thanks for the summary, @JieFengWang. That's super helpful. RAPIDS packages are built for Note that we check #if (__CUDA_ARCH__ >= 860) && (__CUDA_ARCH__ < 900) The question now is whether or not this change will work nicely when building against the RAFT pre-compiled library. I think we will need to test this also for completeness. |
@cjnolet Yes, is there anything else I can do next? I only have the RTX3090 (sm86) and RTX4090 (sm89) available for testing. |
@JieFengWang I think a good initial test here would be to build and install libraft for the sm_86 architecture and then try building and running the example template for the sm_89 architecture (using the libraft that was built for sm_86). If you are able to do this test with your 3090 and 4090 cards then that would be a massive help. |
@cjnolet If installing libraft from source, this may be a bit tricky. Because the 3090 and 4090 are not on the same physical machine. Can I compile a python wheel file, then copy the |
@JieFengWang Got it. Actually, it's possible to build libraft for an architecture that isn't installed in the machine, so the easiest route might be to build and install libraft for sm_80 and sm_86, then use that version of libraft to build the example template for sm_89. |
@cjnolet Got it, but I may need your some help. I know how to set this architecture in simple CUDA projects via cmake if(NOT BUILD_CPU_ONLY)
# CUDA runtime
rapids_cuda_init_runtime(USE_STATIC ${CUDA_STATIC_RUNTIME})
# * find CUDAToolkit package
# * determine GPU architectures
# * enable the CMake CUDA language
# * set other CUDA compilation flags
rapids_find_package(
CUDAToolkit REQUIRED
BUILD_EXPORT_SET raft-exports
INSTALL_EXPORT_SET raft-exports
)
else()
add_compile_definitions(BUILD_CPU_ONLY)
endif() |
Hi @JieFengWang, The easiest way to compile and install
Of course, this may take awhile to compile since it'll build for all of the supported architectures. You can modify the script and change where it sets If you still have trouble building, another thing we can try is to short circuit the build by installing the nightly of raft (through conda or pip) and then modifying the nn_descent header in place in the installed version. That might be the quickest way to test this. |
Co-authored-by: Corey J. Nolet <[email protected]>
@cjnolet Sorry for being a bit busy in the last few days. Got it, I will test it ASAP. |
/ok to test |
Hi @cjnolet . This is my recent attempt. after I installed the nightly raft via mamba, the compile of
The compile is fast and smoothly. Unlink my previous attempt (compile with only the template folder, no installation from source code , no installation from /conda/pip/mamba) , there is no full |
Thanks for checking this @JieFengWang. We've had a few folks verify this internally as well and I think we're good aceept it. Thanks for the contribution! |
/ok to test |
/ok to test |
/ok to test |
/merge |
[bug]Fix compile failure on RTX 4090. related issue (#2073)