From 7cc1a6e65d34e8a33e9571cc719bd34596de1c65 Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Wed, 24 Jan 2024 14:24:13 -0800 Subject: [PATCH] Wording change: Add types to all internal algorithm members --- index.bs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/index.bs b/index.bs index 63185150..f5f22c3a 100644 --- a/index.bs +++ b/index.bs @@ -825,7 +825,7 @@ Its default allowlist is 'self'.
- To create a context given |options|, run these steps: + To create a context given |options| (a {{GPUDevice}} or {{MLContextOptions), run these steps:
1. Let |context| be a new {{MLContext}} object. @@ -931,7 +931,7 @@ The {{MLActivation}} objects (including the ones passed as input to methods) are
- To create an MLActivation given |builder|, |name|, optional |options| and optional |init-steps|, run the following steps: + To create an MLActivation given {{MLGraphBuilder}} |builder|, [=string=] |name|, optional [=ordered map=] |options| and optional algorithm |init-steps|, run the following steps:
1. Let |activation| be a new {{MLActivation}}. @@ -1168,7 +1168,7 @@ partial interface MLContext {
- To validate graph resources, given |resources| and |descriptors|, run the following steps: + To validate graph resources, given {{MLNamedArrayBufferViews}} |resources| and [=ordered map=] |descriptors|, run the following steps:
1. [=map/For each=] |name| → |resource| of |resources|: @@ -1180,7 +1180,7 @@ partial interface MLContext {
- To validate buffer with descriptor given |bufferView| and |descriptor|, run the following steps: + To validate buffer with descriptor given {{MLBufferView}} |bufferView| and {{MLOperandDescriptor}} |descriptor|, run the following steps:
1. If |bufferView|'s [=element type=] does not match to |descriptor|.{{MLOperandDescriptor/dataType}} according to [this table](#appendices-mloperanddatatype-arraybufferview-compatibility), return false. @@ -1190,7 +1190,7 @@ partial interface MLContext {
- To execute graph, given |graph|, |inputs| and |outputs|, run the following steps: + To execute graph, given {{MLGraph}} |graph|, {{MLNamedArrayBufferViews}} |inputs| and {{MLNamedArrayBufferViews}} |outputs|, run the following steps:
1. Let |inputResources| denote the input resources of |graph|.{{MLGraph/[[implementation]]}}. @@ -1514,7 +1514,7 @@ partial interface MLGraphBuilder {
- To create argMin/argMax operation given |op|, {{MLOperand}} |input| and {{MLArgMinMaxOptions}} |options|, run the following steps: + To create argMin/argMax operation given [=string=] |op|, {{MLOperand}} |input| and {{MLArgMinMaxOptions}} |options|, run the following steps:
1. [=Assert=]: |op| is one of "argMin", "argMax". @@ -1783,7 +1783,7 @@ partial interface MLGraphBuilder {
- To check clamp options given |options|, run the following steps: + To check clamp options given {{MLClampOptions}} |options|, run the following steps:
1. If |options|.{{MLClampOptions/minValue}} is greater than |options|.{{MLClampOptions/maxValue}}, then return false. @@ -2397,7 +2397,7 @@ partial interface MLGraphBuilder {
- To create element-wise binary operation given |op|, {{MLOperand}} |a| and {{MLOperand}} |b|, run the following steps: + To create element-wise binary operation given [=string=] |op|, {{MLOperand}} |a| and {{MLOperand}} |b|, run the following steps:
1. [=Assert=]: |op| is one of "add", "sub", "mul", "div", "max", "min", "pow". @@ -2421,7 +2421,7 @@ partial interface MLGraphBuilder {
- To broadcast-shapes given |shape1| and |shape2|, run the following steps: + To broadcast-shapes given [=/list=] |shape1| and [=/list=] |shape2|, run the following steps:
1. [=Assert=]: The type of |shape1| and |shape2| is `sequence of unsigned long`. @@ -2530,7 +2530,7 @@ Although operations *greaterOrEqual* and *lesserOrEqual* can each be implemented
- To create element-wise logical operation given |op|, {{MLOperand}} |a| and an optional {{MLOperand}} |b|, run the following steps: + To create element-wise logical operation given [=string=] |op|, {{MLOperand}} |a| and an optional {{MLOperand}} |b|, run the following steps:
1. [=Assert=]: |op| is one of "equal", "greater", "greaterOrEqual", "lesser", "lesserOrEqual", "not". @@ -2652,7 +2652,7 @@ partial interface MLGraphBuilder {
- To create element-wise unary operation given |op| and {{MLOperand}} |input|, run the following steps: + To create element-wise unary operation given [=string=] |op| and {{MLOperand}} |input|, run the following steps:
1. [=Assert=]: |op| is one of "abs", "ceil", "cos", "erf", "exp", "floor", "identity", "log", "neg", "reciprocal", "sin", "sqrt", "tan". @@ -4820,7 +4820,7 @@ partial interface MLGraphBuilder {
- To create pooling operation given |op|, {{MLOperand}} |input| and {{MLPool2dOptions}} |options|, run the following steps: + To create pooling operation given [=string=] |op|, {{MLOperand}} |input| and {{MLPool2dOptions}} |options|, run the following steps:
1. [=Assert=]: |op| is one of "averagePool2d", "l2Pool2d", "maxPool2d". @@ -5001,7 +5001,7 @@ partial interface MLGraphBuilder {
- To create reduce operation given |op|, {{MLOperand}} |input| and {{MLReduceOptions}} |options|, run the following steps: + To create reduce operation given [=string=] |op|, {{MLOperand}} |input| and {{MLReduceOptions}} |options|, run the following steps:
1. [=Assert=]: |op| is one of "reduceL1", "reduceL2", "reduceLogSum", "reduceLogSumExp", "reduceMax", "reduceMean", "reduceMin", "reduceProduct", "reduceSum", "reduceSumSquare". @@ -6152,7 +6152,7 @@ The {{MLOperand}} objects are created by the methods of {{MLGraphBuilder}}, inte
- To check dimensions given |dimensions| and |type|, run the following steps: + To check dimensions given [=/list=] |dimensions| and {{MLOperandDataType}} |type|, run the following steps:
1. If the [=list/size=] of |dimensions| is 0, return false.