cubecl-core 0.11.0-pre.3

CubeCL core create
Documentation
1
2
3
4
5
6
7
8
9
use cubecl_ir::{Scope, dialect::general::BufferLenOp, pliron::value::Value};

use crate::frontend::buffer_idx;

pub fn expand_buffer_length_native(scope: &Scope, list: Value) -> Value {
    let buffer_idx = buffer_idx(scope, list);
    let buffer_length = BufferLenOp::new(scope.ctx_mut(), buffer_idx);
    scope.register_with_result(&buffer_length)
}