forked from web-platform-tests/wpt
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WebNN: Implement MLBuffer creation/destroy.
Introduces MLBuffer to the WebNN service. Since MLBuffer exists in the domain of the context, instead of a graph, a dedicated command recorder was needed to ensure future context operations (ie. readBuffer) get applied prior to graph operations. * Defines handles to identify objects in the ML service. * Defines MLBuffer interfaces. * Implements buffer creation and destruction. webmachinelearning/webnn#482 Bug: 1472888 Change-Id: I852eff452346a968812e9f248fbb0a4cfc917dbc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5173676 Reviewed-by: ningxin hu <[email protected]> Reviewed-by: Reilly Grant <[email protected]> Reviewed-by: Alex Gough <[email protected]> Reviewed-by: Rafael Cintron <[email protected]> Commit-Queue: Bryan Bernhart <[email protected]> Cr-Commit-Position: refs/heads/main@{#1270252}
- Loading branch information
Showing
3 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// META: title=test WebNN API buffer operations | ||
// META: global=window,dedicatedworker | ||
// META: script=../resources/utils.js | ||
// META: timeout=long | ||
|
||
'use strict'; | ||
|
||
// https://webmachinelearning.github.io/webnn/#api-mlbuffer | ||
|
||
testCreateWebNNBuffer("create", 4); | ||
|
||
testDestroyWebNNBuffer("destroyTwice"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// META: title=test WebNN API buffer operations | ||
// META: global=window,dedicatedworker | ||
// META: script=../../resources/utils.js | ||
// META: timeout=long | ||
|
||
'use strict'; | ||
|
||
// https://webmachinelearning.github.io/webnn/#api-mlbuffer | ||
|
||
testCreateWebNNBuffer("create", 4, 'gpu'); | ||
|
||
testDestroyWebNNBuffer("destroyTwice", 'gpu'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters