pub struct Placement {
pub memory_kind: MemoryKind,
pub device: Option<DeviceId>,
pub cpu_affinity: Option<CpuDomainId>,
}Expand description
Placement metadata for a tensor buffer.
§Examples
use tenferro_tensor::{DeviceId, DeviceKind, GpuBackendKind, MemoryKind, Placement};
let placement = Placement {
memory_kind: MemoryKind::Device,
device: Some(DeviceId {
kind: DeviceKind::Gpu(GpuBackendKind::Cuda),
ordinal: 0,
}),
cpu_affinity: None,
};
assert!(placement.cpu_affinity.is_none());Fields§
§memory_kind: MemoryKindStorage memory class, independent of execution routing metadata.
device: Option<DeviceId>Device that owns or addresses the storage, when applicable.
cpu_affinity: Option<CpuDomainId>Preferred or producing CPU execution domain for routing and locality.
This tag is not proof of allocation ownership, page residency, NUMA pinning, or worker-affinity enforcement. Backend allocation-domain metadata remains attached to the buffer independently.
Trait Implementations§
impl Eq for Placement
impl StructuralPartialEq for Placement
Auto Trait Implementations§
impl Freeze for Placement
impl RefUnwindSafe for Placement
impl Send for Placement
impl Sync for Placement
impl Unpin for Placement
impl UnsafeUnpin for Placement
impl UnwindSafe for Placement
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