Skip to main content

lcast

Function lcast 

Source
pub fn lcast(from: &DType, to: &DType) -> &'static str
Expand description

Get LLVM cast instruction name for a type conversion.

FP8 (E4M3/E5M2) types are mapped to i8 in LLVM and cannot use fpext/fptrunc; FP8↔Float must be decomposed via the devectorize fp8 patterns before reaching LLVM, matching tinygrad’s dedicated f32_to_fp8 / cvt.f32.fp8 intrinsics (llvmir.py:226-230).