1 of 19

2023-01-31

Co-champions: Marat Dukhan, Zhi An Ng

2 of 19

Today

  • Relaxed SIMD based on profiles
  • CG feedback on deterministic semantic for Relaxed madd/nmadd
  • Phase 4 poll

3 of 19

Previously: Relaxed Mode

Positive reception by SIMD subgroup: relaxed-simd/105

Feedback by CG (2022-11-22):

co-design with Profiles, ensuring that Relaxed SIMD use case can be handled.

4 of 19

Full profile

Deterministic profile

Relaxed SIMD semantics

Web engines

Other environments: blockchain processing, live-migration cloud, embedded, etc

5 of 19

Profiles (profiles/pull/5)

Language subset that fits constraints of host environment

1. Syntactic subset (remove instructions)

2. Semantic subset (change instruction implementation)�

Full profile: no restrictions

Deterministic profile: all Relaxed SIMD instructions use deterministic semantics

6 of 19

7 of 19

Summary

Full profile supports relaxed semantics

Deterministic profile uses deterministic semantics (via Wasm SIMD)

  • all Relaxed SIMD instructions have deterministic semantics

[...] only appears with !DET

8 of 19

Spec text changes

9 of 19

Syntax

10 of 19

Execution/Numerics

11 of 19

Relaxed madd/nmadd

2 options for deterministic semantics:

  1. Fused Multiply-Add (FMA, no intermediate rounding)
  2. Multiply + Add (with intermediate rounding)

Would like CG opinion on this.

12 of 19

Execution/Instructions

13 of 19

Binary format

14 of 19

Text format

15 of 19

Benchmarks: end-to-end

16 of 19

Benchmarks: operator-level

17 of 19

Phase 4 poll

18 of 19

Phase 4 requirements

✅ Two or more Web VMs implement the feature.

  • V8 and SpiderMonkey

✅ At least one toolchain implements the feature.

  • Emscripten/LLVM/Binaryen

✅ The formalization and the reference interpreter are usually updated (though these two can be done as part of step 3 at the Working Group chair's discretion).

✅ Community Group has reached consensus in support of the feature.

  • Subgroup has reached consensus

19 of 19

Performance improvements