Symbolic

cubie.odesystems.symbolic

The symbolic subpackage implements the SymPy-driven pipeline that generates CUDA kernels for right-hand-side evaluations and Newton–Krylov helpers. It parses symbolic systems, emits CUDA dxdt kernels, and packages metadata required by cubie.odesystems.SymbolicODE so integrator loops can consume compiled functions directly.

Key helpers

  • builders – utilities that assemble CUDA source strings from SymPy expressions.

  • codegen – orchestrates SymPy code generation for device kernels.

  • templates – shared Jinja templates for kernel emission.

  • transforms – symbolic transformations applied before code generation.

Dependencies

The code generation workflow relies on sympy for symbolic manipulation and numba_cuda_mlir.cuda for compiling emitted kernels. Generated code is cached via cubie.CUDAFactory and consumed by cubie.integrators during loop assembly.