Skip to main content

BfpExperimentArtifact

Struct BfpExperimentArtifact 

Source
pub struct BfpExperimentArtifact<'a> {
    pub m: u32,
    pub k: u32,
    pub n: u32,
    pub xclbin: &'a [u8],
    pub insts: &'a [u8],
}
Expand description

A parsed, envelope-validated XBFP container.

Fields§

§m: u32§k: u32§n: u32§xclbin: &'a [u8]§insts: &'a [u8]

Implementations§

Source§

impl<'a> BfpExperimentArtifact<'a>

Source

pub fn parse(bytes: &'a [u8]) -> Result<Self, BackendError>

Parse and validate the container framing and the flavor-1 shape envelope. Everything is rejected before any native resource exists; malformed framing is the guest’s mistake (InvalidArgument), a well-formed container outside the envelope is Unsupported.

Source

pub fn slot_bytes(&self) -> ([u64; 2], [u64; 1])

Derived slot plan — never self-declared by the artifact. Slot 0 is A (k/8 units), slot 1 is B (k/8 units), slot 2 is C (m·n FP32 lanes).

Source

pub fn to_precompiled_container(&self) -> Vec<u8> ⓘ

Translate into the crate’s internal precompiled container, so loading reuses the one audited executable-construction path (artifact::parse + build_executable).

Trait Implementations§

Source§

impl<'a> Debug for BfpExperimentArtifact<'a>

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, 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, 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.