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

Drop the support of synchronous execution #548

Merged
merged 3 commits into from
Feb 15, 2024

Conversation

huningxin
Copy link
Contributor

@huningxin huningxin commented Feb 1, 2024

Remove the definition and algorithm steps for

  • ML.createContextSync()
  • MLGraphBuilder.buildSync()
  • MLContext.computeSync()

This PR also removes the synchronous execution description from Programming Model section.

The previous algorithm steps of MLGraphBuilder.build() depends on MLGraphBuilder.buildSync(). The algorithm steps of MLGraphBuilder.buildSync() have issue tracked by #457. That is left to a separate PR. This PR just merges the algorithm steps of MLGraphBuilder.buildSync() into MLGraphBuilder.build() with some modifications:

Fix #531

@wchao1115 @anssiko @inexorabletash , PTAL. Thanks!


Preview | Diff

@inexorabletash
Copy link
Member

The bots seem to be having issues, but I've locally verified that there are no Bikeshed warnings or errors.

index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
@zolkis
Copy link
Collaborator

zolkis commented Feb 2, 2024

PR preview failed, just wanted to call attention to common usage of "execute graph" and other algorithms from the "Synchronous execution" section also in asynchronous execution. These should be moved or merged into the async execution steps. It's hard to see from the diff if that was the case.

index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
@huningxin huningxin requested a review from wchao1115 February 3, 2024 07:08
Copy link
Member

@anssiko anssiko left a comment

Choose a reason for hiding this comment

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

Thanks @huningxin for preparing this PR swiftly to allow this change get into the next spec milestone.

And thanks @inexorabletash for your careful review.

@wchao1115 do you want to signal your +1 for this synchronous execution removal?

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Feb 14, 2024
See webmachinelearning/webnn#548

Deletes all sync methods and simplifies the names of all "Async"
methods - e.g. BuildAsync() -> Build()

Bug: 40283536, 41481333
Change-Id: I3b38d987cb4641ea41ab9a974c46dcba16d5c108
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Feb 14, 2024
See webmachinelearning/webnn#548

Deletes all sync methods and simplifies the names of all "Async"
methods - e.g. BuildAsync() -> Build()

Bug: 40283536, 41481333
Change-Id: I3b38d987cb4641ea41ab9a974c46dcba16d5c108
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Feb 14, 2024
See webmachinelearning/webnn#548

Deletes all sync methods and simplifies the names of all "Async"
methods - e.g. BuildAsync() -> Build()

Bug: 40283536, 41481333
Change-Id: I3b38d987cb4641ea41ab9a974c46dcba16d5c108
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Feb 14, 2024
See webmachinelearning/webnn#548

Deletes all sync methods and simplifies the names of all "Async"
methods - e.g. BuildAsync() -> Build()

Bug: 40283536, 41481333
Change-Id: I3b38d987cb4641ea41ab9a974c46dcba16d5c108
Remove the definition and algorithm steps for
- ML.createContextSync()
- MLGraphBuilder.buildSync()
- MLContext.computeSync()

Fix webmachinelearning#531
@anssiko
Copy link
Member

anssiko commented Feb 15, 2024

By merging, we're checking some boxes:

@anssiko anssiko merged commit 79baee9 into webmachinelearning:main Feb 15, 2024
2 checks passed
github-actions bot added a commit that referenced this pull request Feb 15, 2024
SHA: 79baee9
Reason: push, by anssiko

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Feb 15, 2024
See webmachinelearning/webnn#548

Deletes all sync methods and simplifies the names of all "Async"
methods - e.g. BuildAsync() -> Build()

Bug: 40283536, 41481333
Change-Id: I3b38d987cb4641ea41ab9a974c46dcba16d5c108
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Feb 15, 2024
See webmachinelearning/webnn#548

Deletes all sync methods and simplifies the names of all "Async"
methods - e.g. BuildAsync() -> Build()

Bug: 40283536, 41481333
Change-Id: I3b38d987cb4641ea41ab9a974c46dcba16d5c108
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5292884
Commit-Queue: Austin Sullivan <[email protected]>
Reviewed-by: Reilly Grant <[email protected]>
Reviewed-by: ningxin hu <[email protected]>
Reviewed-by: Alex Gough <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1261223}
aarongable pushed a commit to chromium/chromium that referenced this pull request Feb 16, 2024
This reverts commit a3e84dd.

Reason for revert: One Win 11 , blink_wpt_tests are failing consistently since https://ci.chromium.org/ui/p/chromium/builders/ci/Win11%20Tests%20x64/19453/blamelist This CL seems to be a candidate for causing this.

Original change's description:
> webnn: Remove sync methods
>
> See webmachinelearning/webnn#548
>
> Deletes all sync methods and simplifies the names of all "Async"
> methods - e.g. BuildAsync() -> Build()
>
> Bug: 40283536, 41481333
> Change-Id: I3b38d987cb4641ea41ab9a974c46dcba16d5c108
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5292884
> Commit-Queue: Austin Sullivan <[email protected]>
> Reviewed-by: Reilly Grant <[email protected]>
> Reviewed-by: ningxin hu <[email protected]>
> Reviewed-by: Alex Gough <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1261223}

Bug: 40283536, 41481333
Change-Id: Ib59afe686ae8e18bcad63ff7d15816cd93090f00
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5301381
Owners-Override: Markus Heintz <[email protected]>
Auto-Submit: Markus Heintz <[email protected]>
Commit-Queue: Markus Heintz <[email protected]>
Bot-Commit: Rubber Stamper <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1261576}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Feb 16, 2024
This is a reland of commit a3e84dde09e099bebbe4793ffaa70679168130d6

Original change's description:
> webnn: Remove sync methods
>
> See webmachinelearning/webnn#548
>
> Deletes all sync methods and simplifies the names of all "Async"
> methods - e.g. BuildAsync() -> Build()
>
> Bug: 40283536, 41481333
> Change-Id: I3b38d987cb4641ea41ab9a974c46dcba16d5c108
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5292884
> Commit-Queue: Austin Sullivan <[email protected]>
> Reviewed-by: Reilly Grant <[email protected]>
> Reviewed-by: ningxin hu <[email protected]>
> Reviewed-by: Alex Gough <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1261223}

Bug: 40283536, 41481333
Change-Id: Iffcb922b8175a7181deba1f4c2faa953010ae5c0
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Feb 16, 2024
This is a reland of commit a3e84dde09e099bebbe4793ffaa70679168130d6

This CL contains a few additional changes:
- Enables the async APIs on workers, which was causing bots to fail
  since workers could not call createContext()
- Rebaselines WPTs accordingly
- Updates the WPT expectations for the webnn-service-enabled virtual
  test suite

Original change's description:
> webnn: Remove sync methods
>
> See webmachinelearning/webnn#548
>
> Deletes all sync methods and simplifies the names of all "Async"
> methods - e.g. BuildAsync() -> Build()
>
> Bug: 40283536, 41481333
> Change-Id: I3b38d987cb4641ea41ab9a974c46dcba16d5c108
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5292884
> Commit-Queue: Austin Sullivan <[email protected]>
> Reviewed-by: Reilly Grant <[email protected]>
> Reviewed-by: ningxin hu <[email protected]>
> Reviewed-by: Alex Gough <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1261223}

Bug: 40283536, 41481333, 41485898
Change-Id: Iffcb922b8175a7181deba1f4c2faa953010ae5c0
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Feb 16, 2024
This is a reland of commit a3e84dde09e099bebbe4793ffaa70679168130d6

This CL contains a few additional changes:
- Enables the async APIs on workers, which was causing bots to fail
  since workers could not call createContext()
- Rebaselines WPTs accordingly
- Updates the WPT expectations for the webnn-service-enabled virtual
  test suite

Original change's description:
> webnn: Remove sync methods
>
> See webmachinelearning/webnn#548
>
> Deletes all sync methods and simplifies the names of all "Async"
> methods - e.g. BuildAsync() -> Build()
>
> Bug: 40283536, 41481333
> Change-Id: I3b38d987cb4641ea41ab9a974c46dcba16d5c108
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5292884
> Commit-Queue: Austin Sullivan <[email protected]>
> Reviewed-by: Reilly Grant <[email protected]>
> Reviewed-by: ningxin hu <[email protected]>
> Reviewed-by: Alex Gough <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1261223}

Cq-Include-Trybots: luci.chromium.try:win11-x64-fyi-rel
Bug: 40283536, 41481333, 41485898
Change-Id: Iffcb922b8175a7181deba1f4c2faa953010ae5c0
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Feb 16, 2024
This is a reland of commit a3e84dde09e099bebbe4793ffaa70679168130d6

This CL contains a few additional changes:
- Enables the async APIs on workers, which was causing bots to fail
  since workers could not call createContext()
- Rebaselines WPTs accordingly
- Updates the WPT expectations for the webnn-service-enabled virtual
  test suite

Original change's description:
> webnn: Remove sync methods
>
> See webmachinelearning/webnn#548
>
> Deletes all sync methods and simplifies the names of all "Async"
> methods - e.g. BuildAsync() -> Build()
>
> Bug: 40283536, 41481333
> Change-Id: I3b38d987cb4641ea41ab9a974c46dcba16d5c108
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5292884
> Commit-Queue: Austin Sullivan <[email protected]>
> Reviewed-by: Reilly Grant <[email protected]>
> Reviewed-by: ningxin hu <[email protected]>
> Reviewed-by: Alex Gough <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1261223}

Cq-Include-Trybots: luci.chromium.try:win11-x64-fyi-rel
Bug: 40283536, 41481333, 41485898
Change-Id: Iffcb922b8175a7181deba1f4c2faa953010ae5c0
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Feb 17, 2024
This is a reland of commit a3e84dde09e099bebbe4793ffaa70679168130d6

This CL contains a few additional changes:
- Enables the async APIs on workers, which was causing bots to fail
  since workers could not call createContext()
- Rebaselines WPTs accordingly
- Updates the WPT expectations for the webnn-service-enabled virtual
  test suite

Original change's description:
> webnn: Remove sync methods
>
> See webmachinelearning/webnn#548
>
> Deletes all sync methods and simplifies the names of all "Async"
> methods - e.g. BuildAsync() -> Build()
>
> Bug: 40283536, 41481333
> Change-Id: I3b38d987cb4641ea41ab9a974c46dcba16d5c108
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5292884
> Commit-Queue: Austin Sullivan <[email protected]>
> Reviewed-by: Reilly Grant <[email protected]>
> Reviewed-by: ningxin hu <[email protected]>
> Reviewed-by: Alex Gough <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1261223}

Cq-Include-Trybots: luci.chromium.try:win11-x64-fyi-rel
Bug: 40283536, 41481333, 41485898
Change-Id: Iffcb922b8175a7181deba1f4c2faa953010ae5c0
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Feb 17, 2024
This is a reland of commit a3e84dde09e099bebbe4793ffaa70679168130d6

This CL contains a few additional changes:
- Enables the async APIs on workers, which was causing bots to fail
  since workers could not call createContext()
- Rebaselines WPTs accordingly
- Updates the WPT expectations for the webnn-service-enabled virtual
  test suite

Original change's description:
> webnn: Remove sync methods
>
> See webmachinelearning/webnn#548
>
> Deletes all sync methods and simplifies the names of all "Async"
> methods - e.g. BuildAsync() -> Build()
>
> Bug: 40283536, 41481333
> Change-Id: I3b38d987cb4641ea41ab9a974c46dcba16d5c108
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5292884
> Commit-Queue: Austin Sullivan <[email protected]>
> Reviewed-by: Reilly Grant <[email protected]>
> Reviewed-by: ningxin hu <[email protected]>
> Reviewed-by: Alex Gough <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1261223}

Cq-Include-Trybots: luci.chromium.try:win11-x64-fyi-rel
Bug: 40283536, 41481333, 41485898
Change-Id: Iffcb922b8175a7181deba1f4c2faa953010ae5c0
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Feb 17, 2024
This is a reland of commit a3e84dde09e099bebbe4793ffaa70679168130d6

This CL contains a few additional changes:
- Enables the async APIs on workers, which was causing bots to fail
  since workers could not call createContext()
- Rebaselines WPTs accordingly
- Updates the WPT expectations for the webnn-service-enabled virtual
  test suite

Original change's description:
> webnn: Remove sync methods
>
> See webmachinelearning/webnn#548
>
> Deletes all sync methods and simplifies the names of all "Async"
> methods - e.g. BuildAsync() -> Build()
>
> Bug: 40283536, 41481333
> Change-Id: I3b38d987cb4641ea41ab9a974c46dcba16d5c108
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5292884
> Commit-Queue: Austin Sullivan <[email protected]>
> Reviewed-by: Reilly Grant <[email protected]>
> Reviewed-by: ningxin hu <[email protected]>
> Reviewed-by: Alex Gough <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1261223}

Cq-Include-Trybots: luci.chromium.try:win11-x64-fyi-rel
Bug: 40283536, 41481333, 41485898
Change-Id: Iffcb922b8175a7181deba1f4c2faa953010ae5c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5303774
Reviewed-by: Reilly Grant <[email protected]>
Commit-Queue: Austin Sullivan <[email protected]>
Reviewed-by: Rafael Cintron <[email protected]>
Reviewed-by: Alex Gough <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1262043}
KyleJu pushed a commit to web-platform-tests/wpt that referenced this pull request Feb 20, 2024
This is a reland of commit a3e84dde09e099bebbe4793ffaa70679168130d6

This CL contains a few additional changes:
- Enables the async APIs on workers, which was causing bots to fail
  since workers could not call createContext()
- Rebaselines WPTs accordingly
- Updates the WPT expectations for the webnn-service-enabled virtual
  test suite

Original change's description:
> webnn: Remove sync methods
>
> See webmachinelearning/webnn#548
>
> Deletes all sync methods and simplifies the names of all "Async"
> methods - e.g. BuildAsync() -> Build()
>
> Bug: 40283536, 41481333
> Change-Id: I3b38d987cb4641ea41ab9a974c46dcba16d5c108
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5292884
> Commit-Queue: Austin Sullivan <[email protected]>
> Reviewed-by: Reilly Grant <[email protected]>
> Reviewed-by: ningxin hu <[email protected]>
> Reviewed-by: Alex Gough <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1261223}

Cq-Include-Trybots: luci.chromium.try:win11-x64-fyi-rel
Bug: 40283536, 41481333, 41485898
Change-Id: Iffcb922b8175a7181deba1f4c2faa953010ae5c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5303774
Reviewed-by: Reilly Grant <[email protected]>
Commit-Queue: Austin Sullivan <[email protected]>
Reviewed-by: Rafael Cintron <[email protected]>
Reviewed-by: Alex Gough <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1262043}

Co-authored-by: Austin Sullivan <[email protected]>
marcoscaceres pushed a commit to web-platform-tests/wpt that referenced this pull request Feb 23, 2024
This is a reland of commit a3e84dde09e099bebbe4793ffaa70679168130d6

This CL contains a few additional changes:
- Enables the async APIs on workers, which was causing bots to fail
  since workers could not call createContext()
- Rebaselines WPTs accordingly
- Updates the WPT expectations for the webnn-service-enabled virtual
  test suite

Original change's description:
> webnn: Remove sync methods
>
> See webmachinelearning/webnn#548
>
> Deletes all sync methods and simplifies the names of all "Async"
> methods - e.g. BuildAsync() -> Build()
>
> Bug: 40283536, 41481333
> Change-Id: I3b38d987cb4641ea41ab9a974c46dcba16d5c108
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5292884
> Commit-Queue: Austin Sullivan <[email protected]>
> Reviewed-by: Reilly Grant <[email protected]>
> Reviewed-by: ningxin hu <[email protected]>
> Reviewed-by: Alex Gough <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1261223}

Cq-Include-Trybots: luci.chromium.try:win11-x64-fyi-rel
Bug: 40283536, 41481333, 41485898
Change-Id: Iffcb922b8175a7181deba1f4c2faa953010ae5c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5303774
Reviewed-by: Reilly Grant <[email protected]>
Commit-Queue: Austin Sullivan <[email protected]>
Reviewed-by: Rafael Cintron <[email protected]>
Reviewed-by: Alex Gough <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1262043}

Co-authored-by: Austin Sullivan <[email protected]>
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Feb 28, 2024
…estonly

Automatic update from web-platform-tests
Reland "webnn: Remove sync methods" (#44626)

This is a reland of commit a3e84dde09e099bebbe4793ffaa70679168130d6

This CL contains a few additional changes:
- Enables the async APIs on workers, which was causing bots to fail
  since workers could not call createContext()
- Rebaselines WPTs accordingly
- Updates the WPT expectations for the webnn-service-enabled virtual
  test suite

Original change's description:
> webnn: Remove sync methods
>
> See webmachinelearning/webnn#548
>
> Deletes all sync methods and simplifies the names of all "Async"
> methods - e.g. BuildAsync() -> Build()
>
> Bug: 40283536, 41481333
> Change-Id: I3b38d987cb4641ea41ab9a974c46dcba16d5c108
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5292884
> Commit-Queue: Austin Sullivan <[email protected]>
> Reviewed-by: Reilly Grant <[email protected]>
> Reviewed-by: ningxin hu <[email protected]>
> Reviewed-by: Alex Gough <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1261223}

Cq-Include-Trybots: luci.chromium.try​:win11-x64-fyi-rel
Bug: 40283536, 41481333, 41485898
Change-Id: Iffcb922b8175a7181deba1f4c2faa953010ae5c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5303774
Reviewed-by: Reilly Grant <[email protected]>
Commit-Queue: Austin Sullivan <[email protected]>
Reviewed-by: Rafael Cintron <[email protected]>
Reviewed-by: Alex Gough <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1262043}

Co-authored-by: Austin Sullivan <[email protected]>
--

wpt-commits: 0e308a624676bfea808af80e9a6378ec94dce931
wpt-pr: 44626
ErichDonGubler pushed a commit to erichdongubler-mozilla/firefox that referenced this pull request Feb 28, 2024
…estonly

Automatic update from web-platform-tests
Reland "webnn: Remove sync methods" (#44626)

This is a reland of commit a3e84dde09e099bebbe4793ffaa70679168130d6

This CL contains a few additional changes:
- Enables the async APIs on workers, which was causing bots to fail
  since workers could not call createContext()
- Rebaselines WPTs accordingly
- Updates the WPT expectations for the webnn-service-enabled virtual
  test suite

Original change's description:
> webnn: Remove sync methods
>
> See webmachinelearning/webnn#548
>
> Deletes all sync methods and simplifies the names of all "Async"
> methods - e.g. BuildAsync() -> Build()
>
> Bug: 40283536, 41481333
> Change-Id: I3b38d987cb4641ea41ab9a974c46dcba16d5c108
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5292884
> Commit-Queue: Austin Sullivan <[email protected]>
> Reviewed-by: Reilly Grant <[email protected]>
> Reviewed-by: ningxin hu <[email protected]>
> Reviewed-by: Alex Gough <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1261223}

Cq-Include-Trybots: luci.chromium.try​:win11-x64-fyi-rel
Bug: 40283536, 41481333, 41485898
Change-Id: Iffcb922b8175a7181deba1f4c2faa953010ae5c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5303774
Reviewed-by: Reilly Grant <[email protected]>
Commit-Queue: Austin Sullivan <[email protected]>
Reviewed-by: Rafael Cintron <[email protected]>
Reviewed-by: Alex Gough <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1262043}

Co-authored-by: Austin Sullivan <[email protected]>
--

wpt-commits: 0e308a624676bfea808af80e9a6378ec94dce931
wpt-pr: 44626
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drop the support of synchronous execution
5 participants