npu_rs/
lib.rs

1//! NPU Driver for 20 TOPS RISC Board
2//!
3//! A complete driver implementation for neural processing units with support for:
4//! - Matrix multiplication and convolution operations
5//! - Dynamic voltage and frequency scaling (DVFS)
6//! - Thermal management
7//! - Performance monitoring
8//! - Model quantization (PTQ)
9//! - Graph optimization
10//! - Profiling
11
12pub mod tensor;
13pub mod error;
14pub mod memory;
15pub mod perf_monitor;
16pub mod compute;
17pub mod device;
18pub mod execution;
19pub mod model;
20pub mod power;
21pub mod quantization;
22pub mod optimizer;
23pub mod profiler;
24
25pub use error::{NpuError, Result};
26pub use device::{NpuDevice, DeviceInfo, DeviceState, DeviceRegistry};
27pub use execution::{ExecutionContext, BatchScheduler};
28pub use memory::{MemoryManager, MemoryPool, MemoryStats};
29pub use model::{ModelRuntime, ModelConfig, QuantFormat, OptimizationLevel, NeuralNetwork, Layer, LayerType};
30pub use compute::{MatMulUnit, ConvUnit};
31pub use power::{DvfsController, PowerDomain, ThermalManager, PowerState};
32pub use quantization::{QuantStats, QuantConverter, PTQEngine};
33pub use optimizer::{GraphOptimizer, ComputationGraph, ComputeNode, FusionPattern};
34pub use profiler::{Profiler, ProfileEvent, ProfileReport};
35pub use tensor::Tensor;
36pub use perf_monitor::{PerformanceMonitor, PerformanceMetrics};