The stacktrace points to an invalid indexing operation. I don’t see which line of code fails, so you would either have to check the entire stacktrace (via re-running the code with CUDA_LAUNCH_BLOCKING=1 or on the CPU).