burn_backend/backend/
device.rs

1pub use burn_std::device::*;
2
3/// The handle device trait allows to get an id for a backend device.
4pub trait DeviceOps: Clone + Default + PartialEq + Send + Sync + core::fmt::Debug + Device {
5    /// Returns the [device id](DeviceId).
6    fn id(&self) -> DeviceId {
7        self.to_id()
8    }
9}