WebNN: Add some 1D tests for reduce op with empty axes
According to the WebNN specification[1], if the axes
parameter is
empty, the reduction function is applied to each value in the tensor
individually, with no dimensions being reduced. Currently, most of
the reduce tests focus only on this case for 0D inputs, which is
insufficient for thorough verification. For example, with a 0D input,
operations like reduceMin
and reduceMean
that reduce each value
individually are effectively no-ops. However, for 1D inputs, we can
better verify the behavior of reducing each value individually.
[1] https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-reduce
Bug: 404004620
Change-Id: I61a358c9a3e393adf8b69b87310c426976581c70
Cq-Include-Trybots: luci.chromium.try:win11-blink-rel, mac14.arm64-blink-rel, mac14-blink-rel, mac15.arm64-blink-rel, mac15-blink-rel, linux-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6359997
Reviewed-by: ningxin hu [email protected]
Commit-Queue: Mingming1 Xu [email protected]
Cr-Commit-Position: refs/heads/main@{#1436675}