Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::gpu_audio::GpuNeuralRealtimeNode::Config Struct Reference

#include <gpu_neural_realtime_node.hpp>

Public Attributes

NeuralFamily family = NeuralFamily::Unknown
 Must match the family the model was built for.
GpuNeuralModelHandle model
std::uint32_t channels = 1
 Must match the model's channel count.
std::uint32_t lead_blocks = 2
 Fixed output delay in blocks; the CPU shadow is delayed by the same amount, so host delay compensation is family-independent.
std::uint32_t capacity = 8
 GPU ring depth. Must exceed lead_blocks.
std::uint32_t max_inflight = 0
 Maximum GPU blocks in flight; at most capacity - lead_blocks and at most the backend's own in-flight capacity.
std::uint32_t prewarm_blocks = 0
 Silent blocks run through the GPU and the CPU shadow at prepare so both histories begin at the same stream position.
std::uint64_t completion_service_wait_ns = 0
 Optional bounded completion-service budget for each non-RT worker pump.
MissPolicy miss_policy = MissPolicy::CpuFallback
 Only CpuFallback is accepted: the shadow is built in.
ShadowPolicy shadow_policy = ShadowPolicy::Auto
GpuNeuralModelHandle shadow_model
 Optional cheaper model for the shadow.
std::uint32_t shadow_queue_blocks = 16
 Worker queue depth in blocks, for both directions.
void * shadow_audio_workgroup = nullptr
 Borrowed os_workgroup_t of the host's audio thread.
std::uint32_t watchdog_blocks = 0
 GPU watchdog budget in callback blocks: a provider that completes nothing for this many blocks while work is in flight latches ProviderUnresponsive.

Member Data Documentation

◆ capacity

std::uint32_t pulp::gpu_audio::GpuNeuralRealtimeNode::Config::capacity = 8

GPU ring depth. Must exceed lead_blocks.

◆ channels

std::uint32_t pulp::gpu_audio::GpuNeuralRealtimeNode::Config::channels = 1

Must match the model's channel count.

◆ completion_service_wait_ns

std::uint64_t pulp::gpu_audio::GpuNeuralRealtimeNode::Config::completion_service_wait_ns = 0

Optional bounded completion-service budget for each non-RT worker pump.

Zero preserves nonblocking service.

◆ family

NeuralFamily pulp::gpu_audio::GpuNeuralRealtimeNode::Config::family = NeuralFamily::Unknown

Must match the family the model was built for.

◆ lead_blocks

std::uint32_t pulp::gpu_audio::GpuNeuralRealtimeNode::Config::lead_blocks = 2

Fixed output delay in blocks; the CPU shadow is delayed by the same amount, so host delay compensation is family-independent.

◆ max_inflight

std::uint32_t pulp::gpu_audio::GpuNeuralRealtimeNode::Config::max_inflight = 0

Maximum GPU blocks in flight; at most capacity - lead_blocks and at most the backend's own in-flight capacity.

Zero selects two when the backend admits two and the ring holds two blocks past the lead, else one: one block in flight cannot keep up when a block's round trip exceeds its period (64 frames on an M1 Max). The lead, and so the latency, is unchanged.

◆ miss_policy

MissPolicy pulp::gpu_audio::GpuNeuralRealtimeNode::Config::miss_policy = MissPolicy::CpuFallback

Only CpuFallback is accepted: the shadow is built in.

◆ model

GpuNeuralModelHandle pulp::gpu_audio::GpuNeuralRealtimeNode::Config::model

◆ prewarm_blocks

std::uint32_t pulp::gpu_audio::GpuNeuralRealtimeNode::Config::prewarm_blocks = 0

Silent blocks run through the GPU and the CPU shadow at prepare so both histories begin at the same stream position.

◆ shadow_audio_workgroup

void* pulp::gpu_audio::GpuNeuralRealtimeNode::Config::shadow_audio_workgroup = nullptr

Borrowed os_workgroup_t of the host's audio thread.

The Worker shadow thread joins it; without one it runs at USER_INTERACTIVE.

◆ shadow_model

GpuNeuralModelHandle pulp::gpu_audio::GpuNeuralRealtimeNode::Config::shadow_model

Optional cheaper model for the shadow.

Never a default: status reports shadow_model_differs, and its output will not null against the GPU model. Binds like model.

◆ shadow_policy

ShadowPolicy pulp::gpu_audio::GpuNeuralRealtimeNode::Config::shadow_policy = ShadowPolicy::Auto

◆ shadow_queue_blocks

std::uint32_t pulp::gpu_audio::GpuNeuralRealtimeNode::Config::shadow_queue_blocks = 16

Worker queue depth in blocks, for both directions.

◆ watchdog_blocks

std::uint32_t pulp::gpu_audio::GpuNeuralRealtimeNode::Config::watchdog_blocks = 0

GPU watchdog budget in callback blocks: a provider that completes nothing for this many blocks while work is in flight latches ProviderUnresponsive.

Zero selects 200 ms converted to blocks at prepare() (at 48 kHz: 150 blocks of 64 frames, 75 of 128, 38 of 256), or capacity - 1 if that is larger, and grows the ingress ring to hold the window and the lead. A non-zero value is used as given with the configured capacity. A provider that keeps completing, however late, is never unresponsive.


The documentation for this struct was generated from the following file: