Skip to content

[FEATURE] Evaluate whether float32 Biot-Savart kernels are accurate enough for Ptera Software's use cases #254

Description

@camUrban

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

  1. 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.
  2. 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.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or requestperformanceAn opportunity to improve performancequestionFurther information is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions