Skip to content

Commit

Permalink
Try to reproduce issue rapidsai#1490
Browse files Browse the repository at this point in the history
I cannot reproduce the linker error. Building with clang 11.1 and nvcc
11.8. Both test files have raft::cache::(anonymous
namespace)::get_cache_idx defined though..

$ nm -g -C cpp/build/CMakeFiles/UTILS_TEST.dir/test/util/get_cache_idx_1.cu.o | grep get_cache_idx
                 U __cudaRegisterLinkedBinary_667dac6a_18_get_cache_idx_1_cu_eeb3336e_3832672
0000000000000000 D __fatbinwrap_667dac6a_18_get_cache_idx_1_cu_eeb3336e_3832672
0000000000000010 T __device_stub__ZN4raft5cache59_GLOBAL__N__667dac6a_18_get_cache_idx_1_cu_eeb3336e_383267213get_cache_idxEPiiS2_iiS2_S2_Pbi(int*, int, int*, int, int, int*, int*, bool*, int)
0000000000000000 T raft::cache::(anonymous namespace)::get_cache_idx(int*, int, int*, int, int, int*, int*, bool*, int)

$ nm -g -C cpp/build/CMakeFiles/UTILS_TEST.dir/test/util/get_cache_idx_2.cu.o | grep get_cache_idx
                 U __cudaRegisterLinkedBinary_74c80384_18_get_cache_idx_2_cu_a658dc80
0000000000000000 D __fatbinwrap_74c80384_18_get_cache_idx_2_cu_a658dc80
0000000000000010 T __device_stub__ZN4raft5cache51_GLOBAL__N__74c80384_18_get_cache_idx_2_cu_a658dc8013get_cache_idxEPiiS2_iiS2_S2_Pbi(int*, int, int*, int, int, int*, int*, bool*, int)
0000000000000000 T raft::cache::(anonymous namespace)::get_cache_idx(int*, int, int*, int, int, int*, int*, bool*, int)
  • Loading branch information
ahendriksen committed May 5, 2023
1 parent 2dfbe83 commit 730b8a5
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cpp/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -372,5 +372,13 @@ if(BUILD_TESTS)
ConfigureTest(
NAME UTILS_TEST PATH test/core/seive.cu test/util/bitonic_sort.cu test/util/cudart_utils.cpp
test/util/device_atomics.cu test/util/integer_utils.cpp test/util/pow2_utils.cu
test/util/get_cache_idx_1.cu
test/util/get_cache_idx_2.cu
)
set_target_properties(
UTILS_TEST
PROPERTIES
CUDA_SEPARABLE_COMPILATION ON
)

endif()
19 changes: 19 additions & 0 deletions cpp/test/util/get_cache_idx_1.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright (c) 2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#include <gtest/gtest.h>
#include <raft/util/cache.cuh>

19 changes: 19 additions & 0 deletions cpp/test/util/get_cache_idx_2.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright (c) 2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#include <gtest/gtest.h>
#include <raft/util/cache.cuh>

0 comments on commit 730b8a5

Please sign in to comment.