-
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.
Splitting fused l2 knn specializations (#461)
Authors: - Corey J. Nolet (https://github.com/cjnolet) Approvers: - Dante Gama Dessavre (https://github.com/dantegd) URL: #461
- Loading branch information
Showing
8 changed files
with
185 additions
and
97 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
This file was deleted.
Oops, something went wrong.
41 changes: 41 additions & 0 deletions
41
cpp/src/nn/specializations/fused_l2_knn_int_float_false.cu
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,41 @@ | ||
/* | ||
* 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 <cstdint> | ||
#include <raft/spatial/knn/detail/fused_l2_knn.cuh> | ||
|
||
namespace raft { | ||
namespace spatial { | ||
namespace knn { | ||
namespace detail { | ||
|
||
template void fusedL2Knn<int, float, false>(size_t D, | ||
int* out_inds, | ||
float* out_dists, | ||
const float* index, | ||
const float* query, | ||
size_t n_index_rows, | ||
size_t n_query_rows, | ||
int k, | ||
bool rowMajorIndex, | ||
bool rowMajorQuery, | ||
cudaStream_t stream, | ||
raft::distance::DistanceType metric); | ||
|
||
}; // namespace detail | ||
}; // namespace knn | ||
}; // namespace spatial | ||
}; // namespace raft |
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,40 @@ | ||
/* | ||
* 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 <cstdint> | ||
#include <raft/spatial/knn/detail/fused_l2_knn.cuh> | ||
|
||
namespace raft { | ||
namespace spatial { | ||
namespace knn { | ||
namespace detail { | ||
template void fusedL2Knn<int, float, true>(size_t D, | ||
int* out_inds, | ||
float* out_dists, | ||
const float* index, | ||
const float* query, | ||
size_t n_index_rows, | ||
size_t n_query_rows, | ||
int k, | ||
bool rowMajorIndex, | ||
bool rowMajorQuery, | ||
cudaStream_t stream, | ||
raft::distance::DistanceType metric); | ||
|
||
}; // namespace detail | ||
}; // namespace knn | ||
}; // namespace spatial | ||
}; // namespace raft |
40 changes: 40 additions & 0 deletions
40
cpp/src/nn/specializations/fused_l2_knn_long_float_false.cu
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,40 @@ | ||
/* | ||
* 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 <cstdint> | ||
#include <raft/spatial/knn/detail/fused_l2_knn.cuh> | ||
|
||
namespace raft { | ||
namespace spatial { | ||
namespace knn { | ||
namespace detail { | ||
|
||
template void fusedL2Knn<long, float, false>(size_t D, | ||
long* out_inds, | ||
float* out_dists, | ||
const float* index, | ||
const float* query, | ||
size_t n_index_rows, | ||
size_t n_query_rows, | ||
int k, | ||
bool rowMajorIndex, | ||
bool rowMajorQuery, | ||
cudaStream_t stream, | ||
raft::distance::DistanceType metric); | ||
}; // namespace detail | ||
}; // namespace knn | ||
}; // namespace spatial | ||
}; // namespace raft |
40 changes: 40 additions & 0 deletions
40
cpp/src/nn/specializations/fused_l2_knn_long_float_true.cu
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,40 @@ | ||
/* | ||
* 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 <cstdint> | ||
#include <raft/spatial/knn/detail/fused_l2_knn.cuh> | ||
|
||
namespace raft { | ||
namespace spatial { | ||
namespace knn { | ||
namespace detail { | ||
|
||
template void fusedL2Knn<long, float, true>(size_t D, | ||
long* out_inds, | ||
float* out_dists, | ||
const float* index, | ||
const float* query, | ||
size_t n_index_rows, | ||
size_t n_query_rows, | ||
int k, | ||
bool rowMajorIndex, | ||
bool rowMajorQuery, | ||
cudaStream_t stream, | ||
raft::distance::DistanceType metric); | ||
}; // namespace detail | ||
}; // namespace knn | ||
}; // namespace spatial | ||
}; // namespace raft |