-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Work in progress, build defined for float inputs
- Loading branch information
Showing
8 changed files
with
517 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright (c) 2022, 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/neighbors/ivf_pq.cuh> | ||
#include <raft/neighbors/specializations/ivf_pq_specialization.hpp> | ||
|
||
namespace raft::neighbors::ivf_pq { | ||
|
||
#define RAFT_INST_BUILD_EXTEND(T, IdxT) \ | ||
template auto build<T, IdxT>(const handle_t& handle, \ | ||
const index_params& params, \ | ||
const T* dataset, \ | ||
IdxT n_rows, \ | ||
uint32_t dim) \ | ||
->index<IdxT>; \ | ||
\ | ||
template auto extend<T, IdxT>(const handle_t& handle, \ | ||
const index<IdxT>& orig_index, \ | ||
const T* new_vectors, \ | ||
const IdxT* new_indices, \ | ||
IdxT n_rows) \ | ||
->index<IdxT>; | ||
|
||
RAFT_INST_BUILD_EXTEND(float, int64_t); | ||
RAFT_INST_BUILD_EXTEND(int8_t, int64_t); | ||
RAFT_INST_BUILD_EXTEND(uint8_t, int64_t); | ||
|
||
// RAFT_INST_BUILD_EXTEND(float, uint32_t); | ||
// RAFT_INST_BUILD_EXTEND(float, uint64_t); | ||
|
||
#undef RAFT_INST_BUILD_EXTEND | ||
|
||
} // namespace raft::neighbors::ivf_pq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright (c) 2022, 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/neighbors/ivf_pq.cuh> | ||
#include <raft/neighbors/specializations/ivf_pq_specialization.hpp> | ||
|
||
namespace raft::neighbors::ivf_pq { | ||
|
||
#define RAFT_SEARCH_INST(T, IdxT) \ | ||
template void search<T, IdxT>(const handle_t&, \ | ||
const search_params&, \ | ||
const index<IdxT>&, \ | ||
const T*, \ | ||
uint32_t, \ | ||
uint32_t, \ | ||
IdxT*, \ | ||
float*, \ | ||
rmm::mr::device_memory_resource*); | ||
|
||
RAFT_SEARCH_INST(float, int64_t); | ||
RAFT_SEARCH_INST(float, uint32_t); | ||
RAFT_SEARCH_INST(float, uint64_t); | ||
|
||
#undef RAFT_INST_SEARCH | ||
|
||
} // namespace raft::neighbors::ivf_pq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.