diff --git a/testing/web-platform/tests/webnn/validation_tests/clamp.https.any.js b/testing/web-platform/tests/webnn/validation_tests/clamp.https.any.js index 126fa90e167fb..ce1394802ed24 100644 --- a/testing/web-platform/tests/webnn/validation_tests/clamp.https.any.js +++ b/testing/web-platform/tests/webnn/validation_tests/clamp.https.any.js @@ -6,8 +6,7 @@ validateInputFromAnotherBuilder('clamp'); -validateUnaryOperation( - 'clamp', allWebNNOperandDataTypes, /*alsoBuildActivation=*/ true); +validateUnaryOperation('clamp', allWebNNOperandDataTypes); promise_test(async t => { const options = {minValue: 1.0, maxValue: 3.0}; @@ -27,11 +26,6 @@ promise_test(async t => { assert_array_equals(output.shape(), [1, 2, 3, 4]); }, '[clamp] Test building an operator with options.minValue == options.maxValue'); -promise_test(async t => { - const options = {minValue: 2.0}; - builder.clamp(options); -}, '[clamp] Test building an activation with options'); - promise_test(async t => { const options = {minValue: 3.0, maxValue: 1.0}; const input = @@ -46,15 +40,3 @@ promise_test(async t => { const input = builder.input('input', {dataType: 'float16', dimensions: []}); assert_throws_js(TypeError, () => builder.clamp(input, options)); }, '[clamp] Throw if options.minValue is -Infinity when building an operator'); - -promise_test(async t => { - const options = {minValue: 2.0, maxValue: -1.0}; - assert_throws_js(TypeError, () => builder.clamp(options)); -}, '[clamp] Throw if options.minValue > options.maxValue when building an activation'); - -// To be removed once NaN `maxValue` is allowed. Tracked in -// https://github.com/webmachinelearning/webnn/pull/647. -promise_test(async t => { - const options = {maxValue: NaN}; - assert_throws_js(TypeError, () => builder.clamp(options)); -}, '[clamp] Throw if options.maxValue is NaN when building an activation'); diff --git a/testing/web-platform/tests/webnn/validation_tests/gru.https.any.js b/testing/web-platform/tests/webnn/validation_tests/gru.https.any.js index 50d39d297a396..b1b576e96d070 100644 --- a/testing/web-platform/tests/webnn/validation_tests/gru.https.any.js +++ b/testing/web-platform/tests/webnn/validation_tests/gru.https.any.js @@ -430,8 +430,8 @@ multi_builder_test(async (t, builder, otherBuilder) => { }, '[gru] throw if initialHiddenState option is from another builder'); multi_builder_test(async (t, builder, otherBuilder) => { - const activation = builder.clamp(); - const activationFromOtherBuilder = otherBuilder.clamp(); + const activation = builder.relu(); + const activationFromOtherBuilder = otherBuilder.relu(); const options = {activations: [activation, activationFromOtherBuilder]}; const input = builder.input('input', kExampleInputDescriptor); diff --git a/testing/web-platform/tests/webnn/validation_tests/gruCell.https.any.js b/testing/web-platform/tests/webnn/validation_tests/gruCell.https.any.js index 3cd9d32b07397..0465928d514fa 100644 --- a/testing/web-platform/tests/webnn/validation_tests/gruCell.https.any.js +++ b/testing/web-platform/tests/webnn/validation_tests/gruCell.https.any.js @@ -454,8 +454,8 @@ multi_builder_test(async (t, builder, otherBuilder) => { }, '[gruCell] throw if recurrentBias option is from another builder'); multi_builder_test(async (t, builder, otherBuilder) => { - const activation = builder.clamp(); - const activationFromOtherBuilder = otherBuilder.clamp(); + const activation = builder.relu(); + const activationFromOtherBuilder = otherBuilder.relu(); const options = {activations: [activation, activationFromOtherBuilder]}; const input = builder.input('input', kExampleInputDescriptor); diff --git a/testing/web-platform/tests/webnn/validation_tests/lstm.https.any.js b/testing/web-platform/tests/webnn/validation_tests/lstm.https.any.js index 18d609798ce93..c7d341a9d5aa2 100644 --- a/testing/web-platform/tests/webnn/validation_tests/lstm.https.any.js +++ b/testing/web-platform/tests/webnn/validation_tests/lstm.https.any.js @@ -456,8 +456,8 @@ multi_builder_test(async (t, builder, otherBuilder) => { }, '[lstm] throw if initialCellState option is from another builder'); multi_builder_test(async (t, builder, otherBuilder) => { - const activation = builder.clamp(); - const activationFromOtherBuilder = otherBuilder.clamp(); + const activation = builder.relu(); + const activationFromOtherBuilder = otherBuilder.relu(); const options = {activations: [activation, activationFromOtherBuilder]}; const input = builder.input('input', kExampleInputDescriptor); diff --git a/testing/web-platform/tests/webnn/validation_tests/lstmCell.https.any.js b/testing/web-platform/tests/webnn/validation_tests/lstmCell.https.any.js index c3769c828d425..d4031b07b24e6 100644 --- a/testing/web-platform/tests/webnn/validation_tests/lstmCell.https.any.js +++ b/testing/web-platform/tests/webnn/validation_tests/lstmCell.https.any.js @@ -187,8 +187,8 @@ multi_builder_test(async (t, builder, otherBuilder) => { }, '[lstmCell] throw if peepholeWeight option is from another builder'); multi_builder_test(async (t, builder, otherBuilder) => { - const activation = builder.clamp(); - const activationFromOtherBuilder = otherBuilder.clamp(); + const activation = builder.relu(); + const activationFromOtherBuilder = otherBuilder.relu(); const options = {activations: [activation, activationFromOtherBuilder]}; const input = builder.input('input', kExampleInputDescriptor);