nirspipe.pipeline.hyper._gpu#

The coherence transform on a CUDA card: the CPU path’s arithmetic, in the same order, in cupy.

open_device("cuda")   a CudaDevice for one group's run, or None for "cpu"
check_card(jobs)      refuses a run whose processes the card cannot hold

Module Contents#

Classes#

CudaDevice

One group’s use of the card; check is None until a pairing was compared with the CPU.

Functions#

check_card

The card’s name, after refusing a run of jobs processes it cannot hold.

open_device

The card --device names for one group’s run, None for the CPU.

device_params

What a coherence sidecar records about the card, nothing for the CPU.

Data#

API#

nirspipe.pipeline.hyper._gpu.logger = 'get_logger(...)'#
nirspipe.pipeline.hyper._gpu.POOL_LIMIT_GIB = 4#
nirspipe.pipeline.hyper._gpu.INSTALL_HINT = 'pip install "nirspipe[gpu]"'#
nirspipe.pipeline.hyper._gpu.check_card(jobs: int) → str#

The card’s name, after refusing a run of jobs processes it cannot hold.

nirspipe.pipeline.hyper._gpu.open_device(device: str) → CudaDevice | None#

The card --device names for one group’s run, None for the CPU.

nirspipe.pipeline.hyper._gpu.device_params(device: CudaDevice | None) → dict#

What a coherence sidecar records about the card, nothing for the CPU.

class nirspipe.pipeline.hyper._gpu.CudaDevice#

One group’s use of the card; check is None until a pairing was compared with the CPU.

Initialization

prepare_channel(y: numpy.ndarray, dt: float, grid) → nirspipe.pipeline.hyper.wtc._ChannelWavelet#

wtc._prepare_channel after the normalisation, its arrays left on the card.

pair_from_prepared(p1, p2, dt: float, grid)#

wtc._pair_from_prepared on the card.

trim_pair(WCT, aWCT, coi, freqs, n_sig, step, fmin, fmax, signif=None)#

wtc._trim_pair on the card, so only the trimmed map crosses the bus.

has_room() → bool#
release() → None#
raise_if_device(exc: Exception) → None#

Re-raise exc as a DeviceError when the card, not the pairing, failed.

verify(cpu: tuple, gpu: tuple, share: numpy.ndarray, excluded: numpy.ndarray | None, pairing: str) → None#

Refuse the run unless the judged cells agree with the CPU’s to one float32 ulp.