github web-platform-tests/wpt merge_pr_48745

latest releases: merge_pr_49470, epochs/three_hourly/2024-12-03_06H, epochs/six_hourly/2024-12-03_06H...
10 months ago

webnn: Use newer DirectML CLIP operator when possible

Uses DML_ELEMENT_WISE_CLIP1_OPERATOR_DESC to implement the clamp
operator instead of DML_ELEMENT_WISE_CLIP_OPERATOR_DESC when the DML
feature level is high enough

The key difference between these operators is that the older operator
always takes min and max values as float32 values and internally
casts to the appropriate data type, whereas the newer operator allows
passing min and max values as the same data type as the input and
output tensors

This moves the casting logic to the caller (us!) so this CL adds WPT
conformance tests for all data types which the DML backend supports
to ensure the explicit casting added in this CL works as expected

Bug: 345280754
Change-Id: I1b952da47901eba1020545e3ac134755de35a17c
Cq-Include-Trybots: luci.chromium.try:mac15-blink-rel,mac15.arm64-blink-rel,mac14-blink-rel,mac14.arm64-blink-rel,win11-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5931165
Commit-Queue: Austin Sullivan asully@chromium.org
Reviewed-by: ningxin hu ningxin.hu@intel.com
Auto-Submit: Austin Sullivan asully@chromium.org
Cr-Commit-Position: refs/heads/main@{#1371801}

Don't miss a new wpt release

NewReleases is sending notifications on new releases.