tor-browser

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

commit f8e9e59c351f6426578646cba45ac7d87f27d26d
parent 74d9ba0e28f56b21e200c35048ba0778aaf413a7
Author: Wei Wang <wei4.wang@intel.com>
Date:   Tue, 21 Oct 2025 10:39:01 +0000

Bug 1994905 [wpt PR 55499] - [WebNN] Remove the deprecated softmax(input) interface, a=testonly

Automatic update from web-platform-tests
[WebNN] Remove the deprecated softmax(input) interface

This CL removes the deprecated softmax(input) interface, because all
Chrome channels already support softmax(input, axis).

Bug: 342919187
Change-Id: I582a1dbad85c26d67a96567d49930f7d2ccfdccb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7046459
Reviewed-by: ningxin hu <ningxin.hu@intel.com>
Reviewed-by: Phillis Tang <phillis@chromium.org>
Commit-Queue: Wei4 Wang <wei4.wang@intel.com>
Cr-Commit-Position: refs/heads/main@{#1532694}

--

wpt-commits: a7cf2ad452928464350b9bafab4ae1d354c0bc4a
wpt-pr: 55499

Diffstat:
Mtesting/web-platform/tests/webnn/conformance_tests/softmax.https.any.js | 12++++++------
Mtesting/web-platform/tests/webnn/validation_tests/softmax.https.any.js | 51---------------------------------------------------
2 files changed, 6 insertions(+), 57 deletions(-)

diff --git a/testing/web-platform/tests/webnn/conformance_tests/softmax.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/softmax.https.any.js @@ -35,7 +35,7 @@ const softmaxTests = [ }, 'operators': [{ 'name': 'softmax', - 'arguments': [{'input': 'softmaxInput'}], + 'arguments': [{'input': 'softmaxInput'}, {'axis': 1}], 'outputs': 'softmaxOutput' }], 'expectedOutputs': { @@ -79,7 +79,7 @@ const softmaxTests = [ }, 'operators': [{ 'name': 'softmax', - 'arguments': [{'input': 'softmaxInput'}], + 'arguments': [{'input': 'softmaxInput'}, {'axis': 1}], 'outputs': 'softmaxOutput' }], 'expectedOutputs': { @@ -123,7 +123,7 @@ const softmaxTests = [ }, 'operators': [{ 'name': 'softmax', - 'arguments': [{'input': 'softmaxInput'}], + 'arguments': [{'input': 'softmaxInput'}, {'axis': 1}], 'outputs': 'softmaxOutput' }], 'expectedOutputs': { @@ -229,7 +229,7 @@ const softmaxTests = [ }, 'operators': [{ 'name': 'softmax', - 'arguments': [{'input': 'softmaxInput'}], + 'arguments': [{'input': 'softmaxInput'}, {'axis': 1}], 'outputs': 'softmaxOutput' }], 'expectedOutputs': { @@ -271,7 +271,7 @@ const softmaxTests = [ }, 'operators': [{ 'name': 'softmax', - 'arguments': [{'input': 'softmaxInput'}], + 'arguments': [{'input': 'softmaxInput'}, {'axis': 1}], 'outputs': 'softmaxOutput' }], 'expectedOutputs': { @@ -312,7 +312,7 @@ const softmaxTests = [ }, 'operators': [{ 'name': 'softmax', - 'arguments': [{'input': 'softmaxInput'}], + 'arguments': [{'input': 'softmaxInput'}, {'axis': 1}], 'outputs': 'softmaxOutput' }], 'expectedOutputs': { diff --git a/testing/web-platform/tests/webnn/validation_tests/softmax.https.any.js b/testing/web-platform/tests/webnn/validation_tests/softmax.https.any.js @@ -7,57 +7,6 @@ 'use strict'; -const tests_without_axis = [ - { - name: '[softmax] Test building Softmax with float32 input without axis.', - input: {dataType: 'float32', shape: [4, 3]}, - output: {dataType: 'float32', shape: [4, 3]} - }, - { - name: '[softmax] Test building Softmax with float16 input without axis.', - input: {dataType: 'float16', shape: [3, 5]}, - output: {dataType: 'float16', shape: [3, 5]} - }, - { - name: '[softmax] Throw if the input is not a non-floating point data.', - input: {dataType: 'int32', shape: [3, 2]} - }, - { - name: '[softmax] Throw if the input dimensions is not 2.', - input: {dataType: 'float32', shape: [1, 4, 3]} - } -]; - -tests_without_axis.forEach( - test => promise_test(async t => { - const builder = new MLGraphBuilder(context); - let input = builder.input(`input`, test.input); - if (test.output) { - const output = builder.softmax(input); - assert_equals(output.dataType, test.output.dataType); - assert_array_equals(output.shape, test.output.shape); - } else { - const options = { - label: 'softmax_xxx', - }; - try { - builder.softmax(input, options); - } catch (e) { - assert_equals(e.name, 'TypeError'); - const error_message = e.message; - const regrexp = /\[softmax_xxx\]/; - assert_not_equals(error_message.match(regrexp), null); - } - } - }, test.name)); - -multi_builder_test(async (t, builder, otherBuilder) => { - const operandDescriptor = {dataType: 'float32', shape: [2, 3]}; - const inputFromOtherBuilder = otherBuilder.input('input', operandDescriptor); - - assert_throws_js(TypeError, () => builder.softmax(inputFromOtherBuilder)); -}, '[softmax without axis] throw if any input is from another builder'); - const tests = [ { name: '[softmax] Test building Softmax with float32 input.',