commit 57a094697e94d99f404ad43783eb76acc905f416
parent 69354c86eec294a46d9e77e9d5938abdb1b873af
Author: Phillis Tang <phillis@chromium.org>
Date: Wed, 3 Dec 2025 14:42:12 +0000
Bug 2003441 [wpt PR 56392] - webnn: relax layer norm precision for fp16 test, a=testonly
Automatic update from web-platform-tests
webnn: relax layer norm precision for fp16 test
tflite gpu backend produces correct result but with lower precision
(ULP 29), so relax our test expectations.
Bug: 460534989
Change-Id: I602e8b07e1dfe54e80634d24c6b1d23521df0654
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7213411
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Phillis Tang <phillis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1552508}
--
wpt-commits: 2f6c5c9a8b4b41db940fb08340a35364c88bf965
wpt-pr: 56392
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/testing/web-platform/tests/webnn/conformance_tests/layer_normalization.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/layer_normalization.https.any.js
@@ -22,8 +22,11 @@
// MLOperand input, optional MLLayerNormalizationOptions options = {});
-const getLayerNormPrecisionTolerance = () => {
- return {metricType: 'ULP', value: 14};
+const getLayerNormPrecisionTolerance = (graphResources) => {
+ const toleranceValueDict = {float32: 14, float16: 30};
+ const expectedDataType =
+ getExpectedDataTypeOfSingleOutput(graphResources.expectedOutputs);
+ return {metricType: 'ULP', value: toleranceValueDict[expectedDataType]};
};
const layerNormTests = [