-
Notifications
You must be signed in to change notification settings - Fork 182
JIT LTO Cagra Search #1807
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
base: main
Are you sure you want to change the base?
JIT LTO Cagra Search #1807
Changes from all commits
a024f61
45da4aa
a7c8621
eb2d74b
d2318e8
5e6afcd
6eee4da
1de8f28
84c6020
22680c8
37f1163
0ae5383
fe56aec
40c8fd6
e87a8c7
179d733
32a67bd
c27612e
a4b48b1
d5d692e
1c6dd94
30f5ab6
9674969
24fc47d
db9a487
aa9294f
2eb77fe
6c685fa
3e35b99
d0ff62c
eb87577
445a6c4
92a27d4
8549172
67579f4
7ad8774
816a480
ab35ef3
cdd4c85
87334b2
c1eff9f
ece09b8
4dacc6e
1fd95cd
64cde0d
5ac127b
78002c6
9ad6a0b
bf4c4ad
18b2af9
ece5cad
8ce70c2
fdc4239
be3cf0d
7e644c3
235938a
e3b749d
f42ae3f
b606df9
5ce7aab
eaad347
eb3b468
912279c
19f1af3
087b943
c16e109
323b79f
9f13e73
eaf9d39
ce40c51
0d0abb9
84bfa92
21241eb
7c0ac13
880dbf2
d04d7c1
19581f9
a61f019
2eeb913
55ec26c
10228c5
031ce21
088c21e
8ca1062
d5ab5bf
b8c0d42
17d34ae
45a5146
447532e
e1627d1
f7ea581
8b2775c
e9c77d9
adcfb8f
282b376
609a4d6
3115d07
bb524ae
30a8a9f
72ddb36
4bd2102
fb722f0
3523b96
ba758a2
42b78ae
2e3a471
bfc6c09
f6377fa
26abc7b
fb7f105
432bb32
533b770
af23585
78c59d9
9274868
7f8802b
f432aad
39ce9e3
27acbb6
d11edfd
dd23671
4f287c1
64f6ad8
f1888a2
b596e79
9c4980f
f27eeb2
bc5c90e
09dc56c
55c32f4
1866475
c419173
04cc166
1113afc
e372917
d8341ac
6feecce
3e9f5f3
52e05c2
caf8d03
b65f599
5239a1a
736dc75
f83f595
a7a4ef7
5390c4c
07a158c
0e201e8
88a4b6e
101c5ee
5d3a9df
63c7300
0c0b6b5
faa9339
73e8fa0
fef68d3
05cc149
b6c9031
995f998
75e2616
387d9ea
1ccb01c
3256a8e
32a5d9f
592af70
43501b7
b5342d6
b85f16b
e79de08
de0a2b5
c7909c3
bbbfb25
22c40fd
d404869
53ce0aa
9fc9185
1eef8c5
0af09e2
b2e418b
53195ef
f589b26
6b8d175
426625e
97dfa18
29881c8
bb01ec6
6b32331
6516f78
d737706
a809041
0d48be2
49f999f
d66edf0
b52f8c2
0349746
6e07abb
e9e2ff0
9bd6100
34ed3e2
e6f06fc
5552b2f
582d6a0
fb13ea5
98a1dce
a39c150
c3a8d73
8dfb354
33e1bc5
f050b77
d6eec0a
1f3b75b
832eaf2
9243390
dca579a
f11daf5
1c2da37
ff3527b
671e8a7
e14a119
39e67f3
59f8911
be21da4
fb5cf1e
8e6797c
ca67dea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ | |
|
|
||
| #include "@fatbin_header_file@" | ||
| #include <cuvs/detail/jit_lto/FragmentEntry.hpp> | ||
| #include <cuvs/detail/jit_lto/registration_tags.hpp> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After restoring |
||
|
|
||
| @fragment_tag_header_files@ | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION. | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <cuvs/detail/jit_lto/common_fragments.hpp> | ||
|
|
||
| namespace cuvs::neighbors::cagra::detail { | ||
|
|
||
| template <typename DataTag, | ||
| typename IndexTag, | ||
| typename DistanceTag, | ||
| typename QueryTag, | ||
| typename CodebookTag, | ||
| typename TeamTag, | ||
| typename BlockDimTag, | ||
| typename PqBitsTag, | ||
| typename PqLenTag> | ||
| struct fragment_tag_setup_workspace {}; | ||
|
|
||
| template <typename DataTag, | ||
| typename IndexTag, | ||
| typename DistanceTag, | ||
| typename QueryTag, | ||
| typename CodebookTag, | ||
| typename TeamTag, | ||
| typename BlockDimTag, | ||
| typename PqBitsTag, | ||
| typename PqLenTag> | ||
| struct fragment_tag_compute_distance {}; | ||
|
|
||
| template <typename QueryTag, typename DistanceTag, typename MetricTag> | ||
| struct fragment_tag_dist_op {}; | ||
|
|
||
| template <typename DataTag, | ||
| typename IndexTag, | ||
| typename DistanceTag, | ||
| typename QueryTag, | ||
| typename TeamTag, | ||
| typename BlockDimTag, | ||
| typename NormTag> | ||
| struct fragment_tag_apply_normalization_standard {}; | ||
|
|
||
| template <typename DataTag, | ||
| typename SourceIndexTag, | ||
| typename IndexTag, | ||
| typename DistanceTag, | ||
| bool TopkByBitonicSort, | ||
| bool BitonicSortAndMergeMultiWarps> | ||
| struct fragment_tag_search_single_cta {}; | ||
|
|
||
| template <typename DataTag, | ||
| typename SourceIndexTag, | ||
| typename IndexTag, | ||
| typename DistanceTag, | ||
| bool TopkByBitonicSort, | ||
| bool BitonicSortAndMergeMultiWarps> | ||
| struct fragment_tag_search_single_cta_p {}; | ||
|
|
||
| template <typename DataTag, typename SourceIndexTag, typename IndexTag, typename DistanceTag> | ||
| struct fragment_tag_search_multi_cta {}; | ||
|
|
||
| template <typename DataTag, typename IndexTag, typename DistanceTag> | ||
| struct fragment_tag_random_pickup {}; | ||
|
|
||
| template <typename DataTag, typename IndexTag, typename DistanceTag, typename SourceIndexTag> | ||
| struct fragment_tag_compute_distance_to_child_nodes {}; | ||
|
|
||
| template <typename IndexTag, typename DistanceTag, typename SourceIndexTag> | ||
| struct fragment_tag_apply_filter_kernel {}; | ||
|
|
||
| } // namespace cuvs::neighbors::cagra::detail |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| /* | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please restore |
||
| * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION. | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <cstdint> | ||
|
|
||
| namespace cuvs::detail::jit_lto { | ||
|
|
||
| struct tag_f {}; | ||
| struct tag_h {}; | ||
| struct tag_sc {}; | ||
| struct tag_uc {}; | ||
| struct tag_idx_l {}; | ||
| struct tag_filter_none {}; | ||
| struct tag_filter_bitset {}; | ||
|
|
||
| } // namespace cuvs::detail::jit_lto | ||
|
|
||
| namespace cuvs::neighbors::cagra::detail { | ||
|
|
||
| using cuvs::detail::jit_lto::tag_f; | ||
| using cuvs::detail::jit_lto::tag_filter_bitset; | ||
| using cuvs::detail::jit_lto::tag_filter_none; | ||
| using cuvs::detail::jit_lto::tag_h; | ||
| using cuvs::detail::jit_lto::tag_idx_l; | ||
| using cuvs::detail::jit_lto::tag_sc; | ||
| using cuvs::detail::jit_lto::tag_uc; | ||
|
|
||
| struct tag_idx_ui {}; | ||
| struct tag_dist_f {}; | ||
| struct tag_metric_l2 {}; | ||
| struct tag_metric_inner_product {}; | ||
| struct tag_metric_cosine {}; | ||
| struct tag_metric_hamming {}; | ||
| struct tag_team_8 {}; | ||
| struct tag_team_16 {}; | ||
| struct tag_team_32 {}; | ||
| struct tag_dim_128 {}; | ||
| struct tag_dim_256 {}; | ||
| struct tag_dim_512 {}; | ||
| struct tag_pq_bits_0 {}; | ||
| struct tag_pq_bits_8 {}; | ||
| struct tag_pq_len_0 {}; | ||
| struct tag_pq_len_2 {}; | ||
| struct tag_pq_len_4 {}; | ||
| struct tag_codebook_none {}; | ||
| struct tag_codebook_half {}; | ||
| struct tag_metric_l1 {}; | ||
| struct tag_norm_noop {}; | ||
| struct tag_norm_cosine {}; | ||
|
|
||
| } // namespace cuvs::neighbors::cagra::detail | ||
|
|
||
| namespace cuvs::neighbors::ivf_flat::detail { | ||
|
|
||
| using cuvs::detail::jit_lto::tag_f; | ||
| using cuvs::detail::jit_lto::tag_filter_bitset; | ||
| using cuvs::detail::jit_lto::tag_filter_none; | ||
| using cuvs::detail::jit_lto::tag_h; | ||
| using cuvs::detail::jit_lto::tag_idx_l; | ||
| using cuvs::detail::jit_lto::tag_sc; | ||
| using cuvs::detail::jit_lto::tag_uc; | ||
|
|
||
| struct tag_i8 {}; | ||
| struct tag_u8 {}; | ||
|
|
||
| struct tag_acc_f {}; | ||
| struct tag_acc_h {}; | ||
| struct tag_acc_i32 {}; | ||
| struct tag_acc_u32 {}; | ||
|
|
||
| struct tag_metric_euclidean {}; | ||
| struct tag_metric_inner_product {}; | ||
| struct tag_metric_custom_udf {}; | ||
|
|
||
| struct tag_post_process_identity {}; | ||
| struct tag_post_process_sqrt {}; | ||
| struct tag_post_process_compose {}; | ||
|
|
||
| template <typename DataTag, typename AccTag, typename IdxTag, int Capacity, bool Ascending> | ||
| struct fragment_tag_interleaved_scan {}; | ||
|
|
||
| template <typename DataTag, typename AccTag, bool ComputeNorm, int Veclen> | ||
| struct fragment_tag_load_and_compute_dist {}; | ||
|
|
||
| template <typename DataTag, typename AccTag, typename MetricTag, int Veclen> | ||
| struct fragment_tag_metric {}; | ||
|
|
||
| template <typename IndexTag, typename FilterTag> | ||
| struct fragment_tag_filter {}; | ||
|
|
||
| template <typename PostLambdaTag> | ||
| struct fragment_tag_post_lambda {}; | ||
|
|
||
| } // namespace cuvs::neighbors::ivf_flat::detail | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow the existing conventions that we use in other matrix files. We use the
*_abbrevsubstitutions for the kernel name and the tag name. Please don't pollute core CMake code with these implementation details.