Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webnn: Give an MLBuffer an MLOperandDescriptor #46770

Merged
merged 1 commit into from
Jun 15, 2024

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Jun 14, 2024

This CL gives MLBufferDescriptor an MLOperandDescriptor as per
webmachinelearning/webnn#542

To represent this descriptor, this CL also creates a new typemapped
OperandDescriptor type which ensures that the buffer descriptor is
valid. OperandDescriptor will be used more pervasively within WebNN
in follow-up CLs

  1. Move Operand::DataType to DataType (MERGED)
  2. Create a typemapped OperandDescriptor class for MLBuffer <-- this CL
  3. Use OperandDescriptor in mojom::Operand
    4+) Remove duplicate code (especially with //components)

Fuchsia binary size seems to be unavoidable for now, and I suspect
may be temporary once duplicate code is removed in follow-ups.
bloaty shows a binary size increase primarily in
//t/b/r/m/ml/webnn/ml_graph_type_converter.cc, as well as a handful
of other renderer-side files which depend on the mojom component

Bug: 343638938, 325598628
Fuchsia-Binary-Size: See commit description
Cq-Include-Trybots: luci.chromium.try:win11-blink-rel
Change-Id: I775340f5c5e0e80942332cbae750d0d305cdd458
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5604163
Reviewed-by: ningxin hu <[email protected]>
Commit-Queue: Austin Sullivan <[email protected]>
Reviewed-by: Alex Gough <[email protected]>
Reviewed-by: Reilly Grant <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1315553}

This CL gives MLBufferDescriptor an MLOperandDescriptor as per
webmachinelearning/webnn#542

To represent this descriptor, this CL also creates a new typemapped
OperandDescriptor type which ensures that the buffer descriptor is
valid. OperandDescriptor will be used more pervasively within WebNN
in follow-up CLs

1) Move Operand::DataType to DataType (MERGED)
2) Create a typemapped OperandDescriptor class for MLBuffer <-- this CL
3) Use OperandDescriptor in mojom::Operand
4+) Remove duplicate code (especially with //components)

Fuchsia binary size seems to be unavoidable for now, and I suspect
may be temporary once duplicate code is removed in follow-ups.
bloaty shows a binary size increase primarily in
//t/b/r/m/ml/webnn/ml_graph_type_converter.cc, as well as a handful
of other renderer-side files which depend on the mojom component

Bug: 343638938, 325598628
Fuchsia-Binary-Size: See commit description
Cq-Include-Trybots: luci.chromium.try:win11-blink-rel
Change-Id: I775340f5c5e0e80942332cbae750d0d305cdd458
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5604163
Reviewed-by: ningxin hu <[email protected]>
Commit-Queue: Austin Sullivan <[email protected]>
Reviewed-by: Alex Gough <[email protected]>
Reviewed-by: Reilly Grant <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1315553}
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

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

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot merged commit ed9e930 into master Jun 15, 2024
18 checks passed
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-5604163 branch June 15, 2024 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants