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
10 changes: 5 additions & 5 deletions cpp/test/matrix/select_k.cu
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,9 @@ struct SelectK // NOLINT
auto& in_dists = ref.get_in_dists();
auto compare_ids = [&in_ids, &in_dists](const IdxT& i, const IdxT& j) {
if (i == j) return true;
auto ix_i = uint64_t(std::find(in_ids.begin(), in_ids.end(), i) - in_ids.begin());
auto ix_j = uint64_t(std::find(in_ids.begin(), in_ids.end(), j) - in_ids.begin());
if (ix_i >= in_ids.size() || ix_j >= in_ids.size()) return false;
auto ix_i = int64_t(std::find(in_ids.begin(), in_ids.end(), i) - in_ids.begin());
auto ix_j = int64_t(std::find(in_ids.begin(), in_ids.end(), j) - in_ids.begin());
if (size_t(ix_i) >= in_ids.size() || size_t(ix_j) >= in_ids.size()) return false;
ahendriksen marked this conversation as resolved.
Show resolved Hide resolved
auto dist_i = in_dists[ix_i];
auto dist_j = in_dists[ix_j];
if (dist_i == dist_j) return true;
Expand Down Expand Up @@ -430,7 +430,7 @@ INSTANTIATE_TEST_CASE_P( // NOLINT
select::Algo::kWarpDistributedShm)));

using ReferencedRandomDoubleSizeT =
SelectK<double, uint64_t, with_ref<select::Algo::kPublicApi>::params_random>;
SelectK<double, int64_t, with_ref<select::Algo::kPublicApi>::params_random>;
TEST_P(ReferencedRandomDoubleSizeT, Run) { run(); } // NOLINT
INSTANTIATE_TEST_CASE_P( // NOLINT
SelectK,
Expand All @@ -457,7 +457,7 @@ INSTANTIATE_TEST_CASE_P( // NOLINT
select::Algo::kRadix11bitsExtraPass)));

using ReferencedRandomFloatSizeT =
SelectK<float, uint64_t, with_ref<select::Algo::kRadix8bits>::params_random>;
SelectK<float, int64_t, with_ref<select::Algo::kRadix8bits>::params_random>;
TEST_P(ReferencedRandomFloatSizeT, LargeK) { run(); } // NOLINT
INSTANTIATE_TEST_CASE_P(SelectK, // NOLINT
ReferencedRandomFloatSizeT,
Expand Down