use crate::{codegen::Compiler, compute::CubeTask, ir::Elem};
use cubecl_runtime::{channel::ComputeChannel, client::ComputeClient, server::ComputeServer};
pub use cubecl_runtime::channel;
pub use cubecl_runtime::client;
pub use cubecl_runtime::server;
pub use cubecl_runtime::tune;
pub use cubecl_runtime::ExecutionMode;
pub trait Runtime: Send + Sync + 'static + core::fmt::Debug {
type Compiler: Compiler;
type Server: ComputeServer<Kernel = Box<dyn CubeTask<Self::Compiler>>, Feature = Feature>;
type Channel: ComputeChannel<Self::Server>;
type Device;
fn client(device: &Self::Device) -> ComputeClient<Self::Server, Self::Channel>;
fn name() -> &'static str;
fn require_array_lengths() -> bool {
false
}
fn supported_line_sizes() -> &'static [u8];
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
pub enum Feature {
Subcube,
Cmma {
a: Elem,
b: Elem,
c: Elem,
m: u8,
k: u8,
n: u8,
},
Type(Elem),
}