Skip to content

Commit

Permalink
Updated validatoes
Browse files Browse the repository at this point in the history
  • Loading branch information
cjnolet committed Oct 25, 2023
1 parent b49679c commit 48f192a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: raft_cagra
validators:
search: raft-ann-bench.validators.raft_cagra_build_validator
base:
build:
graph_degree: [32, 64]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: raft_ivf_pq
validator: raft-ann-bench.validators.raft_ivf_pq_validator
validators:
search: raft-ann-bench.validators.raft_cagra_build_validator
base:
build:
nlist: [1024]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.


DTYPE_SIZES = {"float": 4, "half": 2, "fp8": 1}


def ivf_pq_validator(params):
def raft_ivf_pq_search_validator(params, k, batch_size):
if "internalDistanceDtype" in params and "smemLutDtype" in params:
return (
DTYPE_SIZES[params["smemLutDtype"]]
>= DTYPE_SIZES[params["internalDistanceDtype"]]
)


def raft_cagra_search_validator(params, k, batch_size):
if "itopk" in params:
return params["itopk"] >= k

0 comments on commit 48f192a

Please sign in to comment.