[all-commits] [llvm/llvm-project] 9dabe3: [mlir][xegpu] Fix crash on 0D vector in vector-to-...

Chennes via All-commits all-commits at lists.llvm.org
Thu Jul 9 15:37:17 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9dabe383fd71aadb5588d1d5bb2eafe7b6fdf4f2
      https://github.com/llvm/llvm-project/commit/9dabe383fd71aadb5588d1d5bb2eafe7b6fdf4f2
  Author: Chennes <xuchen359 at gmail.com>
  Date:   2026-07-09 (Thu, 09 Jul 2026)

  Changed paths:
    M mlir/lib/Conversion/VectorToXeGPU/VectorToXeGPU.cpp
    M mlir/test/Conversion/VectorToXeGPU/transfer-read-to-xegpu.mlir
    M mlir/test/Conversion/VectorToXeGPU/transfer-write-to-xegpu.mlir

  Log Message:
  -----------
  [mlir][xegpu] Fix crash on 0D vector in vector-to-xegpu transfer lowering (#205812)

`transferPreconditions` accepted rank-0 vectors, which then reached
`computeOffsets` and indexed an empty `SmallVector` (`broadcasted[0]`),
asserting `idx < size()` and crashing. For example:

```mlir
vector.transfer_write %arg0, %arg1[%1] : vector<f32>, memref<3xf32>
```

This is valid IR (the verifier accepts it; 0D vector transfers are part
of the vector dialect spec), so the conversion pass should not crash on
it.

Bail out via `notifyMatchFailure` for 0D vectors in the shared
`transferPreconditions`, so both `transfer_read` and `transfer_write`
are left unconverted instead of crashing. This matches how the core
vector lowering already treats 0D transfers as an unsupported corner
case (see `mlir/lib/Dialect/Vector/Transforms/LowerVectorTransfer.cpp`).

Regression tests are added for 0D `transfer_read` and `transfer_write`.

Fixes #205281



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