[wpt-sync] Sync PR 63151 - Fix WebNN binary16 helper rounding
Categories
(Testing :: web-platform-tests, task, P4)
Tracking
(firefox160 fixed)
| Tracking | Status | |
|---|---|---|
| firefox160 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Attachments
(1 file)
|
684.51 KB,
text/plain
|
Details |
Sync web-platform-tests PR 63151 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/63151
Details from upstream follow.
Matt Hargett <plaztiksyke@gmail.com> wrote:
Fix WebNN binary16 helper rounding
The WebNN helper currently rounds binary16 midpoint ties upward and first narrows JavaScript Numbers to float32. That also misclassifies values just above the underflow midpoint and just below the overflow midpoint, and double-rounds values on either side of a binary16 midpoint. These errors affect both test tensors and expected results, obscuring precision regressions in real model integrations.
Convert directly from binary64 with ties-to-even, preserving signed zero and NaN class as required by the WebNN floating-point conversion algorithm.
- Five new browser helper tests fail before the fix; all 14 helper tests pass afterward.
- An independent encoding/midpoint audit passes all 65,536 binary16 encodings and 190,464 signed midpoint/adjacent-binary64 checks.
- WPT lint, JavaScript syntax checks, and
git diff --checkpass.Separate from the ULP-distance fixes in #63150.
| Assignee | ||
Comment 1•1 month ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=104755
| Assignee | ||
Comment 2•1 month ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 589 tests and 10 subtests
Status Summary
Firefox
OK : 318
PASS : 468
FAIL : 1211
ERROR : 30
NOTRUN: 150
Chrome
OK : 348
PASS : 9499
FAIL : 160
Safari
OK : 318
PASS : 468
FAIL : 1211
ERROR : 30
NOTRUN: 150
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
(See attachment for full changes)
Comment 4•1 month ago
|
||
| bugherder | ||
Description
•