Skip to content

Phase 3: GPU TLS backend and multi-band MHAOV - #3

Merged
tjayasinghe merged 1 commit into
mainfrom
feat/phase3-gpu-tls-mb-mhaov
Jun 29, 2026
Merged

Phase 3: GPU TLS backend and multi-band MHAOV#3
tjayasinghe merged 1 commit into
mainfrom
feat/phase3-gpu-tls-mb-mhaov

Conversation

@tjayasinghe

Copy link
Copy Markdown
Owner

Completes the two stretch items from Phase 2, so all seven methods now have CPU and GPU
backends (GLS, BLS, MHAOV are multi-band).

GPU TLS

The binned matched filter is now array-module-generic — numpy (CPU) and cupy (GPU) run the
identical vectorized code path, as the GLS/BLS backends do. The phase correlation uses a
short shifted-slice loop instead of sliding_window_view (absent in cupy); templates stay on
the host and broadcast against device arrays. tls_power gains a backend argument and
TLSMethod exposes gpu_backend=cupy.

Multi-band MHAOV

The per-frequency regression sum of squares is factored out so it can be pooled across bands.
aov_multiband_power fits each band its own trig-polynomial (independent harmonic amplitudes
and phases) at a shared frequency, then combines them into one F-statistic with B*2H model
and N_total - B*(2H+1) residual degrees of freedom. MHAOVMethod.supports_multiband is now
true, via multiband/mhaov_mb.py.

The GPU paths reuse the validated CPU logic; GPU parity tests are gated behind the [gpu]
extra. 96 tests (7 GPU-gated); ruff + mypy clean.

🤖 Generated with Claude Code

TLS: the binned matched filter is now array-module-generic (numpy CPU /
cupy GPU sharing one code path, as the BLS/GLS backends do). The phase
correlation uses a short shifted-slice loop instead of sliding_window_view
(absent in cupy); templates stay on the host and broadcast against device
arrays. tls_power gains a backend argument; TLSMethod exposes gpu_backend.

MHAOV: factored out the per-frequency regression sum of squares so it can be
pooled across bands. New aov_multiband_power fits each band its own
trig-polynomial (independent amplitudes/phases) at a shared frequency and
combines them into one F-statistic (B*2H model dof, N_total-B*(2H+1) residual
dof). MHAOVMethod now supports_multiband via multiband/mhaov_mb.py.

GPU paths share the validated CPU code path; GPU parity tests are gated behind
the [gpu] extra. 96 tests (7 GPU-gated); ruff and mypy clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tjayasinghe
tjayasinghe merged commit 2bf23af into main Jun 29, 2026
5 checks passed
@tjayasinghe
tjayasinghe deleted the feat/phase3-gpu-tls-mb-mhaov branch June 29, 2026 03:42
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.

1 participant