[mlir][sparse] add sparse kernels test to sparse compiler test suite
authorAart Bik <ajcbik@google.com>
Mon, 20 Sep 2021 18:15:13 +0000 (11:15 -0700)
committerAart Bik <ajcbik@google.com>
Wed, 22 Sep 2021 21:56:39 +0000 (14:56 -0700)
commita924fcc7c3193b50a64908c8480389de45801555
treeb878fdb061cdb755d3e97908ccb3edc16b4d7e2c
parent1552179ac0199d819396d8b8db807016a78c8951
[mlir][sparse] add sparse kernels test to sparse compiler test suite

This test makes sure kernels map to efficient sparse code, i.e. all
compressed for-loops, no co-iterating while loops.  In addition, this
revision removes the special constant folding inside the sparse
compiler in favor of Mahesh' new generic linalg folding. Thanks!

NOTE: relies on Mahesh fix, which needs to be rebased first

Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D110001
mlir/include/mlir/Dialect/SparseTensor/Utils/Merger.h
mlir/lib/Dialect/SparseTensor/Utils/Merger.cpp
mlir/test/Dialect/SparseTensor/sparse_kernels.mlir [new file with mode: 0644]
mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_filter_conv2d.mlir
mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_quantized_matmul.mlir