mindspore.device_context
The device_context encapsulates the interface for querying the number of devices with whether the currently specified backend is available.
Cpu Device Backend Management
Returns compute-capable device count of CPU. |
|
Return whether cpu backend is available. |
|
Set the threads number of CPU kernel used. |
Gpu Device Backend Management
Return the number of GPUs available. |
|
Return a bool indicating if CUDA is currently available. |
|
Whether to convert FP32 to TF32 for Conv operators. |
|
Whether to convert FP32 to TF32 for Matmul operators. |
|
Specifies convolution data grad algorithm. |
|
Specifies convolution forward algorithm. |
|
Specifies convolution filter grad algorithm. |
Ascend Device Backend Management
Return compute-capable device count of Ascend. |
|
Returns whether ascend backend is available. |
|
|
Whether to convert FP32 to HF32 for Conv operators. |
|
Whether to convert FP32 to HF32 for Matmul operators. |
Configure mixed precision mode setting. |
|
|
Path to config file of op precision mode. |
Set the maximum duration of executing an operator in seconds. |
|
Enable debugging options for Ascend operators, default not enabled. |
|
Whether to select online compilation.The default settings by the framework are online compilation for static shape, and compiled operator binary files for dynamic shape. |
|
AOE tuning mode setting, which is not set by default. |
|
Set the parameters specific to Ascend Optimization Engine.It needs to be used in conjunction with mindspore.device_context.op_tuning.aoe_tune_mode(tune_mode). |