[all-commits] [llvm/llvm-project] 3dc621: [mlir][sparse] Migrate tests to use new syntax (#6...

Yinying Li via All-commits all-commits at lists.llvm.org
Fri Sep 15 13:12:34 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3dc621124fedab11b2877114c104551c63649f1c
      https://github.com/llvm/llvm-project/commit/3dc621124fedab11b2877114c104551c63649f1c
  Author: Yinying Li <107574043+yinying-lisa-li at users.noreply.github.com>
  Date:   2023-09-15 (Fri, 15 Sep 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrDefs.td
    M mlir/test/Dialect/SparseTensor/GPU/gpu_matvec_lib.mlir
    M mlir/test/Dialect/SparseTensor/codegen.mlir
    M mlir/test/Dialect/SparseTensor/codegen_sparse_alloc.mlir
    M mlir/test/Dialect/SparseTensor/conversion.mlir
    M mlir/test/Dialect/SparseTensor/convert_dense2sparse.mlir
    M mlir/test/Dialect/SparseTensor/convert_sparse2dense.mlir
    M mlir/test/Dialect/SparseTensor/convert_sparse2sparse.mlir
    M mlir/test/Dialect/SparseTensor/invalid.mlir
    M mlir/test/Dialect/SparseTensor/pre_rewriting.mlir
    M mlir/test/Dialect/SparseTensor/rewriting_for_codegen.mlir
    M mlir/test/Dialect/SparseTensor/roundtrip.mlir
    M mlir/test/Dialect/SparseTensor/roundtrip_encoding.mlir
    M mlir/test/Dialect/SparseTensor/sorted_coo.mlir
    M mlir/test/Dialect/SparseTensor/sparse_2d.mlir
    M mlir/test/Dialect/SparseTensor/sparse_3d.mlir
    M mlir/test/Dialect/SparseTensor/sparse_broadcast.mlir
    M mlir/test/Dialect/SparseTensor/sparse_foreach.mlir
    M mlir/test/Dialect/SparseTensor/sparse_nd.mlir
    M mlir/test/Dialect/SparseTensor/sparse_out.mlir
    M mlir/test/Dialect/SparseTensor/sparse_pack.mlir
    M mlir/test/Dialect/SparseTensor/sparse_perm.mlir
    M mlir/test/Dialect/SparseTensor/sparse_perm_lower.mlir
    M mlir/test/Dialect/SparseTensor/sparse_reshape_dot.mlir
    M mlir/test/Dialect/SparseTensor/unsparsifiable_dense_op.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/reshape_dot.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_codegen_foreach.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_collapse_shape.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conv_1d_nwc_wcf.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conv_2d_nchw_fchw.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conv_2d_nhwc_hwcf.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conv_3d.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conv_3d_ndhwc_dhwcf.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion_element.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion_sparse2dense.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion_sparse2sparse.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_coo_test.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_expand_shape.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_flatten.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_foreach_slices.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_insert_2d.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_insert_3d.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_matmul_slice.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_mttkrp.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_out_reduction.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_pack.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_pack_libgen.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_pooling_nhwc.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_reshape.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_scf_nested.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_sorted_coo.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_strided_conv_2d_nhwc_hwcf.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_tensor_mul.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_tensor_ops.mlir
    M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_transpose_coo.mlir
    M mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/sparse-matmul-lib.mlir
    M mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/sparse-matvec-lib.mlir

  Log Message:
  -----------
  [mlir][sparse] Migrate tests to use new syntax (#66543)

**COO**
`lvlTypes = [ "compressed_nu", "singleton" ]` to `map = (d0, d1) -> (d0
: compressed(nonunique), d1 : singleton)`
`lvlTypes = [ "compressed_nu_no", "singleton_no" ]` to `map = (d0, d1)
-> (d0 : compressed(nonunique, nonordered), d1 : singleton(nonordered))`

**SortedCOO**
`lvlTypes = [ "compressed_nu", "singleton" ]` to `map = (d0, d1) -> (d0
: compressed(nonunique), d1 : singleton)`

**BCOO**
`lvlTypes = [ "dense", "compressed_hi_nu", "singleton" ]` to `map = (d0,
d1, d2) -> (d0 : dense, d1 : compressed(nonunique, high), d2 :
singleton)`

**BCSR**
`lvlTypes = [ "compressed", "compressed", "dense", "dense" ], dimToLvl =
affine_map<(d0, d1) -> (d0 floordiv 2, d1 floordiv 3, d0 mod 2, d1 mod
3)>` to
`map = ( i, j ) ->
      ( i floordiv 2 : compressed,
        j floordiv 3 : compressed,
        i mod 2 : dense,
        j mod 3 : dense
      )`

**Tensor and other supported formats(e.g. CCC, CDC, CCCC)**

Currently, ELL and slice are not supported yet in the new syntax and the
CHECK tests will be updated once printing is set to output the new
syntax.

Previous PRs: #66146, #66309, #66443




More information about the All-commits mailing list