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

[FEA] search_multi_cta_00_generate.py support cuvs::neighbors::filtering::bitmap_filter<uint32_t COMMA int64_t> #483

Open
hsgui opened this issue Nov 21, 2024 · 0 comments
Labels
feature request New feature or request

Comments

@hsgui
Copy link

hsgui commented Nov 21, 2024

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I wish I could use RAFT to do [...]

I wish I could use RAFT to support batch queries with filtering. and each query has its own bitset

Describe the solution you'd like

in search_multi_cta.*.cu, add the code like following:

instantiate_kernel_selection(int8_t,
                             uint32_t,
                             float,
                             CagraSampleFilterWithQueryIdOffset<
                               cuvs::neighbors::filtering::bitmap_filter<uint32_t COMMA int64_t>>);

update file: search_multi_cta_00_generate.py

for type_path, (data_t, idx_t, distance_t) in search_types.items():
    path = f"search_multi_cta_{type_path}.cu"
    with open(path, "w") as f:
        f.write(header)
        f.write(
                f"instantiate_kernel_selection(\n  {data_t}, {idx_t}, {distance_t}, cuvs::neighbors::filtering::none_sample_filter);\n"
        )
        f.write(
                f"instantiate_kernel_selection(\n  {data_t}, {idx_t}, {distance_t}, CagraSampleFilterWithQueryIdOffset<cuvs::neighbors::filtering::bitset_filter<uint32_t COMMA int64_t>>);\n"
        )
       f.write(
                f"instantiate_kernel_selection(\n  {data_t}, {idx_t}, {distance_t}, CagraSampleFilterWithQueryIdOffset<cuvs::neighbors::filtering::bitmap_filter<uint32_t COMMA int64_t>>);\n"
        )
        f.write(trailer)
        # For pasting into CMakeLists.txt
    print(f"src/neighbors/detail/cagra/{path}")
@hsgui hsgui added the feature request New feature or request label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant