From 1f30770acae190dbe9cc82fe7474b8698d185e69 Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Thu, 6 Jun 2024 10:05:05 +0200 Subject: [PATCH 1/5] Adding a WebNN feature --- features/webnn.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 features/webnn.yml diff --git a/features/webnn.yml b/features/webnn.yml new file mode 100644 index 0000000000..140e7db9f3 --- /dev/null +++ b/features/webnn.yml @@ -0,0 +1,5 @@ +name: WebNN +description: The WebNN API constructs and executes computational graphs of neural networks by making use of the various machine learning capabilities and hardware accelerators available on the device. Also known as Web Neural Network API. +spec: https://www.w3.org/TR/webnn/ +status: + baseline: false From 90bb09ab4b94af232941ec44b58e65ee9f31dc6b Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Thu, 6 Jun 2024 10:06:58 +0200 Subject: [PATCH 2/5] Add dist file --- features/webnn.yml.dist | 97 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 features/webnn.yml.dist diff --git a/features/webnn.yml.dist b/features/webnn.yml.dist new file mode 100644 index 0000000000..b753b0c493 --- /dev/null +++ b/features/webnn.yml.dist @@ -0,0 +1,97 @@ +# Generated from: webnn.yml +# Do not edit this file by hand. Edit the source file instead! + +compat_features: + - api.ML + - api.ML.createContext + - api.MLActivation + - api.MLContext + - api.MLContext.compute + - api.MLGraph + - api.MLGraphBuilder + - api.MLGraphBuilder.MLGraphBuilder + - api.MLGraphBuilder.abs + - api.MLGraphBuilder.add + - api.MLGraphBuilder.argMax + - api.MLGraphBuilder.argMin + - api.MLGraphBuilder.averagePool2d + - api.MLGraphBuilder.batchNormalization + - api.MLGraphBuilder.build + - api.MLGraphBuilder.cast + - api.MLGraphBuilder.ceil + - api.MLGraphBuilder.clamp + - api.MLGraphBuilder.concat + - api.MLGraphBuilder.constant + - api.MLGraphBuilder.conv2d + - api.MLGraphBuilder.convTranspose2d + - api.MLGraphBuilder.cos + - api.MLGraphBuilder.div + - api.MLGraphBuilder.elu + - api.MLGraphBuilder.equal + - api.MLGraphBuilder.erf + - api.MLGraphBuilder.exp + - api.MLGraphBuilder.expand + - api.MLGraphBuilder.floor + - api.MLGraphBuilder.gather + - api.MLGraphBuilder.gemm + - api.MLGraphBuilder.greater + - api.MLGraphBuilder.greaterOrEqual + - api.MLGraphBuilder.gru + - api.MLGraphBuilder.gruCell + - api.MLGraphBuilder.hardSigmoid + - api.MLGraphBuilder.hardSwish + - api.MLGraphBuilder.identity + - api.MLGraphBuilder.input + - api.MLGraphBuilder.instanceNormalization + - api.MLGraphBuilder.l2Pool2d + - api.MLGraphBuilder.layerNormalization + - api.MLGraphBuilder.leakyRelu + - api.MLGraphBuilder.lesser + - api.MLGraphBuilder.lesserOrEqual + - api.MLGraphBuilder.linear + - api.MLGraphBuilder.log + - api.MLGraphBuilder.lstm + - api.MLGraphBuilder.lstmCell + - api.MLGraphBuilder.matmul + - api.MLGraphBuilder.max + - api.MLGraphBuilder.maxPool2d + - api.MLGraphBuilder.min + - api.MLGraphBuilder.mul + - api.MLGraphBuilder.neg + - api.MLGraphBuilder.not + - api.MLGraphBuilder.pad + - api.MLGraphBuilder.pow + - api.MLGraphBuilder.prelu + - api.MLGraphBuilder.reciprocal + - api.MLGraphBuilder.reduceL1 + - api.MLGraphBuilder.reduceL2 + - api.MLGraphBuilder.reduceLogSum + - api.MLGraphBuilder.reduceLogSumExp + - api.MLGraphBuilder.reduceMax + - api.MLGraphBuilder.reduceMean + - api.MLGraphBuilder.reduceMin + - api.MLGraphBuilder.reduceProduct + - api.MLGraphBuilder.reduceSum + - api.MLGraphBuilder.reduceSumSquare + - api.MLGraphBuilder.relu + - api.MLGraphBuilder.resample2d + - api.MLGraphBuilder.reshape + - api.MLGraphBuilder.sigmoid + - api.MLGraphBuilder.sin + - api.MLGraphBuilder.slice + - api.MLGraphBuilder.softmax + - api.MLGraphBuilder.softplus + - api.MLGraphBuilder.softsign + - api.MLGraphBuilder.split + - api.MLGraphBuilder.sqrt + - api.MLGraphBuilder.sub + - api.MLGraphBuilder.tan + - api.MLGraphBuilder.tanh + - api.MLGraphBuilder.transpose + - api.MLGraphBuilder.triangular + - api.MLGraphBuilder.where + - api.MLOperand + - api.MLOperand.dataType + - api.MLOperand.shape + - api.Navigator.ml + - api.WorkerNavigator.ml From fe9befa7389f5e8a65d538e8ff1ffbbd7df26dec Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Thu, 6 Jun 2024 10:11:00 +0200 Subject: [PATCH 3/5] Add missing support property --- features/webnn.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/features/webnn.yml b/features/webnn.yml index 140e7db9f3..c6ac4098c4 100644 --- a/features/webnn.yml +++ b/features/webnn.yml @@ -3,3 +3,4 @@ description: The WebNN API constructs and executes computational graphs of neura spec: https://www.w3.org/TR/webnn/ status: baseline: false + support: \ No newline at end of file From 942dd07b16d2d11de6395d7063a7a9c56ca53307 Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Thu, 6 Jun 2024 10:13:50 +0200 Subject: [PATCH 4/5] Fixing missing support --- features/webnn.yml | 3 --- features/webnn.yml.dist | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/features/webnn.yml b/features/webnn.yml index c6ac4098c4..7fa05ba10a 100644 --- a/features/webnn.yml +++ b/features/webnn.yml @@ -1,6 +1,3 @@ name: WebNN description: The WebNN API constructs and executes computational graphs of neural networks by making use of the various machine learning capabilities and hardware accelerators available on the device. Also known as Web Neural Network API. spec: https://www.w3.org/TR/webnn/ -status: - baseline: false - support: \ No newline at end of file diff --git a/features/webnn.yml.dist b/features/webnn.yml.dist index b753b0c493..2a0314225a 100644 --- a/features/webnn.yml.dist +++ b/features/webnn.yml.dist @@ -1,6 +1,9 @@ # Generated from: webnn.yml # Do not edit this file by hand. Edit the source file instead! +status: + baseline: false + support: {} compat_features: - api.ML - api.ML.createContext From 17da463770d4106d6df36a4ea94a4aa50af2cf26 Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Fri, 7 Jun 2024 16:07:36 +0200 Subject: [PATCH 5/5] Add exception for WebNN spec URL --- scripts/specs.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/specs.ts b/scripts/specs.ts index 320d9f022b..51d9a46e63 100644 --- a/scripts/specs.ts +++ b/scripts/specs.ts @@ -32,6 +32,10 @@ const defaultAllowlist: allowlistItem[] = [ [ "https://wicg.github.io/controls-list/", "Allowed because it's shipped in Chrome. Remove this exception if https://github.com/whatwg/html/pull/6715 is merged." + ], + [ + "https://www.w3.org/TR/webnn/", + "Allowed because this URL actually serves the same content as the Editor Draft URL, and because the ED URL is a bit verbose. See https://github.com/mdn/browser-compat-data/pull/22569#issuecomment-1992632118." ] ];