uwsampl / SparseTIR

SparseTIR: Sparse Tensor Compiler for Deep Learning
https://sampl.cs.washington.edu/SparseTIR/
Apache License 2.0
131 stars 13 forks source link

Add an `exact_match` argument to `BinarySearch` function in Sparse Iteration Lowering pass #96

Closed yzh119 closed 1 year ago

yzh119 commented 1 year ago

Currently we only have lower_bound and upper_bound like binary search functions, which is not enough to express exact binary search semantics.

This PR adds an exact_match argument in BinarySearch function, if it's set to True, we generate another found_match buffer that stores whether search is an exact match or not.

The generated found_match buffer could then be used in other scenarios such as #95 .