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

inplace operation #8

Open
hyimarm opened this issue Jul 6, 2024 · 9 comments
Open

inplace operation #8

hyimarm opened this issue Jul 6, 2024 · 9 comments

Comments

@hyimarm
Copy link

hyimarm commented Jul 6, 2024

RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [243, 17, 512]], which is output 0 of ReluBackward0, is at version 1; expected version 0 instead. Hint: the backtrace further above shows the operation that failed to compute its gradient. The variable in question was changed in there or anywhere later. Good luck!

@hyimarm
Copy link
Author

hyimarm commented Jul 6, 2024

when I run the training code

@HiddenMarkovModel
Copy link

I encountered the same error, have you resolve it ?

@imbamaker
Copy link

I also encountered this error. How could such a great model have such a mistake? I hope the excellent author can help us.

@JihuaPeng
Copy link
Owner

This may be a pytorch environment incompatibility problem, and you may run the code under torch1.7.1 or torch1.8.1 environment.

@zhongzhaw
Copy link

i run the code under 1.8.1,but "module 'torch' has no attribute 'diff'"can you help me

@zhongzhaw
Copy link

i run the code under 1.8.1,but "module 'torch' has no attribute 'diff'"can you help me

i have run successfully under pytorch 1.8.0

@LLLYLong
Copy link

i run the code under 1.8.1,but "module 'torch' has no attribute 'diff'"can you help me

i have run successfully under pytorch 1.8.0

Hi, can you tell me all the configurations that you ran successfully, such as Gpu model, cuda version, torch version?

@zhongzhaw
Copy link

nvidia A6000 +CUDA Version: 12.2 + torch 1.8.0

@LLLYLong
Copy link

nvidia A6000 +CUDA Version: 12.2 + torch 1.8.0

Thank you very much for your reply. I'm using 3090, cuda11.4, torch1.8.0, but it reports the following error: RuntimeError: CUDA error: no kernel image is available for execution on the device. i think it should be that the cuda and torch versions don't I think cuda and torch versions don't match, normally, cuda12.2 should have a higher version, and it should have the problem, too.

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

6 participants