[Mlir-commits] [mlir] [mlir][vector] Update the internal representation of in_bounds (PR #100336)

Andrzej WarzyƄski llvmlistbot at llvm.org
Mon Aug 5 00:28:29 PDT 2024


banach-space wrote:

 > if we could keep the `in_bounds = [true, true]` textual form that would be amazing.

I've explored that and just didn't like the extra parsing/printing specialisation required for this (as opposed re-using the existing hooks to parse/print attributes). 

@MacDue suggested the following to make parsing somewhat easier. This way we'd know _what_ to expect (DenseBoolAttrArray) and _where_ (i.e. not a random location within `attr-dict`):
```mlir
vector.transfer_read %arg0[%0, %1], %cst, in_bounds = [true] { permutation_map = #map3} : memref<12x16xf32>, vector<8xf32>
```
Having played with that a bit, I just feel it's too different to what we use in other places.

IMO, `in_bounds = array<i1: true>` is self-documenting and I like that. But I appreciate that others might have preference for the current syntax. I've opened this to see how folks feel about this.

https://github.com/llvm/llvm-project/pull/100336


More information about the Mlir-commits mailing list