Try using the article linked below because it is based on Ubuntu. This article is using Debian Stretch, while Ubuntu 18.04 is Debian Buster with modifications.
https://forum.level1techs.com/t/ubuntu-17-04-vfio-pcie-passthrough-kernel-update-4-14-rc1/119639
These posts might also help- gpu-passthrough-not-working-on-ubuntu-18-04