pub enum Device {
Cpu,
}Expand description
Where a tensor’s storage lives and where kernels run on it.
Today there is exactly one variant. That is deliberate, not an oversight:
the Kopitiam Runtime is CPU-only by design (GPU support is explicitly out
of scope — see docs/ai-decisions/ and the parent epic), and this project
does not pay for abstraction it has no use for.
So why does the type exist at all? Because it is the one place where a
future non-CPU backend would have to be admitted, and having it named
makes the CPU-only promise checkable: every signature that takes a
Device is a signature that would need review if that promise ever
changed. A bare () would hide that.
Variants§
Cpu
Trait Implementations§
impl Copy for Device
impl Eq for Device
impl StructuralPartialEq for Device
Auto Trait Implementations§
impl Freeze for Device
impl RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnsafeUnpin for Device
impl UnwindSafe for Device
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.