Skip to content

Remove unsigned dot product from overview #73

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 4 commits into from
May 13, 2022
Merged
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
14 changes: 4 additions & 10 deletions proposals/relaxed-simd/Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,7 @@ def q15mulr(a, b):
### Relaxed integer dot product

- `i16x8.dot_i8x16_i7x16_s(a: v128, b: v128) -> v128`
- `i16x8.dot_i8x16_i7x16_u(a: v128, b: v128) -> v128`
- `i32x4.dot_i8x16_i7x16_add_s(a: v128, b:v128, c:v128) -> v128`
- `i32x4.dot_i8x16_i7x16_add_u(a: v128, b:v128, c:v128) -> v128`

Returns the multiplication of 8-bit elements (signed or unsigned) by 7-bit
elements (unsigned) with accumulation of adjacent products. The `i32x4` versions
Expand All @@ -278,9 +276,7 @@ def dot_product(signed, elements, a, b, c):
result[i/elements] += c[i/elements] if c else 0

i16x8_dot_i8x16_i7x16_s(a, b) = dot_product(signed=True, elements=2, a, b)
i16x8_dot_i8x16_i7x16_u(a, b) = dot_product(signed=False, elements=2, a, b)
i32x4.dot_i8x16_i7x16_add_s(a, b, c) = dot_product(signed=True, elements=4, a, b, c)
i32x4.dot_i8x16_i7x16_add_s(a, b, c) = dot_product(signed=False, elements=4, a, b, c)
i32x4.dot_i8x16_i7x16_add_s(a, b, c) = dot_product(signed=False, elements=2, a, b, c)
```


Expand Down Expand Up @@ -315,11 +311,9 @@ forward, the opcodes for relaxed-simd specification will be the ones in the
| `f64x2.relaxed_max` | 0x110 | 0xee |
| `i16x8.relaxed_q15mulr_s` | 0x111 | unimplemented |
| `i16x8.dot_i8x16_i7x16_s` | 0x112 | unimplemented |
| `i16x8.dot_i8x16_i7x16_u` | 0x113 | unimplemented |
| `i32x4.dot_i8x16_i7x16_add_s` | 0x114 | unimplemented |
| `i32x4.dot_i8x16_i7x16_add_u` | 0x115 | unimplemented |
| Reserved for bfloat16 | 0x116 | unimplemented |
| Reserved | 0x117 - 0x12F | |
| `i32x4.dot_i8x16_i7x16_add_s` | 0x113 | unimplemented |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to confirm: we are changing i32x4.dot_i8x16_i7x16_add_s code here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, or do you think we should leave a gap in case we figure something out?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fine as changed (to not leave a gap). I was checking and commenting since current implementations need to adjust that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We haven't prototyped this yet, so no objections to the opcode number being changed.

| Reserved for bfloat16 | 0x114 | unimplemented |
| Reserved | 0x115 - 0x12F | |

## References

Expand Down