
Whole-window model op: fn over the raw padded chunk. Halo-consuming.
PatchNode.RdCreated by lazy_patch(). The stencil shape for kernels whose spatial context is far beyond a
shift-list focal (CNN inference, e.g. OmniCloudMask): fn(xpad)
receives the parent's value carrying at least radius halo cells per
side (a (C, H, W) cube, traced or plain) and returns a
SIZE-PRESERVING result on the same spatial dims, deriving every size
from the input shape (chunk shapes vary); the evaluator crops the
radius ring afterwards, exactly as focal shifts consume theirs.
Output rank: 2 when out_bands == 0 (the band axis is consumed),
else 3 with a leading band axis of length out_bands.
Arguments
- id
Integer node id (assigned by
graph_add()).- parents
Integer ids of parent nodes (length 1).
- grid
Output
GridSpecof this node.- role
Optional semantic role tag (e.g. "mask", set by
mask()). Pure metadata: never read by the planner or executors; surfaced bydraw()andplan_view().- fn
The model body
fn(xpad).- radius
Halo consumed per side, pixels.
- out_bands
Output band count; 0 drops the band axis.
- dtype
Length-0 (parent's dtype) or length-1 dtype override.
- kernel_id
Content hash standing in for
fnin kernel signatures.- bytes_px
Resident working-set estimate, bytes per core pixel.
- flops_px
Compute estimate, flops per core pixel.
Details
kernel_id is the content identity of the closed-over model (weights
configuration): it stands in for
fnin kernel signatures, sofnitself is never serialised or hashed (a model closure can carry tens of MB). Two nodes with equalkernel_idare treated as the same kernel, sokernel_idmust change whenever the model content changes.bytes_px/flops_pxare planner cost hints per CORE pixel; they price chunk sizing, memory admission, and placement, which cannot introspect an arbitrary model closure.