microsoft/webnn-developer-preview

[Stable Diffusion1_5][WebNN GPU] Failed to execute 'add' on 'MLGraphBuilder': The input operand data types don't match.

Closed this issue ยท 3 comments

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/stable-diffusion-1.5/

  3. Click Load Models button.

Actual Result:

   TypeError: Failed to execute 'add' on 'MLGraphBuilder': The input operand data types don't match. (The error occur when text encode begin to create session.)

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

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

Yes, this is caused by argMax default output data type is "int32" in Chromium prototype now. WebNN EP should set the newly introduced MLArgMinMaxOptions.outputDataType to "int64" for ONNX ArgMax whose output is "int64". This is the same root cause for #17.

@Honry has a fix for WebNN EP: microsoft/onnxruntime#21385

@philloooo, would you plan to send a spec change?

/cc @fdwr

fdwr commented

@philloooo, would you plan to send a spec change?

WebNN spec update for argMin/argMax is here for single axis: https://github.com/webmachinelearning/webnn/pull/724/files
Maybe we should add the outputDataType in that same one?
I'm fine with it being separate too.

(update 1) Never mind, as the above was just merged, and so we need a new separate spec CR for adding outputDataType.

(update 2) Spec change here: webmachinelearning/webnn#730

(update 3) ORT WebNN EP updated: "Add outputDataType option for the ArgMax/ArgMin ops" microsoft/onnxruntime#21385