pub struct DeviceMeshPlan<B: AcceleratorBackend> {
pub topology: DeviceTopology<B>,
pub index_of: HashMap<PointId, u32>,
}Expand description
A device topology plus the host-only stable-ID lookup needed to compile operation-specific plans.
Fields§
§topology: DeviceTopology<B>Device CSR arrays.
index_of: HashMap<PointId, u32>Stable point ID to dense device index. This map is never uploaded.
Implementations§
Source§impl<B: AcceleratorBackend> DeviceMeshPlan<B>
impl<B: AcceleratorBackend> DeviceMeshPlan<B>
Sourcepub fn compile<T: PayloadLike>(
backend: &B,
frozen: &FrozenSieveCsr<PointId, T>,
topology_version: u64,
) -> Result<Self, AcceleratorError>
pub fn compile<T: PayloadLike>( backend: &B, frozen: &FrozenSieveCsr<PointId, T>, topology_version: u64, ) -> Result<Self, AcceleratorError>
Compile an immutable CSR topology into device arrays.
Sourcepub fn validate_topology(&self, current: u64) -> Result<(), AcceleratorError>
pub fn validate_topology(&self, current: u64) -> Result<(), AcceleratorError>
Ensure this plan still corresponds to the current topology version.
Auto Trait Implementations§
impl<B> Freeze for DeviceMeshPlan<B>where
<B as AcceleratorBackend>::Buffer<u64>: Freeze,
<B as AcceleratorBackend>::Buffer<u32>: Freeze,
impl<B> RefUnwindSafe for DeviceMeshPlan<B>where
<B as AcceleratorBackend>::Buffer<u64>: RefUnwindSafe,
<B as AcceleratorBackend>::Buffer<u32>: RefUnwindSafe,
impl<B> Send for DeviceMeshPlan<B>
impl<B> Sync for DeviceMeshPlan<B>
impl<B> Unpin for DeviceMeshPlan<B>
impl<B> UnsafeUnpin for DeviceMeshPlan<B>where
<B as AcceleratorBackend>::Buffer<u64>: UnsafeUnpin,
<B as AcceleratorBackend>::Buffer<u32>: UnsafeUnpin,
impl<B> UnwindSafe for DeviceMeshPlan<B>where
<B as AcceleratorBackend>::Buffer<u64>: UnwindSafe,
<B as AcceleratorBackend>::Buffer<u32>: UnwindSafe,
Blanket Implementations§
Source§impl<T> AccumulatePathExt for T
impl<T> AccumulatePathExt for T
fn accumulate_path<O, I>(path: I) -> Owhere
O: Orientation,
I: IntoIterator<Item = O>,
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