[Mlir-commits] [mlir] [mlir][Transforms][NFC] Dialect conversion: Fix typo and improve docs (PR #107539)
Matthias Springer
llvmlistbot at llvm.org
Fri Sep 6 01:24:34 PDT 2024
https://github.com/matthias-springer updated https://github.com/llvm/llvm-project/pull/107539
>From b9cfedc35c071328d780fe11ea4142a0e0e02c10 Mon Sep 17 00:00:00 2001
From: Matthias Springer <mspringer at nvidia.com>
Date: Fri, 6 Sep 2024 09:53:57 +0200
Subject: [PATCH] [mlir][Transforms][NFC] Dialect conversion: Fix typo and
improve docs
---
mlir/docs/DialectConversion.md | 5 +++++
mlir/include/mlir/Transforms/DialectConversion.h | 9 ++++-----
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/mlir/docs/DialectConversion.md b/mlir/docs/DialectConversion.md
index 23e74470a835f7..4f6cb1dec66a63 100644
--- a/mlir/docs/DialectConversion.md
+++ b/mlir/docs/DialectConversion.md
@@ -383,6 +383,11 @@ class TypeConverter {
};
```
+Materializations through the type converter are optional. If the
+`ConversionConfig::buildMaterializations` flag is set to "false", the dialect
+conversion driver builds an `unrealized_conversion_cast` op instead of calling
+the respective type converter callback whenever a materialization is required.
+
### Region Signature Conversion
From the perspective of type conversion, the types of block arguments are a bit
diff --git a/mlir/include/mlir/Transforms/DialectConversion.h b/mlir/include/mlir/Transforms/DialectConversion.h
index 5f680e8eca7559..65e279e046e886 100644
--- a/mlir/include/mlir/Transforms/DialectConversion.h
+++ b/mlir/include/mlir/Transforms/DialectConversion.h
@@ -1127,13 +1127,12 @@ struct ConversionConfig {
/// If set to "true", the dialect conversion attempts to build source/target/
/// argument materializations through the type converter API in lieu of
- /// builtin.unrealized_conversion_cast ops. The conversion process fails if
+ /// "builtin.unrealized_conversion_cast ops". The conversion process fails if
/// at least one materialization could not be built.
///
- /// If set to "false", the dialect conversion does not does not build any
- /// custom materializations and instead inserts
- /// builtin.unrealized_conversion_cast ops to ensure that the resulting IR
- /// is valid.
+ /// If set to "false", the dialect conversion does not build any custom
+ /// materializations and instead inserts "builtin.unrealized_conversion_cast"
+ /// ops to ensure that the resulting IR is valid.
bool buildMaterializations = true;
};
More information about the Mlir-commits
mailing list