Skip to content

[mlir][docs] Rename OpTrait to Trait in ODS doc #148276

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

Merged
merged 1 commit into from
Jul 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions mlir/docs/DefiningDialects/Operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ their semantics via a special [TableGen backend][TableGenBackend]:
help of the following constructs.
* The `Dialect` class: Operations belonging to one logical group are placed in
the same dialect. The `Dialect` class contains dialect-level information.
* The `OpTrait` class hierarchy: They are used to specify special properties
* The `Trait` class hierarchy: They are used to specify special properties
and constraints of the operation, including whether the operation has side
effect or whether its output has the same shape as the input.
* The `ins`/`outs` marker: These are two special markers builtin to the
Expand Down Expand Up @@ -436,7 +436,7 @@ various traits in the `mlir::OpTrait` namespace.
Both operation traits, [interfaces](../Interfaces.md/#utilizing-the-ods-framework),
and constraints involving multiple operands/attributes/results are provided as
the third template parameter to the `Op` class. They should be deriving from
the `OpTrait` class. See [Constraints](#constraints) for more information.
the `Trait` class. See [Constraints](#constraints) for more information.

### Builder methods

Expand Down Expand Up @@ -1355,7 +1355,7 @@ results. These constraints should be specified as the `Op` class template
parameter as described in
[Operation traits and constraints](#operation-traits-and-constraints).

Multi-entity constraints are modeled as `PredOpTrait` (a subclass of `OpTrait`)
Multi-entity constraints are modeled as `PredOpTrait` (a subclass of `Trait`)
in [`OpBase.td`][OpBase].A bunch of constraint primitives are provided to help
specification. See [`OpBase.td`][OpBase] for the complete list.

Expand All @@ -1366,7 +1366,7 @@ commutative or not, whether is a terminator, etc. These constraints should be
specified as the `Op` class template parameter as described in
[Operation traits and constraints](#operation-traits-and-constraints).

Traits are modeled as `NativeOpTrait` (a subclass of `OpTrait`) in
Traits are modeled as `NativeTrait` (a subclass of `Trait`) in
[`OpBase.td`][OpBase]. They are backed and will be translated into the
corresponding C++ `mlir::OpTrait` classes.

Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/IR/OpBase.td
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ include "mlir/IR/Utils.td"
include "mlir/IR/AttrTypeBase.td"

//===----------------------------------------------------------------------===//
// OpTrait definitions
// *OpTrait definitions
//===----------------------------------------------------------------------===//

// A trait that describes the structure of operation will be marked with
Expand Down
Loading