[all-commits] [llvm/llvm-project] 19dbb2: [mlir] [VectorOps] Add scatter/gather operations t...

Aart Bik via All-commits all-commits at lists.llvm.org
Tue Jul 21 10:58:23 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 19dbb230a245d3404a485d8684587c3d37c198d3
      https://github.com/llvm/llvm-project/commit/19dbb230a245d3404a485d8684587c3d37c198d3
  Author: aartbik <ajcbik at google.com>
  Date:   2020-07-21 (Tue, 21 Jul 2020)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/include/mlir/Dialect/Vector/VectorOps.td
    A mlir/integration_test/Dialect/Vector/CPU/test-gather.mlir
    A mlir/integration_test/Dialect/Vector/CPU/test-scatter.mlir
    M mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
    M mlir/lib/Dialect/Vector/VectorOps.cpp
    M mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
    M mlir/test/Dialect/Vector/invalid.mlir
    M mlir/test/Dialect/Vector/ops.mlir
    M mlir/test/Target/llvmir-intrinsics.mlir

  Log Message:
  -----------
  [mlir] [VectorOps] Add scatter/gather operations to Vector dialect

Introduces the scatter/gather operations to the Vector dialect
(important memory operations for sparse computations), together
with a first reference implementation that lowers to the LLVM IR
dialect to enable running on CPU (and other targets that support
the corresponding LLVM IR intrinsics).

The operations can be used directly where applicable, or can be used
during progressively lowering to bring other memory operations closer to
hardware ISA support for a gather/scatter. The semantics of the operation
closely correspond to those of the corresponding llvm intrinsics.

Note that the operation allows for a dynamic index vector (which is
important for sparse computations). However, this first reference
lowering implementation "serializes" the address computation when
base + index_vector is converted to a vector of pointers. Exploring
how to use SIMD properly during these step is TBD. More general
memrefs and idiomatic versions of striding are also TBD.

Reviewed By: arpith-jacob

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




More information about the All-commits mailing list