Reject zero-dimension block_row_indices in SparseAttention
Merged
AP
5mo ago+33+33+01234567890123456789-0-0-0123456789
This pull request strengthens the validation logic for the block_row_indices input in the SparseAttention operator and adds a corresponding unit test to ensure that zero-dimension cases are properly rejected.
Validation improvements:
- Updated the check in
Status CheckInputs(insparse_attention_helper.h) to require that the first dimension ofblock_row_indicesis greater than zero, preventing invalid zero-dimension input.
Test coverage:
- Added a new unit test
RejectsZeroDimBlockRowIndicesinsparse_attention_op_test.ccto verify that the operator correctly rejects inputs whereblock_row_indiceshas a zero in its first dimension.