Yes, that’s unfortunately caused by the asynchronous CUDA kernel execution.
Generally you should get a better error message by running the code on the CPU.
If that’s not feasible (e.g. since it takes too long) or doesn’t create the error, you would have to rerun the code with CUDA_LAUNCH_BLOCKING=1 to get the right line of code, which creates the error.