pub struct Glm5NextMhcKernels {
pub hc_expand: KernelHandle,
pub hc_pre: KernelHandle,
pub hc_mix: KernelHandle,
pub hc_mix_bf16: KernelHandle,
pub hc_finish: KernelHandle,
pub hc_post: KernelHandle,
pub hc_head: KernelHandle,
}Expand description
2026-09-25: Every kernel the GLM-5.3 hyper-connection launches. Copy: the loader resolves
them once and every layer holds a copy.
Fields§
§hc_expand: KernelHandle2026-09-25: Broadcast the embedding into the hc_mult highway streams; first text layer
only. A GLM target cannot use hyper_connection::hc_expand: that kernel is in the
DeepSeek-V4 model directory, and a target compiles only common/ and its own model
directory.
hc_pre: KernelHandle2026-09-25: The fused glm5next_hc_pre, one block per token. glm_hc_pre does not launch
it; examples/glm5next_hc_split_gate.rs uses it as the oracle for hc_mix + hc_finish.
hc_mix: KernelHandle2026-09-25: glm5next_hc_mix: one block per (token, mixing row), grid (T, mix_hc),
reading an FP32 hc_fn.
hc_mix_bf16: KernelHandle2026-09-25: glm5next_hc_mix reading a BF16 hc_fn. Widening BF16 to FP32 is exact, so it
computes the FP32 kernel’s result on the widened weights. Optional (try_kernel, 0 when
absent); glm_hc_pre uses it when the site’s hc_fn_bf16 is set and the handle is not 0.
hc_finish: KernelHandle2026-09-25: glm5next_hc_finish: from the mixes, post, comb (Sinkhorn) and the
collapsed row y.
hc_post: KernelHandle§hc_head: KernelHandleImplementations§
Source§impl Glm5NextMhcKernels
impl Glm5NextMhcKernels
Sourcepub fn resolve(gpu: &dyn GpuBackend) -> Result<Self>
pub fn resolve(gpu: &dyn GpuBackend) -> Result<Self>
2026-09-25: Resolve the kernels. A missing one is an error, except hc_mix_bf16, which is
0 when absent.
Trait Implementations§
Source§impl Clone for Glm5NextMhcKernels
impl Clone for Glm5NextMhcKernels
Source§fn clone(&self) -> Glm5NextMhcKernels
fn clone(&self) -> Glm5NextMhcKernels
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more