Skip to main content

AddressableGroupedBank

Trait AddressableGroupedBank 

Source
pub trait AddressableGroupedBank<B>{
    type Acquisition;
    type Report;
    type Error;

    // Required methods
    fn member_bytes(&self, key: ParameterBankKey) -> Option<u64>;
    fn acquire(
        &mut self,
        request: ParameterBankAcquisition<'_>,
        context: &<B::Tensor as Tensor>::Context,
    ) -> Result<Self::Acquisition, Self::Error>;
    fn gated_product_groups(
        &mut self,
        acquisition: &Self::Acquisition,
        spec: &GroupedGatedProductSpec,
        context: &<B::Tensor as Tensor>::Context,
    ) -> Result<B::GatedProductGroups, Self::Error>;
    fn relu2_groups(
        &mut self,
        acquisition: &Self::Acquisition,
        spec: &GroupedRelu2Spec,
        context: &<B::Tensor as Tensor>::Context,
    ) -> Result<B::Relu2Groups, Self::Error>;
    fn complete(
        &mut self,
        acquisition: Self::Acquisition,
        output: &B::Tensor,
        context: &<B::Tensor as Tensor>::Context,
    ) -> Result<(), Self::Error>;
    fn report(&self) -> Result<Self::Report, Self::Error>;
}
Expand description

Generic addressable storage and grouped-operator construction mechanisms.

The mechanism receives already translated bank keys, compact specifications, and access classes. Architecture identity, routing policy, global identity mapping, chunking, and text-session behavior remain outside this contract.

Required Associated Types§

Source

type Acquisition

Live native storage retained across grouped execution.

Source

type Report

Generic bank telemetry snapshot.

Source

type Error

Storage, transfer, lowering, or construction failure.

Required Methods§

Source

fn member_bytes(&self, key: ParameterBankKey) -> Option<u64>

Returns the selected byte geometry for one admitted bank member.

Source

fn acquire( &mut self, request: ParameterBankAcquisition<'_>, context: &<B::Tensor as Tensor>::Context, ) -> Result<Self::Acquisition, Self::Error>

Acquires exact generic keys in caller-supplied compact order.

Source

fn gated_product_groups( &mut self, acquisition: &Self::Acquisition, spec: &GroupedGatedProductSpec, context: &<B::Tensor as Tensor>::Context, ) -> Result<B::GatedProductGroups, Self::Error>

Constructs one compact gated-product operator from acquired bindings.

Source

fn relu2_groups( &mut self, acquisition: &Self::Acquisition, spec: &GroupedRelu2Spec, context: &<B::Tensor as Tensor>::Context, ) -> Result<B::Relu2Groups, Self::Error>

Constructs one compact ReLU-squared operator from acquired bindings.

Source

fn complete( &mut self, acquisition: Self::Acquisition, output: &B::Tensor, context: &<B::Tensor as Tensor>::Context, ) -> Result<(), Self::Error>

Retains acquired storage until the grouped output is natively complete.

Source

fn report(&self) -> Result<Self::Report, Self::Error>

Returns generic key, byte, tier, acquisition, and eviction telemetry.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§