Skip to main content

compile_to_cuda_forward

Function compile_to_cuda_forward 

Source
pub fn compile_to_cuda_forward(source: &str) -> Result<String, String>
Expand description

Recognize the ordered tensor-op stages of a MULTI-STAGE forward and lower it to ONE CUDA program that chains their parallel kernels through shared device buffers — the whole-forward orchestrator (crate::codegen_cuda::qwen_emit). Where compile_to_cuda_tensor_op emits ONE op’s kernel, this composes a sequence (rmsnorm → matmul → softmax → …). Refuses (typed) if no stage is recognized.