Skip to main content

Crate meganeura

Crate meganeura 

Source
Expand description

Meganeura: graph-optimized neural network framework on blade-graphics.

Models are defined as declarative computation graphs, optimized with greedy rewrites by default (or optional equality saturation via egglog), and compiled to static GPU dispatch sequences — no manual CUDA-graphing needed.

Re-exports§

pub use data::DataLoader;
pub use data::MnistDataset;
pub use graph::DType;
pub use graph::Graph;
pub use graph::NodeId;
pub use graph::TensorType;
pub use load::nnef::NnefError;
pub use load::nnef::NnefModel;
pub use load::nnef::load_nnef;
pub use load::onnx::OnnxError;
pub use load::onnx::OnnxModel;
pub use load::onnx::load_onnx;
pub use load::onnx::load_onnx_bytes;
pub use optimize::ExtractionCost;
pub use optimize::OptimizeConfig;
pub use optimize::OptimizeMode;
pub use optimize::OptimizeReport;
pub use runtime::CoopPolicy;
pub use runtime::DebugStepReport;
pub use runtime::DeviceMemoryStats;
pub use runtime::DispatchAnomaly;
pub use runtime::ExternalBindError;
pub use runtime::ExternalSlot;
pub use runtime::GpuOptions;
pub use runtime::MemorySummary;
pub use runtime::ReadNodeError;
pub use runtime::Session;
pub use runtime::SessionOptions;
pub use runtime::TuneOutcome;
pub use runtime::init_gpu_context;
pub use runtime::init_gpu_context_with;
pub use train::EpochStats;
pub use train::LossHistory;
pub use train::MetricCallback;
pub use train::Mode;
pub use train::Optimizer;
pub use train::SessionConfig;
pub use train::StepMetrics;
pub use train::TrainConfig;
pub use train::TrainHistory;
pub use train::Trainer;
pub use train::build;
pub use train::build_inference_session;
pub use train::build_session;
pub use train::build_session_unoptimized;
pub use train::compile_training_graph;
pub use tune::MatmulTile;
pub use tune::TuneClass;
pub use tune::TuneConv2d;
pub use tune::TuneDecision;
pub use tune::TuneError;
pub use tune::TuneOptions;
pub use tune::TunePhaseTimes;
pub use tune::TunePreparationTimes;
pub use tune::TuneQualificationTimes;
pub use tune::TuneReport;
pub use tune::TuneScope;
pub use tune::TuneScratchStats;
pub use tune::TuneScratchUsage;
pub use tune::TuneStaging;
pub use tune::TuneStagingReuse;

Modules§

config
Central registry of every MEGANEURA_* environment variable — and the ONLY place that reads them.
data
Data loading utilities for training.
eager
Eager evaluation: inspect any node of a graph while you build it.
graph
load
Model loading from standard interchange formats.
models
nn
High-level neural network building blocks.
optimize
Graph optimization with deterministic greedy rewrites by default and optional equality saturation through egglog. The current local rule set reaches the same useful forms with greedy rewriting at much lower build cost. Equality saturation retains alternatives for extraction using an expression-size or estimated tensor-traffic objective.
profiler
Profiling infrastructure producing Perfetto binary traces (.pftrace).
runtime
train
tune
Bounded, opt-in kernel selection. See crate::Session::tune_with.

Structs§

CompileOptions
Options controlling graph → execution-plan compilation.
CoopCaps
Generate a Flash Attention 2 forward kernel with BQ>1 multi-query tiling.
TuningKnobs
Performance-tuning knobs that shape generated kernels and dispatch geometry. A knob is data: it lives in CompileOptions, is stamped into the compiled ExecutionPlan (geometry and generated WGSL must agree), and participates in the plan-cache fingerprint automatically. Defaults come from capability-signature heuristics plus MEGANEURA_FLASH_* env overrides; a session-build tuner can substitute measured values instead.

Functions§

coop_caps
set_coop_caps