[INFO] Initializing environment for https://gitcode.com/pre-commit/pre-commit-hooks. [WARNING] repo `https://gitcode.com/pre-commit/pre-commit-hooks` uses deprecated stage names (commit, push) which will be removed in a future version. Hint: often `pre-commit autoupdate --repo https://gitcode.com/pre-commit/pre-commit-hooks` will fix this. if it does not -- consider reporting an issue to that repo. [INFO] Initializing environment for https://gitcode.com/pre-commit-clang/mirrors-clang-format. [INFO] Initializing environment for https://gitcode.com/gh_mirrors/ru/ruff-pre-commit. [INFO] Initializing environment for https://gitcode.com/gh_mirrors/co/codespell. [INFO] Installing environment for https://gitcode.com/pre-commit/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://gitcode.com/pre-commit-clang/mirrors-clang-format. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://gitcode.com/gh_mirrors/ru/ruff-pre-commit. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://gitcode.com/gh_mirrors/co/codespell. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... trim trailing whitespace.................................................Failed - hook id: trailing-whitespace - exit code: 1 - files were modified by this hook Fixing docs/zh/install/compile.md Fixing docs/QUICKSTART.md fix end of files.........................................................Failed - hook id: end-of-file-fixer - exit code: 1 - files were modified by this hook Fixing CONTRIBUTING.md Fixing docs/QUICKSTART_en.md Fixing CONTRIBUTING_en.md Fixing docs/en/install/compile.md check yaml...........................................(no files to check)Skipped check for added large files..............................................Passed check for merge conflicts................................................Passed detect private key.......................................................Passed check json...........................................(no files to check)Skipped clang-format.........................................(no files to check)Skipped ruff check...........................................(no files to check)Skipped ruff format..........................................(no files to check)Skipped codespell................................................................Passed All changes made by hooks: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 741a4ee..9e7fba2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -64,4 +64,4 @@ 如果社区中他人遇到的问题您有合适的解决方法,欢迎您在Issue中发表评论交流,帮助他人解决问题和痛点,共同优化易用性。 - 如果对应Issue需要进行代码修改,您可以在Issue评论框中输入“/assign”或“/assign @yourself”,将该Issue分配给您,跟踪协助解决问题。 \ No newline at end of file + 如果对应Issue需要进行代码修改,您可以在Issue评论框中输入“/assign”或“/assign @yourself”,将该Issue分配给您,跟踪协助解决问题。 diff --git a/CONTRIBUTING_en.md b/CONTRIBUTING_en.md index bc809ef..31ef8de 100644 --- a/CONTRIBUTING_en.md +++ b/CONTRIBUTING_en.md @@ -63,4 +63,4 @@ Developer contribution scenarios mainly include: If you have suitable solutions for problems encountered by others in the community, we welcome you to comment and communicate in the Issue to help others solve problems and pain points, and jointly optimize usability. - If the corresponding Issue requires code modification, you can enter "/assign" or "/assign @yourself" in the Issue comment box to assign this Issue to you for tracking and assisting in solving the problem. \ No newline at end of file + If the corresponding Issue requires code modification, you can enter "/assign" or "/assign @yourself" in the Issue comment box to assign this Issue to you for tracking and assisting in solving the problem. diff --git a/docs/QUICKSTART.md b/docs/QUICKSTART.md index cd9c981..1e79b8a 100644 --- a/docs/QUICKSTART.md +++ b/docs/QUICKSTART.md @@ -23,19 +23,19 @@ > 本指南以单算子编译过程为例,也支持编译整个算子库算子、离线编译等多种场景,更多编译参数说明参见[《build参数说明》](zh/install/build.md),编译过程中的常见问题均可参考[《源码构建指南》](zh/install/compile.md)。 ### 1. 进入项目源码 - + - CANNLab云开发环境: - + 默认提供最新最新版CANN包配套的项目源码,进入源码目录,\$\{gitCode\_id\}替换为开发者个人gitCode账号。 - + ```bash cd /mnt/workspace/gitCode/${gitCode_id}/ops-ras ``` - 非CANNLab云开发环境: - + 根据[release仓库](https://gitcode.com/cann/release-management)源码与CANN版本配套关系,执行如下命令下载源码,\$\{tag\_version\}替换为目标分支标签,例如9.0.0。 - + ```bash git clone -b ${tag_version} https://gitcode.com/cann/ops-ras.git && cd ops-ras ``` diff --git a/docs/QUICKSTART_en.md b/docs/QUICKSTART_en.md index 023e0f6..3a12c35 100644 --- a/docs/QUICKSTART_en.md +++ b/docs/QUICKSTART_en.md @@ -272,4 +272,4 @@ int main() { ## Conclusion -After experiencing the above processes, you have basically completed the operator development process. If you want to further contribute new operators or learn more advanced development, debugging, and other skills, please visit the project README to learn about [Advanced Tutorials](../README.md#学习教程) and [Contribution Guide](../README.md#相关信息), and so on. \ No newline at end of file +After experiencing the above processes, you have basically completed the operator development process. If you want to further contribute new operators or learn more advanced development, debugging, and other skills, please visit the project README to learn about [Advanced Tutorials](../README.md#学习教程) and [Contribution Guide](../README.md#相关信息), and so on. diff --git a/docs/en/install/compile.md b/docs/en/install/compile.md index 4d716fc..13878ba 100644 --- a/docs/en/install/compile.md +++ b/docs/en/install/compile.md @@ -282,4 +282,4 @@ The default installation directory requires the current user to have read, write ```bash sudo -E ./build_out/cann-ops-ras-*linux*.run - ``` \ No newline at end of file + ``` diff --git a/docs/zh/install/compile.md b/docs/zh/install/compile.md index d2ac171..4624d36 100644 --- a/docs/zh/install/compile.md +++ b/docs/zh/install/compile.md @@ -111,7 +111,7 @@ ```bash Self-extractable archive "cann-${soc_name}-ops-ras_${cann_version}_linux-${arch}.run" successfully created. ``` - + \$\{soc\_name\}表示NPU型号名称,即\$\{soc\_version\}删除"ascend"后剩余的内容。编译成功后,run包存放于build_out目录下。 2. **安装ops-ras包** @@ -186,36 +186,36 @@ 将下载好的第三方软件上传至离线环境,可存放在`third_party`目录或自定义目录下。**推荐前者,其编译命令与联网编译场景下的命令一致。** - **third\_party目录**(推荐) - + 请在本项目根目录创建`third_party`目录(若有则无需创建),将第三方软件拷贝到该指定目录。此时编译命令与联网编译命令一致,具体参考[联网编译](#联网编译)。 - + - **自定义目录** - + 在离线环境的任意位置新建`${cann_3rd_lib_path}`目录,将第三方软件拷贝到该目录,请确保该目录有权限访问。 ```bash mkdir -p ${cann_3rd_lib_path} ``` - + 此时编译命令需在联网编译命令基础上额外增加`--cann_3rd_lib_path=${cann_3rd_lib_path}`用于指定第三方软件所在路径。假设存放路径为`/path/cann_3rd_lib_path`,不同编译方式对应的命令如下: - + - 自定义算子包 - + ```bash bash build.sh --pkg --soc=${soc_version} [--vendor_name=${vendor_name}] [--ops=${op_list}] --cann_3rd_lib_path=${cann_3rd_lib_path} # 以AddExample算子编译为例 # bash build.sh --pkg --soc=ascend910b --ops=add_example -j16 --cann_3rd_lib_path=/path/cann_3rd_lib_path ``` - + - ops-ras整包 - + ```bash bash build.sh --pkg [--jit] --soc=${soc_version} --cann_3rd_lib_path=${cann_3rd_lib_path} # bash build.sh --pkg --soc=ascend910b --cann_3rd_lib_path=/path/cann_3rd_lib_path ``` - + - ops-ras静态库 - + ```bash bash build.sh --pkg --static --soc=${soc_version} --cann_3rd_lib_path=${cann_3rd_lib_path} # bash build.sh --pkg --static --soc=ascend910b --cann_3rd_lib_path=/path/cann_3rd_lib_path