Skip to content

Derive mixed precision from settings object to prevent propagation bugs#206

Merged
Jammy2211 merged 2 commits intofeature/linalg_mixed_precisionfrom
copilot/sub-pr-205
Feb 8, 2026
Merged

Derive mixed precision from settings object to prevent propagation bugs#206
Jammy2211 merged 2 commits intofeature/linalg_mixed_precisionfrom
copilot/sub-pr-205

Conversation

Copy link
Contributor

Copilot AI commented Feb 8, 2026

The curvature_matrix_via_mapping_matrix_from function accepted both a settings parameter and a separate use_mixed_precision flag, making it easy for call sites to pass settings but forget the flag, silently disabling mixed precision.

Changes

  • Removed redundant use_mixed_precision parameter from curvature_matrix_via_mapping_matrix_from
  • Function now reads settings.use_mixed_precision directly
  • Updated imaging/mapping.py to remove explicit use_mixed_precision argument
  • Updated interferometer/mapping.py to pass settings parameter (was missing, defaulting to use_mixed_precision=False)

Example

Before:

curvature_matrix = curvature_matrix_via_mapping_matrix_from(
    mapping_matrix=matrix,
    noise_map=noise,
    settings=settings,
    use_mixed_precision=settings.use_mixed_precision,  # Redundant, easy to forget
    xp=xp,
)

After:

curvature_matrix = curvature_matrix_via_mapping_matrix_from(
    mapping_matrix=matrix,
    noise_map=noise,
    settings=settings,  # Mixed precision derived automatically
    xp=xp,
)

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: Jammy2211 <23455639+Jammy2211@users.noreply.github.com>
Copilot AI changed the title [WIP] Update mixed precision linear algebra implementation based on feedback Derive mixed precision from settings object to prevent propagation bugs Feb 8, 2026
Copilot AI requested a review from Jammy2211 February 8, 2026 09:27
@Jammy2211 Jammy2211 marked this pull request as ready for review February 8, 2026 09:41
@Jammy2211 Jammy2211 merged commit a78b864 into feature/linalg_mixed_precision Feb 8, 2026
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.

2 participants