-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[MLIR] Fix documentation generation for DLTI dialect. #97052
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-mlir-dlti @llvm/pr-subscribers-mlir Author: Anton Lydike (AntonLydike) ChangesThis patch fixes the docs generation for the DLTI dialect to include attributes (CMake config pointed to the wrong tablegen file). It also fixes formatting in places so that proper markdown is generated. Tagging @nhasabni @rengolin @ftynse Full diff: https://github.com/llvm/llvm-project/pull/97052.diff 2 Files Affected:
diff --git a/mlir/include/mlir/Dialect/DLTI/CMakeLists.txt b/mlir/include/mlir/Dialect/DLTI/CMakeLists.txt
index 44a814f1c8e82..5b0cb6c37bfab 100644
--- a/mlir/include/mlir/Dialect/DLTI/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/DLTI/CMakeLists.txt
@@ -1,5 +1,5 @@
add_mlir_dialect(DLTI dlti)
-add_mlir_doc(DLTI DLTIDialect Dialects/ -gen-dialect-doc)
+add_mlir_doc(DLTIAttrs DLTIDialect Dialects/ -gen-dialect-doc)
set(LLVM_TARGET_DEFINITIONS DLTIAttrs.td)
mlir_tablegen(DLTIAttrs.h.inc -gen-attrdef-decls -attrdefs-dialect=dlti)
diff --git a/mlir/include/mlir/Dialect/DLTI/DLTIAttrs.td b/mlir/include/mlir/Dialect/DLTI/DLTIAttrs.td
index b3849e9b5be62..443e3128b4acb 100644
--- a/mlir/include/mlir/Dialect/DLTI/DLTIAttrs.td
+++ b/mlir/include/mlir/Dialect/DLTI/DLTIAttrs.td
@@ -27,9 +27,7 @@ def DataLayoutEntryTrait
def DLTI_DataLayoutEntryAttr :
DLTIAttr<"DataLayoutEntry", [DataLayoutEntryTrait]> {
- let summary = [{
- An attribute to represent an entry of a data layout specification.
- }];
+ let summary = "An attribute to represent an entry of a data layout specification.";
let description = [{
A data layout entry attribute is a key-value pair where the key is a type or
an identifier and the value is another attribute. These entries form a data
@@ -62,9 +60,7 @@ def DataLayoutSpecTrait
def DLTI_DataLayoutSpecAttr :
DLTIAttr<"DataLayoutSpec", [DataLayoutSpecTrait]> {
- let summary = [{
- An attribute to represent a data layout specification.
- }];
+ let summary = "An attribute to represent a data layout specification.";
let description = [{
A data layout specification is a list of entries that specify (partial) data
layout information. It is expected to be attached to operations that serve
@@ -111,23 +107,23 @@ def TargetSystemSpecTrait
def DLTI_TargetSystemSpecAttr :
DLTIAttr<"TargetSystemSpec", [TargetSystemSpecTrait]> {
- let summary = [{
- An attribute to represent target system specification.
- }];
+ let summary = "An attribute to represent target system specification.";
let description = [{
A system specification describes the overall system containing
multiple devices, with each device having a unique ID (string)
and its corresponding TargetDeviceSpec object.
Example:
- dlti.target_system_spec =
- #dlti.target_system_spec<
- "CPU": #dlti.target_device_spec<
- #dlti.dl_entry<"dlti.L1_cache_size_in_bytes", 4096: ui32>>,
- "GPU": #dlti.target_device_spec<
- #dlti.dl_entry<"dlti.max_vector_op_width", 64 : ui32>>,
- "XPU": #dlti.target_device_spec<
- #dlti.dl_entry<"dlti.max_vector_op_width", 4096 : ui32>>>
+ ```
+ dlti.target_system_spec =
+ #dlti.target_system_spec<
+ "CPU": #dlti.target_device_spec<
+ #dlti.dl_entry<"dlti.L1_cache_size_in_bytes", 4096: ui32>>,
+ "GPU": #dlti.target_device_spec<
+ #dlti.dl_entry<"dlti.max_vector_op_width", 64 : ui32>>,
+ "XPU": #dlti.target_device_spec<
+ #dlti.dl_entry<"dlti.max_vector_op_width", 4096 : ui32>>>
+ ```
}];
let parameters = (ins
ArrayRefParameter<"DeviceIDTargetDeviceSpecPair", "">:$entries
@@ -165,17 +161,17 @@ def TargetDeviceSpecTrait
def DLTI_TargetDeviceSpecAttr :
DLTIAttr<"TargetDeviceSpec", [TargetDeviceSpecTrait]> {
- let summary = [{
- An attribute to represent target device specification.
- }];
+ let summary = "An attribute to represent target device specification.";
let description = [{
Each device specification describes a single device and its
hardware properties. Each device specification can contain any number
of optional hardware properties (e.g., max_vector_op_width below).
Example:
- #dlti.target_device_spec<
- #dlti.dl_entry<"dlti.max_vector_op_width", 64 : ui32>>
+ ```
+ #dlti.target_device_spec<
+ #dlti.dl_entry<"dlti.max_vector_op_width", 64 : ui32>>
+ ```
}];
let parameters = (ins
ArrayRefParameter<"DataLayoutEntryInterface", "">:$entries
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
@rengolin do I need another approval before merging? Just got commit access, so am happy to press the button, just wanted to check if it's ready. |
Technically you only need one approval, but it's usually good to wait a day to make sure there are no additional concerns. We can always do post-commit review if anyone finds something wrong after merge, and can either land a fix or revert for further investigations. In this case, it should be safe to merge (no bots will break) and it's easy to fix later (another doc patch). |
This patch fixes the docs generation for the DLTI dialect to include attributes (CMake config pointed to the wrong tablegen file). It also fixes formatting in places so that proper markdown is generated.
This patch fixes the docs generation for the DLTI dialect to include attributes (CMake config pointed to the wrong tablegen file). It also fixes formatting in places so that proper markdown is generated.
This patch fixes the docs generation for the DLTI dialect to include attributes (CMake config pointed to the wrong tablegen file). It also fixes formatting in places so that proper markdown is generated.
Tagging @nhasabni @rengolin @ftynse