Scientific backends and execution support¶
Choose a scientific implementation separately from the workflow scheduler.
execution controls metadata grouping and resource admission; execution_profile
controls numerical conventions and processing options. Select the CUDA
processor explicitly with segment_processer, as shown below.
Backend |
Modules and dependencies |
Scheduling and resume |
Injection and output scope |
|---|---|---|---|
Native CPU |
|
One bounded segment supervisor; optional shared-frame metadata grouping. Shared-input lag workers fall back to serial for injections. Catalog progress supports resume. |
Injection trials, catalog records, saved waveforms and plots follow native configuration. |
JAX likelihood (experimental) |
|
Retained for future JAX development; no production processor selects it. It is excluded from release distributions. |
Likelihood-stage experiments and kernel tests; use the native or CUDA workflow for the complete search and its output options. |
CUDA workflow (experimental) |
|
One bounded segment supervisor; spawned lag workers own device state. Parent commits catalog progress. Resume requires matching recorded options. |
Injections use serial lag dispatch. Saved products and injection support
depend on |
ROOT compatibility |
Legacy ROOT-backed modules and cWB library |
Direct frame reads under the same segment supervisor; no decoded-input cache or separate scheduler adapter is required. |
Uses ROOT-backed data structures; see C++ Core Modifications. |
For regression and whitening, see Data Conditioning.
JAX likelihood prototype¶
The experimental JAX evaluator lives in prototypes/likelihoodWPGPU in the
repository. It preserves its separate numerical implementation for future
development; it is not installed as part of PycWB or selected by the CUDA
workflow. Existing development imports should use
prototypes.likelihoodWPGPU instead of pycwb.modules.likelihoodWPGPU.
From a source checkout with the project dependencies installed, run these commands at the repository root:
python -m pytest prototypes/likelihoodWPGPU/tests -q
python -m benchmark.likelihood.benchmark_cpu_vs_gpu --data /path/to/test_data.pkl
The benchmark compares the JAX prototype with the native likelihood using a
saved cluster fixture. Kernel checks and timings do not establish whole-search
scientific validity. See prototypes/likelihoodWPGPU/README.md for its entry
points and numerical scope.
CUDA workflow assembly¶
Add this overlay to an otherwise valid search YAML:
segment_processer: pycwb.workflow.subflow.process_job_segment_gpu.process_job_segment
execution_profile:
scalar_dpf: true
gpu:
selection_cuda: true
dpf: true
likelihood: true
lag_workers: 1
output_batch: 1
Start with one worker and measure CPU, host-memory and device-memory use before
increasing concurrency. gpu.validate_stages: true compares CUDA stages with
the native calculation; disable it when measuring performance because it
repeats that work.
Output combinations¶
With
output_batch: 1andq_reconstruction: false, the parent uses native reconstruction and save logic, including waveforms, plots and injections.output_batch > 1rejects saved waveforms and segments with injections. Trigger records are committed before progress; uncommitted lags rerun on resume.q_reconstruction: trueuses native CPU reconstruction to compute only the whitened REC/DAT products needed by Q-veto. It rejects injections, saved products and plots; use complete native reconstruction when those products are needed.dpf: truewithexecution_profile.scalar_dpf: falseis rejected both offline and at runtime.Remove the retired
worker_output: trueoption to use parent output. If an existing catalog recorded it as true, start a new working directory. The exact old YAML/recorded valueworker_output: falseremains accepted only by a migration reader. It is normalized away for execution and resume comparison, with raw catalog provenance preserved. New settings records have noworker_outputfield or default.
GPU option reference¶
All boolean defaults are false; CPU preparation and lag worker counts default to one.
Parameter |
Type |
Description |
Default |
|---|---|---|---|
gpu.selection_cuda |
|
Use the ordered CUDA selector; false uses JAX alignment and selection. |
|
gpu.dpf |
|
Use CUDA DPF regulation. Requires execution_profile.scalar_dpf=true. |
|
gpu.likelihood |
|
Use ordered CUDA likelihood sky scoring with native host orchestration. |
|
gpu.chirp |
|
Use CUDA trial scoring with shared native-order chirp sampling and finalization. |
|
gpu.subnet |
|
Use CUDA subnet sky scoring. |
|
gpu.subnet_batch |
|
Batch CUDA subnet sky scans; takes precedence over subnet. |
|
gpu.td |
|
Extract time-delay vectors with CUDA. |
|
gpu.reuse_workspace |
|
Retain per-stage device allocation slots between calls. |
|
gpu.reuse_td_workspace |
|
Reuse bounded time-delay device scratch. |
|
gpu.q_reconstruction |
|
Reconstruct only whitened REC/DAT products for Q-veto. Requires catalog-only background without saved products or plots. |
|
gpu.read_processes |
|
Spawn frame readers instead of using threads when read_workers exceeds one. |
|
gpu.overlap_setup |
|
Overlap coherence and time-delay setup; reserve the sum of their worker counts. |
|
gpu.wdm_prefilter |
|
CUDA WDM prefilter with native CPU FFT. Requires at most three setup workers; M=4096 is rejected at runtime. |
|
gpu.quiet_driver |
|
Suppress verbose Numba CUDA allocation logs; warnings and errors remain. |
|
gpu.validate_stages |
|
Also run the native reference for selection, subnet and likelihood and require exact results. Exclude validation runs from speed measurements. |
|
gpu.validate_td |
|
Also run the native reference for time-delay extraction and require exact results. Exclude validation runs from speed measurements. |
|
gpu.validate_setup |
|
Also run the native reference for coherence preparation and require exact results. Exclude validation runs from speed measurements. |
|
gpu.validate_td_setup |
|
Also run the native reference for time-delay preparation and require exact results. Exclude validation runs from speed measurements. |
|
gpu.validate_read |
|
Also run the native reference for frame reads and require exact results. Exclude validation runs from speed measurements. |
|
gpu.validate_conditioning |
|
Also run the native reference for conditioning and require exact results. Exclude validation runs from speed measurements. |
|
gpu.validate_reconstruction |
|
Also run the native reference for Q-veto reconstruction and require exact results. Exclude validation runs from speed measurements. |
|
gpu.lag_workers |
|
Spawned CUDA lag workers, capped by pending lags. Injection jobs run serially. |
|
gpu.read_workers |
|
Concurrent frame readers within one segment preparation. |
|
gpu.condition_workers |
|
Concurrent CPU detector-conditioning tasks. |
|
gpu.setup_workers |
|
Concurrent coherence resolution preparations. |
|
gpu.td_setup_workers |
|
Concurrent time-delay resolution preparations. |
|
gpu.output_batch |
|
Parent catalog commit cadence in lags; batches above one reject injections and saved waveforms. Failed uncommitted batches are recomputed on resume. |
|
gpu.profile_lags |
|
Optional half-open lag range start:stop with 0 <= start < stop for timing records. |
|
gpu.stage_failure_dir |
|
Optional directory for serialized stage mismatch evidence when paired checks fail. |
|
Compatibility and naming¶
The YAML spellings segment_processer and parallel_injection_trail
remain supported. Use the processor path in the example above to select the
CUDA workflow.