Commit 52f9fb5
authored
* Fixes #906: add dask+cupy backends for perlin, terrain, crosstab
Add missing dask+cupy backends for perlin() and generate_terrain()
using per-chunk GPU kernel launches via da.map_blocks with block_info
coordinate mapping. Add cupy and dask+cupy backends for crosstab()
by converting to numpy/dask+numpy and delegating. Fix _find_cats()
to handle pure cupy arrays without wrapping in @delayed.
* Update README feature matrix for new and existing GPU backends
- Terrain Generation, Perlin Noise: mark dask+cupy as ✅ (native)
- Zonal Cross Tabulate: mark cupy and dask+cupy as 🔄 (CPU fallback)
- Zonal Statistics: mark cupy as ✅ (native), dask+cupy as 🔄 (fallback)
- Apply: mark cupy and dask+cupy as 🔄 (CPU fallback)
* Add dask/cupy/dask+cupy support for trim() and crop()
Both functions only need numpy for the boundary scan; the output is a
slice of the original DataArray, so the backend is preserved. Convert
to numpy for the scan, then slice the original raster.
Update README feature matrix for trim and crop.
* Add native GPU kernel for zonal.apply() with automatic CPU fallback
JIT-compile the user's scalar function as a CUDA device function and
run it inside a CUDA kernel, avoiding the GPU→CPU→GPU round-trip.
Non-compilable functions (e.g. using dict, str) automatically fall
back to the existing CPU path via exception handling.
1 parent f5ce56a commit 52f9fb5
5 files changed
Lines changed: 664 additions & 35 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | | - | |
| 227 | + | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
| 230 | + | |
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
240 | | - | |
| 239 | + | |
| 240 | + | |
241 | 241 | | |
242 | | - | |
243 | | - | |
244 | | - | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
195 | 226 | | |
196 | 227 | | |
197 | 228 | | |
| |||
246 | 277 | | |
247 | 278 | | |
248 | 279 | | |
249 | | - | |
250 | | - | |
251 | | - | |
| 280 | + | |
252 | 281 | | |
253 | 282 | | |
254 | 283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
165 | 214 | | |
166 | 215 | | |
167 | 216 | | |
| |||
263 | 312 | | |
264 | 313 | | |
265 | 314 | | |
266 | | - | |
267 | | - | |
268 | | - | |
| 315 | + | |
269 | 316 | | |
270 | 317 | | |
271 | 318 | | |
| |||
0 commit comments