[Mlir-commits] [mlir] [mlir][tosa] Add `tosa.avg_pool2d_adaptive` purity note (PR #233473)

Luke Hutton llvmlistbot at llvm.org
Mon Oct 19 09:00:56 PDT 2026


https://github.com/lhutton1 created https://github.com/llvm/llvm-project/pull/233473

Similar to `tosa.avg_pool2d`, add a note about purity.

>From e836523f2c44c0de8b588ed6088b7d36d67e050f Mon Sep 17 00:00:00 2001
From: Luke Hutton <luke.hutton at arm.com>
Date: Mon, 19 Oct 2026 16:57:53 +0100
Subject: [PATCH] [mlir][tosa] Add `tosa.avg_pool2d_adaptive` purity note

Similar to `tosa.avg_pool2d`, add a note about purity.

Change-Id: Idea48da1d56dfb524e286c6438943b7be02feca6
---
 mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td b/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td
index 339061b2aee83..9e81e9ce69593 100644
--- a/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td
+++ b/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td
@@ -170,6 +170,9 @@ def Tosa_AvgPool2dAdaptiveOp
     average, only the number of valid input tensor values, but not padding, are
     used to calculate the divisor. Compared to avg_pool2d, the kernel/stride/
     pad values are provided as inputs.
+
+    This operation is not pure. Undefined behaviour may occur if the accumulated
+    result overflows.
   }];
 
   let arguments = (ins Tosa_Tensor4D:$input,



More information about the Mlir-commits mailing list