cubecl-core 0.10.0-pre.3

CubeCL core create
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::prelude::CubePrimitive;
use cubecl_ir::{Instruction, Metadata, Scope, Variable};

pub fn expand_length_native(scope: &mut Scope, list: Variable) -> Variable {
    let out = scope.create_local(usize::as_type(scope));
    scope.register(Instruction::new(
        Metadata::Length { var: list },
        out.clone().into(),
    ));
    out.into()
}