Is your code running fine on the CPU? A CPU run would give you most likely a better stack trace, but I assume your indexing might be wrong.
If your CPU code works, could you run the script with CUDA_LAUNCH_BLOCKING=1 python script.py args and post the stack trace here, please?