unofficial-ascend-tools
Project description
简介
hccl在未做适配前需要配置/etc/hccl_rootinfo.json文件才能运行,该文件中包含
- NPU的地址信息
- 拓扑文件路径,拓扑文件中描述了NPU之间的互联关系
安装
在线安装
python3 -m pip install unofficial-ascend-tools
本地安装
下载好whl软件包
python3 -m pip install ./<软件包文件>.hwl
从源码构建
首先进入源码目录(指包含setup.py的目录)
python3 -m pip install setuptools wheel #安装构建工具
python3 ./setup.py bdist_wheel # 构建安装包
python3 -m pip install dist/*.whl # 安装
安装可能遇到的问题
1. 使用代理时报证书相关错误
原因:代理软件可能无法正确处理证书
解决方法:
-
使用--trusted-host参数指定不校验正式,详细用法请查看pip的参数说明
-
配置pip使用http源
2.操作系统报错可能破坏系统依赖
报错信息类似
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
原因是,部分python软件包存在两种os源和pip源两种安装方式,当使用pip源安装时可能会破坏os源安装的软件包,因此os提示危险操作
解决方法:
1.使用virtualenv方式,例如python自带的venv或者conda均可,以venv为例
python3 -m venv myenv
source myenv/bin/activate
#激活虚拟环境后再安装即可
2.不推荐,添加--break-system-packages选项强制安装
3. OS缺乏pip、venv等工具
原因 操作系统中相关软件包没有安装
解决办法:
1.yum包管理器,适用与openeuler等os
yum makecache
yum install python3-pip python3-venv
2.apt包管理器,适用于ubuntu、debian等os
apt-get update
apt-get install python3-pip python3-venv
使用工具生成/etc/hccl_rootinfo.json
备份之前的文件(可选)
检查/etc/hccl_rootinfo.json 文件是否存在, 如果存在,建议备份
生成rootinfo文件
mindcluster-tools rootinfo -o /etc/hccl_rootinfo.json
如果不指定-o参数, 工具会在执行命令的当前目录生产new_hccl_rootinfo.json文件, 需要手动将文件拷贝到/etc/hccl_rootinfo.json
注意: 由于机型较多,部分未适配机型可能报错,如果报错,需要手动指定topo文件,详见下一个章节
手动指定拓扑文件
mindcluster-tools rootinfo -t <path_to_topo_file> -o /etc/hccl_rootinfo.json
注意: <path_to_topo_file> 要替换成拓扑文件的绝对路径
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unofficial_ascend_tools-0.0.8.post2-py3-none-any.whl.
File metadata
- Download URL: unofficial_ascend_tools-0.0.8.post2-py3-none-any.whl
- Upload date:
- Size: 55.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1038080b666aba7febc1ee0551e65e6887d9f35dc642d93a17ebef5e403f219a
|
|
| MD5 |
9fde45d51837d653160aee34ebc7c2c7
|
|
| BLAKE2b-256 |
713cdb04fb529f2cff2dae227cfcf324038f3c960536c874d4c1f945eb2b0293
|