1pub mod ad;
39pub mod async_copy;
40pub mod const_check;
41pub mod dtype;
42pub mod dynamic;
43pub mod env;
44pub mod graph;
45pub mod hir;
46pub mod infer;
47pub mod infer_shape;
48pub mod inspect;
49pub mod layout;
50pub mod lir;
51pub mod logical_kernel;
52pub mod measure;
53pub mod mir;
54pub mod module;
55pub mod nvfp4;
56pub mod op;
57pub mod op_registry;
58pub mod ops;
59pub mod perfetto;
60pub mod phase;
61pub mod pretty;
62pub mod provenance;
63pub mod quant;
64pub mod rng;
65pub use nvfp4::{FP4_E2M1_LUT, NVFP4_GROUP_SIZE, fp4_e2m1_to_f32, fp8_e4m3_scale_to_f32};
66pub mod binding_manifest;
67pub mod component;
68pub mod hir_extension;
69pub mod reflect;
70#[cfg(feature = "serialize")]
71pub mod serialize;
72pub mod shape;
73pub mod target;
74pub mod variant;
75pub mod verify;
76
77pub use ad::AdPipelineStage;
78pub use async_copy::{AsyncCopy, BarrierToken, DoubleBuffer, SyncCopy};
79pub use dtype::{DType, Element, ElementSubtype};
80pub use dynamic::sym;
81pub use dynamic::{
82 DimEnv, bind_graph, collect_dynamic_symbols, has_dynamic_dims, infer_bindings_from_f32_inputs,
83 infer_bindings_from_inputs, same_binding, sync_concat_shapes, sync_graph_shapes,
84 sync_narrow_ops, sync_reshape_ops,
85};
86pub use env::{RlxEnv, RuntimeOverrides, flag, is_unset, parse_or, set, unset, var, var_os};
87pub use graph::{Graph, Node, NodeId};
88pub use hir::{FusionPolicy, HirGraphExt, HirModule, HirMut, HirNode, HirNodeId, HirOp};
89pub use infer::GraphExt;
90pub use inspect::{
91 inspect_buffer_plan, inspect_graph, inspect_graph_diff, inspect_hir, inspect_hir_stats,
92 inspect_lir, inspect_mir, inspect_mir_diff, inspect_mir_stats,
93};
94pub use layout::{Coord2, Ragged, ShapeTuple, Strides2, Strides3, Tile2, Tile3};
95pub use lir::{
96 LirBufferPlan, LirBufferSlot, LirFingerprint, LirIoManifest, LirModule, LirViewAlias,
97};
98pub use logical_kernel::{
99 KernelDispatchConfig, KernelDispatchPolicy, LogicalKernelEntry, logical_kinds_in_graph,
100 registered_logical_kernels, should_lower_to_common,
101};
102pub use measure::{CacheBuster, Tick, time_ns};
103pub use mir::{MirModule, MirNode, MirNodeId, MirOp};
104pub use module::{GraphModule, GraphStage};
105pub use op::{Op, OpKind};
106pub use op_registry::{
107 JvpContext, OpExtension, OpRegistry, VjpContext, VmapContext, global_registry, lookup_op,
108 register_op,
109};
110pub use phase::{Phase, PhaseSchedule, derive_phases};
111pub use provenance::{NodeOrigin, node_label, stamp_pass_origins};
112pub use quant::{QuantMap, QuantScheme};
113pub use rng::Philox4x32;
114#[cfg(feature = "serialize")]
115pub use serialize::{hir_from_json, hir_to_json, lir_from_json, lir_to_json};
116pub use verify::{VerifyError, verify, verify_all, verify_shapes};
117
118pub fn hir_to_graph(hir: HirModule) -> Result<Graph, hir::LowerError> {
120 Ok(hir.lower_to_mir()?.into_graph())
121}
122pub use binding_manifest::{BindingManifest, IoBindingEntry, WeightBlock};
123pub use component::{CompilationMode, ModelComponent};
124pub use hir_extension::{
125 HirExtensionFn, apply_hir_extensions, apply_hir_extensions_named, register_hir_extension,
126 registered_hir_extensions,
127};
128pub use reflect::{
129 BlockSpecialization, HirReflection, ManifestDiff, MirReflection, SpecializeBlockRecord,
130 layout_for_binding, layout_from_lir, probe_block_specialization, symbolic_layout_hint,
131};
132pub use shape::{Dim, DimBinding, Shape};
133pub use variant::{ModelPhase, ModelVariant};