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

Wording change: Add types to all internal algorithm members #536

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ Its <a>default allowlist</a> is <code>'self'</code>.

<details open algorithm>
<summary>
To <dfn>create a context</dfn> given |options|, run these steps:
To <dfn>create a context</dfn> given |options| (a {{GPUDevice}} or {{MLContextOptions), run these steps:
</summary>
<div class=algorithm-steps>
1. Let |context| be a new {{MLContext}} object.
Expand Down Expand Up @@ -931,7 +931,7 @@ The {{MLActivation}} objects (including the ones passed as input to methods) are

<details open algorithm>
<summary>
To <dfn>create an MLActivation</dfn> given |builder|, |name|, optional |options| and optional |init-steps|, run the following steps:
To <dfn>create an MLActivation</dfn> given {{MLGraphBuilder}} |builder|, [=string=] |name|, optional [=ordered map=] |options| and optional algorithm |init-steps|, run the following steps:
</summary>
<div class=algorithm-steps>
1. Let |activation| be a new {{MLActivation}}.
Expand Down Expand Up @@ -1168,7 +1168,7 @@ partial interface MLContext {

<details open algorithm>
<summary>
To <dfn>validate graph resources</dfn>, given |resources| and |descriptors|, run the following steps:
To <dfn>validate graph resources</dfn>, given {{MLNamedArrayBufferViews}} |resources| and [=ordered map=] |descriptors|, run the following steps:
</summary>
<div class=algorithm-steps>
1. [=map/For each=] |name| &rarr; |resource| of |resources|:
Expand All @@ -1180,7 +1180,7 @@ partial interface MLContext {

<details open algorithm>
<summary>
To <dfn>validate buffer with descriptor</dfn> given |bufferView| and |descriptor|, run the following steps:
To <dfn>validate buffer with descriptor</dfn> given {{MLBufferView}} |bufferView| and {{MLOperandDescriptor}} |descriptor|, run the following steps:
</summary>
<div class=algorithm-steps>
1. If |bufferView|'s [=element type=] does not match to |descriptor|.{{MLOperandDescriptor/dataType}} according to [this table](#appendices-mloperanddatatype-arraybufferview-compatibility), return false.
Expand All @@ -1190,7 +1190,7 @@ partial interface MLContext {

<details open algorithm>
<summary>
To <dfn>execute graph</dfn>, given |graph|, |inputs| and |outputs|, run the following steps:
To <dfn>execute graph</dfn>, given {{MLGraph}} |graph|, {{MLNamedArrayBufferViews}} |inputs| and {{MLNamedArrayBufferViews}} |outputs|, run the following steps:
</summary>
<div class=algorithm-steps>
1. Let |inputResources| denote the input resources of |graph|.{{MLGraph/[[implementation]]}}.
Expand Down Expand Up @@ -1514,7 +1514,7 @@ partial interface MLGraphBuilder {

<details open algorithm>
<summary>
To <dfn for="MLGraphBuilder" data-lt="argminmax-op">create argMin/argMax operation</dfn> given |op|, {{MLOperand}} |input| and {{MLArgMinMaxOptions}} |options|, run the following steps:
To <dfn for="MLGraphBuilder" data-lt="argminmax-op">create argMin/argMax operation</dfn> given [=string=] |op|, {{MLOperand}} |input| and {{MLArgMinMaxOptions}} |options|, run the following steps:
</summary>
<div class=algorithm-steps>
1. [=Assert=]: |op| is one of "argMin", "argMax".
Expand Down Expand Up @@ -1783,7 +1783,7 @@ partial interface MLGraphBuilder {

<details open algorithm>
<summary>
To <dfn>check clamp options</dfn> given |options|, run the following steps:
To <dfn>check clamp options</dfn> given {{MLClampOptions}} |options|, run the following steps:
</summary>
<div class=algorithm-steps>
1. If |options|.{{MLClampOptions/minValue}} is greater than |options|.{{MLClampOptions/maxValue}}, then return false.
Expand Down Expand Up @@ -2397,7 +2397,7 @@ partial interface MLGraphBuilder {

<details open algorithm>
<summary>
To <dfn for="MLGraphBuilder" data-lt="element-wise-binary-op">create element-wise binary operation</dfn> given |op|, {{MLOperand}} |a| and {{MLOperand}} |b|, run the following steps:
To <dfn for="MLGraphBuilder" data-lt="element-wise-binary-op">create element-wise binary operation</dfn> given [=string=] |op|, {{MLOperand}} |a| and {{MLOperand}} |b|, run the following steps:
</summary>
<div class=algorithm-steps>
1. [=Assert=]: |op| is one of "add", "sub", "mul", "div", "max", "min", "pow".
Expand All @@ -2421,7 +2421,7 @@ partial interface MLGraphBuilder {

<details open algorithm>
<summary>
To <dfn for="MLGraphBuilder">broadcast-shapes</dfn> given |shape1| and |shape2|, run the following steps:
To <dfn for="MLGraphBuilder">broadcast-shapes</dfn> given [=/list=] |shape1| and [=/list=] |shape2|, run the following steps:
</summary>
<div class=algorithm-steps>
1. [=Assert=]: The type of |shape1| and |shape2| is `sequence of unsigned long`.
Expand Down Expand Up @@ -2530,7 +2530,7 @@ Although operations *greaterOrEqual* and *lesserOrEqual* can each be implemented

<details open algorithm>
<summary>
To <dfn for="MLGraphBuilder" data-lt="element-wise-logical-op">create element-wise logical operation</dfn> given |op|, {{MLOperand}} |a| and an optional {{MLOperand}} |b|, run the following steps:
To <dfn for="MLGraphBuilder" data-lt="element-wise-logical-op">create element-wise logical operation</dfn> given [=string=] |op|, {{MLOperand}} |a| and an optional {{MLOperand}} |b|, run the following steps:
</summary>
<div class=algorithm-steps>
1. [=Assert=]: |op| is one of "equal", "greater", "greaterOrEqual", "lesser", "lesserOrEqual", "not".
Expand Down Expand Up @@ -2652,7 +2652,7 @@ partial interface MLGraphBuilder {

<details open algorithm>
<summary>
To <dfn for="MLGraphBuilder" data-lt="element-wise-unary-op">create element-wise unary operation</dfn> given |op| and {{MLOperand}} |input|, run the following steps:
To <dfn for="MLGraphBuilder" data-lt="element-wise-unary-op">create element-wise unary operation</dfn> given [=string=] |op| and {{MLOperand}} |input|, run the following steps:
</summary>
<div class=algorithm-steps>
1. [=Assert=]: |op| is one of "abs", "ceil", "cos", "erf", "exp", "floor", "identity", "log", "neg", "reciprocal", "sin", "sqrt", "tan".
Expand Down Expand Up @@ -4820,7 +4820,7 @@ partial interface MLGraphBuilder {

<details open algorithm>
<summary>
To <dfn for="MLGraphBuilder" data-lt="pooling-op">create pooling operation</dfn> given |op|, {{MLOperand}} |input| and {{MLPool2dOptions}} |options|, run the following steps:
To <dfn for="MLGraphBuilder" data-lt="pooling-op">create pooling operation</dfn> given [=string=] |op|, {{MLOperand}} |input| and {{MLPool2dOptions}} |options|, run the following steps:
</summary>
<div class=algorithm-steps>
1. [=Assert=]: |op| is one of "averagePool2d", "l2Pool2d", "maxPool2d".
Expand Down Expand Up @@ -5001,7 +5001,7 @@ partial interface MLGraphBuilder {

<details open algorithm>
<summary>
To <dfn for="MLGraphBuilder" data-lt="reduce-op">create reduce operation</dfn> given |op|, {{MLOperand}} |input| and {{MLReduceOptions}} |options|, run the following steps:
To <dfn for="MLGraphBuilder" data-lt="reduce-op">create reduce operation</dfn> given [=string=] |op|, {{MLOperand}} |input| and {{MLReduceOptions}} |options|, run the following steps:
</summary>
<div class=algorithm-steps>
1. [=Assert=]: |op| is one of "reduceL1", "reduceL2", "reduceLogSum", "reduceLogSumExp", "reduceMax", "reduceMean", "reduceMin", "reduceProduct", "reduceSum", "reduceSumSquare".
Expand Down Expand Up @@ -6152,7 +6152,7 @@ The {{MLOperand}} objects are created by the methods of {{MLGraphBuilder}}, inte

<details open algorithm>
<summary>
To <dfn>check dimensions</dfn> given |dimensions| and |type|, run the following steps:
To <dfn>check dimensions</dfn> given [=/list=] |dimensions| and {{MLOperandDataType}} |type|, run the following steps:
</summary>
<div class=algorithm-steps>
1. If the [=list/size=] of |dimensions| is 0, return false.
Expand Down
Loading