Skip to main content

ruda_kernel/
lib.rs

1#![cfg_attr(
2    not(any(feature = "std", feature = "kernel-ir", feature = "quantization-kernels", feature = "library")),
3    no_std
4)]
5//! Ruda Rust kernel DSL and device tensor operations.
6
7extern crate self as ruda_kernel;
8
9#[cfg(any(feature = "quantization", feature = "frontend", feature = "library"))]
10extern crate alloc;
11
12#[cfg(all(any(feature = "frontend-std", feature = "source-template"), not(any(feature = "std", feature = "kernel-ir", feature = "quantization-kernels", feature = "library"))))]
13extern crate std;
14
15#[cfg(feature = "frontend")]
16#[macro_use]
17extern crate derive_new;
18
19
20
21
22#[cfg(feature = "frontend")]
23#[allow(unsafe_code)]
24pub mod dsl;
25
26#[cfg(feature = "library")]
27#[allow(unsafe_code)]
28pub mod library;
29
30#[cfg(feature = "kernel-ir")]
31#[allow(unsafe_code)]
32pub mod tiling;
33
34#[cfg(feature = "quantization")]
35#[allow(unsafe_code)]
36pub mod quantization;
37
38#[cfg(feature = "device-tensor")]
39#[allow(unsafe_code)]
40pub mod tensor;
41
42/// Host source templates and compiled Kernel task integration.
43#[cfg(feature = "source-template")]
44pub mod template;