API Reference
Complete programmatic API specifications for the Aura SDK Core engine.
The Aura SDK exposed programmatic API handles device enumeration, memory scheduling, and hardware enclave configuration.
GenieEngine
Initialize the Hexagon co-processor engine using the native Genie format for NPU execution:
use std::path::Path;
use aura_sdk::engines::GenieEngine;
fn initialize() -> Result<GenieEngine, Box<dyn std::error::Error>> {
let config_path = Path::new("phi-config/genie_config.json");
let engine = GenieEngine::new(config_path)?;
Ok(engine)
} Running Sync Queries
Executes inference synchronously on the NPU and processes output tokens using a callback closure:
engine.query_sync("Explain NPUs in one sentence.", 512, |token| {
print!("{}", token);
})?; AuraEngine
Initialize the ONNX Runtime execution engine utilizing QNN EP or CPU fallback:
use std::path::Path;
use aura_sdk::engines::AuraEngine;
fn initialize_ort() -> Result<AuraEngine, Box<dyn std::error::Error>> {
let model_path = Path::new("models/model_q4.onnx");
let engine = AuraEngine::new(model_path, "43")?;
Ok(engine)
} Running Queries
Executes inference on CPU fallback and processes output tokens using a callback closure:
engine.query("Explain NPUs in one sentence.", 512, |token| {
print!("{}", token);
})?;