Skip to main content

rusttorch_core/
lib.rs

1//! Shared runtime contracts for the RustTorch workspace.
2
3#![deny(missing_docs)]
4#![doc = include_str!("../COMPATIBILITY.md")]
5
6pub mod device;
7pub mod error;
8
9pub use device::{DeviceCapabilities, DeviceSpec, available_devices, resolve_device};
10pub use error::{Result, RustTorchError};
11pub use tch::{Device, Kind, Reduction, Tensor, no_grad, no_grad_guard};
12
13/// Seeds LibTorch's random number generator.
14pub fn manual_seed(seed: i64) {
15    tch::manual_seed(seed);
16}