[all-commits] [llvm/llvm-project] 2d515e: [mlir][VectorOps] Implement insert_strided_slice c...

Nicolas Vasilache via All-commits all-commits at lists.llvm.org
Thu Jan 9 00:15:49 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2d515e49d89c0738ccef8f1733d5f9afe00ee979
      https://github.com/llvm/llvm-project/commit/2d515e49d89c0738ccef8f1733d5f9afe00ee979
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2020-01-09 (Thu, 09 Jan 2020)

  Changed paths:
    M mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
    M mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir

  Log Message:
  -----------
  [mlir][VectorOps] Implement insert_strided_slice conversion

Summary:
This diff implements the progressive lowering of insert_strided_slice.
Two cases appear:
1. when the source and dest vectors have different ranks, extract the dest
subvector at the proper offset and reduce to case 2.
2. when they have the same rank N:
  a. if the source and dest type are the same, the insertion is trivial:
     just forward the source
  b. otherwise, iterate over all N-1 D subvectors and create an
     extract/insert_strided_slice/insert replacement, reducing the problem
     to vecotrs of the same N-1 rank.

This combines properly with the other conversion patterns to lower all the way to LLVM.

Reviewers: ftynse, rriddle, AlexEichenberger, andydavis1, tetuante, nicolasvasilache

Reviewed By: andydavis1

Subscribers: merge_guards_bot, mehdi_amini, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, llvm-commits

Tags: #llvm

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




More information about the All-commits mailing list