Solved by ptrblck in post #2 
              
              
                The error points to an invalid index. 
You could rerun the code either on the CPU to get the line of code causing the issue or on the GPU via CUDA_LAUNCH_BLOCKING=1 as suggested in the error message.