[mlir][sparse] assert fail on mismatch between rank and annotations array
authorAart Bik <ajcbik@google.com>
Fri, 19 Feb 2021 06:01:39 +0000 (22:01 -0800)
committerAart Bik <ajcbik@google.com>
Fri, 19 Feb 2021 07:22:14 +0000 (23:22 -0800)
commit2556d622828ae5631ac483d82592440fa1910d80
tree11eb31c6b36b2cf3fdf115a55c51c35df4daa5ec
parentcd4051ac802fdc5664a3432f57d99bbcb4c07a92
[mlir][sparse] assert fail on mismatch between rank and annotations array

Rationale:
Providing the wrong number of sparse/dense annotations was silently
ignored or caused unrelated crashes. This minor change verifies that
the provided number matches the rank.

Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D97034
mlir/lib/ExecutionEngine/SparseUtils.cpp