Skip to main content

Module traits

Module traits 

Source
Expand description

Auto-generated contract traits for compiler-enforced binding verification.

Each trait corresponds to a YAML contract. Consumer crates impl the trait to prove they have the required functions with correct signatures.

Missing method = compile error. Wrong signature = compile error.

Regenerate all: for f in contracts/*.yaml; do pv scaffold --trait "$f" -o ...; done

See: docs/specifications/sub/contract-trait-enforcement.md (Section 23)

Re-exports§

pub use activation_kernel_v1::ActivationKernelV1;
pub use adamw_kernel_v1::AdamwKernelV1;
pub use attention_kernel_v1::AttentionKernelV1;
pub use cross_entropy_kernel_v1::CrossEntropyKernelV1;
pub use flash_attention_v1::FlashAttentionV1;
pub use gqa_kernel_v1::GqaKernelV1;
pub use layernorm_kernel_v1::LayernormKernelV1;
pub use matmul_kernel_v1::MatmulKernelV1;
pub use rmsnorm_kernel_v1::RmsnormKernelV1;
pub use rope_kernel_v1::RopeKernelV1;
pub use silu_kernel_v1::SiluKernelV1;
pub use softmax_kernel_v1::SoftmaxKernelV1;
pub use swiglu_kernel_v1::SwigluKernelV1;

Modules§

activation_kernel_v1
Auto-generated contract trait for activation-kernel-v1. Generated by: pv scaffold --trait contracts/activation-kernel-v1.yaml DO NOT EDIT — regenerate from YAML source.
adamw_kernel_v1
Auto-generated contract trait for adamw-kernel-v1. Generated by: pv scaffold --trait contracts/adamw-kernel-v1.yaml DO NOT EDIT — regenerate from YAML source.
attention_kernel_v1
Auto-generated contract trait for attention-kernel-v1. Generated by: pv scaffold --trait contracts/attention-kernel-v1.yaml DO NOT EDIT — regenerate from YAML source.
cross_entropy_kernel_v1
Auto-generated contract trait for cross-entropy-kernel-v1. Generated by: pv scaffold --trait contracts/cross-entropy-kernel-v1.yaml DO NOT EDIT — regenerate from YAML source.
flash_attention_v1
Auto-generated contract trait for flash-attention-v1. Generated by: pv scaffold --trait contracts/flash-attention-v1.yaml DO NOT EDIT — regenerate from YAML source.
gqa_kernel_v1
Auto-generated contract trait for gqa-kernel-v1. Generated by: pv scaffold --trait contracts/gqa-kernel-v1.yaml DO NOT EDIT — regenerate from YAML source.
layernorm_kernel_v1
Auto-generated contract trait for layernorm-kernel-v1. Generated by: pv scaffold --trait contracts/layernorm-kernel-v1.yaml DO NOT EDIT — regenerate from YAML source.
matmul_kernel_v1
Auto-generated contract trait for matmul-kernel-v1. Generated by: pv scaffold --trait contracts/matmul-kernel-v1.yaml DO NOT EDIT — regenerate from YAML source.
rmsnorm_kernel_v1
Auto-generated contract trait for rmsnorm-kernel-v1. Generated by: pv scaffold --trait contracts/rmsnorm-kernel-v1.yaml DO NOT EDIT — regenerate from YAML source.
rope_kernel_v1
Auto-generated contract trait for rope-kernel-v1. Generated by: pv scaffold --trait contracts/rope-kernel-v1.yaml DO NOT EDIT — regenerate from YAML source.
silu_kernel_v1
Auto-generated contract trait for silu-kernel-v1. Generated by: pv scaffold --trait contracts/silu-kernel-v1.yaml DO NOT EDIT — regenerate from YAML source.
softmax_kernel_v1
Auto-generated contract trait for softmax-kernel-v1. Generated by: pv scaffold --trait contracts/softmax-kernel-v1.yaml DO NOT EDIT — regenerate from YAML source.
swiglu_kernel_v1
Auto-generated contract trait for swiglu-kernel-v1. Generated by: pv scaffold --trait contracts/swiglu-kernel-v1.yaml DO NOT EDIT — regenerate from YAML source.