Stream: git-wasmtime

Topic: wasmtime / PR #9910 pulley: implement vector shuffle


view this post on Zulip Wasmtime GitHub notifications bot (Dec 28 2024 at 18:02):

eagr opened PR #9910 from eagr:pulley-vshuffle to bytecodealliance:main:

part of #9783

view this post on Zulip Wasmtime GitHub notifications bot (Dec 28 2024 at 18:02):

eagr requested fitzgen for a review on PR #9910.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 28 2024 at 18:02):

eagr requested wasmtime-compiler-reviewers for a review on PR #9910.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 28 2024 at 18:02):

eagr requested wasmtime-core-reviewers for a review on PR #9910.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 28 2024 at 18:02):

eagr requested wasmtime-default-reviewers for a review on PR #9910.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 28 2024 at 18:19):

eagr updated PR #9910.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 28 2024 at 19:44):

github-actions[bot] commented on PR #9910:

Subscribe to Label Action

cc @fitzgen

<details>
This issue or pull request has been labeled: "cranelift", "pulley"

Thus the following users have been cc'd because of the following labels:

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Dec 29 2024 at 18:42):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 29 2024 at 18:42):

alexcrichton created PR review comment:

Instead of putting the mask into a VReg could it be a u128 immediate to the vshuffle instruction itself? That should cut down on opcodes slightly and more closely matches the wasm semantics of the instruction.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 30 2024 at 04:53):

eagr submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 30 2024 at 04:53):

eagr created PR review comment:

could it be a u128 immediate to the vshuffle instruction itself?

I remember not, but let me try again

view this post on Zulip Wasmtime GitHub notifications bot (Dec 30 2024 at 08:36):

eagr submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 30 2024 at 08:36):

eagr created PR review comment:

vshuffle(VReg, VReg, VReg, u128) would raise this error

thread '<unnamed>' panicked at cranelift/codegen/src/isa/pulley_shared/inst/emit.rs:109:9:
encoded inst InstAndKind { inst: Raw { raw: VShuffle { dst: Writable { reg: VReg(p0v) }, src1: VReg(p0v), src2: VReg(p1v), mask: 41362427191743139026751447860679676176 } }, kind: PhantomData<cranelift_codegen::isa::pulley64::Pulley64> } longer than worst-case size: length: 22, Inst::worst_case_size() = 20

view this post on Zulip Wasmtime GitHub notifications bot (Dec 30 2024 at 08:47):

eagr submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 30 2024 at 08:47):

eagr created PR review comment:

If it's ok, I guess I could raise the inst. size limit.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 30 2024 at 08:58):

eagr updated PR #9910.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 30 2024 at 09:02):

eagr updated PR #9910.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 30 2024 at 16:31):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 30 2024 at 17:04):

eagr updated PR #9910.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 30 2024 at 17:10):

alexcrichton has enabled auto merge for PR #9910.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 30 2024 at 17:26):

eagr commented on PR #9910:

Do you happen to have something along the Pully pipeline that could use an extra pair of hands? I should probably leave these exercises for others. Btw, this is a wonderful setup for helping people learn about how Pulley works :)

view this post on Zulip Wasmtime GitHub notifications bot (Dec 30 2024 at 17:33):

alexcrichton merged PR #9910.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 30 2024 at 18:07):

alexcrichton commented on PR #9910:

Sure yeah, whatever suits you best! Perhaps the next-lowest-hanging-fruit is performance optimizations which will involve running benchmarks and understanding the performance of Pulley and where hot-spots are. The main goal would be identifying macro-opcodes that can be added for lowering. The first one off the top of my head would be a macro opcode related to bounds checks to make memory accesses faster, but I haven't done performance profiling one way or another on that yet. (we also don't have many docs yet on how to do this so it's a choose-your-own-adventure at the moment, so not necessarily great as a first project)


Last updated: Jan 24 2025 at 00:11 UTC