Skip to content

[WebNN-native/Node] support context-based compute graph. - #281

Open
miaobin wants to merge 1 commit into
webmachinelearning:mainfrom
miaobin:context-build-compute
Open

[WebNN-native/Node] support context-based compute graph.#281
miaobin wants to merge 1 commit into
webmachinelearning:mainfrom
miaobin:context-build-compute

Conversation

@miaobin

Copy link
Copy Markdown
Contributor

Move synchronous and asynchronous compute methods from MLGraph to MLContext and rename the methods to MLContext.computeSync and MLContext.compute.

  • Modified webnn.json and webnn_wire.json to sync with the latest spec.
  • Retained the ComputeImpl() method under the GraphBase class and made it as a public member.
  • Retained the overrides of the compute implementation in the Graph classes of each backend.
  • The context-based compute is implemented by calling the ComputeImpl() method of the GraphBase class.
  • Modified the test cases and nodejs binding.

BTW, CI may be blocked, because the PR in the polyfill has not been merged.
@fujunwei@mingmingtasd PTAL, I can optimize the code here firstly.

Comment threadnode/src/Context.cpp Outdated
Comment threadsrc/webnn/native/dml/ContextDML.h Outdated
@miaobin
miaobinforce-pushed the context-build-compute branch 2 times, most recently from 320e789 to 38bb77bCompareJuly 18, 2022 07:42
@miaobin

Copy link
Copy Markdown
ContributorAuthor

Fixed issues related to Wire, @fujunwei@mingmingtasd PTAL, Thanks.

@miaobin
miaobinforce-pushed the context-build-compute branch 2 times, most recently from 5de7fab to 303d6d1CompareNovember 14, 2022 06:34
@miaobin
miaobinforce-pushed the context-build-compute branch from 303d6d1 to 81eba24CompareNovember 22, 2022 05:21
@miaobin
miaobinforce-pushed the context-build-compute branch from 81eba24 to 4d6f702CompareDecember 5, 2022 01:10
Sign up for freeto 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.

2 participants

@miaobin@mingmingtasd