Batch solving

cubie.batchsolving

The Solver interface is the main entry point. It brings together batch grids, array managers, GPU program builds, and system details into a coordinated integration pipeline, while solve_ivp() offers a shortcut for common workflows. Supporting modules prepare the GPU programs, describe solver outputs, and provide data checks used by attrs-based containers.

Subpackages

Core API

  • Solver – high-level manager that drives CUDA kernel launches.

  • solve_ivp – convenience wrapper for single-run solver configuration.

  • SolveResult – captures state, summaries, and diagnostic metadata.

  • SolveSpec – checked configuration describing a solver invocation.

  • Calibration – races solver configurations on a representative batch and picks the fastest (Solver.calibrate()).

  • Optimisation – times buffer placement, loop unrolling and launch shape for one configuration and keeps the fastest (Solver.optimize()).

Supporting infrastructure

Dependencies

  • Batch kernel compilation extends cubie.CUDAFactory and relies on cubie.integrators.algorithms and cubie.integrators.step_control for loop callables, and cubie.array_interpolator for driver interpolation.

  • Array managers size buffers with cubie.outputhandling.output_sizes and allocate memory through cubie.memory managers.

  • Solver results surface summary metrics registered via cubie.outputhandling.summarymetrics.