Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

安装昇腾环境和torch遇到的问题 #22

Open
hipudding opened this issue Jun 14, 2024 · 2 comments
Open

安装昇腾环境和torch遇到的问题 #22

hipudding opened this issue Jun 14, 2024 · 2 comments

Comments

@hipudding
Copy link
Contributor

  1. 所有的pip安装给清华源加速,除了pip install torch的时候指定了index-url

  2. 软件依赖加上 python3-devel

  3. cann环境变量 路径不对,使用的是非root安装,卸载也不要区分path,就按非root安装

  4. 写个建议,建议非root安装使用

  5. pytorch或者安装的地方给一个miniconda的链接?

  6. 算子包安装成功验证
    Ascend-cann-kernels-910b_8.0.RC2.alpha002_linux install success.
    Ascend-cann-toolkit_8.0.RC2.alpha002_linux-aarch64 install success

  7. 固件可能会重启,提醒

  8. 固件,驱动,cann验证写到安装后紧接着

  9. 编译pytorch需要安装git
    10.编译pytorch的注释缩进加个空格

  10. pytorch版本是v2.2.0,前面多一个v

  11. torch-npu的版本号和分支匹配关系,目前是错误的

  12. torch编译的时候禁用cuda USE_CUDA=0 python setup.py develop

  13. torch 3rd更新还有一个sync,给个提示,如果失败了怎么重试 git submodule sync git submodule update --init --recursive

  14. 提示安装固件和驱动,非docker方式还需要安装cann

  15. conda 安装gcc
    conda install -c conda-forge libstdcxx-ng libgcc-ng gcc=9.4 gxx=9.4 cmake ninja python=3.8
    缺少头文件和库:conda的gcc,需要拷贝crypt的头文件和lib库到gcc的source root下?
    系统程序提示符号不存在,考虑是否链接到了conda中的符号,或者多个版本,libffi.so.7 => /home/hua/miniconda3/lib/libffi.so.7 (0x0000ffff9a3c3000)
    缺少动态库 export LD_LIBRARY_PATH=/home/hua/miniconda3/lib/:$LD_LIBRARY_PATH

  16. 安装torch_npu whl包 pip install dist/torch_npu*.whl

  17. arm默认开启了abi,需要关闭 export _GLIBCXX_USE_CXX11_ABI=0, 给提示

  18. ascend_npu依赖 pip install requirment

  19. 使用conda别忘了装cann依赖的python包

@hipudding hipudding mentioned this issue Jun 14, 2024
@MengqingCao
Copy link
Contributor

  1. torch镜像中安装的numpy版本为2.0.0,与 torch 2.2.0 不兼容,指定numpy版本为1.26.4
  2. 选择 CANN 版本后,点击 driver,会重置选项
  3. DPP代码中 torch.cuda.device_count() --> torch.npu.device_count()

@shink
Copy link
Contributor

shink commented Jun 29, 2024

  1. torch镜像中安装的numpy版本为2.0.0,与 torch 2.2.0 不兼容,指定numpy版本为1.26.4
  2. 选择 CANN 版本后,点击 driver,会重置选项
  3. DPP代码中 torch.cuda.device_count() --> torch.npu.device_count()

I'm on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants