microsoft / webnn-developer-preview

MIT License
37 stars 7 forks source link

[Segment Anything][WebNN GPU] Failed to execute 'compute' on 'MLContext': Invalid outputs: The type (BigInt64) of the array buffer view #17

Closed JiangYueBook closed 1 month ago

JiangYueBook commented 1 month ago

Repro Steps:

  1. Launch latest Chrome Canary on Windows 11
    C:\Users\AppData\Local\Google\Chrome SxS\Application\chrome.exe" --enable-features=WebMachineLearningNeuralNetwork

  2. Visit https://microsoft.github.io/webnn-developer-preview/demos/segment-anything/

  3. Move mouse to image when the modesl loading finshed.

Actual Result:

   TypeError: Failed to execute 'compute' on 'MLContext': Invalid outputs: The type (BigInt64) of the array buffer view with name "/ArgMax_output_0" doesn't match the expected operand data type (int32).

Environment:

Chrome Canary: 128.0.6600.0 (Official Build)

GPU Driver Version: 32.0.101.5762

Device OS CPU GPU
Laptop Windows 11 23H2 Ultra 7 155H Intel Arc Graphics
ibelem commented 1 month ago

Caused by argMax change: chromium-review.googlesource.com/c/chromium/src/+/5692538

fdwr commented 1 month ago

Breaking change should be addressed once this goes: https://github.com/microsoft/onnxruntime/pull/21385

(update) It's in ORT's WebNN EP. Now need to update the sample to use the newer ORT build.

ibelem commented 1 month ago

This issue has been fixed in demo code https://github.com/microsoft/webnn-developer-preview/pull/19 , please close this issue. Thanks! :)