[Mlir-commits] [mlir] [mlir][linalg] Generic to category specialization (PR #184624)

Andrzej WarzyƄski llvmlistbot at llvm.org
Fri Mar 6 01:02:11 PST 2026


================
@@ -131,6 +161,11 @@ func.func @op_matmul_signed_cast(%A: tensor<16x8xi16>, %B: tensor<8x32xi16>,
 // CHECK-NOT: linalg.matmul {cast = #linalg.type_fn<cast_unsigned>}
 // CHECK: linalg.matmul
 
+// CATEGORY-LABEL: op_matmul_signed_cast
+// CATEGORY-NOT: linalg.generic
+// CATEGORY: linalg.contract indexing_maps = {{\[}}#[[$MAP_A]], #[[$MAP_B]], #[[$MAP_C]]{{\]}}
+// CATEGORY-NOT: {cast =
----------------
banach-space wrote:

Note, this doesn't guarantee that there is no `cast = #linalg.type_fn<cast_unsigned>` (or similar) before `linalg.contract indexing_maps`.  In general, I find `CHECK-NOT` no that useful.

I think that this would be more robust and a stronger guarantee that the output is as expected:
```
// CATEGORY: [[RES:.*]] = linalg.contract indexing_maps = {{\[}}#[[$MAP_A]], #[[$MAP_B]], #[[$MAP_C]]{{\]}}
// CATEGORY: return [[RES]]
```

Similar comment elsewhere.

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


More information about the Mlir-commits mailing list