microsoft / webnn-developer-preview

MIT License
38 stars 7 forks source link

[Segment Anything][SAM ViT-B Decoder] Failed to execute 'constant' on 'MLGraphBuilder': This MLGraphBuilder has already built a graph #20

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. Check demo loading logs

Actual Result:

   [Session Create] SAM ViT-B Decoder (FP16) failed, Failed to execute 'constant' on 'MLGraphBuilder': This MLGraphBuilder has already built a graph.

Environment:

Chrome Canary: 129.0.6617.0 Device OS CPU GPU
Desktop Windows 11 23H2 i7-12700 Nvidia 2080Ti
ibelem commented 1 month ago

Thanks for the report @JiangYueBook

This issue caused by Allow an MLGraphBuilder to build at most one MLGraph, @Honry will update WebNN EP in ONNX Runtime Web and I will update the ORT Web dists later in demo code.

@fdwr @Adele101

fdwr commented 1 month ago

@a-sully Oops, I guess there was some impact. I figured your change would be impact-free for the samples. @Honry Thank you for updating ORT. I guess the WebNN EP builds multiple partitions within the same graph using the same graphBuilder?

Honry commented 1 month ago

@Honry Thank you for updating ORT. I guess the WebNN EP builds multiple partitions within the same graph using the same graphBuilder?

Yes, I am fixing this.

Honry commented 1 month ago

@Honry Thank you for updating ORT. I guess the WebNN EP builds multiple partitions within the same graph using the same graphBuilder?

Yes, I am fixing this.

PR submitted, @fdwr, PTAL, thanks!