#![forbid(unsafe_code)]
pub use nuvec_compile as compile;
pub use nuvec_compile::compile;
pub use nuvec_core as core;
pub use nuvec_core::{
ArgReduceOp, Array, BinaryOp, Category, Complex64, CustomCall, CustomFunction, DType, Device,
DeviceKind, Element, Error, Flags, Primitive, ReduceOp, Result, Scalar, ScalarOperand,
ScalarOrArray, ScanOp, ScatterReduce, Scheduled, SliceArg, Stream, UnaryOp, abs, add, addmm,
all, any, arange, argmax, argmin, argpartition, argsort, astype, async_eval, at_least_float,
bf16, broadcast_to, checkpoint, concatenate, conjugate, contiguous, conv1d, cos, cummax,
cummin, cumprod, cumsum, custom_function, default_device, default_stream, dequantize, divide,
equal, erfinv, eval, exp, expand_dims, f16, gather_mm, gather_qmm, grad, greater,
greater_equal, jvp, less, less_equal, log, logaddexp, logcumsumexp, logsumexp, matmul, max,
maximum, mean, min, minimum, multiply, negative, not_equal, ones, partition, prod,
promote_types, put_along_axis, quantize, quantized_matmul, repeat, reshape,
scatter_add_along_axis, schedule, set_default_stream, sigmoid, sign, sin, slice, slice_update,
softmax, sort, split, split_at, sqrt, squeeze, stack, stop_gradient, subtract, sum, take,
take_along_axis, tanh, topk, transpose, value_and_grad, vjp, vmap, where_, zeros,
};
pub use nuvec_core::{fast, random};
pub use nuvec_cpu as cpu;
pub use nuvec_distributed as distributed;
pub use nuvec_gpu as gpu;
pub use nuvec_io as io;
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn version_is_set() {
assert!(!VERSION.is_empty());
assert_eq!(VERSION, crate::core::VERSION);
}
#[test]
fn root_api_works() {
let a = Array::from_slice(&[1i32, 2], &[2]).unwrap();
let b = multiply(&a, &a).unwrap() + &a;
assert_eq!(b.to_vec::<i32>().unwrap(), vec![2, 6]);
}
}