[all-commits] [llvm/llvm-project] 77f829: [mlir][sparse] Improve sparse tensor type constrai...

Matthias Springer via All-commits all-commits at lists.llvm.org
Sun Oct 13 12:13:00 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 77f8297c6fdaa62121ddb108043dcaad5c45c7ad
      https://github.com/llvm/llvm-project/commit/77f8297c6fdaa62121ddb108043dcaad5c45c7ad
  Author: Matthias Springer <me at m-sp.org>
  Date:   2024-10-13 (Sun, 13 Oct 2024)

  Changed paths:
    M mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrDefs.td
    M mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
    M mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
    M mlir/test/Dialect/SparseTensor/invalid.mlir

  Log Message:
  -----------
  [mlir][sparse] Improve sparse tensor type constraints (#112133)

Sparse tensors are always ranked tensors. Encodings cannot be attached
to unranked tensors. Change the type constraint to `RankedTensorOf`, so
that we generate `TypedValue<RankedTensorType>` instead of
`TypedValue<TensorType>`. This removes the need for type casting in some
cases.

Also improve the verifiers (missing `return` statements) and switch a
few other `AnyTensor` to `AnyRankedTensor`.

This commit is in preparation of a dialect conversion commit that
required fixes in the sparse dialect.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list