julian-seward1 opened PR #2327 from arm64-simd-dotmul
to main
:
This patch implements, for aarch64, the following wasm SIMD extensions
i32x4.dot_i16x8_s instruction
https://github.com/WebAssembly/simd/pull/127It also updates dependencies as follows, in order that the new instruction can
be parsed, decoded, etc:wat to 1.0.27
wast to 26.0.1
wasmparser to 0.65.0
wasmprinter to 0.2.12The changes are straightforward:
new CLIF instruction
widening_pairwise_dot_product_s
translation from wasm into
widening_pairwise_dot_product_s
new AArch64 instructions
smull
,smull2
(part of theVecRRR
group)translation from
widening_pairwise_dot_product_s
tosmull ; smull2 ; addv
There is no testcase in this commit, because that is a separate repo. The
implementation has been tested, nevertheless.<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
julian-seward1 requested yurydelendik for a review on PR #2327.
akirilov-arm submitted PR Review.
akirilov-arm submitted PR Review.
akirilov-arm created PR Review Comment:
Just a comment (no need to take action) - it's probably time to introduce an
Inst
variant for widening binary operations, so that the handling of the high and the low halves can be streamlined, for example, but we can do this separately. We previously took a shortcut here becauseUmlal
was the only odd man out.cc @jgouly
akirilov-arm created PR Review Comment:
How about panicking and printing the type otherwise?
julian-seward1 submitted PR Review.
julian-seward1 created PR Review Comment:
Ah, good point, I forgot. Silly me. Will fix.
julian-seward1 submitted PR Review.
julian-seward1 created PR Review Comment:
Yeah, that sounds like a nice cleanup for a followup. I'm curious though .. when you say "handling of the high and the low halves can be streamlined", what did you have in mind, roughly?
akirilov-arm submitted PR Review.
akirilov-arm created PR Review Comment:
Have a look at
Inst::VecMiscNarrow
, which organizes things similarly, but for narrowing operations. TBH I don't have an exact code change in mind (as I said, neither Joey, nor I did anything yet because there was no real need), but having a separate boolean parameter to specify the half is probably going to be the way to do it.I dislike the ISA's approach (via the vector shape), but it has constraints (encoding space) that are not applicable to the
Inst
enum. Anyway, theInst
variants don't necessarily map 1:1 to machine instructions, so we can use that to improve ergonomics (e.g. we support bitwise operations on arbitrary vector shapes, not just 8-bit elements).
akirilov-arm submitted PR Review.
akirilov-arm created PR Review Comment:
Actually even better would be returning
Err(CodegenError::...)
- @cfallin was previously encouraging this.
cfallin submitted PR Review.
cfallin created PR Review Comment:
+1; best to propagate the error upward, since we have the types to do so.
yurydelendik submitted PR Review.
julian-seward1 updated PR #2327 from arm64-simd-dotmul
to main
:
This patch implements, for aarch64, the following wasm SIMD extensions
i32x4.dot_i16x8_s instruction
https://github.com/WebAssembly/simd/pull/127It also updates dependencies as follows, in order that the new instruction can
be parsed, decoded, etc:wat to 1.0.27
wast to 26.0.1
wasmparser to 0.65.0
wasmprinter to 0.2.12The changes are straightforward:
new CLIF instruction
widening_pairwise_dot_product_s
translation from wasm into
widening_pairwise_dot_product_s
new AArch64 instructions
smull
,smull2
(part of theVecRRR
group)translation from
widening_pairwise_dot_product_s
tosmull ; smull2 ; addv
There is no testcase in this commit, because that is a separate repo. The
implementation has been tested, nevertheless.<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
julian-seward1 updated PR #2327 from arm64-simd-dotmul
to main
:
This patch implements, for aarch64, the following wasm SIMD extensions
i32x4.dot_i16x8_s instruction
https://github.com/WebAssembly/simd/pull/127It also updates dependencies as follows, in order that the new instruction can
be parsed, decoded, etc:wat to 1.0.27
wast to 26.0.1
wasmparser to 0.65.0
wasmprinter to 0.2.12The changes are straightforward:
new CLIF instruction
widening_pairwise_dot_product_s
translation from wasm into
widening_pairwise_dot_product_s
new AArch64 instructions
smull
,smull2
(part of theVecRRR
group)translation from
widening_pairwise_dot_product_s
tosmull ; smull2 ; addv
There is no testcase in this commit, because that is a separate repo. The
implementation has been tested, nevertheless.<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
akirilov-arm submitted PR Review.
julian-seward1 updated PR #2327 from arm64-simd-dotmul
to main
:
This patch implements, for aarch64, the following wasm SIMD extensions
i32x4.dot_i16x8_s instruction
https://github.com/WebAssembly/simd/pull/127It also updates dependencies as follows, in order that the new instruction can
be parsed, decoded, etc:wat to 1.0.27
wast to 26.0.1
wasmparser to 0.65.0
wasmprinter to 0.2.12The changes are straightforward:
new CLIF instruction
widening_pairwise_dot_product_s
translation from wasm into
widening_pairwise_dot_product_s
new AArch64 instructions
smull
,smull2
(part of theVecRRR
group)translation from
widening_pairwise_dot_product_s
tosmull ; smull2 ; addv
There is no testcase in this commit, because that is a separate repo. The
implementation has been tested, nevertheless.<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
julian-seward1 merged PR #2327.
Last updated: Dec 23 2024 at 12:05 UTC