[Mlir-commits] [mlir] [mlir][spirv] Tighten SPIR-V TOSA pool constraints (PR #193515)

Igor Wodiany llvmlistbot at llvm.org
Fri Apr 24 03:31:23 PDT 2026


================
@@ -54,6 +54,96 @@ void printSPIRV_I32_1DArmTensor(OpAsmPrinter &printer, Operation *,
 // SPIRV Tosa Custom verifiers
 //===----------------------------------------------------------------------===//
 
+namespace {
+
+int64_t getIntValue(DenseIntElementsAttr attr, size_t idx) {
+  return (*std::next(attr.getValues<APInt>().begin(), idx)).getSExtValue();
+}
+
+LogicalResult verifyPool2DPadValuesLessThanKernel(Operation *op,
----------------
IgWod wrote:

Part of me wonders if this one should be moved to tablegen, but I don't have a strong opinion on it. If it can be implement relatively simple, i.e., without writing a lot of C++ code, maybe it's worth it? The logic seems pretty simple.

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


More information about the Mlir-commits mailing list