[all-commits] [llvm/llvm-project] b27d97: [mlir][tensor] Add test for invalid tensor.unpack ...

Andrzej Warzyński via All-commits all-commits at lists.llvm.org
Mon Dec 2 07:33:27 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b27d97bef782a8405e80e7b9f60b44d0537f43b6
      https://github.com/llvm/llvm-project/commit/b27d97bef782a8405e80e7b9f60b44d0537f43b6
  Author: Andrzej Warzyński <andrzej.warzynski at arm.com>
  Date:   2024-12-02 (Mon, 02 Dec 2024)

  Changed paths:
    M mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
    M mlir/test/Dialect/Tensor/invalid.mlir

  Log Message:
  -----------
  [mlir][tensor] Add test for invalid tensor.unpack + update error msg (#118275)

Adds a new test for invalid `tensor.unpack` operations where the output
rank does not match the expected rank (input rank + num inner tile
sizes). For example:

```mlir
tensor.unpack %output
  inner_dims_pos = [0, 1]
  inner_tiles = [32, 16]
  into %input : tensor<64x32x16xf32> -> tensor<256x128xf32>
```

In addition, updates the corresponding error message to make it more
informative:

BEFORE:
```mlir
error: packed rank must equal unpacked rank + tiling factors}
```

AFTER:
```mlir
error: packed rank != (unpacked rank + num tiling factors), got 3 != 4
```



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