Problem Statement
The Biot-Savart line vortex kernels run exclusively in float64. Preliminary benchmarking of a float32 port of the parallel CPU kernels, verified against the package's float64 kernels, measured geometric mean speedups of roughly 1.3x for the collapsed kernel and 2.1x for the expanded kernel, with no new dependencies. Whether float32 precision is actually acceptable for Ptera Software's use cases is unknown, and that question gates whether these gains can ever be shipped.
Location(s): pterasoftware/_aerodynamics_functions.py
Proposed Solution
- Build an accuracy benchmark that compares float32 kernel results against the float64 reference across representative use cases: steady and unsteady solves, trim analysis, convergence analysis, and the coupled aeroelastic and free flight solvers.
- Define acceptance criteria in terms of the quantities users consume (load coefficients, trim points, converged meshes) rather than raw kernel output error, since accumulated round-off matters most where results feed back into the simulation.
- If float32 proves accurate enough for all use cases, consider adopting it broadly. If it proves accurate enough for some use cases but not others, consider adding a precision flag to the solvers so users can opt in where it is safe.
Additional Context
Beyond the CPU gains, float32 viability would unlock the general practicality of GPU acceleration: consumer GPUs run float64 at a small fraction of their float32 throughput, so any compelling GPU path is effectively float32 only.
Positive results would likely open follow-on questions, such as whether float32 is also appropriate for other computations and/or stored variables.
Problem Statement
The Biot-Savart line vortex kernels run exclusively in float64. Preliminary benchmarking of a float32 port of the parallel CPU kernels, verified against the package's float64 kernels, measured geometric mean speedups of roughly 1.3x for the collapsed kernel and 2.1x for the expanded kernel, with no new dependencies. Whether float32 precision is actually acceptable for Ptera Software's use cases is unknown, and that question gates whether these gains can ever be shipped.
Location(s):
pterasoftware/_aerodynamics_functions.pyProposed Solution
Additional Context
Beyond the CPU gains, float32 viability would unlock the general practicality of GPU acceleration: consumer GPUs run float64 at a small fraction of their float32 throughput, so any compelling GPU path is effectively float32 only.
Positive results would likely open follow-on questions, such as whether float32 is also appropriate for other computations and/or stored variables.