ferrotensor-backend 0.1.0

wgpu compute backend with hand-written WGSL kernels for the Ferrotensor ML framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use ferrotensor_backend::{UnifiedTensor, WgpuContext};

fn main() {
    env_logger::init();
    pollster::block_on(async {
        let ctx = WgpuContext::new().await;

        let data = vec![1.0, 2.0, 3.0, 4.0];
        let shape = vec![2, 2];

        println!("Creating tensor with data: {:?}", data);
        let tensor = UnifiedTensor::new(&ctx, &data, &shape);

        println!("Tensor created successfully: {:?}", tensor);
        println!("Buffer size: {} bytes", tensor.size_in_bytes());
    });
}