[all-commits] [llvm/llvm-project] 846103: [mlir][memref] Unranked support for extract_aligne...

Spenser Bauman via All-commits all-commits at lists.llvm.org
Thu Jun 13 06:12:40 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 846103c7e3899a654c470fa360b22d35df888427
      https://github.com/llvm/llvm-project/commit/846103c7e3899a654c470fa360b22d35df888427
  Author: Spenser Bauman <sbauman at mathworks.com>
  Date:   2024-06-13 (Thu, 13 Jun 2024)

  Changed paths:
    M mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
    M mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp
    M mlir/test/Conversion/MemRefToLLVM/memref-to-llvm.mlir
    M mlir/test/Dialect/MemRef/expand-strided-metadata.mlir

  Log Message:
  -----------
  [mlir][memref] Unranked support for extract_aligned_pointer_as_index (#93908)

memref.extract_aligned_pointer_as_index currently does not support
unranked inputs. This lack of support interferes with the folding
operations in the expand-strided-metadata pass.

    %r = memref.reinterpret_cast %arg0 to
        offset: [0],
        sizes: [],
        strides: [] : memref<*xf32> to memref<f32>

%i = memref.extract_aligned_pointer_as_index %r : memref<f32> -> index

Patterns like this occur when bufferizing operations on unranked
tensors.

This change modifies the extract_aligned_pointer_as_index operation to
support unranked inputs with corresponding support in the MemRef->LLVM
conversion.

Co-authored-by: Spenser Bauman <sabauma at fastmail>



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