Both segment loops in the streaming writer do the conversion in the wrong order (_writer.py:1141-1148 for tiled segments, 1241-1247 for strips):
seg_np = np.asarray(dask_data[r0:r1, seg_c0:seg_c1].compute())
if hasattr(seg_np, 'get'):
seg_np = seg_np.get()
cupy.ndarray.__array__ raises TypeError: Implicit conversion to a NumPy array is not allowed, so np.asarray throws before the .get() branch can run. The handoff is dead code, and any dask-of-cupy array routed to the CPU streaming writer crashes.
Repro: to_geotiff(dask_cupy_da, path, gpu=False) raises the TypeError above. gpu=False is the documented way to force the CPU writer, and the docstring promises dask-backed inputs are written in streaming mode.
The VRT per-tile writer gets the order right (_writers/eager.py:1107-1112): compute first, .get() if the chunk is cupy, then np.asarray. The streaming loops should do the same.
Both segment loops in the streaming writer do the conversion in the wrong order (
_writer.py:1141-1148for tiled segments,1241-1247for strips):cupy.ndarray.__array__raisesTypeError: Implicit conversion to a NumPy array is not allowed, sonp.asarraythrows before the.get()branch can run. The handoff is dead code, and any dask-of-cupy array routed to the CPU streaming writer crashes.Repro:
to_geotiff(dask_cupy_da, path, gpu=False)raises the TypeError above.gpu=Falseis the documented way to force the CPU writer, and the docstring promises dask-backed inputs are written in streaming mode.The VRT per-tile writer gets the order right (
_writers/eager.py:1107-1112): compute first,.get()if the chunk is cupy, thennp.asarray. The streaming loops should do the same.