Skip to content

Add fused_overlap and multi_overlap dask graph utilities#1071

Merged
brendancol merged 8 commits intomasterfrom
dask-graph-utils
Mar 24, 2026
Merged

Add fused_overlap and multi_overlap dask graph utilities#1071
brendancol merged 8 commits intomasterfrom
dask-graph-utils

Conversation

@brendancol
Copy link
Contributor

Summary

  • Adds fused_overlap(agg, *stages, boundary='nan') -- fuses sequential map_overlap calls into a single pass with summed depth, producing one blockwise graph layer instead of N
  • Adds multi_overlap(agg, func, n_outputs, depth, boundary) -- runs a multi-output kernel via da.overlap.overlap() + da.map_blocks() in a single pass instead of N separate calls + stack
  • Both available as standalone imports and on the .xrs DataArray accessor
  • Includes _normalize_depth and _pad_nan helpers

Test plan

  • 23 tests for fused_overlap (correctness vs sequential, 1/2/3 stages, non-square depth, graph size reduction, numpy fallback, validation, accessor)
  • 16 tests for multi_overlap (correctness vs sequential stack, shape, band dim, coords/attrs, dtype, graph size reduction, boundary modes, numpy fallback, validation, accessor)
  • Accessor expected-methods tests updated
  • All 74 tests pass, no regressions

@github-actions github-actions bot added the performance PR touches performance-sensitive code label Mar 24, 2026
@brendancol brendancol merged commit 142fa1c into master Mar 24, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance PR touches performance-sensitive code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant