diff --git a/webnn/validation_tests/gather.https.any.js b/webnn/validation_tests/gather.https.any.js index 668112cc10fff90..4a2ab218f8d2ab3 100644 --- a/webnn/validation_tests/gather.https.any.js +++ b/webnn/validation_tests/gather.https.any.js @@ -18,6 +18,20 @@ const tests = [ axis: 2, output: {dataType: 'float32', dimensions: [1, 2, 5, 6, 4]} }, + { + name: '[gather] Test gather with indices\'s dataType = uint32', + input: {dataType: 'float32', dimensions: [1, 2, 3, 4]}, + indices: {dataType: 'uint32', dimensions: [5, 6]}, + axis: 2, + output: {dataType: 'float32', dimensions: [1, 2, 5, 6, 4]} + }, + { + name: '[gather] Test gather with indices\'s dataType = int32', + input: {dataType: 'float32', dimensions: [1, 2, 3, 4]}, + indices: {dataType: 'int32', dimensions: [5, 6]}, + axis: 2, + output: {dataType: 'float32', dimensions: [1, 2, 5, 6, 4]} + }, { name: '[gather] TypeError is expected if the input is a scalar', input: {dataType: 'float16', dimensions: []}, @@ -32,9 +46,15 @@ const tests = [ }, { name: - '[gather] TypeError is expected if the data type of indices is invalid', + '[gather] TypeError is expected if the data type of indices is float32 which is invalid', input: {dataType: 'float16', dimensions: [1, 2, 3, 4]}, indices: {dataType: 'float32', dimensions: [5, 6]} + }, + { + name: + '[gather] TypeError is expected if the data type of indices is uint64 which is invalid', + input: {dataType: 'float16', dimensions: [1, 2, 3, 4]}, + indices: {dataType: 'uint64', dimensions: [5, 6]} } ];