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 options

Backend

Modules and dependencies

Scheduling and resume

Injection and output scope

Native CPU

coherence_native, super_cluster_native, likelihoodWP; NumPy, Numba, JAX CPU, WDM

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)

prototypes.likelihoodWPGPU; source checkout only, mostly FP32 kernels

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)

coherence_gpu, super_cluster_gpu, likelihood_gpu, pycwb.utils.gpu; NVIDIA driver, bundled NVRTC and JAX CUDA wheels, x64 enabled

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 output_batch and q_reconstruction; see below.

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: 1 and q_reconstruction: false, the parent uses native reconstruction and save logic, including waveforms, plots and injections.

  • output_batch > 1 rejects saved waveforms and segments with injections. Trigger records are committed before progress; uncommitted lags rerun on resume.

  • q_reconstruction: true uses 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: true with execution_profile.scalar_dpf: false is rejected both offline and at runtime.

  • Remove the retired worker_output: true option to use parent output. If an existing catalog recorded it as true, start a new working directory. The exact old YAML/recorded value worker_output: false remains accepted only by a migration reader. It is normalized away for execution and resume comparison, with raw catalog provenance preserved. New settings records have no worker_output field 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

boolean

Use the ordered CUDA selector; false uses JAX alignment and selection.

false

gpu.dpf

boolean

Use CUDA DPF regulation. Requires execution_profile.scalar_dpf=true.

false

gpu.likelihood

boolean

Use ordered CUDA likelihood sky scoring with native host orchestration.

false

gpu.chirp

boolean

Use CUDA trial scoring with shared native-order chirp sampling and finalization.

false

gpu.subnet

boolean

Use CUDA subnet sky scoring.

false

gpu.subnet_batch

boolean

Batch CUDA subnet sky scans; takes precedence over subnet.

false

gpu.td

boolean

Extract time-delay vectors with CUDA.

false

gpu.reuse_workspace

boolean

Retain per-stage device allocation slots between calls.

false

gpu.reuse_td_workspace

boolean

Reuse bounded time-delay device scratch.

false

gpu.q_reconstruction

boolean

Reconstruct only whitened REC/DAT products for Q-veto. Requires catalog-only background without saved products or plots.

false

gpu.read_processes

boolean

Spawn frame readers instead of using threads when read_workers exceeds one.

false

gpu.overlap_setup

boolean

Overlap coherence and time-delay setup; reserve the sum of their worker counts.

false

gpu.wdm_prefilter

boolean

CUDA WDM prefilter with native CPU FFT. Requires at most three setup workers; M=4096 is rejected at runtime.

false

gpu.quiet_driver

boolean

Suppress verbose Numba CUDA allocation logs; warnings and errors remain.

false

gpu.validate_stages

boolean

Also run the native reference for selection, subnet and likelihood and require exact results. Exclude validation runs from speed measurements.

false

gpu.validate_td

boolean

Also run the native reference for time-delay extraction and require exact results. Exclude validation runs from speed measurements.

false

gpu.validate_setup

boolean

Also run the native reference for coherence preparation and require exact results. Exclude validation runs from speed measurements.

false

gpu.validate_td_setup

boolean

Also run the native reference for time-delay preparation and require exact results. Exclude validation runs from speed measurements.

false

gpu.validate_read

boolean

Also run the native reference for frame reads and require exact results. Exclude validation runs from speed measurements.

false

gpu.validate_conditioning

boolean

Also run the native reference for conditioning and require exact results. Exclude validation runs from speed measurements.

false

gpu.validate_reconstruction

boolean

Also run the native reference for Q-veto reconstruction and require exact results. Exclude validation runs from speed measurements.

false

gpu.lag_workers

integer

Spawned CUDA lag workers, capped by pending lags. Injection jobs run serially.

1

gpu.read_workers

integer

Concurrent frame readers within one segment preparation.

1

gpu.condition_workers

integer

Concurrent CPU detector-conditioning tasks.

1

gpu.setup_workers

integer

Concurrent coherence resolution preparations.

1

gpu.td_setup_workers

integer

Concurrent time-delay resolution preparations.

1

gpu.output_batch

integer

Parent catalog commit cadence in lags; batches above one reject injections and saved waveforms. Failed uncommitted batches are recomputed on resume.

1

gpu.profile_lags

['string', 'null']

Optional half-open lag range start:stop with 0 <= start < stop for timing records.

null

gpu.stage_failure_dir

['string', 'null']

Optional directory for serialized stage mismatch evidence when paired checks fail.

null

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.