makepath / xarray-spatial

Raster-based Spatial Analytics for Python
https://xarray-spatial.readthedocs.io/
MIT License
805 stars 81 forks source link

focal apply: drop gpu support #706

Closed thuydotm closed 2 years ago

thuydotm commented 2 years ago

Focal apply receives a function as an argument, which seems not supported by numba cuda. On the other hand, it takes in a kernel of size m*n. To benefit from the GPU we need to be able to process data cells in parallel, each cell being the center of an m*n array. If we want enough flexibility, focal apply needs to allow calculations on an array created from the original data and the kernel, which requires array allocation, which is not supported by numba either.

For those reasons, we cannot use numba for the cupy case at the moment. The GPU support should be dropped for now.