Open
docs: include the RAS suffix in custom package activation paths #134
tianjunAdd on Oct 2
docs: include the RAS suffix in custom package activation paths #134
Open
Total: 2 files changed+14-14
| @@ -76,7 +76,7 @@ If compiling in an environment with internet access, third-party dependencies ar | |||
| 76 | 76 | ||
| 77 | The default installation path for the custom operator package is `${ASCEND_HOME_PATH}/opp/vendors`. ${ASCEND_HOME_PATH} is configured through environment variables and indicates the installation path of the CANN toolkit package, generally ${install_path}/cann. | 77 | The default installation path for the custom operator package is `${ASCEND_HOME_PATH}/opp/vendors`. ${ASCEND_HOME_PATH} is configured through environment variables and indicates the installation path of the CANN toolkit package, generally ${install_path}/cann. |
| 78 | 78 | ||
| 79 | - > Description: You can configure the --install-path=${install_path} parameter to define the operator package installation directory. Before using the custom operator package, execute the source ${install_path}/vendors/${vendor_name}/bin/set_env.bash command. The set_env.bash script appends the custom operator package installation path to the environment variable ASCEND_CUSTOM_OPP_PATH, making the custom operator package effective in the current environment. | 79 | + > Description: You can configure the --install-path=${install_path} parameter to define the operator package installation directory. Before using the custom operator package, execute the source ${install_path}/vendors/${vendor_name}_ras/bin/set_env.bash command. The set_env.bash script appends the custom operator package installation path to the environment variable ASCEND_CUSTOM_OPP_PATH, making the custom operator package effective in the current environment. |
| 80 | 80 | ||
| 81 | 3. **(Optional) Uninstall the custom operator package.** | 81 | 3. **(Optional) Uninstall the custom operator package.** |
| 82 | 82 | ||
| @@ -282,4 +282,4 @@ The default installation directory requires the current user to have read, write | |||
| 282 | 282 | ||
| 283 | ```bash | 283 | ```bash |
| 284 | sudo -E ./build_out/cann-ops-ras-*linux*.run | 284 | sudo -E ./build_out/cann-ops-ras-*linux*.run |
| 285 | - ``` | 285 | + ``` |
| @@ -76,7 +76,7 @@ | |||
| 76 | 76 | ||
| 77 | 自定义算子包默认安装路径为```${ASCEND_HOME_PATH}/opp/vendors```,\$\{ASCEND\_HOME\_PATH\}已通过环境变量配置,表示CANN toolkit包安装路径,一般为\$\{install\_path\}/cann。 | 77 | 自定义算子包默认安装路径为```${ASCEND_HOME_PATH}/opp/vendors```,\$\{ASCEND\_HOME\_PATH\}已通过环境变量配置,表示CANN toolkit包安装路径,一般为\$\{install\_path\}/cann。 |
| 78 | 78 | ||
| 79 | - > 说明:可通过配置--install-path=\$\{install\_path\}参数定义算子包安装目录,在使用自定义算子包前,需执行source \$\{install_path\}/vendors/${vendor_name}/bin/set_env.bash命令,set\_env.bash脚本将自定义算子包安装路径追加到环境变量ASCEND\_CUSTOM\_OPP\_PATH中,使自定义算子包在当前环境中生效。 | 79 | + > 说明:可通过配置--install-path=\$\{install\_path\}参数定义算子包安装目录,在使用自定义算子包前,需执行source \$\{install_path\}/vendors/${vendor_name}_ras/bin/set_env.bash命令,set\_env.bash脚本将自定义算子包安装路径追加到环境变量ASCEND\_CUSTOM\_OPP\_PATH中,使自定义算子包在当前环境中生效。 |
| 80 | 80 | ||
| 81 | 3. **(可选)卸载自定义算子包。** | 81 | 3. **(可选)卸载自定义算子包。** |
| 82 | 82 | ||
| @@ -111,7 +111,7 @@ | |||
| 111 | ```bash | 111 | ```bash |
| 112 | Self-extractable archive "cann-${soc_name}-ops-ras_${cann_version}_linux-${arch}.run" successfully created. | 112 | Self-extractable archive "cann-${soc_name}-ops-ras_${cann_version}_linux-${arch}.run" successfully created. |
| 113 | ``` | 113 | ``` |
| 114 | - | 114 | + |
| 115 | \$\{soc\_name\}表示NPU型号名称,即\$\{soc\_version\}删除"ascend"后剩余的内容。编译成功后,run包存放于build_out目录下。 | 115 | \$\{soc\_name\}表示NPU型号名称,即\$\{soc\_version\}删除"ascend"后剩余的内容。编译成功后,run包存放于build_out目录下。 |
| 116 | 116 | ||
| 117 | 2. **安装ops-ras包** | 117 | 2. **安装ops-ras包** |
| @@ -186,36 +186,36 @@ | |||
| 186 | 将下载好的第三方软件上传至离线环境,可存放在`third_party`目录或自定义目录下。**推荐前者,其编译命令与联网编译场景下的命令一致。** | 186 | 将下载好的第三方软件上传至离线环境,可存放在`third_party`目录或自定义目录下。**推荐前者,其编译命令与联网编译场景下的命令一致。** |
| 187 | 187 | ||
| 188 | - **third\_party目录**(推荐) | 188 | - **third\_party目录**(推荐) |
| 189 | - | 189 | + |
| 190 | 请在本项目根目录创建`third_party`目录(若有则无需创建),将第三方软件拷贝到该指定目录。此时编译命令与联网编译命令一致,具体参考[联网编译](#联网编译)。 | 190 | 请在本项目根目录创建`third_party`目录(若有则无需创建),将第三方软件拷贝到该指定目录。此时编译命令与联网编译命令一致,具体参考[联网编译](#联网编译)。 |
| 191 | - | 191 | + |
| 192 | - **自定义目录** | 192 | - **自定义目录** |
| 193 | - | 193 | + |
| 194 | 在离线环境的任意位置新建`${cann_3rd_lib_path}`目录,将第三方软件拷贝到该目录,请确保该目录有权限访问。 | 194 | 在离线环境的任意位置新建`${cann_3rd_lib_path}`目录,将第三方软件拷贝到该目录,请确保该目录有权限访问。 |
| 195 | 195 | ||
| 196 | ```bash | 196 | ```bash |
| 197 | mkdir -p ${cann_3rd_lib_path} | 197 | mkdir -p ${cann_3rd_lib_path} |
| 198 | ``` | 198 | ``` |
| 199 | - | 199 | + |
| 200 | 此时编译命令需在联网编译命令基础上额外增加`--cann_3rd_lib_path=${cann_3rd_lib_path}`用于指定第三方软件所在路径。假设存放路径为`/path/cann_3rd_lib_path`,不同编译方式对应的命令如下: | 200 | 此时编译命令需在联网编译命令基础上额外增加`--cann_3rd_lib_path=${cann_3rd_lib_path}`用于指定第三方软件所在路径。假设存放路径为`/path/cann_3rd_lib_path`,不同编译方式对应的命令如下: |
| 201 | - | 201 | + |
| 202 | - 自定义算子包 | 202 | - 自定义算子包 |
| 203 | - | 203 | + |
| 204 | ```bash | 204 | ```bash |
| 205 | bash build.sh --pkg --soc=${soc_version} [--vendor_name=${vendor_name}] [--ops=${op_list}] --cann_3rd_lib_path=${cann_3rd_lib_path} | 205 | bash build.sh --pkg --soc=${soc_version} [--vendor_name=${vendor_name}] [--ops=${op_list}] --cann_3rd_lib_path=${cann_3rd_lib_path} |
| 206 | # 以AddExample算子编译为例 | 206 | # 以AddExample算子编译为例 |
| 207 | # bash build.sh --pkg --soc=ascend910b --ops=add_example -j16 --cann_3rd_lib_path=/path/cann_3rd_lib_path | 207 | # bash build.sh --pkg --soc=ascend910b --ops=add_example -j16 --cann_3rd_lib_path=/path/cann_3rd_lib_path |
| 208 | ``` | 208 | ``` |
| 209 | - | 209 | + |
| 210 | - ops-ras整包 | 210 | - ops-ras整包 |
| 211 | - | 211 | + |
| 212 | ```bash | 212 | ```bash |
| 213 | bash build.sh --pkg [--jit] --soc=${soc_version} --cann_3rd_lib_path=${cann_3rd_lib_path} | 213 | bash build.sh --pkg [--jit] --soc=${soc_version} --cann_3rd_lib_path=${cann_3rd_lib_path} |
| 214 | # bash build.sh --pkg --soc=ascend910b --cann_3rd_lib_path=/path/cann_3rd_lib_path | 214 | # bash build.sh --pkg --soc=ascend910b --cann_3rd_lib_path=/path/cann_3rd_lib_path |
| 215 | ``` | 215 | ``` |
| 216 | - | 216 | + |
| 217 | - ops-ras静态库 | 217 | - ops-ras静态库 |
| 218 | - | 218 | + |
| 219 | ```bash | 219 | ```bash |
| 220 | bash build.sh --pkg --static --soc=${soc_version} --cann_3rd_lib_path=${cann_3rd_lib_path} | 220 | bash build.sh --pkg --static --soc=${soc_version} --cann_3rd_lib_path=${cann_3rd_lib_path} |
| 221 | # bash build.sh --pkg --static --soc=ascend910b --cann_3rd_lib_path=/path/cann_3rd_lib_path | 221 | # bash build.sh --pkg --static --soc=ascend910b --cann_3rd_lib_path=/path/cann_3rd_lib_path |