Skip to main content

Module compute_g_beta

Module compute_g_beta 

Source
Expand description

Fused GPU kernel for DeltaNet g and beta computation.

g[t, vh] = softplus(alpha_logit[t, vh] + dt_bias[vh]) * (-ssm_a[vh]) beta[t, vh] = sigmoid(beta_logit[t, vh])

Replaces the CPU bridge in compute_g_and_beta_cpu. For seq=1 this dispatches 1×nv threads — trivial GPU work but eliminates 2 CPU-GPU buffer downloads (alpha_logit, beta_logit) per delta-net layer.

Statics§

COMPUTE_G_BETA_SHADER_SOURCE

Functions§

compute_g_beta_gpu
Allocate output buffers, dispatch the kernel, commit, and return (g, beta).
dispatch_compute_g_beta
Dispatch compute_g_beta kernel into encoder.
register
Register compute_g_beta_f32 shader with the kernel registry.