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

Transformer跑不通 #8

Open
Jason-shc opened this issue May 21, 2024 · 1 comment
Open

Transformer跑不通 #8

Jason-shc opened this issue May 21, 2024 · 1 comment

Comments

@Jason-shc
Copy link

Jason-shc commented May 21, 2024

Transformer.py文件中的out = x + nn.Parameter(self.pe, requires_grad=False).to(self.device)报错:
RuntimeError: CUDA error: device-side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.
这是为什么

@JackHCC
Copy link
Owner

JackHCC commented Jul 18, 2024

Transformer.py文件中的out = x + nn.Parameter(self.pe, requires_grad=False).to(self.device)报错: RuntimeError: CUDA error: device-side assert triggered CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1. Compile with TORCH_USE_CUDA_DSA to enable device-side assertions. 这是为什么

参考这个看看:https://discuss.pytorch.org/t/how-to-fix-cuda-error-device-side-assert-triggered-error/137553/3

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