@@ -1393,20 +1393,20 @@ Build a composed graph up to a given output operand into a computational graph a
1393
1393
<div class=algorithm-steps>
1394
1394
1. Let |promise| be [=a new promise=] .
1395
1395
1. Return |promise| and run the following steps [=in parallel=] :
1396
- 1. If |outputs| is empty, then [=reject=] |promise| with a {{TypeError}} .
1396
+ 1. If |outputs| is empty, then [=reject=] |promise| with a {{TypeError}} , and abort these steps .
1397
1397
1. [=map/For each=] |name| → |operand| of |outputs|:
1398
- 1. If |name| is empty, then [=reject=] |promise| with a {{TypeError}} .
1399
- 1. If any of the following sub-steps fail, then [=reject=] |promise| with an "{{OperationError}} " {{DOMException}} .
1398
+ 1. If |name| is empty, then [=reject=] |promise| with a {{TypeError}} , and abort these steps .
1399
+ 1. If any of the following sub-steps fail, then [=reject=] |promise| with an "{{OperationError}} " {{DOMException}} , and abort these steps .
1400
1400
1. Let |graph| be a new {{MLGraph}} :
1401
1401
1. Set |graph|.{{MLGraph/[[context]]}} to [=this=] .{{MLGraphBuilder/[[context]]}} .
1402
1402
1. Make a request to the underlying platform to:
1403
1403
1. Connect |graph| to a new [=implementation-defined=] graph implementation |graphImpl| given |graph|.
1404
1404
1. Set |graph|.{{MLGraph/[[implementation]]}} to |graphImpl|.
1405
1405
1. Make a request to the underlying platform to initialize the graph:
1406
1406
1. [=map/For each=] |name| → |operand| of |outputs|:
1407
- 1. If [=validating MLOperand=] given |operand| and [=this=] returns false, then [=reject=] |promise| with a {{TypeError}} .
1407
+ 1. If [=validating MLOperand=] given |operand| and [=this=] returns false, then [=reject=] |promise| with a {{TypeError}} , and abort these steps .
1408
1408
1. If |operand| was created as an input by the underlying platform:
1409
- 1. If |operand|.{{MLOperand/[[name]]}} is not unique for |graphImpl|, then [=reject=] |promise| with a {{TypeError}} .
1409
+ 1. If |operand|.{{MLOperand/[[name]]}} is not unique for |graphImpl|, then [=reject=] |promise| with a {{TypeError}} , and abort these steps .
1410
1410
1. Add |operand|.{{MLOperand/[[descriptor]]}} to |graph|.{{MLGraph/[[inputDescriptors]]}} [|operand|.{{MLOperand/[[name] ]}}].
1411
1411
1. If |operand| was created as a constant by the underlying platform:
1412
1412
1. Implementations MAY preprocess and optimize the tensor data of |operand| for the underlying platform.
0 commit comments