[all-commits] [llvm/llvm-project] 853d70: [mlir][sparse] moving inbound check for slice driv...

PeimingLiu via All-commits all-commits at lists.llvm.org
Fri Jun 9 10:03:29 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 853d704fd0c4744731870df67ade7249d5440438
      https://github.com/llvm/llvm-project/commit/853d704fd0c4744731870df67ade7249d5440438
  Author: Peiming Liu <peiming at google.com>
  Date:   2023-06-09 (Fri, 09 Jun 2023)

  Changed paths:
    M mlir/lib/Dialect/SparseTensor/Transforms/LoopEmitter.cpp
    M mlir/test/Dialect/SparseTensor/sparse_conv_2d_slice_based.mlir

  Log Message:
  -----------
  [mlir][sparse] moving inbound check for slice driven loop into before block of the WhileOp

This patch changes the while loop generated for iterating over a fully reduced sparse level with affine index expression.
Before:
```
cont = true
while (cont) {
  if (inBound()) {
    ....
    cont = true;
  } else {
    cont = false;
  }
}
```
After:
```
while(inBound()) {
  ....
}
```

Reviewed By: K-Wu

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




More information about the All-commits mailing list