Skip to main content

MultiTileDispatcher

Struct MultiTileDispatcher 

Source
pub struct MultiTileDispatcher {
    pub sub_devices: Vec<SubDeviceInfo>,
    pub config: MultiTileConfig,
}
Expand description

Enumerates Level Zero sub-devices and partitions matrix work across tiles.

On devices without sub-devices (single-tile GPUs), the dispatcher degrades gracefully to single-device behaviour — callers do not need to special-case this.

Fields§

§sub_devices: Vec<SubDeviceInfo>

Discovered sub-devices. Empty means single-device fallback.

§config: MultiTileConfig

Active configuration.

Implementations§

Source§

impl MultiTileDispatcher

Source

pub fn new(sub_devices: Vec<SubDeviceInfo>, config: MultiTileConfig) -> Self

Construct a dispatcher with pre-discovered sub-device information.

Typically called by the backend after enumerating the Level Zero device tree. Pass an empty sub_devices vec for single-tile GPUs.

Source

pub fn single_device() -> Self

Construct a single-device dispatcher (no sub-device enumeration).

Source

pub fn tile_count(&self) -> usize

Return how many tiles are available for dispatch.

Returns 1 when no sub-devices were discovered (single-tile path).

Source

pub fn should_use_multi_tile(&self, m: usize) -> bool

Return true when multi-tile dispatch should be used for a problem of size m (number of output matrix rows).

Source

pub fn partition(&self, m: usize) -> Vec<TileWorkSlice>

Partition m rows across available tiles according to the configured WorkDistribution strategy.

Returns a Vec<TileWorkSlice> with one entry per active tile. The slices are non-overlapping and together cover the full [0, m) range.

If there are no sub-devices or m == 0, returns a single slice for tile 0 covering the entire row range.

Source

pub fn from_synthetic(names: &[&str]) -> Self

Simulate sub-device enumeration from a list of synthetic device names.

This is useful for unit tests that cannot call into Level Zero hardware.

Trait Implementations§

Source§

impl Debug for MultiTileDispatcher

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for MultiTileDispatcher

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more