Skip to content
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
11 changes: 11 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1697,6 +1697,16 @@ An {{MLOperandDescriptor}} |A| is <dfn for=MLOperandDescriptor>equal</dfn> to an
1. Return |elementLength| * |elementSize|.
</details>

<details open algorithm>
<summary>
The <dfn for="MLOperandDescriptor">element count</dfn> of an {{MLOperandDescriptor}} |desc| is the value returned by the following steps:
</summary>
1. Let |elementCount| be 1.
1. [=list/For each=] |dimension| of |desc|.{{MLOperandDescriptor/shape}}:
1. Set |elementCount| to |elementCount| * |dimension|.
1. Return |elementCount|.
</details>

<p>
A <dfn>valid dimension</dfn> is an integer greater than zero and in the range of {{long}}. Implementations may impose a smaller upper bound.
</p>
Expand All @@ -1712,6 +1722,7 @@ Issue(391): Should 0-size dimensions be supported?

Issue(456): The maximum number of operand dimensions is not defined, but native ML APIs usually have a maximum supported size.

1. If |descriptor|'s [=MLOperandDescriptor/element count=] is not a [=valid dimension=], then return false.
1. If |descriptor|'s [=MLOperandDescriptor/byte length=] is not supported by the implementation, then return false.
1. Return true.
</details>
Expand Down