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

Updating cagra build constraint #2016

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
DTYPE_SIZES = {"float": 4, "half": 2, "fp8": 1}


def raft_cagra_build_constraints(params, dims):
if "graph_degree" in params and "intermediate_graph_degree" in params:
return params["graph_degree"] <= params["intermediate_graph_degree"]
return True


def raft_ivf_pq_build_constraints(params, dims):
if "pq_dim" in params:
return params["pq_dim"] <= dims
Expand All @@ -36,8 +42,10 @@ def raft_ivf_pq_search_constraints(params, build_params, k, batch_size):


def raft_cagra_search_constraints(params, build_params, k, batch_size):
ret = True
if "itopk" in params:
return params["itopk"] >= k
ret = ret and params["itopk"] >= k
return ret


def hnswlib_search_constraints(params, build_params, k, batch_size):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: raft_cagra
constraints:
build: raft-ann-bench.constraints.raft_cagra_build_constraints
search: raft-ann-bench.constraints.raft_cagra_search_constraints
groups:
base:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
groundtruth_neighbors_file: wiki_all_1M/groundtruth.1M.neighbors.ibin
distance: euclidean

- name: wiki_all_10M,
- name: wiki_all_10M
dims: 768
base_file: wiki_all_10M/base.10M.fbin
query_file: wiki_all_10M/queries.fbin
Expand Down