Skip to main content

Crate ronn_core

Crate ronn_core 

Source
Expand description

RONN Core Runtime Engine

This crate provides the foundational components of the RONN (Rust ONNX Neural Network) runtime, including tensor operations, model graph representation, and core execution interfaces.

§Architecture

The core engine follows a layered architecture:

  • Types: Fundamental data structures for tensors, graphs, and metadata
  • Session: Management of inference sessions and resource isolation
  • Tensor: Multi-dimensional array operations with Candle integration
  • Graph: Model representation and manipulation utilities

§Example

use ronn_core::{Tensor, DataType, TensorLayout};

// Create a 2x3 tensor with zeros
let tensor = Tensor::zeros(vec![2, 3], DataType::F32, TensorLayout::RowMajor)?;
assert_eq!(tensor.shape(), vec![2, 3]);
assert_eq!(tensor.numel(), 6);

Re-exports§

pub use error::CoreError;
pub use error::Result;
pub use graph::GraphBuilder;
pub use graph::GraphStatistics;
pub use memory_pool::MemoryPool;
pub use memory_pool::PoolConfig;
pub use memory_pool::PoolStats;
pub use memory_pool::PooledBuffer;
pub use memory_pool::global_pool;
pub use ops::ArithmeticOps;
pub use ops::MatrixOps;
pub use ops::ReductionOps;
pub use ops::ShapeOps;
pub use profiling::CategoryStats;
pub use profiling::OperationStats;
pub use profiling::ProfileConfig;
pub use profiling::ProfileEvent;
pub use profiling::ProfileReport;
pub use profiling::Profiler;
pub use profiling::global_profiler;
pub use profiling::init_profiler;
pub use session::GlobalStatistics;
pub use session::InferenceSession;
pub use session::SessionConfig;
pub use session::SessionManager;
pub use session::SessionStatistics;
pub use simd::SimdFeatures;
pub use simd::SimdLevel;
pub use simd::simd_features;
pub use tensor::Tensor;
pub use types::AttributeValue;
pub use types::CompiledKernel;
pub use types::DataType;
pub use types::ExecutionProvider;
pub use types::GraphEdge;
pub use types::GraphNode;
pub use types::KernelStats;
pub use types::MemoryInfo;
pub use types::MemoryType;
pub use types::MemoryUsage;
pub use types::ModelGraph;
pub use types::NodeAttribute;
pub use types::NodeId;
pub use types::OperatorSpec;
pub use types::OptimizationLevel;
pub use types::PerformanceProfile;
pub use types::ProviderCapability;
pub use types::ProviderConfig;
pub use types::ProviderId;
pub use types::ProviderType;
pub use types::ResourceRequirements;
pub use types::SessionId;
pub use types::SubGraph;
pub use types::TensorAllocator;
pub use types::TensorBuffer;
pub use types::TensorLayout;

Modules§

error
Error types for core operations
graph
Graph manipulation and validation utilities.
logging
Structured logging configuration for RONN.
memory_pool
Memory pooling for efficient tensor allocation.
ops
Tensor operations module.
profiling
Performance profiling infrastructure
session
Session lifecycle management for inference contexts.
simd
SIMD (Single Instruction Multiple Data) optimizations
tensor
Tensor implementation with Candle backend integration.
types
Core type definitions for the RONN runtime.

Macros§

profile
Profile a scope with the global profiler