My suggestion is not a fix, but a debugging step. 
If I understand the issue correctly, your code is now working on the CPU as well as with CUDA_LAUNCH_BLOCKING=1 on the GPU, but raises the assert statement on a plain GPU run?