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

CUDA error: no kernel image #25

Open
Yead opened this issue Aug 28, 2023 · 1 comment
Open

CUDA error: no kernel image #25

Yead opened this issue Aug 28, 2023 · 1 comment

Comments

@Yead
Copy link

Yead commented Aug 28, 2023

image

I built the environment according to doc, and after run python backend/main.py got this error

Traceback (most recent call last):
  File "backend/main.py", line 275, in <module>
    sg.run()                                                                                                                                                                                                                                                  
  File "backend/main.py", line 214, in run                                                                                                                                                                                                                      
    recognizer = AudioRecogniser(language=self.language)                                                                                                                                                                                                      
  File "backend/main.py", line 32, in __init__                                                                                                                                                                                                                  
    self.model = whisper.load_model(self.model_path)                                                                                                                                                                                                          
  File "/home/ddl/video_cut/video-subtitle-generator/backend/whisper/__init__.py", line 149, in load_model                                                                                                                                                      
    model.load_state_dict(checkpoint["model_state_dict"])                                                                                                                                                                                                     
  File "/home/ddl/anaconda3/envs/vsgEnv/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1497, in load_state_dict                                                                                                                                  
    raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(                                                                                                                                                                               
RuntimeError: Error(s) in loading state_dict for Whisper:                                                                                                                                                                                                           
While copying the parameter named "encoder.blocks.0.attn.query.weight", whose dimensions in the model are torch.Size([1024, 1024]) and whose dimensions in the checkpoint are torch.Size([1024, 1024]), an exception occurred : ('CUDA error: no kernel image is available for execution on the device',). 
While copying the parameter named "encoder.blocks.0.attn.key.weight", whose dimensions in the model are torch.Size([1024, 1024]) and whose dimensions in the checkpoint are torch.Size([1024, 1024]), an exception occurred : ('CUDA error: no kernel image is available for execution on the device',).
While copying the parameter named "encoder.blocks.0.attn.value.weight", whose dimensions in the model are torch.Size([1024, 1024]) and whose dimensions in the checkpoint are torch.Size([1024, 1024]), an exception occurred : ('CUDA error: no kernel image is available for execution on the device',). 
While copying the parameter named "encoder.blocks.0.attn.out.weight", whose dimensions in the model are torch.Size([1024, 1024]) and whose dimensions in the checkpoint are torch.Size([1024, 1024]), an exception occurred : ('CUDA error: no kernel image is available for execution on the device',). 

My GPU is 3090, what should I do about it? Looking forward to your reply!

@TengliEd
Copy link

TengliEd commented May 4, 2024

I had the same problem

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

2 participants