Is your code running fine on the CPU? Generally, it should give you a better error message.
If so, could you rerun the code with CUDA_LAUNCH_BLOCKING=1 python script.py args and post the complete error message here?