[Mlir-commits] [mlir] [mlir] NFC: Clarify documentation on InferShapedTypeOpInterface::inferReturnTypeComponents (PR #70350)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Oct 26 09:36:52 PDT 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Felix Schneider (ubfx)
<details>
<summary>Changes</summary>
This patch copies a sentence from the documentation of `InferTypeOpInterface::inferReturnTypes()` to `InferShapedTypeOpInterface::inferReturnTypeComponents()`, clarifying that the method expects valid (verified) input arguments.
---
Full diff: https://github.com/llvm/llvm-project/pull/70350.diff
1 Files Affected:
- (modified) mlir/include/mlir/Interfaces/InferTypeOpInterface.td (+3)
``````````diff
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",
``````````
</details>
https://github.com/llvm/llvm-project/pull/70350
More information about the Mlir-commits
mailing list