microsoft / webnn-developer-preview

MIT License
44 stars 10 forks source link

MLTensorUsage is not defined in Classification and Whisper #57

Closed fdwr closed 13 hours ago

fdwr commented 15 hours ago

Google Chrome 133.0.6835.0 (Official Build) canary (64-bit)

Probably from: webnn: Remove grace-period support for MLTensorUsage | https://chromium-review.googlesource.com/c/chromium/src/+/6015318

FYI @a-sully and @ibelem.

Image

Image

ibelem commented 14 hours ago

@fdwr Yes, we discussed this issue at midnight yesterday. Will try to use ort test dists as possible to fix these demos at first.

Google Chrome 133.0.6835.0 (Official Build) canary (64-bit)

fdwr commented 14 hours ago

Relevant: https://github.com/microsoft/onnxruntime/pull/22831

huningxin commented 13 hours ago

A workaround, once the models loaded, open the developer console, paste and run the following polyfill code

if (typeof MLTensorUsage == 'undefined') window.MLTensorUsage = {WEBGPU_INTEROP: 1, READ: 2, WRITE: 4}