Skip to content

Commit

Permalink
ANN_BENCH: split instances of RaftCagra into multiple files (#2313)
Browse files Browse the repository at this point in the history
Split instances of RaftCagra into multiple files to compile them in parallel and thus reduce the total benchmark compile time.

Authors:
  - Artem M. Chirkin (https://github.com/achirkin)

Approvers:
  - Robert Maynard (https://github.com/robertmaynard)
  - Corey J. Nolet (https://github.com/cjnolet)

URL: #2313
  • Loading branch information
achirkin authored May 15, 2024
1 parent ee2a0ba commit 92d4301
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 4 deletions.
5 changes: 4 additions & 1 deletion cpp/bench/ann/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,10 @@ if(RAFT_ANN_BENCH_USE_RAFT_CAGRA)
RAFT_CAGRA
PATH
bench/ann/src/raft/raft_benchmark.cu
$<$<BOOL:${RAFT_ANN_BENCH_USE_RAFT_CAGRA}>:bench/ann/src/raft/raft_cagra.cu>
$<$<BOOL:${RAFT_ANN_BENCH_USE_RAFT_CAGRA}>:bench/ann/src/raft/raft_cagra_float.cu>
$<$<BOOL:${RAFT_ANN_BENCH_USE_RAFT_CAGRA}>:bench/ann/src/raft/raft_cagra_half.cu>
$<$<BOOL:${RAFT_ANN_BENCH_USE_RAFT_CAGRA}>:bench/ann/src/raft/raft_cagra_int8_t.cu>
$<$<BOOL:${RAFT_ANN_BENCH_USE_RAFT_CAGRA}>:bench/ann/src/raft/raft_cagra_uint8_t.cu>
LINKS
raft::compiled
)
Expand Down
20 changes: 20 additions & 0 deletions cpp/bench/ann/src/raft/raft_cagra_float.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright (c) 2023-2024, 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 "raft_cagra_wrapper.h"

namespace raft::bench::ann {
template class RaftCagra<float, uint32_t>;
} // namespace raft::bench::ann
20 changes: 20 additions & 0 deletions cpp/bench/ann/src/raft/raft_cagra_half.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright (c) 2023-2024, 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 "raft_cagra_wrapper.h"

namespace raft::bench::ann {
template class RaftCagra<half, uint32_t>;
} // namespace raft::bench::ann
20 changes: 20 additions & 0 deletions cpp/bench/ann/src/raft/raft_cagra_int8_t.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright (c) 2023-2024, 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 "raft_cagra_wrapper.h"

namespace raft::bench::ann {
template class RaftCagra<int8_t, uint32_t>;
} // namespace raft::bench::ann
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,4 @@

namespace raft::bench::ann {
template class RaftCagra<uint8_t, uint32_t>;
template class RaftCagra<int8_t, uint32_t>;
template class RaftCagra<half, uint32_t>;
template class RaftCagra<float, uint32_t>;
} // namespace raft::bench::ann

0 comments on commit 92d4301

Please sign in to comment.