@@ -1542,20 +1542,20 @@ Build a composed graph up to a given output operand into a computational graph a
1542
1542
<div class=algorithm-steps>
1543
1543
1. Let |promise| be [=a new promise=] .
1544
1544
1. Return |promise| and run the following steps [=in parallel=] :
1545
- 1. If |outputs| is empty, then [=reject=] |promise| with a {{TypeError}} .
1545
+ 1. If |outputs| is empty, then [=reject=] |promise| with a {{TypeError}} , and abort these steps .
1546
1546
1. [=map/For each=] |name| → |operand| of |outputs|:
1547
- 1. If |name| is empty, then [=reject=] |promise| with a {{TypeError}} .
1548
- 1. If any of the following sub-steps fail, then [=reject=] |promise| with an "{{OperationError}} " {{DOMException}} .
1547
+ 1. If |name| is empty, then [=reject=] |promise| with a {{TypeError}} , and abort these steps .
1548
+ 1. If any of the following sub-steps fail, then [=reject=] |promise| with an "{{OperationError}} " {{DOMException}} , and abort these steps .
1549
1549
1. Let |graph| be a new {{MLGraph}} :
1550
1550
1. Set |graph|.{{MLGraph/[[context]]}} to [=this=] .{{MLGraphBuilder/[[context]]}} .
1551
1551
1. Make a request to the underlying platform to:
1552
1552
1. Connect |graph| to a new [=implementation-defined=] graph implementation |graphImpl| given |graph|.
1553
1553
1. Set |graph|.{{MLGraph/[[implementation]]}} to |graphImpl|.
1554
1554
1. Make a request to the underlying platform to initialize the graph:
1555
1555
1. [=map/For each=] |name| → |operand| of |outputs|:
1556
- 1. If [=validating MLOperand=] given |operand| and [=this=] returns false, then [=reject=] |promise| with a {{TypeError}} .
1556
+ 1. If [=validating MLOperand=] given |operand| and [=this=] returns false, then [=reject=] |promise| with a {{TypeError}} , and abort these steps .
1557
1557
1. If |operand| was created as an input by the underlying platform:
1558
- 1. If |operand|.{{MLOperand/[[name]]}} is not unique for |graphImpl|, then [=reject=] |promise| with a {{TypeError}} .
1558
+ 1. If |operand|.{{MLOperand/[[name]]}} is not unique for |graphImpl|, then [=reject=] |promise| with a {{TypeError}} , and abort these steps .
1559
1559
1. Add |operand|.{{MLOperand/[[descriptor]]}} to |graph|.{{MLGraph/[[inputDescriptors]]}} [|operand|.{{MLOperand/[[name] ]}}].
1560
1560
1. If |operand| was created as a constant by the underlying platform:
1561
1561
1. Implementations MAY preprocess and optimize the tensor data of |operand| for the underlying platform.
0 commit comments