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 in prune_ldm.py #9

Open
GtxMiracle opened this issue Mar 14, 2024 · 0 comments
Open

Cuda Error in prune_ldm.py #9

GtxMiracle opened this issue Mar 14, 2024 · 0 comments

Comments

@GtxMiracle
Copy link

Hi, I'm running the prune_ldm.py, and I got the following error in Line pruner.step(). Could you please let me know how to fix it?
My environment is:

torch == 1.13.1
torch_pruning==1.3.1

../aten/src/ATen/native/cuda/IndexKernel.cu:92: operator(): block: [3,0,0], thread: [93,0,0] Assertion index >= -sizes[i] && index < sizes[i] && "index out of bounds" failed.
../aten/src/ATen/native/cuda/IndexKernel.cu:92: operator(): block: [3,0,0], thread: [94,0,0] Assertion index >= -sizes[i] && index < sizes[i] && "index out of bounds" failed.
../aten/src/ATen/native/cuda/IndexKernel.cu:92: operator(): block: [3,0,0], thread: [95,0,0] Assertion index >= -sizes[i] && index < sizes[i] && "index out of bounds" failed.
Traceback (most recent call last):
File "prune_ldm.py", line 134, in
pruner.step()
File "/opt/conda/lib/python3.8/site-packages/torch_pruning/pruner/algorithms/metapruner.py", line 227, in step
for group in pruning_method():
File "/opt/conda/lib/python3.8/site-packages/torch_pruning/pruner/algorithms/metapruner.py", line 343, in prune_local
imp = self.estimate_importance(group, ch_groups=ch_groups)
File "/opt/conda/lib/python3.8/site-packages/torch_pruning/pruner/algorithms/metapruner.py", line 231, in estimate_importance
return self.importance(group, ch_groups=ch_groups)
File "/opt/conda/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/torch_pruning/pruner/importance.py", line 183, in call
local_imp = w.abs().pow(self.p).sum(1)
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.

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

1 participant