pub fn install_linalg_kernels(
builder: CpuProviderBundleBuilder,
kernels: Arc<dyn CpuLinalgKernels>,
) -> CpuProviderBundleBuilderExpand description
Install kernels on a provider bundle under construction.
ยงExamples
use std::sync::Arc;
use tenferro_cpu::{CpuBackendKind, CpuProviderBundle};
use tenferro_linalg::cpu_kernels::{install_linalg_kernels, CpuLinalgKernels, CpuLinalgKernelsSlot};
#[derive(Debug)]
struct Nothing;
impl CpuLinalgKernels for Nothing {}
let bundle = install_linalg_kernels(
CpuProviderBundle::builder(CpuBackendKind::default_compiled()),
Arc::new(Nothing),
)
.build()?;
assert!(bundle.extension::<CpuLinalgKernelsSlot>().is_some());