diff --git a/install/mindspore_cpu_install.md b/install/mindspore_cpu_install.md index df1e46112392c76f30b2a3aa4aec8909cf674d84..f2bd38f3978a3ce9b3c775072311bcf1b06fe7c9 100644 --- a/install/mindspore_cpu_install.md +++ b/install/mindspore_cpu_install.md @@ -68,11 +68,11 @@ 2. 在源码根目录下执行如下命令编译MindSpore。 ```bash - bash build.sh -e cpu -z -j4 + bash build.sh -e cpu -j4 ``` > - 在执行上述命令前,需保证可执行文件cmake和patch所在路径已加入环境变量PATH中。 > - `build.sh`中会执行`git clone`获取第三方依赖库的代码,请提前确保git的网络设置正确可用。 - > - 如果编译机性能较好,可在执行中增加-j{线程数}来增加线程数量。如`bash build.sh -e cpu -z -j12`。 + > - 如果编译机性能较好,可在执行中增加-j{线程数}来增加线程数量。如`bash build.sh -e cpu -j12`。 3. 执行如下命令安装MindSpore。 diff --git a/install/mindspore_cpu_install_en.md b/install/mindspore_cpu_install_en.md index b9f10a33c5d1fc8df2900ea3f1c22a9b4cf07599..a2af197e52b5010bad45b6b1cc6d63ef49999366 100644 --- a/install/mindspore_cpu_install_en.md +++ b/install/mindspore_cpu_install_en.md @@ -68,11 +68,11 @@ This document describes how to quickly install MindSpore on a Ubuntu system with 2. Run the following command in the root directory of the source code to compile MindSpore: ```bash - bash build.sh -e cpu -z -j4 + bash build.sh -e cpu -j4 ``` > - Before running the preceding command, ensure that the paths where the executable files cmake and patch store have been added to the environment variable PATH. > - In the `build.sh` script, the `git clone` command will be executed to obtain the code in the third-party dependency database. Ensure that the network settings of Git are correct. - > - If the compiler performance is strong, you can add -j{Number of threads} in to script to increase the number of threads. For example, `bash build.sh -e cpu -z -j12`. + > - If the compiler performance is strong, you can add -j{Number of threads} in to script to increase the number of threads. For example, `bash build.sh -e cpu -j12`. 3. Run the following command to install MindSpore: diff --git a/install/mindspore_d_install.md b/install/mindspore_d_install.md index 2b0ef0e28eacae826f7ce54126cff1bc85376e24..602339400d18875e21cc601fa38fae97256d5917 100644 --- a/install/mindspore_d_install.md +++ b/install/mindspore_d_install.md @@ -33,9 +33,9 @@ | 版本号 | 操作系统 | 可执行文件安装依赖 | 源码编译安装依赖 | | ---- | :--- | :--- | :--- | -| MindSpore 0.5.0-beta | - Ubuntu 18.04 aarch64
- Ubuntu 18.04 x86_64
- EulerOS 2.8 aarch64
- EulerOS 2.5 x86_64 | - [Python](https://www.python.org/downloads/) 3.7.5
- Ascend 910 AI处理器配套软件包(对应版本Atlas Data Center Solution V100R020C00T100)
- [gmp](https://gmplib.org/download/gmp/) 6.1.2
- 其他依赖项参见[requirements.txt](https://gitee.com/mindspore/mindspore/blob/r0.5/requirements.txt) | **编译依赖:**
- [Python](https://www.python.org/downloads/) 3.7.5
- Ascend 910 AI处理器配套软件包(对应版本Atlas Data Center Solution V100R020C00T100)
- [wheel](https://pypi.org/project/wheel/) >= 0.32.0
- [GCC](https://gcc.gnu.org/releases.html) 7.3.0
- [CMake](https://cmake.org/download/) >= 3.14.1
- [patch](http://ftp.gnu.org/gnu/patch/) >= 2.5
- [gmp](https://gmplib.org/download/gmp/) 6.1.2
**安装依赖:**
与可执行文件安装依赖相同 | +| MindSpore 0.5.0-beta | - Ubuntu 18.04 aarch64
- Ubuntu 18.04 x86_64
- EulerOS 2.8 aarch64
- EulerOS 2.5 x86_64 | - [Python](https://www.python.org/downloads/) 3.7.5
- Ascend 910 AI处理器配套软件包(对应版本Atlas Data Center Solution V100R020C00)
- [gmp](https://gmplib.org/download/gmp/) 6.1.2
- 其他依赖项参见[requirements.txt](https://gitee.com/mindspore/mindspore/blob/r0.5/requirements.txt) | **编译依赖:**
- [Python](https://www.python.org/downloads/) 3.7.5
- Ascend 910 AI处理器配套软件包(对应版本Atlas Data Center Solution V100R020C00)
- [wheel](https://pypi.org/project/wheel/) >= 0.32.0
- [GCC](https://gcc.gnu.org/releases.html) 7.3.0
- [CMake](https://cmake.org/download/) >= 3.14.1
- [patch](http://ftp.gnu.org/gnu/patch/) >= 2.5
- [gmp](https://gmplib.org/download/gmp/) 6.1.2
**安装依赖:**
与可执行文件安装依赖相同 | -- 确认当前用户有权限访问Ascend 910 AI处理器配套软件包(对应版本Atlas Data Center Solution V100R020C00T100)的安装路径`/usr/local/Ascend`,若无权限,需要root用户将当前用户添加到`/usr/local/Ascend`所在的用户组,具体配置请详见配套软件包的说明文档。 +- 确认当前用户有权限访问Ascend 910 AI处理器配套软件包(对应版本Atlas Data Center Solution V100R020C00)的安装路径`/usr/local/Ascend`,若无权限,需要root用户将当前用户添加到`/usr/local/Ascend`所在的用户组,具体配置请详见配套软件包的说明文档。 - GCC 7.3.0可以直接通过apt命令安装。 - 在联网状态下,安装whl包时会自动下载`requirements.txt`中的依赖项,其余情况需自行安装。 @@ -57,7 +57,7 @@ ### 配套软件包依赖配置 - - 安装Ascend 910 AI处理器配套软件包(对应版本Atlas Data Center Solution V100R020C00T100)提供的whl包,whl包随配套软件包发布,升级配套软件包之后需要重新安装。 + - 安装Ascend 910 AI处理器配套软件包(对应版本Atlas Data Center Solution V100R020C00)提供的whl包,whl包随配套软件包发布,升级配套软件包之后需要重新安装。 ```bash pip install /usr/local/Ascend/fwkacllib/lib64/topi-{version}-py3-none-any.whl @@ -88,11 +88,11 @@ 2. 在源码根目录下,执行如下命令编译MindSpore。 ```bash - bash build.sh -e d -z + bash build.sh -e ascend ``` > - 在执行上述命令前,需保证可执行文件`cmake`和`patch`所在路径已加入环境变量PATH中。 > - `build.sh`中会执行`git clone`获取第三方依赖库的代码,请提前确保git的网络设置正确可用。 - > - `build.sh`中默认的编译线程数为8,如果编译机性能较差可能会出现编译错误,可在执行中增加-j{线程数}来减少线程数量。如`bash build.sh -e d -z -j4`。 + > - `build.sh`中默认的编译线程数为8,如果编译机性能较差可能会出现编译错误,可在执行中增加-j{线程数}来减少线程数量。如`bash build.sh -e ascend -j4`。 3. 执行如下命令安装MindSpore。 @@ -103,19 +103,40 @@ ## 配置环境变量 -- 安装好MindSpore之后,需要导出Runtime相关环境变量。 +- EulerOS操作系统,安装好MindSpore之后,需要导出Runtime相关环境变量。 ```bash # control log level. 0-DEBUG, 1-INFO, 2-WARNING, 3-ERROR, default level is WARNING. export GLOG_v=2 + # Conda environmental options LOCAL_ASCEND=/usr/local/Ascend # the root directory of run package + # lib libraries that the run package depends on export LD_LIBRARY_PATH=${LOCAL_ASCEND}/add-ons/:${LOCAL_ASCEND}/fwkacllib/lib64:${LD_LIBRARY_PATH} + + # Environment variables that must be configured + export TBE_IMPL_PATH=${LOCAL_ASCEND}/opp/op_impl/built-in/ai_core/tbe # TBE operator implementation tool path + export PATH=${LOCAL_ASCEND}/fwkacllib/ccec_compiler/bin/:${PATH} # TBE operator compilation tool path + export PYTHONPATH=${TBE_IMPL_PATH}:${PYTHONPATH} # Python library that TBE implementation depends on + ``` + +- Ubuntu操作系统,安装好MindSpore之后,需要导出Runtime相关环境变量,注意:需要将如下配置中{version}替换为环境上真实的版本号。 + + ```bash + # control log level. 0-DEBUG, 1-INFO, 2-WARNING, 3-ERROR, default level is WARNING. + export GLOG_v=2 + + # Conda environmental options + LOCAL_ASCEND=/usr/local/Ascend # the root directory of run package + + # lib libraries that the run package depends on + export LD_LIBRARY_PATH=${LOCAL_ASCEND}/add-ons/:${LOCAL_ASCEND}/ascend-toolkit/{version}/fwkacllib/lib64:${LOCAL_ASCEND}/driver/lib64:${LD_LIBRARY_PATH} + # Environment variables that must be configured - export TBE_IMPL_PATH=${LOCAL_ASCEND}/opp/op_impl/built-in/ai_core/tbe # TBE operator implementation tool path - export PATH=${LOCAL_ASCEND}/fwkacllib/ccec_compiler/bin/:${PATH} # TBE operator compilation tool path - export PYTHONPATH=${TBE_IMPL_PATH}:${PYTHONPATH} # Python library that TBE implementation depends on + export TBE_IMPL_PATH=${LOCAL_ASCEND}/ascend-toolkit/{version}/opp/op_impl/built-in/ai_core/tbe # TBE operator implementation tool path + export PATH=${LOCAL_ASCEND}/ascend-toolkit/{version}/fwkacllib/ccec_compiler/bin/:${PATH} # TBE operator compilation tool path + export PYTHONPATH=${TBE_IMPL_PATH}:${PYTHONPATH} # Python library that TBE implementation depends on ``` ## 安装验证 diff --git a/install/mindspore_d_install_en.md b/install/mindspore_d_install_en.md index 95fcee125031e0818c14aaf97105bef5e8bffef1..1b34561f7db256ff17038a17d36bf748b27f1259 100644 --- a/install/mindspore_d_install_en.md +++ b/install/mindspore_d_install_en.md @@ -32,9 +32,9 @@ This document describes how to quickly install MindSpore on an Ascend AI process | Version | Operating System | Executable File Installation Dependencies | Source Code Compilation and Installation Dependencies | | ---- | :--- | :--- | :--- | -| MindSpore 0.5.0-beta | - Ubuntu 18.04 aarch64
- Ubuntu 18.04 x86_64
- EulerOS 2.8 aarch64
- EulerOS 2.5 x86_64 | - [Python](https://www.python.org/downloads/) 3.7.5
- Ascend 910 AI processor software package(Version:Atlas Data Center Solution V100R020C00T100)
- [gmp](https://gmplib.org/download/gmp/) 6.1.2
- For details about other dependency items, see [requirements.txt](https://gitee.com/mindspore/mindspore/blob/r0.5/requirements.txt). | **Compilation dependencies:**
- [Python](https://www.python.org/downloads/) 3.7.5
- Ascend 910 AI processor software package(Version:Atlas Data Center Solution V100R020C00T100)
- [wheel](https://pypi.org/project/wheel/) >= 0.32.0
- [GCC](https://gcc.gnu.org/releases.html) 7.3.0
- [CMake](https://cmake.org/download/) >= 3.14.1
- [patch](http://ftp.gnu.org/gnu/patch/) >= 2.5
- [gmp](https://gmplib.org/download/gmp/) 6.1.2
**Installation dependencies:**
same as the executable file installation dependencies. | +| MindSpore 0.5.0-beta | - Ubuntu 18.04 aarch64
- Ubuntu 18.04 x86_64
- EulerOS 2.8 aarch64
- EulerOS 2.5 x86_64 | - [Python](https://www.python.org/downloads/) 3.7.5
- Ascend 910 AI processor software package(Version:Atlas Data Center Solution V100R020C00)
- [gmp](https://gmplib.org/download/gmp/) 6.1.2
- For details about other dependency items, see [requirements.txt](https://gitee.com/mindspore/mindspore/blob/r0.5/requirements.txt). | **Compilation dependencies:**
- [Python](https://www.python.org/downloads/) 3.7.5
- Ascend 910 AI processor software package(Version:Atlas Data Center Solution V100R020C00)
- [wheel](https://pypi.org/project/wheel/) >= 0.32.0
- [GCC](https://gcc.gnu.org/releases.html) 7.3.0
- [CMake](https://cmake.org/download/) >= 3.14.1
- [patch](http://ftp.gnu.org/gnu/patch/) >= 2.5
- [gmp](https://gmplib.org/download/gmp/) 6.1.2
**Installation dependencies:**
same as the executable file installation dependencies. | -- Confirm that the current user has the right to access the installation path `/usr/local/Ascend `of Ascend 910 AI processor software package(Version:Atlas Data Center Solution V100R020C00T100). If not, the root user needs to add the current user to the user group where `/usr/local/Ascend` is located. For the specific configuration, please refer to the software package instruction document. +- Confirm that the current user has the right to access the installation path `/usr/local/Ascend `of Ascend 910 AI processor software package(Version:Atlas Data Center Solution V100R020C00). If not, the root user needs to add the current user to the user group where `/usr/local/Ascend` is located. For the specific configuration, please refer to the software package instruction document. - GCC 7.3.0 can be installed by using apt command. - When the network is connected, dependency items in the `requirements.txt` file are automatically downloaded during .whl package installation. In other cases, you need to manually install dependency items. @@ -56,7 +56,7 @@ This document describes how to quickly install MindSpore on an Ascend AI process ### Configuring software package Dependencies - - Install the .whl package provided in Ascend 910 AI processor software package(Version:Atlas Data Center Solution V100R020C00T100). The .whl package is released with the software package. After software package is upgraded, reinstall the .whl package. + - Install the .whl package provided in Ascend 910 AI processor software package(Version:Atlas Data Center Solution V100R020C00). The .whl package is released with the software package. After software package is upgraded, reinstall the .whl package. ```bash pip install /usr/local/Ascend/fwkacllib/lib64/topi-{version}-py3-none-any.whl @@ -87,11 +87,11 @@ The compilation and installation must be performed on the Ascend 910 AI processo 2. Run the following command in the root directory of the source code to compile MindSpore: ```bash - bash build.sh -e d -z + bash build.sh -e ascend ``` > - Before running the preceding command, ensure that the paths where the executable files `cmake` and `patch` store have been added to the environment variable PATH. > - In the `build.sh` script, the `git clone` command will be executed to obtain the code in the third-party dependency database. Ensure that the network settings of Git are correct. - > - In the `build.sh` script, the default number of compilation threads is 8. If the compiler performance is poor, compilation errors may occur. You can add -j{Number of threads} in to script to reduce the number of threads. For example, `bash build.sh -e d -z -j4`. + > - In the `build.sh` script, the default number of compilation threads is 8. If the compiler performance is poor, compilation errors may occur. You can add -j{Number of threads} in to script to reduce the number of threads. For example, `bash build.sh -e ascend -j4`. 3. Run the following command to install MindSpore: @@ -102,19 +102,40 @@ The compilation and installation must be performed on the Ascend 910 AI processo ## Configuring Environment Variables -- After MindSpore is installed, export runtime-related environment variables. +- In EulerOS, after MindSpore is installed, export runtime-related environment variables. ```bash # control log level. 0-DEBUG, 1-INFO, 2-WARNING, 3-ERROR, default level is WARNING. export GLOG_v=2 + # Conda environmental options LOCAL_ASCEND=/usr/local/Ascend # the root directory of run package + # lib libraries that the run package depends on export LD_LIBRARY_PATH=${LOCAL_ASCEND}/add-ons/:${LOCAL_ASCEND}/fwkacllib/lib64:${LD_LIBRARY_PATH} + + # Environment variables that must be configured + export TBE_IMPL_PATH=${LOCAL_ASCEND}/opp/op_impl/built-in/ai_core/tbe # TBE operator implementation tool path + export PATH=${LOCAL_ASCEND}/fwkacllib/ccec_compiler/bin/:${PATH} # TBE operator compilation tool path + export PYTHONPATH=${TBE_IMPL_PATH}:${PYTHONPATH} # Python library that TBE implementation depends on + ``` + +- In Ubuntu, after MindSpore is installed, export runtime-related environment variables. Note: you need to replace {version} in the following configuration with the actual version number on the environment. + + ```bash + # control log level. 0-DEBUG, 1-INFO, 2-WARNING, 3-ERROR, default level is WARNING. + export GLOG_v=2 + + # Conda environmental options + LOCAL_ASCEND=/usr/local/Ascend # the root directory of run package + + # lib libraries that the run package depends on + export LD_LIBRARY_PATH=${LOCAL_ASCEND}/add-ons/:${LOCAL_ASCEND}/ascend-toolkit/{version}/fwkacllib/lib64:${LOCAL_ASCEND}/driver/lib64:${LD_LIBRARY_PATH} + # Environment variables that must be configured - export TBE_IMPL_PATH=${LOCAL_ASCEND}/opp/op_impl/built-in/ai_core/tbe # TBE operator implementation tool path - export PATH=${LOCAL_ASCEND}/fwkacllib/ccec_compiler/bin/:${PATH} # TBE operator compilation tool path - export PYTHONPATH=${TBE_IMPL_PATH}:${PYTHONPATH} # Python library that TBE implementation depends on + export TBE_IMPL_PATH=${LOCAL_ASCEND}/ascend-toolkit/{version}/opp/op_impl/built-in/ai_core/tbe # TBE operator implementation tool path + export PATH=${LOCAL_ASCEND}/ascend-toolkit/{version}/fwkacllib/ccec_compiler/bin/:${PATH} # TBE operator compilation tool path + export PYTHONPATH=${TBE_IMPL_PATH}:${PYTHONPATH} # Python library that TBE implementation depends on ``` ## Installation Verification diff --git a/install/mindspore_gpu_install.md b/install/mindspore_gpu_install.md index dc09a2aaefcb1caae615b24398c4e3fff5788aa0..7ebea9626fbf564625e410bbf7a852bdc6369cd2 100644 --- a/install/mindspore_gpu_install.md +++ b/install/mindspore_gpu_install.md @@ -68,11 +68,11 @@ 2. 在源码根目录下执行如下命令编译MindSpore。 ```bash - bash build.sh -e gpu -M on -z + bash build.sh -e gpu ``` > - 在执行上述命令前,需保证可执行文件`cmake`和`patch`所在路径已加入环境变量PATH中。 > - `build.sh`中会执行`git clone`获取第三方依赖库的代码,请提前确保git的网络设置正确可用。 - > - `build.sh`中默认的编译线程数为8,如果编译机性能较差可能会出现编译错误,可在执行中增加-j{线程数}来减少线程数量。如`bash build.sh -e gpu -M on -z -j4`。 + > - `build.sh`中默认的编译线程数为8,如果编译机性能较差可能会出现编译错误,可在执行中增加-j{线程数}来减少线程数量。如`bash build.sh -e gpu -j4`。 3. 执行如下命令安装MindSpore。 diff --git a/install/mindspore_gpu_install_en.md b/install/mindspore_gpu_install_en.md index 740168621062190816cec5a21d20d5a74fd6cc33..626c1e1aa14d12c73bfeb6ec1d70fbec54102189 100644 --- a/install/mindspore_gpu_install_en.md +++ b/install/mindspore_gpu_install_en.md @@ -68,11 +68,11 @@ This document describes how to quickly install MindSpore on a NVIDIA GPU environ 2. Run the following command in the root directory of the source code to compile MindSpore: ```bash - bash build.sh -e gpu -M on -z + bash build.sh -e gpu ``` > - Before running the preceding command, ensure that the paths where the executable files `cmake` and `patch` store have been added to the environment variable PATH. > - In the `build.sh` script, the `git clone` command will be executed to obtain the code in the third-party dependency database. Ensure that the network settings of Git are correct. - > - In the `build.sh` script, the default number of compilation threads is 8. If the compiler performance is poor, compilation errors may occur. You can add -j{Number of threads} in to script to reduce the number of threads. For example, `bash build.sh -e gpu -M on -z -j4`. + > - In the `build.sh` script, the default number of compilation threads is 8. If the compiler performance is poor, compilation errors may occur. You can add -j{Number of threads} in to script to reduce the number of threads. For example, `bash build.sh -e gpu -j4`. 3. Run the following command to install MindSpore: