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.
hi, did you solve this error?