Is the sript working fine on the CPU using the same setup (i.e. input shapes etc.)?
If so, rerun the code with CUDA_LAUNCH_BLOCKING=1 python script.py args and check the stacktrace again, as it should point to the operation which is failing.