Merged
fix(docs): Correct install guidance and README documentation center description #6146
anyangleAdd on Sep 10
fix(docs): Correct install guidance and README documentation center description #6146
Merged
Merged fromquadrate/pypto_ayldoc_9.2intocann/pypto9.2.0
Total: 5 files changed+9-8
| @@ -63,7 +63,7 @@ PyPTO提供了丰富的示例代码,涵盖从基础操作到复杂模型实现 | |||
| 63 | ## 📖文档资源 | 63 | ## 📖文档资源 |
| 64 | 64 | ||
| 65 | 若您希望深入体验项目功能并修改源码,请访问如下文档获取详细教程。 | 65 | 若您希望深入体验项目功能并修改源码,请访问如下文档获取详细教程。 |
| 66 | -- [文档中心](https://pypto.gitcode.com) :当前发布版本的详细文档,包括编程指南、API参考,贡献指南等 | 66 | +- [文档中心](https://pypto.gitcode.com):当前发布版本的详细文档,包括PyPTO算子开发、PyPTO API参考等 |
| 67 | - [示例代码](https://gitcode.com/cann/pypto/blob/master/examples/):丰富的示例代码,从基础到高级应用 | 67 | - [示例代码](https://gitcode.com/cann/pypto/blob/master/examples/):丰富的示例代码,从基础到高级应用 |
| 68 | 68 | ||
| 69 | ## 🔍目录结构 | 69 | ## 🔍目录结构 |
| @@ -64,7 +64,7 @@ If you want to quickly experience the usage and development process of PyPTO, re | |||
| 64 | ## Documentation Resources | 64 | ## Documentation Resources |
| 65 | 65 | ||
| 66 | If you want to deeply experience the project features and modify the source code, refer to the following documents for detailed tutorials. | 66 | If you want to deeply experience the project features and modify the source code, refer to the following documents for detailed tutorials. |
| 67 | -- [Documentation Center](https://pypto.gitcode.com): Detailed documentation for the current release version, including programming guides, API references, contribution guides, and more. | 67 | +- [Documentation Center](https://pypto.gitcode.com): Detailed documentation for the current release version, including programming guides (with debugging and tuning tools), API references, and more. |
| 68 | - [Sample Code](https://gitcode.com/cann/pypto/blob/master/examples/): Rich sample code from basic to advanced applications. | 68 | - [Sample Code](https://gitcode.com/cann/pypto/blob/master/examples/): Rich sample code from basic to advanced applications. |
| 69 | 69 | ||
| 70 | ## Directory Structure | 70 | ## Directory Structure |
| @@ -11,11 +11,10 @@ | |||
| 11 | ```bash | 11 | ```bash |
| 12 | # 手动准备第三方源码包后设置 | 12 | # 手动准备第三方源码包后设置 |
| 13 | export PYPTO_THIRD_PARTY_PATH=<path-to-thirdparty> | 13 | export PYPTO_THIRD_PARTY_PATH=<path-to-thirdparty> |
| 14 | - | ||
| 15 | -# 然后执行编译 | ||
| 16 | -python3 -m pip install . --verbose | ||
| 17 | ``` | 14 | ``` |
| 18 | 15 | ||
| 16 | +设置完成后,再执行编译和安装。 | ||
| 17 | + | ||
| 19 | ## 使用约束 | 18 | ## 使用约束 |
| 20 | 19 | ||
| 21 | - 路径下需包含`json-3.11.3`和`libboundscheck-v1.1.16`的源码包。 | 20 | - 路径下需包含`json-3.11.3`和`libboundscheck-v1.1.16`的源码包。 |
| @@ -52,7 +52,7 @@ python3 build_ci.py --clean --no_isolation | |||
| 52 | > [!NOTE] 并行度与内存 | 52 | > [!NOTE] 并行度与内存 |
| 53 | > | 53 | > |
| 54 | > - 若未指定编译并行度,将默认根据 CPU 核数和可用内存(含 cgroup 内存上限)自动计算。 | 54 | > - 若未指定编译并行度,将默认根据 CPU 核数和可用内存(含 cgroup 内存上限)自动计算。 |
| 55 | -> - 也可通过 `-j` 参数或环境变量 `PYPTO_BUILD_JOB_NUM` 显式覆盖,两者在 `pip install .` 和 `build_ci.py` 入口均生效。 | 55 | +> - 也可通过`-j`参数或环境变量`PYPTO_BUILD_JOB_NUM`显式覆盖,在`build_ci.py`入口生效。 |
| 56 | 56 | ||
| 57 | ### 安装 | 57 | ### 安装 |
| 58 | 58 | ||
| @@ -60,16 +60,18 @@ python3 build_ci.py --clean --no_isolation | |||
| 60 | 60 | ||
| 61 | ```bash | 61 | ```bash |
| 62 | cd build_out | 62 | cd build_out |
| 63 | -bash ./cann-pypto_${pypto_version}_${os_arch}.run --full -q --pylocal | 63 | +bash ./cann-pypto_${pypto_version}_${os_arch}.run --full -q --pylocal --install-path=${install_path} |
| 64 | ``` | 64 | ``` |
| 65 | 65 | ||
| 66 | 变量含义说明: | 66 | 变量含义说明: |
| 67 | 67 | ||
| 68 | - \$\{pypto_version}:表示PyPTO包版本号,例如`9.1.0`。 | 68 | - \$\{pypto_version}:表示PyPTO包版本号,例如`9.1.0`。 |
| 69 | - \$\{os_arch}:表示操作系统和CPU架构信息,例如`linux-aarch64`。 | 69 | - \$\{os_arch}:表示操作系统和CPU架构信息,例如`linux-aarch64`。 |
| 70 | +- \$\{install_path}:表示指定安装路径,**须与CANN toolkit安装路径一致**。未指定时,root用户默认安装到`/usr/local/Ascend`,非root用户默认安装到`~/Ascend`。 | ||
| 70 | - `--full`:表示执行完整安装。 | 71 | - `--full`:表示执行完整安装。 |
| 71 | - `-q`:表示静默安装。 | 72 | - `-q`:表示静默安装。 |
| 72 | - `--pylocal`:安装软件包时,是否将python相关信息安装到CANN软件包的安装路径。 | 73 | - `--pylocal`:安装软件包时,是否将python相关信息安装到CANN软件包的安装路径。 |
| 74 | +- `--install-path`:指定安装路径。自定义CANN安装路径场景下必须显式传入,否则会安装到默认路径,可能导致首次安装失败或误覆盖/卸载已预装的PyPTO。 | ||
| 73 | 75 | ||
| 74 | ## 安装验证 | 76 | ## 安装验证 |
| 75 | 77 | ||
| @@ -1,4 +1,4 @@ | |||
| 1 | -# 基础编译, 如 pip install . / -e . | 1 | +# 基础编译依赖(配合python3 build_ci.py使用) |
| 2 | setuptools>=70.3.0 | 2 | setuptools>=70.3.0 |
| 3 | pybind11>=2.13.6 | 3 | pybind11>=2.13.6 |
| 4 | 4 | ||