mindspore.run_check

mindspore.run_check()[源代码]

提供了便捷的API用以查询MindSpore的安装是否成功。如果检查返回结果中的版本不是你所期望的,请在run_check()之前使用 mindspore.set_context() 设置device_target。

样例:

>>> import mindspore
>>> mindspore.run_check()
MindSpore version: xxx
The result of multiplication calculation is correct, MindSpore has been installed on platform [XX] successfully!