tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 7738921acf74eb26c45584294afbe07da0542002
parent 8b8510e11701f03a01d7539ce769cef301e658dc
Author: Phillis Tang <phillis@chromium.org>
Date:   Wed,  3 Dec 2025 14:42:00 +0000

Bug 2003437 [wpt PR 56380] - webnn: relax cos and sin tolerance, a=testonly

Automatic update from web-platform-tests
webnn: relax cos and sin tolerance

The cos and sin fp16 tests expect higher accuracy than allowed by
WGSL spec. Adjust it to be the same as the WGSL spec.

Change-Id: Icfda445b2af3207c0ff0fb725ff3d7d7618a865e
Bug: 460534989
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7204672
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Phillis Tang <phillis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1552373}

--

wpt-commits: 79805728e336eb7c589e4f4ddb9ce43b576d6f9d
wpt-pr: 56380

Diffstat:
Mtesting/web-platform/tests/webnn/conformance_tests/cos.https.any.js | 4+++-
Mtesting/web-platform/tests/webnn/conformance_tests/sin.https.any.js | 4+++-
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/testing/web-platform/tests/webnn/conformance_tests/cos.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/cos.https.any.js @@ -15,7 +15,9 @@ const getCosPrecisionTolerance = (graphResources) => { - const toleranceValueDict = {float32: 1 / 1024, float16: 1 / 512}; + // Use the float accuracy for WGSL for float16: + // https://gpuweb.github.io/gpuweb/wgsl/#concrete-float-accuracy + const toleranceValueDict = {float32: 2 ** -10, float16: 2 ** -7}; const expectedDataType = getExpectedDataTypeOfSingleOutput(graphResources.expectedOutputs); return {metricType: 'ATOL', value: toleranceValueDict[expectedDataType]}; diff --git a/testing/web-platform/tests/webnn/conformance_tests/sin.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/sin.https.any.js @@ -15,7 +15,9 @@ const getSinPrecisionTolerance = (graphResources) => { - const toleranceValueDict = {float32: 1 / 1024, float16: 1 / 512}; + // Use the float accuracy for WGSL for float16: + // https://gpuweb.github.io/gpuweb/wgsl/#concrete-float-accuracy + const toleranceValueDict = {float32: 2 ** -10, float16: 2 ** -7}; const expectedDataType = getExpectedDataTypeOfSingleOutput(graphResources.expectedOutputs); return {metricType: 'ATOL', value: toleranceValueDict[expectedDataType]};