27 lines
850 B
Rust
27 lines
850 B
Rust
//! Test to verify exports from rtx-science
|
|
|
|
// This test verifies that the expected types are properly exported
|
|
#[test]
|
|
fn test_exports() {
|
|
// Test that Tensor type is available
|
|
let device = rtx_science::Device::cpu();
|
|
let _tensor = rtx_science::Tensor::zeros(&[2, 2], &device);
|
|
|
|
// Test that Device type is available
|
|
let _device = rtx_science::Device::cpu();
|
|
|
|
// Test that DType enum is available
|
|
let _dtype = rtx_science::DType::F32;
|
|
|
|
// Test that Variable is available
|
|
let tensor = rtx_science::Tensor::ones(&[3, 3], &device).unwrap();
|
|
let _var = rtx_science::Variable::new(tensor, true);
|
|
|
|
// Test that errors are available
|
|
type _TE = rtx_science::TensorError;
|
|
type _AE = rtx_science::AutogradError;
|
|
|
|
// Test that MemoryPool is available as a type
|
|
type _MP = rtx_science::MemoryPool;
|
|
}
|