[Mlir-commits] [mlir] [mlir] NFC: Clarify documentation on InferShapedTypeOpInterface::inferReturnTypeComponents (PR #70350)
Felix Schneider
llvmlistbot at llvm.org
Thu Oct 26 09:35:46 PDT 2023
https://github.com/ubfx created https://github.com/llvm/llvm-project/pull/70350
This patch copies a sentence from the documentation of `InferTypeOpInterface::inferReturnTypes()` to `InferShapedTypeOpInterface::inferReturnTypeComponents()`, clarifying that the method expects valid (verified) input arguments.
>From a930b23a8b9dcf2afbe0c73357d5b3e98f0d136d Mon Sep 17 00:00:00 2001
From: Felix Schneider <fx.schn at gmail.com>
Date: Thu, 26 Oct 2023 18:32:25 +0200
Subject: [PATCH] [mlir] NFC: Clarify documentation on
InferShapedTypeOpInterface::inferReturnTypeComponents
This patch copies a sentence from the documentation of
`InferTypeOpInterface::inferReturnTypes()` to
`InferShapedTypeOpInterface::inferReturnTypeComponents()`, clarifying
that the method expects valid (verified) input arguments.
---
mlir/include/mlir/Interfaces/InferTypeOpInterface.td | 3 +++
1 file changed, 3 insertions(+)
diff --git a/mlir/include/mlir/Interfaces/InferTypeOpInterface.td b/mlir/include/mlir/Interfaces/InferTypeOpInterface.td
index c5eeeaf58a7b4f8..d32dc16f6f734ae 100644
--- a/mlir/include/mlir/Interfaces/InferTypeOpInterface.td
+++ b/mlir/include/mlir/Interfaces/InferTypeOpInterface.td
@@ -142,6 +142,9 @@ def InferShapedTypeOpInterface : OpInterface<"InferShapedTypeOpInterface"> {
Unknown (e.g., unranked) shape and nullptrs for element type and attribute
may be returned by this function while returning success. E.g., partial
population of components is not error condition.
+
+ Be aware that this method is supposed to be called with valid arguments,
+ e.g., operands are verified, or it may result in an undefined behavior.
}],
/*retTy=*/"::mlir::LogicalResult",
/*methodName=*/"inferReturnTypeComponents",
More information about the Mlir-commits
mailing list