burn_tensor/tensor/backend/
device.rs

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