t4a-cubecl-runtime 0.11.0

The runtime API of CubeCL: clients, devices, handles and everything a kernel launch needs.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use cubecl_common::device::{Device, DeviceId};

/// The device of the CPU runtime. There is only one.
#[derive(new, Clone, PartialEq, Eq, Default, Hash, Debug)]
pub struct CpuDevice;

impl Device for CpuDevice {
    fn from_id(_device_id: DeviceId) -> Self {
        Self
    }

    fn to_id(&self) -> DeviceId {
        DeviceId {
            type_id: 0,
            index_id: 0,
        }
    }
}