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

[ENH] [3/5] Header structure: force explicit instantiation in tests and benchmarks #1439

Closed
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d9801e8
MV: add -inl suffix to header paths
ahendriksen Apr 20, 2023
50b374d
MV: raft_runtime src files
ahendriksen Apr 13, 2023
8974ae3
FIX: add missing includes
ahendriksen Apr 20, 2023
95ef31b
FIX: getWorkspaceSize
ahendriksen Apr 20, 2023
7edcb6a
PREP: Separate rbf_fin_op
ahendriksen Apr 20, 2023
71de7bd
PREP: registers: Add _types header
ahendriksen Apr 20, 2023
541cabc
Change RAFT_COMPILED from INTERFACE to PUBLIC
ahendriksen Apr 20, 2023
d81b14e
Define RAFT_EXPLICIT and RAFT_EXPLICIT_INSTANTIATE_ONLY
ahendriksen Apr 20, 2023
48ea769
Update docs
ahendriksen Apr 20, 2023
e6bb5d5
Replace specializations by split headers
ahendriksen Apr 20, 2023
ff79abf
Deprecate specialization headers
ahendriksen Apr 20, 2023
c9e7413
Add interleaved scan instances
ahendriksen Apr 20, 2023
0c889dc
Separate fused_l2_nn_helpers
ahendriksen Apr 20, 2023
f97b2a8
Remove pairwise_matrix_instantiation_point
ahendriksen Apr 20, 2023
fb637f7
Rename specialization => instantiation
ahendriksen Apr 20, 2023
7b065af
test/neighbors/selection.cu: Expose kFaissMaxK
ahendriksen Apr 20, 2023
d5b5673
Remove includes of specialization headers
ahendriksen Apr 20, 2023
94d8117
test/distance/dist_adj.cu: Add instance
ahendriksen Apr 20, 2023
361570b
test/cluster/linkage.cu: Allow instance
ahendriksen Apr 20, 2023
5171de3
test/sparse/neighbors/connect_components.cu: Allow instance
ahendriksen Apr 20, 2023
4426c50
test/neighbors/ann_ivf_pq/test_float_uint32_t.cu: Allow instance
ahendriksen Apr 20, 2023
e527efc
test/matrix/select_k.cu: Change index type
ahendriksen Apr 20, 2023
17902e9
test/neighbors/fused_l2_knn.cu: Change index type
ahendriksen Apr 20, 2023
976189b
Force explicit instantiations in tests
ahendriksen Apr 20, 2023
bdae61d
Force explicit instantiations in benchmarks
ahendriksen Apr 20, 2023
b0b8fe5
Test that headers are free standing
ahendriksen Apr 20, 2023
4b9700e
Update cpp/test/matrix/select_k.cu
ahendriksen Apr 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions cpp/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

function(ConfigureTest)

set(options OPTIONAL LIB)
set(options OPTIONAL LIB EXPLICIT_INSTANTIATE_ONLY)
ahendriksen marked this conversation as resolved.
Show resolved Hide resolved
set(oneValueArgs NAME)
set(multiValueArgs PATH TARGETS CONFIGURATIONS)

Expand Down Expand Up @@ -59,6 +59,10 @@ function(ConfigureTest)
"$<$<COMPILE_LANGUAGE:CUDA>:${RAFT_CUDA_FLAGS}>"
)

if(ConfigureTest_EXPLICIT_INSTANTIATE_ONLY)
target_compile_definitions(${TEST_NAME} PRIVATE "RAFT_EXPLICIT_INSTANTIATE_ONLY")
endif()

target_include_directories(${TEST_NAME} PUBLIC "$<BUILD_INTERFACE:${RAFT_SOURCE_DIR}/test>")

install(
Expand Down Expand Up @@ -88,6 +92,7 @@ if(BUILD_TESTS)
test/cluster/kmeans_find_k.cu
OPTIONAL
LIB
EXPLICIT_INSTANTIATE_ONLY
)

ConfigureTest(
Expand All @@ -112,6 +117,9 @@ if(BUILD_TESTS)
test/core/span.cu
test/core/temporary_device_buffer.cu
test/test.cpp
OPTIONAL
LIB
EXPLICIT_INSTANTIATE_ONLY
)

ConfigureTest(
Expand Down Expand Up @@ -141,6 +149,7 @@ if(BUILD_TESTS)
test/distance/gram.cu
OPTIONAL
LIB
EXPLICIT_INSTANTIATE_ONLY
)

ConfigureTest(NAME LABEL_TEST PATH test/label/label.cu test/label/merge_labels.cu)
Expand Down Expand Up @@ -202,6 +211,7 @@ if(BUILD_TESTS)
test/sparse/spectral_matrix.cu
OPTIONAL
LIB
EXPLICIT_INSTANTIATE_ONLY
)

ConfigureTest(
Expand All @@ -221,7 +231,7 @@ if(BUILD_TESTS)

ConfigureTest(
NAME SOLVERS_TEST PATH test/cluster/cluster_solvers_deprecated.cu test/linalg/eigen_solvers.cu
test/lap/lap.cu test/sparse/mst.cu OPTIONAL LIB
test/lap/lap.cu test/sparse/mst.cu OPTIONAL LIB EXPLICIT_INSTANTIATE_ONLY
)

ConfigureTest(
Expand All @@ -246,11 +256,19 @@ if(BUILD_TESTS)

ConfigureTest(
NAME SPARSE_DIST_TEST PATH test/sparse/dist_coo_spmv.cu test/sparse/distance.cu OPTIONAL LIB
EXPLICIT_INSTANTIATE_ONLY
)

ConfigureTest(
NAME SPARSE_NEIGHBORS_TEST PATH test/sparse/neighbors/connect_components.cu
test/sparse/neighbors/brute_force.cu test/sparse/neighbors/knn_graph.cu OPTIONAL LIB
NAME
SPARSE_NEIGHBORS_TEST
PATH
test/sparse/neighbors/connect_components.cu
test/sparse/neighbors/brute_force.cu
test/sparse/neighbors/knn_graph.cu
OPTIONAL
LIB
EXPLICIT_INSTANTIATE_ONLY
)

ConfigureTest(
Expand All @@ -276,6 +294,7 @@ if(BUILD_TESTS)
test/neighbors/selection.cu
OPTIONAL
LIB
EXPLICIT_INSTANTIATE_ONLY
)

ConfigureTest(
Expand Down Expand Up @@ -309,6 +328,7 @@ if(BUILD_TESTS)
test/stats/v_measure.cu
OPTIONAL
LIB
EXPLICIT_INSTANTIATE_ONLY
)

ConfigureTest(
Expand Down