webmachinelearning / webnn-polyfill

🧠⚙️ Web Neural Network API polyfill based on TensorFlow.js
https://www.npmjs.com/package/@webmachinelearning/webnn-polyfill
Apache License 2.0
101 stars 18 forks source link

Support latest spec #238

Closed BruceDai closed 6 months ago

BruceDai commented 6 months ago

Let me firstly apologize for this large PR. It includes below changes to align with latest WebNN API Spec.

@huningxin @Honry PTAL, thanks.

BruceDai commented 6 months ago

@huningxin I've summitted new commits to address your comments. Please take another look, thanks.

BruceDai commented 6 months ago

@huningxin Updated. Please take another review, thanks.

huningxin commented 6 months ago

@Honry , do you have any further comments?

BruceDai commented 6 months ago

have you tested it with webnn-samples?

@Honry Yes, I verified update webnn-polyfill.js by locally running our WebNN Samples by Wasm and WebGL backends. Most samples can run correctly except an error "Kernel 'Complex' not registered for backend 'wasm'" happened for Noise Suppression (NSNet2) sample which is an open issue https://github.com/tensorflow/tfjs/issues/5440 for tensorflow.js.

Honry commented 6 months ago

@BruceDai, super cool! Thank you for your great effort! Looking forward to new release.

BruceDai commented 6 months ago

@huningxin @Honry Thanks for reviewing. I'm going to merge it.