Stream: git-wasmtime

Topic: wasmtime / PR #14054 aarch64: lower mixed unsigned-by-sig...


view this post on Zulip Wasmtime GitHub notifications bot (Jul 31 2026 at 18:13):

darmie opened PR #14054 from darmie:aarch64-usdot-i8mm to bytecodealliance:main:

Implements the proposal from #14050 (a maintainer confirmed CI can validate this).

What

aarch64 folds the signed i8 dot-product tree into SDOT under has_dotprod, but the mixed unsigned x signed form had no equivalent, so on a FEAT_I8MM part it kept the umull/smull + saddlp widening fallback even though USDOT computes it in a single instruction. x64 already lowers this form to VPDPBUSD on a VNNI host; aarch64 covered only the signed case.

That mixed shape is what quantized inference produces — unsigned activations against signed weights — which is the reason USDOT and VPDPBUSD exist at all.

How

Mirrors the existing SDOT support:

Testing

What I could not verify locally

My machine is an M1, where hw.optional.arm.FEAT_I8MM = 0, so USDOT never executes here. What I did verify locally:

What remains for CI on I8MM hardware is that USDOT itself produces those same values. Flagging it plainly since a wrong dot-product rule is a silent miscompile rather than a crash.

One open question from #14050, in case it matters: I derived the mixed-tree pattern from the fallback lowering rather than from a mid-end dump, so if the mid-end normalises the mixed form differently than the signed one, the rule may need its shape adjusted.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 31 2026 at 18:13):

darmie requested alexcrichton for a review on PR #14054.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 31 2026 at 18:13):

darmie requested wasmtime-compiler-reviewers for a review on PR #14054.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 31 2026 at 18:16):

darmie edited PR #14054:

Implements #14050.

aarch64 folds the signed i8 dot tree into SDOT under has_dotprod; the mixed unsigned-by-signed form had no equivalent and kept the umull/smull + saddlp fallback. x64 already lowers that form to VPDPBUSD.

Mirrors the SDOT support: has_i8mm setting + host detection + use_i8mm extractor, the USDOT encoding, and a rule beside the SDOT one — same tree, one operand widening unsigned.

Tests: precise-output filetest for the lowering, plus a runtest (interpreter + native targets, and an aarch64 has_i8mm target) with lanes above 127 to pin the unsigned widening. Existing isa/aarch64 filetests pass unchanged.

FEAT_I8MM = 0 on my machine, so USDOT doesn't execute locally — selection and tree semantics are verified, that USDOT itself matches is for CI.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 31 2026 at 18:19):

darmie converted PR #14054 aarch64: lower mixed unsigned-by-signed i8 dot to USDOT (FEAT_I8MM) to a draft

view this post on Zulip Wasmtime GitHub notifications bot (Jul 31 2026 at 18:19):

darmie commented on PR #14054:

Moving to draft — CI is red on Linux arm64, which is the first host where this rule actually fires (my machine has FEAT_I8MM = 0, so locally it only ever took the fallback path). So this is exactly the case I flagged as unverifiable, and CI caught it.

Not yet diagnosed. My leading suspicion is the rule matching too broadly: it sits at priority 9, above the SDOT rule, and if the mid-end emits uwiden for the i7 operand of i32x4.relaxed_dot_i8x16_i7x16_add_s then this rule would hijack that tree — where USDOT's unsigned operand is the first source, so the operands would be the wrong way round. Will confirm against the failing test before pushing anything further.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 31 2026 at 18:23):

darmie updated PR #14054.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 31 2026 at 18:23):

darmie has marked PR #14054 as ready for review.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 31 2026 at 18:23):

darmie requested wasmtime-core-reviewers for a review on PR #14054.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 31 2026 at 19:57):

darmie updated PR #14054.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 31 2026 at 20:17):

darmie updated PR #14054.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 31 2026 at 20:33):

darmie updated PR #14054.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 31 2026 at 22:04):

github-actions[bot] added the label cranelift:area:aarch64 on PR #14054.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 31 2026 at 22:04):

github-actions[bot] added the label cranelift on PR #14054.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 31 2026 at 22:04):

github-actions[bot] added the label cranelift:meta on PR #14054.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 31 2026 at 22:04):

github-actions[bot] added the label wasmtime:api on PR #14054.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 31 2026 at 22:04):

github-actions[bot] added the label isle on PR #14054.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 31 2026 at 22:04):

github-actions[bot] added the label wasmtime:config on PR #14054.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 31 2026 at 22:04):

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

Subscribe to Label Action

cc @cfallin, @fitzgen

<details>
This issue or pull request has been labeled: "cranelift", "cranelift:area:aarch64", "cranelift:meta", "isle", "wasmtime:api", "wasmtime:config"

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 (Jul 31 2026 at 23:04):

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

Label Messager: wasmtime:config

It looks like you are changing Wasmtime's configuration options. Make sure to
complete this check list:

[fuzzing-config]: https://github.com/bytecodealliance/wasmtime/blob/ca0e8d0a1d8cefc0496dba2f77a670571d8fdcab/crates/fuzzing/src/generators.rs#L182-L194
[fuzzing-docs]: https://docs.wasmtime.dev/contributing-fuzzing.html


<details>

To modify this label's message, edit the <code>.github/label-messager/wasmtime-config.md</code> file.

To add new label messages or remove existing label messages, edit the
<code>.github/label-messager.json</code> configuration file.

Learn more.

</details>

view this post on Zulip Wasmtime GitHub notifications bot (Aug 01 2026 at 00:58):

:thumbs_up: alexcrichton submitted PR review:

Thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Aug 01 2026 at 00:58):

alexcrichton added PR #14054 aarch64: lower mixed unsigned-by-signed i8 dot to USDOT (FEAT_I8MM) to the merge queue

view this post on Zulip Wasmtime GitHub notifications bot (Aug 01 2026 at 01:24):

:check: alexcrichton merged PR #14054.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 01 2026 at 01:24):

alexcrichton removed PR #14054 aarch64: lower mixed unsigned-by-signed i8 dot to USDOT (FEAT_I8MM) from the merge queue


Last updated: Aug 30 2026 at 09:07 UTC