Commit 4c53027
committed
Enable Dask+CuPy for GPU read and write
read_geotiff_gpu:
- New chunks= parameter returns a Dask+CuPy DataArray
- read_geotiff_gpu('dem.tif', chunks=512) decompresses on GPU
then chunks the result for out-of-core GPU pipelines
write_geotiff_gpu:
- Accepts Dask+CuPy DataArrays (.compute() then compress on GPU)
- Accepts Dask+NumPy DataArrays (.compute() then transfer to GPU)
- Accepts raw CuPy, numpy, or list inputs
All 7 input combinations verified:
read_geotiff_gpu -> CuPy DataArray (existing)
read_geotiff_gpu(chunks=N) -> Dask+CuPy DataArray (new)
write_geotiff_gpu(cupy_array) (existing)
write_geotiff_gpu(cupy_DataArray) (existing)
write_geotiff_gpu(dask_cupy_DataArray) (new)
write_geotiff_gpu(numpy_array) (auto-transfer)
write_geotiff_gpu(dask_numpy_DataArray) (auto-compute+transfer)
Also fixed write_geotiff CuPy fallback for raw arrays and
Dask+CuPy DataArrays (compute then .get() to numpy).1 parent 9cca00b commit 4c53027
2 files changed
+35
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
145 | | - | |
| 144 | + | |
| 145 | + | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
527 | | - | |
| 527 | + | |
| 528 | + | |
528 | 529 | | |
529 | 530 | | |
530 | 531 | | |
531 | 532 | | |
532 | 533 | | |
533 | 534 | | |
534 | | - | |
535 | | - | |
| 535 | + | |
| 536 | + | |
536 | 537 | | |
537 | 538 | | |
538 | 539 | | |
| |||
542 | 543 | | |
543 | 544 | | |
544 | 545 | | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
545 | 549 | | |
546 | 550 | | |
547 | 551 | | |
| |||
669 | 673 | | |
670 | 674 | | |
671 | 675 | | |
672 | | - | |
673 | | - | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
674 | 687 | | |
675 | 688 | | |
676 | 689 | | |
| |||
728 | 741 | | |
729 | 742 | | |
730 | 743 | | |
731 | | - | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
732 | 749 | | |
733 | | - | |
734 | | - | |
| 750 | + | |
735 | 751 | | |
736 | | - | |
737 | | - | |
| 752 | + | |
738 | 753 | | |
739 | 754 | | |
740 | 755 | | |
| |||
744 | 759 | | |
745 | 760 | | |
746 | 761 | | |
747 | | - | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
748 | 770 | | |
749 | 771 | | |
750 | 772 | | |
| |||
0 commit comments