Reland "Reland "webnn: add int4 and uint4 support for quantizeLinear and dequantizeLinear""
This is a reland of commit c80028acacc05ac6687d44d9af5c95851b88b11e
The original commit was reverted due to the crash of
WebNNGraphImplTest.Resample2dTest for android-oreo-x86-rel.
The root cause of this failure is due to the original CL introduces
GetBitsPerElement() which causes the intermediate bits number as
(34902 * 23243 * 8 * 4: the input operand dimensions [1, 1, 34902, 23343])
which is greater than maximum size_t on 32-bit system, and causes
OperandDescriptor::Create(type, dimensions) returning an unexpected
result.
The solution in this reland CL is using uint64_t instead of size_t for
intermediate calculation result. Besides, this reland CL also fixes a
minor data limited error of quantize_linear_zero_point for DirectML
backend.
Original change's description:
Reland "webnn: add int4 and uint4 support for quantizeLinear and dequantizeLinear"
This is a reland of commit 3a1707bcd20fa2fc4b1036755259ed01dc6632d5.
The original commit was reverted due to the crash of WebNNGraphImplTest.Resample2dTest for android-oreo-x86-rel.However, I can't reproduce this crash locally and the
android-oreo-x86-rel bot in chromium can pass now without
changing any code.Original change's description:
webnn: add int4 and uint4 support for quantizeLinear and dequantizeLinear
This CL also adds some WPT conformance tests to verify the
implementation.Bug: 40206287
Change-Id: Ieb8ce3ae2182388ae7cc98cd1fc8e3d2dcd9c7d2
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/+/5861613
Commit-Queue: Lisha Guo lisha.guo@intel.com
Reviewed-by: ningxin hu ningxin.hu@intel.com
Reviewed-by: Alex Gough ajgo@chromium.org
Reviewed-by: Rafael Cintron rafael.cintron@microsoft.com
Cr-Commit-Position: refs/heads/main@{#1365343}Bug: 40206287
Change-Id: I8c3b922d092214e4c56ffb5298b86c8d12baf8c0
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/+/5918905
Reviewed-by: Rafael Cintron rafael.cintron@microsoft.com
Reviewed-by: ningxin hu ningxin.hu@intel.com
Reviewed-by: Alex Gough ajgo@chromium.org
Commit-Queue: Lisha Guo lisha.guo@intel.com
Cr-Commit-Position: refs/heads/main@{#1366660}
Bug: 40206287
Change-Id: I1dab0a282f8579151387bb67b9045129186215d1
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
Include-Ci-Only-Tests: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5922495
Reviewed-by: Alex Gough ajgo@chromium.org
Commit-Queue: Lisha Guo lisha.guo@intel.com
Reviewed-by: ningxin hu ningxin.hu@intel.com
Cr-Commit-Position: refs/heads/main@{#1369144}