mindspore.runtime.set_kernel_launch_capture
- mindspore.runtime.set_kernel_launch_capture(enable_capture_graph)[source]
In O0/O1 mode, the incremental inference scenario supports graph capture. By capturing the CPU-side operator dispatch behavior into a graph, the performance of CPU-side operator dispatch is improved.
Warning
This is an experimental API that is subject to change or deletion.
- Parameters
enable_capture_graph (bool) – Whether to enable graph capture. It can be turned on or off at any position in the script.
Examples
>>> import mindspore as ms >>> ms.runtime.set_kernel_launch_capture(enable_capture_graph=True)