The error is raised by an invalid kernel launch config.
In case you are using a custom CUDA extension, you could try to rerun the code via CUDA_LAUNCH_BLOCKING=1 python script.py args and check the kernel launch configs in the failing operation given by the stack trace.