已合并
[doc]:TTFHW需要在资料中增加约束性语言指导AI稳定执行 #428
孟广欣创建于 7月30日
[doc]:TTFHW需要在资料中增加约束性语言指导AI稳定执行 #428
已合并
共 3 个文件变更+109-158
| @@ -14,64 +14,41 @@ | |||
| 14 | 14 | ||
| 15 | ## ✨ 最新消息 | 15 | ## ✨ 最新消息 |
| 16 | 16 | ||
| 17 | -- [2026.03.24] 支持 Prometheus 在线监测。 | 17 | +🔹 [2026.03.24] 支持 Prometheus 在线监测。 |
| 18 | -- [2025.12.30] 支持Torch Profiler数据采集与解析。 | 18 | +🔹 [2025.12.30] 支持Torch Profiler数据采集与解析。 |
| 19 | -- [2025.11.30] 对接 OpenTelemetry 生态,支持全链路 Trace 追踪。 | 19 | +🔹 [2025.11.30] 对接 OpenTelemetry 生态,支持全链路 Trace 追踪。 |
| 20 | -- [2025.11.24] 支持 vLLM 框架的无侵入自动插桩采集。 | 20 | +🔹 [2025.11.24] 支持 vLLM 框架的无侵入自动插桩采集。 |
| 21 | -- [2025.11.07] 发布自动寻优插件化模式。 | 21 | +🔹 [2025.11.07] 发布自动寻优插件化模式。 |
| 22 | 22 | ||
| 23 | ## ℹ️ 简介 | 23 | ## ℹ️ 简介 |
| 24 | 24 | ||
| 25 | MindStudio Service Profiler 是一款专为大模型推理服务设计的全栈性能分析与调优工具。它通过无侵入式采集、高性能数据持久化及多维关联分析,帮助用户深入洞察推理框架(如 MindIE, vLLM, SGLang)在昇腾硬件上的运行表现,精准定位性能瓶颈。 | 25 | MindStudio Service Profiler 是一款专为大模型推理服务设计的全栈性能分析与调优工具。它通过无侵入式采集、高性能数据持久化及多维关联分析,帮助用户深入洞察推理框架(如 MindIE, vLLM, SGLang)在昇腾硬件上的运行表现,精准定位性能瓶颈。 |
| 26 | 26 | ||
| 27 | -## 🗺️ 目录结构 | 27 | +## ⚙️ 功能介绍 |
| 28 | 28 | ||
| 29 | -关键目录如下,详细目录介绍参见[项目目录](docs/zh/dir_structure.md)。 | 29 | +面向不同使用场景,本工具提供以下功能,详细用法请参见对应参考文档: |
| 30 | 30 | ||
| 31 | -```ColdFusion | 31 | +| 功能名称 | 功能描述 | 详细介绍 | |
| 32 | -├─docs # 文档目录 | 32 | +|:---------------------------|:-----------------------------------|:-----------------------------------------------------------------------| |
| 33 | -├─include # 采集能力对外接口目录 | 33 | +| 【性能调优】服务化性能调优 | 理解服务化调优数据格式、可视化分析方式及典型调优流程 | [点击查看](docs/zh/msserviceprofiler_serving_tuning_instruct.md) | |
| 34 | -├─ms_service_profiler # 基础能力目录(解析、数据比对等),python源码主目录 | 34 | +| 【性能采集】vLLM 服务化性能采集 | 针对 vLLM 框架场景的专项服务化性能采集 | [点击查看](docs/zh/vLLM_service_oriented_performance_collection_tool.md) | |
| 35 | -│ ├─tracer/ # Trace数据监测能力目录 | 35 | +| 【性能采集】SGLang 服务化性能采集 | 针对 SGLang 框架场景的专项服务化性能采集 | [点击查看](docs/zh/SGLang_service_oriented_performance_collection_tool.md) | |
| 36 | -│ ├─patcher/ # vLLM、SGLang服务化调优能力目录 | 36 | +| 【数据监测】MindIE Trace 数据链路监测 | 将服务端请求链路打通到 Jaeger 等 OTLP 生态 | [点击查看](docs/zh/msserviceprofiler_trace_data_monitoring_instruct.md) | |
| 37 | -├─msservice_advisor/ # 专家建议工具目录 | 37 | +| 【在线监测】vLLM Prometheus 在线监测 | 在 vLLM-Ascend 上结合 Prometheus 做在线监控 | [点击查看](docs/zh/vLLM_metrics_tool_instruct.md) | |
| 38 | -├─ms_serviceparam_optimizer/ # 自动寻优工具目录 | 38 | +| 【比对分析】性能数据比对 | 对不同版本/配置的性能结果做对比分析 | [点击查看](docs/zh/ms_service_profiler_compare_tool_instruct.md) | |
| 39 | -├─ms_service_metric/ # 在线监测工具目录 | 39 | +| 【比对分析】多维度解析 | 从多维度对采集的性能数据做深入分析 | [点击查看](docs/zh/msserviceprofiler_multi_analyze_instruct.md) | |
| 40 | -└── cpp # 基础能力目录(采集),C++源码主目录 | 40 | +| 【比对分析】拆解分析 | 对服务化性能数据做细粒度拆解分析 | [点击查看](docs/zh/service_performance_split_tool_instruct.md) | |
| 41 | -└─test # 测试目录 | 41 | +| 【寻优建议】服务化自动寻优 | 在已有采集数据基础上进行参数自动寻优 | [点击查看](docs/zh/serviceparam_optimizer_instruct.md) | |
| 42 | -``` | 42 | +| 【寻优建议】服务化自动寻优插件模式 | 以插件化模式进行参数自动寻优 | [点击查看](docs/zh/serviceparam_optimizer_plugin_instruct.md) | |
| 43 | - | 43 | +| 【寻优建议】服务化专家建议 | 基于采集数据获取性能调优专家建议 | [点击查看](docs/zh/service_profiling_advisor_instruct.md) | |
| 44 | -## 🛠️ 工具安装 | ||
| 45 | - | ||
| 46 | -安装msServiceProfiler工具,详情请参见《[msServiceProfiler工具安装指南](docs/zh/msserviceprofiler_install_guide.md)》。 | ||
| 47 | 44 | ||
| 48 | ## 🚀 快速入门 | 45 | ## 🚀 快速入门 |
| 49 | 46 | ||
| 50 | -msServiceProfiler服务化调优工具的快速入门,包括必要的操作步骤、参数说明等,具体请参见[快速入门](docs/zh/quick_start.md)。 | 47 | +msServiceProfiler服务化调优工具的快速入门,包括必要的操作步骤、参数说明等,具体请参见《[快速入门](docs/zh/quick_start.md)》。 |
| 51 | 48 | ||
| 52 | -## ⚙️ 功能介绍 | 49 | +## 🛠️ 工具安装 |
| 53 | 50 | ||
| 54 | -面向不同使用场景,建议按照以下顺序快速体验本工具: | 51 | +安装msServiceProfiler工具,详情请参见《[msServiceProfiler 安装指南](docs/zh/msserviceprofiler_install_guide.md)》。 |
| 55 | - | ||
| 56 | -1. **服务化性能调优**:详细理解服务化调优数据格式、可视化分析方式及典型调优流程,参见[服务化调优工具](docs/zh/msserviceprofiler_serving_tuning_instruct.md)。 | ||
| 57 | - | ||
| 58 | -2. **vLLM / SGLang 场景专项采集**:如只关注某一框架,可直接参考对应服务化性能采集工具使用指南: | ||
| 59 | - - [vLLM 服务化性能采集工具](docs/zh/vLLM_service_oriented_performance_collection_tool.md) | ||
| 60 | - - [SGLang 服务化性能采集工具](docs/zh/SGLang_service_oriented_performance_collection_tool.md) | ||
| 61 | - | ||
| 62 | -3. **Trace 数据链路监测(MindIE 场景)**:需要将服务端请求链路打通到 Jaeger 等 OTLP 生态时,参见[Trace数据监测工具](docs/zh/msserviceprofiler_trace_data_monitoring_instruct.md)。 | ||
| 63 | - | ||
| 64 | -4. **Prometheus 在线监测(vLLM 场景)**:如需在 vLLM-Ascend 上结合 Prometheus 做在线监控,参见[vLLM 服务化 Prometheus 数据监测工具使用指南](docs/zh/vLLM_metrics_tool_instruct.md)。Prometheus、Grafana 为第三方开源软件,不属于 MindStudio 产品发布包的组成部分,用户可根据实际环境选择其他兼容的监控、可视化方案;如使用 Prometheus,请使用安全版本并完成必要的安全加固。 | ||
| 65 | - | ||
| 66 | -5. **采集数据的比对与多维分析**:对不同版本/配置的性能结果做对比或从多维度深入分析时,参见: | ||
| 67 | - - [服务化性能数据比对工具](docs/zh/ms_service_profiler_compare_tool_instruct.md) | ||
| 68 | - - [服务化多维度解析工具](docs/zh/msserviceprofiler_multi_analyze_instruct.md) | ||
| 69 | - - [服务化拆解工具](docs/zh/service_performance_split_tool_instruct.md) | ||
| 70 | - | ||
| 71 | -6. **自动寻优与专家建议(进阶能力)**:在已有采集数据基础上进行参数自动寻优或获取专家建议时,参见: | ||
| 72 | - - [服务化自动寻优工具](docs/zh/serviceparam_optimizer_instruct.md) | ||
| 73 | - - [服务化自动寻优插件模式](docs/zh/serviceparam_optimizer_plugin_instruct.md) | ||
| 74 | - - [服务化专家建议工具](docs/zh/service_profiling_advisor_instruct.md) | ||
| 75 | 52 | ||
| 76 | ## 🌌 智能检索 | 53 | ## 🌌 智能检索 |
| 77 | 54 | ||
| @@ -80,12 +57,15 @@ msServiceProfiler服务化调优工具的快速入门,包括必要的操作步 | |||
| 80 | 🔹 [AI 问答(ZRead)](https://zread.ai/mindstudio-docs/master):中文问答体验更优,精准定位功能用法与细节。 | 57 | 🔹 [AI 问答(ZRead)](https://zread.ai/mindstudio-docs/master):中文问答体验更优,精准定位功能用法与细节。 |
| 81 | 🔹 [精确搜索(ReadTheDocs)](https://mindstudio-docs-master.readthedocs.io):关键词全文检索,直达接口、参数与报错等信息。 | 58 | 🔹 [精确搜索(ReadTheDocs)](https://mindstudio-docs-master.readthedocs.io):关键词全文检索,直达接口、参数与报错等信息。 |
| 82 | 59 | ||
| 60 | +## 🛠️ 贡献指南 | ||
| 61 | + | ||
| 62 | +欢迎参与项目贡献,请参见《[贡献指南](CONTRIBUTING.md)》。 | ||
| 63 | + | ||
| 83 | ## ⚖️ 相关说明 | 64 | ## ⚖️ 相关说明 |
| 84 | 65 | ||
| 85 | -- 《[版本说明](https://gitcode.com/Ascend/msserviceprofiler/releases)》 | 66 | +🔹《[版本说明](https://gitcode.com/Ascend/msserviceprofiler/releases)》 |
| 86 | -- 《[贡献指南](CONTRIBUTING.md)》 | 67 | +🔹《[许可证声明](./docs/zh/legal/license_notice.md)》 |
| 87 | -- 《[免责声明](./docs/zh/legal/disclaimer.md)》 | 68 | +🔹《[免责声明](./docs/zh/legal/disclaimer.md)》 |
| 88 | -- 《[License声明](./docs/zh/legal/license_notice.md)》 | ||
| 89 | 69 | ||
| 90 | ## 🤝 建议与交流 | 70 | ## 🤝 建议与交流 |
| 91 | 71 | ||
| @@ -97,12 +77,8 @@ msServiceProfiler服务化调优工具的快速入门,包括必要的操作步 | |||
| 97 | 77 | ||
| 98 | ## 🙏 致谢 | 78 | ## 🙏 致谢 |
| 99 | 79 | ||
| 100 | -msServiceProfiler由华为公司的下列部门联合贡献: | 80 | +本工具由华为公司的下列部门联合贡献: |
| 101 | - | 81 | +🔹 昇腾计算MindStudio开发部 |
| 102 | -- 昇腾计算MindStudio开发部 | 82 | +🔹 昇腾计算生态使能部 |
| 103 | - | 83 | +🔹 华为云昇腾云服务 |
| 104 | -感谢来自社区的每一个PR,欢迎贡献msServiceProfiler! | 84 | +感谢来自社区的每一个PR,欢迎贡献! |
| 105 | - | ||
| 106 | -## 关于MindStudio团队 | ||
| 107 | - | ||
| 108 | -华为MindStudio全流程开发工具链团队致力于提供端到端的昇腾AI应用开发解决方案,使能开发者高效完成训练开发、更多信息请访问 [昇腾社区](https://www.hiascend.com/developer/software/mindstudio) 和 [昇腾论坛](https://www.hiascend.com/forum/)。 | ||
| @@ -16,74 +16,18 @@ msServiceProfiler(服务化调优工具)是面向推理服务化场景的性 | |||
| 16 | | 专家建议 | `msservice_advisor/` | 性能分析专家建议工具 | | 16 | | 专家建议 | `msservice_advisor/` | 性能分析专家建议工具 | |
| 17 | | 第三方依赖 | `3rdparty/` | OpenTelemetry、Ascend SDK等第三方库 | | 17 | | 第三方依赖 | `3rdparty/` | OpenTelemetry、Ascend SDK等第三方库 | |
| 18 | 18 | ||
| 19 | -## 2. 开发环境配置 | 19 | +## 2. 编译环境配置 |
| 20 | 20 | ||
| 21 | -### 2.1 开发软件推荐 | 21 | +按照《[msServiceProfiler 安装指南 — 源码安装](../msserviceprofiler_install_guide.md#231-环境准备)》章节完成编译和测试环境的搭建。 |
| 22 | 22 | ||
| 23 | -| 软件 | 用途 | | 23 | +> **说明:** 环境镜像的构建方法及配套软件版本由 MindStudio 统一镜像制作指南维护,本仓库不重复定义。 |
| 24 | -| :------ | :----------- | | ||
| 25 | -| VSCode | Python/C++开发 | | ||
| 26 | -| CLion | C++开发(推荐) | | ||
| 27 | -| PyCharm | Python开发(推荐) | | ||
| 28 | - | ||
| 29 | -### 2.2 环境依赖 | ||
| 30 | - | ||
| 31 | -#### 2.2.1 系统要求 | ||
| 32 | - | ||
| 33 | -- **操作系统**:Linux(CentOS、Ubuntu等主流发行版) | ||
| 34 | -- **硬件平台**:昇腾NPU | ||
| 35 | - | ||
| 36 | -#### 2.2.2 软件依赖 | ||
| 37 | - | ||
| 38 | -| 软件名 | 版本要求 | 用途 | | ||
| 39 | -| :------ | :------- | :------ | | ||
| 40 | -| Python | >= 3.10 | 运行时环境 | | ||
| 41 | -| cmake | >= 3.11 | C++项目构建 | | ||
| 42 | -| gcc/g++ | 支持 C++14 | C++编译器 | | ||
| 43 | -| git | 无 | 代码管理 | | ||
| 44 | -| sqlite3 | 无 | 数据库依赖 | | ||
| 45 | - | ||
| 46 | -#### 2.2.3 Python依赖 | ||
| 47 | - | ||
| 48 | -**运行时依赖**: | ||
| 49 | - | ||
| 50 | -```text | ||
| 51 | -pandas~=2.2 | ||
| 52 | -openpyxl | ||
| 53 | -numpy | ||
| 54 | -pydantic | ||
| 55 | -psutil | ||
| 56 | -scipy | ||
| 57 | -pyyaml | ||
| 58 | -matplotlib | ||
| 59 | -msguard | ||
| 60 | -loguru | ||
| 61 | -opentelemetry-exporter-otlp-proto-grpc==1.33.1 | ||
| 62 | -opentelemetry-exporter-otlp-proto-http==1.33.1 | ||
| 63 | -bytecode>=0.17.0 | ||
| 64 | -``` | ||
| 65 | - | ||
| 66 | -**开发测试依赖**: | ||
| 67 | - | ||
| 68 | -```text | ||
| 69 | -coverage | ||
| 70 | -pytest | ||
| 71 | -pytest-mock | ||
| 72 | -pytest_check | ||
| 73 | -jsonschema | ||
| 74 | -pytest-asyncio | ||
| 75 | -``` | ||
| 76 | - | ||
| 77 | -#### 2.2.4 CANN环境 | ||
| 78 | - | ||
| 79 | -需要安装配套版本的CANN Toolkit开发套件包并配置CANN环境变量,具体请参见[CANN快速安装](https://www.hiascend.com/cann/download)。 | ||
| 80 | 24 | ||
| 81 | ## 3. 代码下载与项目结构 | 25 | ## 3. 代码下载与项目结构 |
| 82 | 26 | ||
| 83 | ### 3.1 代码拉取流程 | 27 | ### 3.1 代码拉取流程 |
| 84 | 28 | ||
| 85 | ```bash | 29 | ```bash |
| 86 | -# Fork代码到自己仓库,并使用git从自己远程仓库clone代码到本地 | 30 | +# Fork代码到自己仓库,并使用git从自己远程仓库clone代码到编译容器内 |
| 87 | git clone https://gitcode.com/Ascend/msserviceprofiler.git | 31 | git clone https://gitcode.com/Ascend/msserviceprofiler.git |
| 88 | cd msserviceprofiler | 32 | cd msserviceprofiler |
| 89 | ``` | 33 | ``` |
| @@ -1,4 +1,6 @@ | |||
| 1 | -# msServiceProfiler 工具安装指南 | 1 | +# msServiceProfiler 安装指南 |
| 2 | + | ||
| 3 | +<br> | ||
| 2 | 4 | ||
| 3 | ## 1. 安装说明 | 5 | ## 1. 安装说明 |
| 4 | 6 | ||
| @@ -20,58 +22,87 @@ | |||
| 20 | 22 | ||
| 21 | ### 2.3 源码安装 | 23 | ### 2.3 源码安装 |
| 22 | 24 | ||
| 23 | -```shell | 25 | +如需使用最新代码的功能,或对源码进行修改以增强功能,可下载本仓库代码,自行编译、打包工具并完成安装。 |
| 24 | -# 1. 安装构建依赖 | ||
| 25 | -apt-get install libsqlite3-dev # RHEL/CentOS/Fedora 等使用 yum 的系统请执行:yum install sqlite sqlite-devel | ||
| 26 | 26 | ||
| 27 | -# 2. 拉取源码 | 27 | +#### 2.3.1 环境准备 |
| 28 | + | ||
| 29 | +源码编译统一使用 MindStudio 标准构建环境。 | ||
| 30 | + | ||
| 31 | +- 日常开发或使用已发布镜像,请参考《[MindStudio工具开发环境安装指导](https://gitcode.com/Ascend/msot/blob/master/docs/zh/common/dev_env_setup.md)》。 | ||
| 32 | +- 需要从基础操作系统复现环境、执行源码构建验证或单元测试验证时,必须参考《[MindStudio统一构建镜像制作指南](https://gitcode.com/Ascend/msot/blob/master/docs/zh/common/docker_image_build_guide.md)》,从openEuler基础镜像现场构建环境镜像。 | ||
| 33 | + | ||
| 34 | +本文档后续的源码编译和单元测试命令,均在上述指定镜像容器或现场构建的环境镜像的容器中执行,CANN 软件包版本、GCC 版本和 Python 版本以统一镜像制作指南为准,本仓库不重复维护。 | ||
| 35 | + | ||
| 36 | +镜像构建完成后,必须使用统一镜像制作指南第 7 章给出的 `ctr_in.py` 命令,在交互式终端中启动并进入容器。不得使用普通 `docker run` 创建容器,也不得使用 `docker exec <容器名> bash -c '<命令>'` 替代交互式环境;否则可能跳过 Python、GCC 和 CANN 环境初始化。 | ||
| 37 | + | ||
| 38 | +进入 `ctr_in.py` 打开的交互式容器 Shell 后,执行如下命令克隆本仓库: | ||
| 39 | + | ||
| 40 | +```bash | ||
| 41 | +cd ~ | ||
| 28 | git clone https://gitcode.com/Ascend/msserviceprofiler.git | 42 | git clone https://gitcode.com/Ascend/msserviceprofiler.git |
| 29 | -cd msserviceprofiler | ||
| 30 | - | ||
| 31 | -# 3. 执行一键构建并升级(自动完成:下载第三方依赖 > 构建 run 包 > 执行安装/升级) | ||
| 32 | - | ||
| 33 | -# 方式一:使用环境变量 ASCEND_TOOLKIT_HOME 指定的 CANN 安装路径 | ||
| 34 | -bash scripts/build_and_upgrade.sh | ||
| 35 | - | ||
| 36 | -# 方式二:手动指定 CANN 安装路径 | ||
| 37 | -bash scripts/build_and_upgrade.sh --install-path=/usr/local/Ascend/ascend-toolkit | ||
| 38 | ``` | 43 | ``` |
| 39 | 44 | ||
| 40 | -执行时将列出将被覆盖的文件并等待确认,示例回显如下: | 45 | +#### 2.3.2 执行编译 |
| 41 | 46 | ||
| 42 | -```ColdFusion | 47 | +保持在 `ctr_in.py` 打开的同一个交互式容器 Shell 中,在仓库根目录执行以下命令,自动完成依赖下载与构建: |
| 43 | -Verifying archive integrity... 100% SHA256 checksums are OK. All good. | 48 | + |
| 44 | -Uncompressing mindstudio-service-profiler 100% | 49 | +```bash |
| 45 | -[mindstudio-msserviceprofiler] [2026-03-04 03:35:37] [INFO]: Upgrade target path: /usr/local/Ascend/cann-x.x.x | 50 | +cd ~/msserviceprofiler |
| 46 | -[mindstudio-msserviceprofiler] [2026-03-04 03:35:37] [INFO]: The following files will be overwritten. To keep the original files, please manually copy or backup them. | 51 | +python3 build.py |
| 47 | - - /usr/local/Ascend/cann-x.x.x/python/site-packages/ms_service_profiler | ||
| 48 | - - /usr/local/Ascend/cann-x.x.x/python/site-packages/ms_service_profiler/libms_service_profiler.so | ||
| 49 | -Confirm to proceed? [y/N]: | ||
| 50 | ``` | 52 | ``` |
| 51 | 53 | ||
| 52 | -输入 y 或 Y 确认后,执行成功将有以下回显信息。 | 54 | +构建成功后,安装包将生成在 `artifacts/` 目录下。 |
| 53 | 55 | ||
| 54 | -```ColdFusion | 56 | +#### 2.3.3 执行单元测试(可选) |
| 55 | -Successfully installed ... ms_service_profiler-x.x.x | ||
| 56 | -[mindstudio-msserviceprofiler] [2026-03-04 03:35:37] [INFO]: pip install whl for entry point registration | ||
| 57 | -[mindstudio-msserviceprofiler] [2026-03-04 03:35:37] [INFO]: Upgrade completed. | ||
| 58 | -[mindstudio-msserviceprofiler] [2026-03-04 03:35:37] [INFO]: mindstudio-msserviceprofiler upgrade completed, the path is: '/usr/local/Ascend/cann-x.x.x'. | ||
| 59 | 57 | ||
| 60 | -[INFO] 构建并升级完成。 | 58 | +此步骤非安装必需。如需验证代码基本功能,可执行单元测试: |
| 59 | + | ||
| 60 | +```bash | ||
| 61 | +cd ~/msserviceprofiler | ||
| 62 | +python3 build.py test | ||
| 63 | +``` | ||
| 64 | + | ||
| 65 | +命令返回码为 0,且测试用例均无失败,表示单元测试通过。 | ||
| 66 | + | ||
| 67 | +#### 2.3.4 安装 | ||
| 68 | + | ||
| 69 | +##### 2.3.4.1 准备 run 包 | ||
| 70 | + | ||
| 71 | +安装软件包前需给run包添加可执行权限。进入run包保存路径,执行如下命令,增加可执行权限。 | ||
| 72 | + | ||
| 73 | +```bash | ||
| 74 | +cd ~/msserviceprofiler/artifacts | ||
| 75 | +chmod +x mindstudio-service-profiler_<version>_<arch>.run | ||
| 76 | +``` | ||
| 77 | + | ||
| 78 | +##### 2.3.4.2 安装 | ||
| 79 | + | ||
| 80 | +将run包拷贝到运行环境中,执行以下命令安装。 | ||
| 81 | + | ||
| 82 | +```bash | ||
| 83 | +./mindstudio-service-profiler_<version>_<arch>.run --install | ||
| 84 | +``` | ||
| 85 | + | ||
| 86 | +当回显包含以下信息时,表示软件包安装成功。 | ||
| 87 | + | ||
| 88 | +```text | ||
| 89 | +mindstudio-msserviceprofiler package install success, the path is: '<install_path>'. | ||
| 61 | ``` | 90 | ``` |
| 62 | 91 | ||
| 63 | > [!NOTE] | 92 | > [!NOTE] |
| 64 | > | 93 | > |
| 65 | -> - 安装或升级将自动覆盖 CANN 安装路径下的 `ms_service_profiler`、`libms_service_profiler.so`、`include/msServiceProfiler` 等目标文件。如需保留原文件,请根据执行时列出的文件清单提前手动备份。 | 94 | +> - 默认安装路径:root 用户为 `/usr/local/Ascend/cann`,非 root 用户为 `${HOME}/Ascend/cann`。 |
| 66 | -> - 若未设置 `ASCEND_TOOLKIT_HOME` 且未指定 `--install-path`,将执行失败并提示需手动指定 CANN 安装路径。 | 95 | +> |
| 67 | -> - 若安装中途终止或因依赖缺失等异常终止,请先删除 `msserviceprofiler/build` 目录后再重新执行,命令:`rm -r msserviceprofiler/build`。 | 96 | +> - 如果要指定路径安装,则需添加`--install-path`,例如`./mindstudio-service-profiler_<version>_<arch>.run --install-path=./test --install`,则将此run包安装到当前目录下的test目录下。 |
| 97 | +> | ||
| 98 | +> - 若系统中已安装该工具的旧版本,可使用 `--upgrade` 执行覆盖升级安装,升级路径通过 `--install-path` 或 `ASCEND_TOOLKIT_HOME` 环境变量指定。 | ||
| 68 | 99 | ||
| 69 | ## 3. 验证安装 | 100 | ## 3. 验证安装 |
| 70 | 101 | ||
| 71 | 安装完成后,执行以下命令验证工具是否安装成功: | 102 | 安装完成后,执行以下命令验证工具是否安装成功: |
| 72 | 103 | ||
| 73 | -```shell | 104 | +```bash |
| 74 | - pip list | grep msserviceprofiler | 105 | +pip list | grep msserviceprofiler |
| 75 | ``` | 106 | ``` |
| 76 | 107 | ||
| 77 | 若输出不报错,且能显示版本信息,则表明安装成功。 | 108 | 若输出不报错,且能显示版本信息,则表明安装成功。 |
| @@ -88,20 +119,20 @@ Successfully installed ... ms_service_profiler-x.x.x | |||
| 88 | 119 | ||
| 89 | > [!NOTE] | 120 | > [!NOTE] |
| 90 | > | 121 | > |
| 91 | - > - 需要联网环境才能下载,若环境不允许联网或离线状态,请先在可联网的环境下载该脚本后拷贝到目标设备。 | 122 | + > - 需要联网环境才能下载,若环境不允许联网或处于离线状态,请先在可联网的环境下载该脚本后拷贝到目标设备。 |
| 92 | > - 若执行命令无响应或出现连接失败、SSL证书错误等问题,请参见[FAQ](https://www.hiascend.com/developer/blog/details/02176213671719317003)。 | 123 | > - 若执行命令无响应或出现连接失败、SSL证书错误等问题,请参见[FAQ](https://www.hiascend.com/developer/blog/details/02176213671719317003)。 |
| 93 | 124 | ||
| 94 | 2. 执行卸载。 | 125 | 2. 执行卸载。 |
| 95 | 126 | ||
| 96 | ```bash | 127 | ```bash |
| 97 | - python ms_install.py uninstall {tools_name} | 128 | + python3 ms_install.py uninstall {tools_name} |
| 98 | ``` | 129 | ``` |
| 99 | 130 | ||
| 100 | - 其中{tools_name}配置为需要卸载的工具名称,可通过`python ms_install.py help`命令查询,在打印信息中的Available Tools字段下显示工具名称。 | 131 | + 其中{tools_name}配置为需卸载的工具名称,可通过`python3 ms_install.py help`命令查询,在打印信息中的Available Tools字段下显示工具名称。 |
| 101 | 132 | ||
| 102 | 卸载成功打印如下信息: | 133 | 卸载成功打印如下信息: |
| 103 | 134 | ||
| 104 | - ```ColdFusion | 135 | + ```text |
| 105 | Successfully uninstalled 1 tool ({tools_name}) | 136 | Successfully uninstalled 1 tool ({tools_name}) |
| 106 | ``` | 137 | ``` |
| 107 | 138 | ||