MooreThreads / torch_musa

torch_musa is an open source repository based on PyTorch, which can make full use of the super computing power of MooreThreads graphics cards.
Other
319 stars 22 forks source link

import torch_musa报libmusa_kernels.so: undefined symbol,该如何解决 #63

Open zhutao1221 opened 2 weeks ago

zhutao1221 commented 2 weeks ago

安装了以版本torch和torch_musa
torch 2.0.0+cpu torch_musa 1.2.1 以及MUSA+SDK-MUSA+SDK+rc3.1.0的SDK 运行import torch_musa时报以下错误,该如何解决: Traceback (most recent call last): File "/home/zhutao/programs/conda3/lib/python3.10/site-packages/torch_musa/init.py", line 38, in import torch_musa._MUSAC ImportError: /home/zhutao/programs/conda3/lib/python3.10/site-packages/torch_musa/lib/libmusa_kernels.so: undefined symbol: _ZN2at18_GeneratorRegisterC1ESt8functionIFNS_9GeneratorEaEE

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/zhutao/workspace/standby_v_sf/code/myr.py", line 3, in import torch_musa File "/home/zhutao/programs/conda3/lib/python3.10/site-packages/torch_musa/init.py", line 40, in raise ImportError("Please try running Python from a different directory!") from err ImportError: Please try running Python from a different directory!

1823616178 commented 1 week ago

sdk中的toolkit没装好

lijingwei9060 commented 5 days ago

有相同的问题,不知道toolkit又问什么问题,各种指令都能正常输出。musaInfo、musa_version_query,都正常。 Traceback (most recent call last): File "/home/casoul/.local/lib/python3.10/site-packages/torch_musa/init.py", line 39, in import torch_musa._MUSAC ImportError: /home/casoul/.local/lib/python3.10/site-packages/torch_musa/lib/libmusa_kernels.so: undefined symbol: _ZN3c105ErrorC2ENS_14SourceLocationENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE

lijingwei9060 commented 4 days ago

一定要安装这个工程release的torch,这个torch是补丁后的,否则会出现上面的问题。