From 7ab0a58d7b1b1460e6f91c5547babfd2de746245 Mon Sep 17 00:00:00 2001 From: Rolf Morel Date: Thu, 8 Aug 2024 02:27:52 -0700 Subject: [PATCH] Update docs based on review --- mlir/include/mlir/Dialect/DLTI/DLTI.h | 7 +++++++ .../mlir/Dialect/DLTI/TransformOps/DLTITransformOps.td | 6 +++--- mlir/lib/Dialect/DLTI/DLTI.cpp | 8 ++++---- mlir/lib/Dialect/DLTI/TransformOps/DLTITransformOps.cpp | 2 +- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/mlir/include/mlir/Dialect/DLTI/DLTI.h b/mlir/include/mlir/Dialect/DLTI/DLTI.h index 4061c98bf9eca44..6e2623e084be52d 100644 --- a/mlir/include/mlir/Dialect/DLTI/DLTI.h +++ b/mlir/include/mlir/Dialect/DLTI/DLTI.h @@ -24,7 +24,14 @@ class DataLayoutEntryAttrStorage; } // namespace mlir namespace mlir { namespace dlti { +/// Find the first DataLayoutSpec associated to `op`, via either the +/// DataLayoutOpInterface, a method on ModuleOp, or an attribute implementing +/// the interface, on `op` and else on `op`'s ancestors in turn. DataLayoutSpecInterface getDataLayoutSpec(Operation *op); + +/// Find the first TargetSystemSpec associated to `op`, via either the +/// DataLayoutOpInterface, a method on ModuleOp, or an attribute implementing +/// the interface, on `op` and else on `op`'s ancestors in turn. TargetSystemSpecInterface getTargetSystemSpec(Operation *op); } // namespace dlti } // namespace mlir diff --git a/mlir/include/mlir/Dialect/DLTI/TransformOps/DLTITransformOps.td b/mlir/include/mlir/Dialect/DLTI/TransformOps/DLTITransformOps.td index 438912a6b2623bc..69aacac986ad737 100644 --- a/mlir/include/mlir/Dialect/DLTI/TransformOps/DLTITransformOps.td +++ b/mlir/include/mlir/Dialect/DLTI/TransformOps/DLTITransformOps.td @@ -24,7 +24,7 @@ def QueryOp : Op emitError, return success(); } +//===----------------------------------------------------------------------===// +// DLTIDialect +//===----------------------------------------------------------------------===// + DataLayoutSpecInterface dlti::getDataLayoutSpec(Operation *op) { DataLayoutSpecInterface dlSpec = nullptr; @@ -424,10 +428,6 @@ TargetSystemSpecInterface dlti::getTargetSystemSpec(Operation *op) { return sysSpec; } -//===----------------------------------------------------------------------===// -// DLTIDialect -//===----------------------------------------------------------------------===// - constexpr const StringLiteral mlir::DLTIDialect::kDataLayoutAttrName; constexpr const StringLiteral mlir::DLTIDialect::kDataLayoutEndiannessKey; constexpr const StringLiteral mlir::DLTIDialect::kDataLayoutEndiannessBig; diff --git a/mlir/lib/Dialect/DLTI/TransformOps/DLTITransformOps.cpp b/mlir/lib/Dialect/DLTI/TransformOps/DLTITransformOps.cpp index a03e5e885e9dbfd..259af8857c02f69 100644 --- a/mlir/lib/Dialect/DLTI/TransformOps/DLTITransformOps.cpp +++ b/mlir/lib/Dialect/DLTI/TransformOps/DLTITransformOps.cpp @@ -20,7 +20,7 @@ using namespace mlir::transform; #define DEBUG_TYPE "dlti-transforms" //===----------------------------------------------------------------------===// -// FuseOp +// QueryOp //===----------------------------------------------------------------------===// void transform::QueryOp::getEffects(