mindspore.runtime
Runtime encapsulates interfaces for stream, event, memory, and executor. MindSpore abstracts the corresponding modules from different backends, allowing users to schedule hardware resources at the Python layer.
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. |
Memory
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. |
|
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. |
|
Release all memory fragments in the memory pool, so that memory arrangement will be optimized. |
|
Set the memory parameters of runtime device memory management that is implemented using a memory pool. |
Executor
Enable thread-level core binding to assign specific CPU cores to MindSpore's main modules (main thread, pynative, runtime, minddata), to prevent unstable performance caused by MindSpore's threads seizing CPU. |
|
Whether to enable synchronous execution. |
|
Set the threads number of runtime used. |