[Tracking Issue] Add exact_match
argument for binary search block generation in LowerSparseIter pass
#74
Labels
exact_match
argument for binary search block generation in LowerSparseIter pass
#74
Pitch
Currently, we only support two modes
lower_bound
/upper_bound
for binary search. In some cases, we need to identify whether the given coordinate matches with any of the values in an indices list, and neitherlower_bound
norupper_bound
is enough in this case.Solution
We should add an
exact_match
argument in the binary search block generation function. Whenexact_match
is set totrue
, the generated binary search block will write aINVALID
(a macro represents an invalid value) to outputlookup
array.We also need to propagate the
invalid
property: ifmid[vi]
isINVALID
, thenA[mid[vi]]
will be invalid memory access.The correct way to process such a case is to invalidate the whole expression:
The text was updated successfully, but these errors were encountered: