Posts

Showing posts with the label Nvidia

Pass the GPU (or how I learned to love IOMMU)

Image
  A few years ago I moved off VMWare in the home datacentre. Like a lot of folks I have embraced KVM for most things virtual around the house, but it's only recently that I really needed to virtualise a GPU for one of the guests. It turns out there's a few little tricks to getting this right, and I thought that since it took some time to get it all working just right I should write it down.  Even if it's so I can find what I went through! This time I am using Red Hat Enterprise Linux 10.1 so my notes may be a little specific to that platform and release, but most of this should work regardless of the distribution. First things first I am going to assume that you have KVM up and running and that you're comfortable with creating and managing guests.  If not, you will need to get that done, and if you're installing from scratch don't install any GUI because it's going to make your job easier later on Before we start installing cards, make sure your firmware set...

Compiling OpenCV with CUDA Support on Windows

Image
I have actively avoided doing this for a while , but now I need to run CUDA-dependent OpenCV Code on a Windows Machine.  So it's time to bite the bullet and get it done. Want to go for a ride?  It will be fun, I promise! Background This is being run on a Gigabyte Motherboard with a 10th-Generation i7 CPU, 64GB RAM and Windows 11 (Release).  You want at least 4GB of RAM and an i5 to do the build with any sort of efficiency. First, get your pre-requisites You will need: Visual Studio 2019.  The free version is just fine. ( https://www.visualstudio.com ) OpenCV and OpenCV-Contrib source code from Github ( https://github.com/opencv ) Python (https://www.python.org) CMake ( https://www.cmake.org ) NVIDIA Drivers to suit your GPU ( https://www.nvidia.com ) NVIDIA CUDA libraries and CuDNN version to suit your GPU ( https://developer.nvidia.com ) A pot of coffee or other suitable beverage Install CUDA, Python, Visual Studio and CMake.  Make sure they are in the user pat...