@@ -86,8 +86,9 @@ def Vector_ContractionOp :
86
86
87
87
An optional kind attribute may be used to specify the combining function
88
88
between the intermediate result and accumulator argument of rank K. This
89
- attribute can take the values add/mul/min/max for int/fp, and/or/xor for
90
- int only. The default is "add".
89
+ attribute can take the values `add`/`mul`/`minsi`/`minui`/`maxsi`/`maxui`
90
+ /`and`/`or`/`xor` for integers, and `add`/`mul`/`minf`/`maxf`/`minimumf`
91
+ /`maximumf` for floats. The default is `add`.
91
92
92
93
Example:
93
94
@@ -149,7 +150,7 @@ def Vector_ContractionOp :
149
150
#contraction_trait = {
150
151
indexing_maps = #contraction_accesses,
151
152
iterator_types = ["reduction"],
152
- kind = #vector.kind<max >
153
+ kind = #vector.kind<maxf >
153
154
}
154
155
%6 = vector.contract #contraction_trait %0, %1, %2
155
156
: vector<10xf32>, vector<10xf32> into f32
@@ -232,7 +233,8 @@ def Vector_ReductionOp :
232
233
let summary = "reduction operation";
233
234
let description = [{
234
235
Reduces an 1-D vector "horizontally" into a scalar using the given
235
- operation (add/mul/min/max for int/fp and and/or/xor for int only).
236
+ operation: `add`/`mul`/`minsi`/`minui`/`maxsi`/`maxui`/`and`/`or`/`xor` for
237
+ integers, and `add`/`mul`/`minf`/`maxf`/`minimumf`/`maximumf` for floats.
236
238
Reductions also allow an optional fused accumulator.
237
239
238
240
Note that these operations are restricted to 1-D vectors to remain
@@ -289,8 +291,9 @@ def Vector_MultiDimReductionOp :
289
291
let summary = "Multi-dimensional reduction operation";
290
292
let description = [{
291
293
Reduces an n-D vector into an (n-k)-D vector (or a scalar when k == n)
292
- using the given operation (add/mul/min/max for int/fp and and/or/xor for
293
- int only).
294
+ using the given operation: `add`/`mul`/`minsi`/`minui`/`maxsi`/`maxui`
295
+ /`and`/`or`/`xor` for integers, and `add`/`mul`/`minf`/`maxf`/`minimumf`
296
+ /`maximumf` for floats.
294
297
Takes an initial accumulator operand.
295
298
296
299
Example:
@@ -937,11 +940,12 @@ def Vector_OuterProductOp :
937
940
lowered to the LLVMIR dialect, this form emits `llvm.intr.fma`, which
938
941
is guaranteed to lower to actual `fma` instructions on x86.
939
942
940
- An optional kind attribute may be specified to be add/mul/min/max
941
- for int/fp, and and/or/xor for int only. The default is "add", in which
942
- case the operation returns a fused multiply-add. In other cases it returns
943
- a multiply followed by the appropriate operation (for example, a compare and
944
- select for "max").
943
+ An optional kind attribute may be specified to be: `add`/`mul`/`minsi`
944
+ /`minui`/`maxsi`/`maxui`/`and`/`or`/`xor` for integers, and `add`/`mul`
945
+ /`minf`/`maxf`/`minimumf`/`maximumf` for floats.
946
+ The default is `add`, in which case the operation returns a fused
947
+ multiply-add. In other cases it returns a multiply followed by the
948
+ appropriate operation (for example, a compare and select for `maxf`).
945
949
946
950
Example:
947
951
@@ -953,7 +957,7 @@ def Vector_OuterProductOp :
953
957
vector<4xf32>, vector<8xf32>, vector<4x8xf32>
954
958
return %3: vector<4x8xf32>
955
959
956
- %4 = vector.outerproduct %0, %1, %2 {kind = #vector.kind<max >}:
960
+ %4 = vector.outerproduct %0, %1, %2 {kind = #vector.kind<maxf >}:
957
961
vector<4xf32>, vector<8xf32>, vector<4x8xf32>
958
962
return %3: vector<4x8xf32>
959
963
@@ -2764,10 +2768,10 @@ def Vector_ScanOp :
2764
2768
let description = [{
2765
2769
Performs an inclusive/exclusive scan on an n-D vector along a single
2766
2770
dimension returning an n-D result vector using the given
2767
- operation (add/ mul/min/max for int/fp and and/or/ xor for
2768
- int only) and a specified value for the initial value. The operator
2769
- returns the result of scan as well as the result of the last
2770
- reduction in the scan.
2771
+ operation (` add`/` mul`/`minsi`/`minui`/`maxsi`/`maxui`/` and`/`or`/` xor` for
2772
+ integers, and `add`/`mul`/`minf`/`maxf`/`minimumf`/`maximumf` for floats),
2773
+ and a specified value for the initial value. The operator returns the
2774
+ result of scan as well as the result of the last reduction in the scan.
2771
2775
2772
2776
Example:
2773
2777
0 commit comments