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

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

Open
zhutao1221 opened this issue Oct 31, 2024 · 3 comments

Comments

@zhutao1221
Copy link

安装了以版本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
Copy link

sdk中的toolkit没装好

@lijingwei9060
Copy link

有相同的问题,不知道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
Copy link

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

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