1#[cfg(all(
2 feature = "candle",
3 any(feature = "coreml", feature = "cuda", feature = "nnapi")
4))]
5compile_error!("feature `candle` is mutually exclusive with `coreml`/`cuda`/`nnapi`");
6
7#[cfg(all(
8 feature = "ane",
9 any(
10 feature = "coreml",
11 feature = "cuda",
12 feature = "nnapi",
13 feature = "candle"
14 )
15))]
16compile_error!("feature `ane` is mutually exclusive with `coreml`/`cuda`/`nnapi`/`candle`");
17
18pub mod error;
19pub mod export;
20pub mod inference;
21pub mod itn;
22pub mod lexicon;
23pub mod model;
24pub mod protocol;
25pub mod punctuation;
26
27#[cfg(feature = "quantize")]
32pub use gigastt_quantize as quantize;
33
34#[cfg(feature = "quantize")]
39pub mod onnx_proto {
40 pub use gigastt_quantize::onnx_proto::AttributeProto;
41 pub use gigastt_quantize::onnx_proto::DeviceConfigurationProto;
42 pub use gigastt_quantize::onnx_proto::FunctionProto;
43 pub use gigastt_quantize::onnx_proto::GraphProto;
44 pub use gigastt_quantize::onnx_proto::IntIntListEntryProto;
45 pub use gigastt_quantize::onnx_proto::ModelProto;
46 pub use gigastt_quantize::onnx_proto::NodeDeviceConfigurationProto;
47 pub use gigastt_quantize::onnx_proto::NodeProto;
48 pub use gigastt_quantize::onnx_proto::OperatorSetIdProto;
49 pub use gigastt_quantize::onnx_proto::OperatorStatus;
50 pub use gigastt_quantize::onnx_proto::ShardedDimProto;
51 pub use gigastt_quantize::onnx_proto::ShardingSpecProto;
52 pub use gigastt_quantize::onnx_proto::SimpleShardedDimProto;
53 pub use gigastt_quantize::onnx_proto::SparseTensorProto;
54 pub use gigastt_quantize::onnx_proto::StringStringEntryProto;
55 pub use gigastt_quantize::onnx_proto::TensorAnnotation;
56 pub use gigastt_quantize::onnx_proto::TensorProto;
57 pub use gigastt_quantize::onnx_proto::TensorShapeProto;
58 pub use gigastt_quantize::onnx_proto::TrainingInfoProto;
59 pub use gigastt_quantize::onnx_proto::TypeProto;
60 pub use gigastt_quantize::onnx_proto::ValueInfoProto;
61 pub use gigastt_quantize::onnx_proto::Version;
62 pub use gigastt_quantize::onnx_proto::attribute_proto;
63 pub use gigastt_quantize::onnx_proto::simple_sharded_dim_proto;
64 pub use gigastt_quantize::onnx_proto::tensor_proto;
65 pub use gigastt_quantize::onnx_proto::tensor_shape_proto;
66 pub use gigastt_quantize::onnx_proto::type_proto;
67}
68
69pub(crate) mod runtime;
70mod sha256;
71pub mod vad;
72mod wordpiece;
73
74pub use runtime::cpu_factory;
75
76pub mod runtime_api {
79 #[cfg(all(feature = "ane", target_os = "macos"))]
80 pub use crate::runtime::ane_factory;
81 #[cfg(feature = "candle")]
82 pub use crate::runtime::candle_factory;
83 pub use crate::runtime::{
84 Runtime, RuntimeError, RuntimeFactory, RuntimeSession, Shape, Tensor, TensorData,
85 TensorDataView, cpu_factory, production_factory,
86 };
87}