[all-commits] [llvm/llvm-project] 4c8198: [mlir][SCF] Add `scf.for` bufferization preprocess...

Matthias Springer via All-commits all-commits at lists.llvm.org
Wed Apr 3 20:08:36 PDT 2024


  Branch: refs/heads/users/matthias-springer/scf_bufferization_preprocessing
  Home:   https://github.com/llvm/llvm-project
  Commit: 4c819864c5edbdb8137451c0a0b6a97240a17008
      https://github.com/llvm/llvm-project/commit/4c819864c5edbdb8137451c0a0b6a97240a17008
  Author: Matthias Springer <springerm at google.com>
  Date:   2024-04-04 (Thu, 04 Apr 2024)

  Changed paths:
    M mlir/include/mlir/Dialect/SCF/Transforms/Passes.h
    M mlir/include/mlir/Dialect/SCF/Transforms/Passes.td
    M mlir/lib/Dialect/SCF/Transforms/Bufferize.cpp
    A mlir/test/Dialect/SCF/one-shot-bufferize-preprocessing.mlir

  Log Message:
  -----------
  [mlir][SCF] Add `scf.for` bufferization preprocessing pass

Add a bufferization preprocessing pass for `scf.for` loops to support loops where a yielded tensor value does not bufferize to the equivalent corresponding iter_arg buffer. This preprocessing works around a limitation of `scf.for` bufferization by inserting additional buffer copies for yielded tensors.

This preprocessing can be used to support most cases where One-Shot Bufferize fails to bufferize the IR with the following error message:
```
error: Yield operand #0 is not equivalent to the corresponding iter bbArg
```



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