mindspore.runtime
Runtime encapsulates interfaces for executor, memory, stream and event. MindSpore abstracts the corresponding modules from different backends, allowing users to schedule hardware resources at the Python layer.
Executor
| Set the threads number of runtime used. | |
| Indicates that synchronizing the execution of the startup device reduces the execution performance of the program. | |
| Enable thread-level core binding to allocate specific CPU cores for key MindSpore modules (main thread, pynative, runtime, and minddata), preventing performance instability caused by CPU core contention among MindSpore threads. | |
| In O0/O1 mode, the incremental inference scenario supports graph capture. | |
| O0 mode supports operator batch parallel delivery interface, supports enabling parallel delivery, and configures parallel number. | 
Memory
| A MemPool warp a  | |
| Receive a .so file via ctypes, and dynamically load the alloc and free functions within it. | |
| Empty cache in the memory pool. | |
| Returns the peak memory size of the memory pool actually occupied by Tensor since the process was started. | |
| Returns the peak value of the total memory managed by the memory pool since the process was started. | |
| Returns the actual memory size currently occupied by Tensor. | |
| Replay the memory operation based on the application and release order of memory_block.csv. | |
| Returns the total amount of memory currently managed by the memory pool. | |
| Returns status information queried from the memory pool. | |
| Returns readable memory pool status information. | |
| Reset the peak memory size managed by the memory pool. | |
| Reset the peak memory size of the memory pool actually occupied by Tensor. | |
| Reset the "peak" stats tracked by memory manager. | |
| Set the memory parameters of runtime device memory management that is implemented using a memory pool. | |
| A context manager that routes allocations and deallocations to a given pool. | 
Stream
| Return communication stream on this device. | |
| Return current stream used on this device. | |
| Return default stream on this device. | |
| Sets the current stream.This is a wrapper API to set the stream. | |
| Synchronize all streams on current device.(Each MindSpore process only occupies one device) | |
| Wrapper around a device stream. | |
| Context-manager that selects a given stream. | 
Event
| Wrapper around a device event. |