Lessons Learned from Adding Backend Dispatching to NetworkX and scikit-image
summary
Library-level dispatching adds GPU and alternative-implementation support by routing calls to concrete backends: NetworkX evolved over three years to convert inputs, cache conversions, log and introspect results, and dispatch via a decorator pattern (one prototype became the main implementation); scikit-image explores five prototypes and targets cuGraph/cuPy/RAPIDS for zero‑change acceleration while keeping results on device. Backends implement a small interface, frontends add a networkx.dispatchable decorator or equivalent, and a nascent tooling project spatch codifies best practices.
AI-written summary · about
