mindspore.hal
Hal encapsulates interfaces for device, stream, and event. MindSpore abstracts the corresponding modules from different backends, allowing users to schedule hardware resources at the Python layer.
Device
API Name |
Description |
Supported Platforms |
Returns device count of specified backend. |
|
|
Get the architecture list this MindSpore was compiled for. |
|
|
Get specified device's capability. |
|
|
Get specified device's name. |
|
|
Get specified device's properties. |
|
|
Returns whether specified backend is available. |
|
|
Returns whether specified backend is initialized. |
|
Stream
API Name |
Description |
Supported Platforms |
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
API Name |
Description |
Supported Platforms |
Wrapper around a device event. |
|