[GIS] GDAL usage of GPU with Windows

gdalgdal-translategdalwarp

I use GDAL 2.2.1, released 2017/06/23 on Windows 10. It was install with pre-compiled packages. I usually use gdalwarp, gdal_translate or gdal_grid as commands for single use, or with Python bindings for larger programs.

I haven't found a way to use Windows GPU, even with a few options I try such as -wo "USE_OPENCL=TRUE". The graph on my GPU stays still and flat (0.0%). Here is an example of code to resample an image:

gdalwarp -r cubicspline -tr 4.5e-5 4.5e-5 -ot Int16 -te  3 41 8 45 -multi -wo "USE_OPENCL=TRUE" DEM_75m.tif DEM_5m.tif

During the processing, RAM is used at 200Mo, 20% of CPU and of course 100% of hard-drive usage. 0% GPU.

Should I re-install GDAL with new build parameters, or is there a way of using it as it is?

Best Answer

Sounds like you need to recompile gdal with opencl / cuda. You will need the cuda toolkit installed. Once thats done, your call to gdalwarp looks correct. Even once it's working you'll likely see that there is a lot of time spent transferring the data to the GPU and back again.

Related Question