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

ASR推理错误 #1071

Open
Carey8175 opened this issue May 9, 2024 · 10 comments
Open

ASR推理错误 #1071

Carey8175 opened this issue May 9, 2024 · 10 comments

Comments

@Carey8175
Copy link

Could not load library libcudnn_ops_infer.so.8. Error: libcudnn_ops_infer.so.8: cannot open shared object file: No such file or directory

系统:ubantu
cuda:12.3
torch:2.1.1

@BOCEAN-FENG
Copy link

cudnn安了吗,没写到感觉就是没有安装

@Carey8175
Copy link
Author

安装后报错:
Traceback (most recent call last):
File "/home/carey/GPT-SoVITS/tools/asr/fasterwhisper_asr.py", line 77, in execute_asr
for segment in segments:
File "/home/carey/anaconda3/envs/voice/lib/python3.9/site-packages/faster_whisper/transcribe.py", line 1106, in restore_speech_timestamps
for segment in segments:
File "/home/carey/anaconda3/envs/voice/lib/python3.9/site-packages/faster_whisper/transcribe.py", line 511, in generate_segments
encoder_output = self.encode(segment)
File "/home/carey/anaconda3/envs/voice/lib/python3.9/site-packages/faster_whisper/transcribe.py", line 762, in encode
return self.model.encode(features, to_cpu=to_cpu)
RuntimeError: parallel_for failed: cudaErrorNoKernelImageForDevice: no kernel image is available for execution on the device

但是中文可以正常运行,我用的多语种模型的日语就会报这个错

@Carey8175
Copy link
Author

Carey8175 commented May 9, 2024

GPU:tesla M40

@Carey8175
Copy link
Author

noavx

@Carey8175
Copy link
Author

达摩可以运行,但是fastwhisper不行

@jzeng703
Copy link

LD_LIBRARY_PATH加上环境对应的libcudnn_ops_infer.so.8路径就好了

@Carey8175
Copy link
Author

LD_LIBRARY_PATH加上环境对应的libcudnn_ops_infer.so.8路径就好了

加上了过后,达摩能够使用,但是多语种那个不能使用,报错:
Traceback (most recent call last):
File "/home/carey/GPT-SoVITS/tools/asr/fasterwhisper_asr.py", line 77, in execute_asr
for segment in segments:
File "/home/carey/anaconda3/envs/voice/lib/python3.9/site-packages/faster_whisper/transcribe.py", line 1106, in restore_speech_timestamps
for segment in segments:
File "/home/carey/anaconda3/envs/voice/lib/python3.9/site-packages/faster_whisper/transcribe.py", line 511, in generate_segments
encoder_output = self.encode(segment)
File "/home/carey/anaconda3/envs/voice/lib/python3.9/site-packages/faster_whisper/transcribe.py", line 762, in encode
return self.model.encode(features, to_cpu=to_cpu)
RuntimeError: parallel_for failed: cudaErrorNoKernelImageForDevice: no kernel image is available for execution on the device

@SapphireLab
Copy link
Contributor

M40 可以用 cuda12 吗?感觉会有兼容性问题.
报错前面有没有出现半精度的警告, 有的话把 config.py 中的 is_half 改了, 这卡应该不支持半精度运算.

@Carey8175
Copy link
Author

M40 可以用 cuda12 吗?感觉会有兼容性问题. 报错前面有没有出现半精度的警告, 有的话把 config.py 中的 is_half 改了, 这卡应该不支持半精度运算.
Nvidia官网下载的Driver,支持cuda12,如果是cuda问题,那么达摩应该也跑不了啊,但是我可以运行。出现了is_half的问题,我已经改过了is_half

@KaiWei-Seu
Copy link

可能的解法

  1. 查看是否存在libcudnn_ops_infer.so.8;
find / -type f -name "*ibcudnn_cnn_infer*" -o -type d -name "*ibcudnn_cnn_infer*"

结果发现在这里:/usr/local/lib/python3.9/site-packages/torch/lib/libcudnn_cnn_infer.so.8
2. 添加路径,执行:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/python3.9/site-packages/torch/lib/

我这边就ok了

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

5 participants