[all-commits] [llvm/llvm-project] bd5494: [mlir][sparse] make index type explicit in public ...

Aart Bik via All-commits all-commits at lists.llvm.org
Wed Oct 20 12:46:47 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bd5494d127a39f619b7d0e5e967f190e0e61d6e7
      https://github.com/llvm/llvm-project/commit/bd5494d127a39f619b7d0e5e967f190e0e61d6e7
  Author: Aart Bik <ajcbik at google.com>
  Date:   2021-10-20 (Wed, 20 Oct 2021)

  Changed paths:
    M mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
    M mlir/lib/ExecutionEngine/SparseUtils.cpp
    M mlir/test/Dialect/SparseTensor/conversion.mlir

  Log Message:
  -----------
  [mlir][sparse] make index type explicit in public API of support library

The current implementation used explicit index->int64_t casts for some, but
not all instances of passing values of type "index" in and from the sparse
support library. This revision makes the situation more consistent by
using new "index_t" type at all such places  (which allows for less trivial
casting in the generated MLIR code).  Note that the current revision still
assumes that "index" is 64-bit wide. If we want to support targets with
alternative "index" bit widths, we need to build the support library different.
But the current revision is a step forward by making this requirement explicit
and more visible.

Reviewed By: wrengr

Differential Revision: https://reviews.llvm.org/D112122




More information about the All-commits mailing list