Skip to content

Preserve floating reference dtype in transport matrix builders - #213

Merged
jc-macdonald merged 2 commits into
mainfrom
readiness/operator-reference-precision
Oct 14, 2026
Merged

jc-macdonald merged 2 commits into
mainfrom
readiness/operator-reference-precision

Conversation

@jc-macdonald

Copy link
Copy Markdown
Member

A float32 reference in build_advection_matrix or build_diffusion_matrix previously produced float64 operators on NumPy and JAX with x64 enabled. Floating references now select their own precision directly; integer references still construct floating operators. The existing stencil formulas and namespace selection are preserved.

Independent reflecting stencils cover NumPy/JAX/CPU Torch in float32/float64. JAX JIT and JAX/Torch coefficient derivatives match a known quadratic objective; the existing CPU Torch CI job includes these regressions. Documentation and changelog describe reference-controlled precision.

Closes #212. Found during #206 qualification.

Validation: just format, just ci (742 core tests passed; 389 provider tests passed), just docs, the all-backend precision suite (22 passed), and just build-all passed, including both installed wheels. Required GPU qualification remains separate; this fix preserves the existing floating-reference API contract.

@jc-macdonald
jc-macdonald merged commit d379fee into main Oct 14, 2026
7 checks passed
@jc-macdonald
jc-macdonald deleted the readiness/operator-reference-precision branch October 14, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Honor floating reference precision in advection and diffusion builders

1 participant