Arjun Bhamra e6cfdd01ae
[MLIR][XeGPU] Validate DPAS operand types against uArch in XeGPUToXeVM conversion (#185081)
The `DpasOp` would crash with `llvm_unreachable` with unsupported types
(like i16, or i32 in operand) when during lowering to the XeVM dialect.
This happens in both `encodePrecision` and `getNumOperandsPerDword`.

Per
https://github.com/llvm/llvm-project/issues/180107#issuecomment-4009160113,
we handle this in the `matchAndRewrite` by retrieving the uArch instance
and fetching the registered `SubgroupMatrixMultiplyAcc` instruction.
Then, we validate with `getSupportedTypes` and check `aTy`, `bTy`, and
`resultType` correctly with `notifyMatchError` for reporting and
graceful handling.

We add a failed conversion test for a simplified version of the
reproducible error in #180107
2026-03-25 07:37:17 -07:00
..