does anyone know how i'd be able to get QGIS in either windows or Ubuntu to use the dedicated graphics card over the integrated graphics? I am attempting to speed up the processing of a supervised classification algorithm. The algorithm in question is the semi automatic classification plugin.
-
Are you sure that the processing algorithm is actually GPU enabled? First guess would be that its probably CPU bound.– BradHardsCommented May 2, 2016 at 4:02
-
I'll have a look.– QGISUserCommented May 2, 2016 at 4:04
-
From what I can tell I cant seem to find any settings in the algorithm focusing on this.– QGISUserCommented May 2, 2016 at 4:28
-
It might be useful to edit your question to say which algorithm (and which implementation of the algorithm) you are using. If you can't say that it is supposed to be using GPU, then I think it isn't.– BradHardsCommented May 2, 2016 at 9:04
-
I think the question is about more than just this specific use case. Some months ago, I installed a new video card. But, it didn't speed up rendering like I hoped it would. So I'd like to know if there is a setting or something that I need to change– Ezra BoydCommented May 3, 2016 at 2:49
3 Answers
I am a GIS developer and geospatial analyst. I use QGIS professionally. QGIS does make limited use of parallelized GPU acceleration, but only for raster rendering, namely:
- slope
- aspect
- hillshade
- ruggedness
The option is baked in since the QGIS 3 (Shout out to Alessandro Pasotti). In order to activate this capability, you need to do the following on Ubuntu 18.04:
- Install
mesa-opencl-icd
(to enable GPU C++ acceleration) - Install
ocl-icd-opencl-dev
(to enable CPU multi-threaded parallelism) - Install
clinfo
to check Opencl status on your machine
Go to QGIS Settings -> Acceleration -> then tick the case "Enable OpenCL Acceleration" your device must appear in the list.
Some GPU accelerated tasks like Blender Rendering requires AMD distributed drivers (proprietary). Despite a common circulating myth, you do not have to sacrifice the awesomeness of the libre amdgpu driver for the finicky amdgpu-pro to get those working. Simply download the right driver from AMD website then install the non pro version with this command: amdgpu-install -y --headless --no-dkms --opencl=pal,legacy
The --no-dkms part prevents rebuild of the kernel which may lead to erros on non Ubuntu OS. I am not aware that GPU acceleration is used other than that within QGIS. Otherwise why not use multithreading and multiprocessing capabilities In PyQGIS and unleash all python3 power to any kind of parallelized algorithm?
PS: I do not have advice Nvidia wise, since I do not own an Nvidia card and I believe (subjectively maybe) that AMD is way more suited to Linux Systems with their awesome free amdgpu driver. Add --no-32 flag (depending on driver version to avoid those if no 32bit system)
QGIS doesn't make use of the GPU for any work it does, render or otherwise.
-
Thanks, but obviously not the answer we were hoping for. Do you know it doesn't make use of the GPU? Commented May 5, 2016 at 2:34
-
Because none of the code does ;) You have to program it to do isn't just a switch.– Nathan WCommented May 5, 2016 at 3:32
you can check this to enable your GPU to make some raster calculations https://github.com/aFuerst/PyCUDA-Raster