Skip to content

Commit 8d97179

Browse files
committed
[MLIR/NFC] Operations.md: Explain all primitive constraints
1 parent 77d307f commit 8d97179

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

mlir/docs/DefiningDialects/Operations.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,27 @@ Right now, the following primitive constraints are supported:
291291
equal to `N`
292292
* `IntMaxValue<N>`: Specifying an integer attribute to be less than or equal
293293
to `N`
294+
* `IntNEQValue<N>`: Specifying an integer attribute to be not equal
295+
to `N`
296+
* `IntPositive`: Specifying an integer attribute whose value is positive
297+
* `IntNonNegative`: Specifying an integer attribute whose value is
298+
non-negative
294299
* `ArrayMinCount<N>`: Specifying an array attribute to have at least `N`
295300
elements
301+
* `ArrayMaxCount<N>`: Specifying an array attribute to have at most `N`
302+
elements
303+
* `ArrayCount<N>`: Specifying an array attribute to have exactly `N`
304+
elements
305+
* `DenseArrayCount<N>`: Specifying a dense array attribute to have
306+
exactly `N` elements
307+
* `DenseArrayStrictlyPositive<arrayType>`: Specifying a dense array attribute
308+
of type `arrayType` to have all positive elements
309+
* `DenseArrayStrictlyNonNegative<arrayType>`: Specifying a dense array attribute
310+
of type `arrayType` to have all non-negative elements
311+
* `DenseArraySorted<arrayType>`: Specifying a dense array attribute
312+
of type `arrayType` to have elements in non-decreasing order
313+
* `DenseArrayStrictlySorted<arrayType>`: Specifying a dense array attribute
314+
of type `arrayType` to have elements in increasing order
296315
* `IntArrayNthElemEq<I, N>`: Specifying an integer array attribute's `I`-th
297316
element to be equal to `N`
298317
* `IntArrayNthElemMinValue<I, N>`: Specifying an integer array attribute's
@@ -301,6 +320,7 @@ Right now, the following primitive constraints are supported:
301320
`I`-th element to be less than or equal to `N`
302321
* `IntArrayNthElemInRange<I, M, N>`: Specifying an integer array attribute's
303322
`I`-th element to be greater than or equal to `M` and less than or equal to `N`
323+
* `IsNullAttr`: Specifying an optional attribute which must be empty
304324

305325
TODO: Design and implement more primitive constraints
306326

0 commit comments

Comments
 (0)