Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Support latest spec #238

Merged
merged 7 commits into from
Mar 26, 2024
Merged

Conversation

BruceDai
Copy link
Collaborator

@BruceDai BruceDai commented Mar 20, 2024

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

  • Support MLOperandDataType
  • Support shape() and dataType() of MLOperand
  • Support at least 2D inputs for matmul
  • Remove autoPad option of conv2d/convTranspose2d/Pool2d operations
  • Drop sync APIs
  • Drop null value of newShape for reshape
  • Drop squeeze operation
  • Drop MLBufferView
  • Update links
  • Correct some outputShape of tests
  • Upgrade version to 0.1.10

@huningxin @Honry PTAL, thanks.

1. Support MLOperandDataType
2. Support shape() and dataType() of MLOperand
3. Remove autoPad option of conv2d/convTranspose2d/Pool2d operations
4. Drop sync APIs
5. Drop null value of newShape for reshape
6. Drop squeeze operation
7. Drop MLBufferView

Besides, updated links and corrected some outputShape of tests
src/nn/ops/binary.ts Outdated Show resolved Hide resolved
src/nn/ops/conv2d.ts Outdated Show resolved Hide resolved
src/nn/ops/conv2d.ts Outdated Show resolved Hide resolved
src/nn/ops/conv2d.ts Outdated Show resolved Hide resolved
src/nn/ops/conv2d.ts Show resolved Hide resolved
src/nn/ops/conv_transpose2d.ts Outdated Show resolved Hide resolved
src/nn/ops/pool2d.ts Outdated Show resolved Hide resolved
src/nn/ops/pool2d.ts Outdated Show resolved Hide resolved
src/nn/ops/reduce.ts Outdated Show resolved Hide resolved
src/nn/ops/unary.ts Show resolved Hide resolved
@BruceDai
Copy link
Collaborator Author

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

Copy link
Contributor

@huningxin huningxin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left comment for padding, others LGTM, thanks!

src/nn/ops/conv2d.ts Outdated Show resolved Hide resolved
src/nn/ops/conv2d.ts Outdated Show resolved Hide resolved
@BruceDai
Copy link
Collaborator Author

@huningxin Updated. Please take another review, thanks.

Copy link
Contributor

@huningxin huningxin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks much @BruceDai !

@huningxin
Copy link
Contributor

@Honry , do you have any further comments?

Copy link
Contributor

@Honry Honry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍👍👍, have you tested it with webnn-samples?

@BruceDai
Copy link
Collaborator Author

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 tensorflow/tfjs#5440 for tensorflow.js.

@Honry
Copy link
Contributor

Honry commented Mar 25, 2024

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

@BruceDai
Copy link
Collaborator Author

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

@BruceDai BruceDai merged commit d20c9f4 into webmachinelearning:master Mar 26, 2024
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants