Closed Bug 1705446 Opened 4 years ago Closed 4 years ago

WASM simd pref is not read correctly in Firefox (was: WASM SIMD support is broken)

Categories

(Core :: JavaScript: WebAssembly, defect, P1)

x86_64
Linux
defect

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox87 --- unaffected
firefox88 --- unaffected
firefox89 --- fixed

People

(Reporter: gcp, Assigned: lth)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(2 files)

8:22.16 INFO: Last good revision: d5390c04b7ba6c977f704306a4b5bf6fab16248f
8:22.16 INFO: First bad revision: f89e1e839debb71ee6a3f49fee146a0d03c6a537
8:22.16 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=d5390c04b7ba6c977f704306a4b5bf6fab16248f&tochange=f89e1e839debb71ee6a3f49fee146a0d03c6a537

STR:

  1. Make sure javascript.options.wasm_simd = true
  2. Go to lichess.org
  3. Tools->Analysis board
  4. The pane on the right should say "Stockfish 13 NNUE". If WASM SIMD is broken, it will say "Stockfish 11+HCE".

Background: https://lichess.org/blog/YDOKRxQAACgAREB3/stockfish-13-nnue-on-lichess

Regressed by: 1677204
Has Regression Range: --- → yes

OK, something fishy here.

This is the program lichess uses to detect SIMD:

(module
  (type (;0;) (func (result v128)))
  (func (;0;) (type 0) (result v128)
    i32.const 0
    i32x4.splat
    i32.const 0
    i32x4.splat
    i32x4.dot_i16x8_s)
  (export "test" (func 0)))

This validates as it should in the spidermonkey shell, but not in Firefox when I step through the lichess detection code in the debugger. So something is definitely up.

Assignee: nobody → lhansen
Severity: -- → S3
Status: NEW → ASSIGNED
Priority: -- → P1
Attached file nnue.html

Test case for browser. With SIMD enabled, this should print 'true' but it prints 'false' (current Nightly).

The features rewrite got the names of the Firefox wasm prefs wrong, they
all have a wasm_ prefix that got chopped off. We could discuss whether the
prefix should be added in XPCJSContext.cpp or in the WasmFeatures list,
but I think the latter is clearer.

It sucks that we don't have meaningful test cases for this. A manual
test case (see bug) is easy, but how to automate it?

Patch fixes the problem on lichess.

Set release status flags based on info from the regressing bug 1677204

Pushed by lhansen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cb26d49c9f18 Fix Firefox pref names in WasmFeatures. r=rhunt
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
Blocks: wasm-simd
Summary: WASM SIMD support is broken → WASM simd pref is not read correctly in Firefox (was: WASM SIMD support is broken)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: