mindspore.runtime.launch_blocking
- mindspore.runtime.launch_blocking()[source]
Indicates that synchronizing the execution of the startup device reduces the execution performance of the program.
In the initial state when this interface is not called, the operator executes asynchronously on the device. In this case, when an error occurs in the execution of the operator, it will not be possible to locate the position of the particular error script code.
When this interface is called, the operator is executed in a synchronized manner on the device. At this point, when an error occurs in the execution of the operator, the location of the erroneous script code can be located based on the error call stack.
Examples
>>> import mindspore as ms >>> ms.set_device("Ascend", 1) >>> ms.runtime.launch_blocking()