A device-side assert is usually triggered when you are doing out of bounds indexing.
To get the exact location of crash, you can try to run your program after setting the environment variable
export CUDA_LAUNCH_BLOCKING=1
python myprogram.py