Skip to content

Commit 0efcfb1

Browse files
authored
Make "input signed op kind"s be "is input unsigned" and booleans. (#483)
1 parent 1ad02b7 commit 0efcfb1

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

proposals/0029-cooperative-vector.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ specification we add four operations:
160160
declare <[NUMo] x [TYo]> @dx.op.matvecmul.v[NUMo][TYo].v[NUMi][TYi](
161161
immarg i32 ; opcode
162162
<[NUMi] x [TYi]>, ; input vector
163-
immarg i1, ; input signed op kind
163+
immarg i1, ; is input unsigned
164164
immarg i32, ; input interpretation
165165
%dx.types.Handle, ; matrix resource
166166
i32, ; matrix offset
@@ -170,12 +170,12 @@ declare <[NUMo] x [TYo]> @dx.op.matvecmul.v[NUMo][TYo].v[NUMi][TYi](
170170
immarg i32, ; matrix layout
171171
immarg i1, ; matrix transpose
172172
i32, ; matrix stride
173-
immarg i1) ; output signed op kind
173+
immarg i1) ; is output unsigned
174174
175175
declare <[NUMo] x [TYo]> @dx.op.matvecmuladd.v[NUMo][TYo].v[NUMi][TYi](
176176
immarg i32 ; opcode
177177
<[NUMi] x [TYi]>, ; input vector
178-
immarg i1, ; input signed op kind
178+
immarg i1, ; is input unsigned
179179
immarg i32, ; input interpretation
180180
%dx.types.Handle, ; matrix resource
181181
i32, ; matrix offset
@@ -188,7 +188,7 @@ declare <[NUMo] x [TYo]> @dx.op.matvecmuladd.v[NUMo][TYo].v[NUMi][TYi](
188188
%dx.types.Handle, ; bias vector resource
189189
i32, ; bias vector offset
190190
immarg i32, ; bias vector interpretation
191-
immarg i1) ; output signed op kind
191+
immarg i1) ; is output unsigned
192192
```
193193

194194
#### Overview
@@ -222,9 +222,9 @@ types are types such as **SignedInt8x4Packed** where each 32-bit element of the
222222
vector corresponds to four 8-bit signed integers. See [Type Interpretations]
223223
for details.
224224

225-
The **input signed op kind** is a value from the existing `SignedOpKind` enum.
226-
`0` indicates that the input vector is a float or signed integer, `1` indicates
227-
that the input vector is an unsigned integer.
225+
The **is input unsigned** is a boolean value; `false` indicates that the input
226+
vector is a float or signed integer, `true` indicates that the input vector is
227+
an unsigned integer.
228228

229229

230230
##### Matrix
@@ -274,9 +274,9 @@ This operation returns a vector of size `NUMo` and contains elements of type
274274
`TYo`. The result vector does not have an interpretation parameter, its type is
275275
the declared type.
276276

277-
The **output signed op kind** is a value from the existing `SignedOpKind` enum.
278-
`0` indicates that the output vector is a float or signed integer, `1` indicates
279-
that the input vector is an unsigned integer.
277+
The **is output unsigned** is a boolean value; `false` indicates that the input
278+
vector is a float or signed integer, `true` indicates that the input vector is
279+
an unsigned integer.
280280

281281
#### Validation
282282

@@ -533,7 +533,7 @@ Packed Case:
533533
OPCODE,
534534
%inputVector,
535535
16, ; input interpretation - ComponentType::PackedS8x32
536-
0, ; input signed op kind = 0 = signed
536+
false, ; is input unsigned = false = signed
537537
%matrixResource,
538538
0, ; matrix offset
539539
19, ; matrix interpretation - ComponentType::I8
@@ -542,7 +542,7 @@ Packed Case:
542542
2, ; matrix layout - MulOptimal
543543
0, ; matrix transpose - false
544544
0, ; matrix stride
545-
0); ; output signed op kind = 0 = signed
545+
0); ; is output unsigned = false = signed
546546
```
547547

548548
Non-Packed Case:
@@ -556,7 +556,7 @@ Non-Packed Case:
556556
OPCODE,
557557
%inputVector,
558558
19, ; input interpretation - ComponentType::I8
559-
0, ; input signed op kind = 0 = signed
559+
0, ; is input unsigned = false = signed
560560
%matrixResource,
561561
0, ; matrix offset
562562
5, ; matrix interpretation - ComponentType::I8
@@ -565,7 +565,7 @@ Non-Packed Case:
565565
2, ; matrix layout - MulOptimal
566566
0, ; matrix transpose - false
567567
0, ; matrix stride
568-
0) ; output signed op kind = 0 = signed
568+
0) ; is output unsigned = false = signed
569569
```
570570

571571
#### Precision Requirements

0 commit comments

Comments
 (0)