Skip to main content

ReferenceDeviceRuntime

Struct ReferenceDeviceRuntime 

Source
pub struct ReferenceDeviceRuntime { /* private fields */ }
Expand description

Synchronous, in-memory vNext runtime used for bounded numerical reference execution. It is never selected implicitly by a product backend.

Implementations§

Trait Implementations§

Source§

impl DeviceRuntime for ReferenceDeviceRuntime

Source§

type Buffer = ReferenceDeviceBuffer

Source§

type Stream = ReferenceDeviceStream

Source§

type Command = ReferenceDeviceCommand

Source§

type Fence = ReferenceDeviceFence

Source§

type Error = ReferenceDeviceRuntimeError

Source§

fn descriptor(&self) -> &DeviceDescriptor

Source§

fn attention_execution_policy(&self) -> AttentionExecutionPolicy

Resolved attention provider-family policy installed by this runtime composition. Auto is never valid after composition.
Source§

fn allocate( &self, permit: DeviceAllocationPermit<'_>, ) -> Result<Self::Buffer, Self::Error>

Allocates only after the resource transaction has authorized the exact request. DeviceAllocationPermit has no public constructor and borrows the live transaction context, so raw device allocation cannot bypass admission or outlive the transaction action that authorized it.
Source§

fn buffer_descriptor(&self, buffer: &Self::Buffer) -> BufferDescriptor

Source§

fn create_stream(&self) -> Result<Self::Stream, Self::Error>

Source§

fn stream_state(&self, stream: &Self::Stream) -> StreamState

Source§

fn encode_copy( &self, source: &Self::Buffer, destination: &Self::Buffer, region: CopyRegion, ) -> Result<Self::Command, Self::Error>

Source§

fn encode_upload( &self, source: &[u8], source_layout: HostTransferLayout, destination: &Self::Buffer, destination_offset_bytes: u64, ) -> Result<Self::Command, Self::Error>

Source§

fn encode_zero( &self, destination: &Self::Buffer, destination_offset_bytes: u64, length_bytes: u64, ) -> Result<Self::Command, Self::Error>

Source§

fn submit( &self, stream: &mut Self::Stream, commands: DeviceCommandBatch<Self::Command>, ) -> Result<Self::Fence, DefinitelyNotSubmitted<Self::Error>>

Submits one non-empty ordered command batch and returns its exact completion fence. A backend must preserve command order and must not manufacture intermediate host-visible completion boundaries. Read more
Source§

fn submission_attribution( &self, fence: &Self::Fence, ) -> Option<DeviceSubmissionAttribution>

Returns backend-observed native work for an already submitted fence. Attribution may be requested explicitly for correctness evidence or by a diagnostic timing mode. The returned rows never grant completion or resource-release authority.
Source§

fn query_fence(&self, fence: &Self::Fence) -> FenceQuery<Self::Error>

Observes a fence without blocking. Indeterminate is not terminal and therefore cannot release command-owned resources.
Source§

fn wait_fence( &self, fence: &Self::Fence, ) -> Result<DeviceTerminalReceipt<Self::Error>, FenceIndeterminate<Self::Error>>

Waits for a quiescent terminal. Failure to prove quiescence retains the fence and every resource reachable from the submitted invocation.
Source§

fn synchronize(&self, stream: &mut Self::Stream) -> Result<(), Self::Error>

Source§

fn readback( &self, stream: &mut Self::Stream, source: &Self::Buffer, region: CopyRegion, output_layout: HostTransferLayout, ) -> Result<Vec<u8>, Self::Error>

Source§

fn describe_error( &self, error: &Self::Error, ) -> Result<DeviceErrorReport, VNextError>

Source§

fn begin_static_weight_import( &self, ) -> Option<Result<Box<dyn StaticWeightImportSession<Self::Buffer, Self::Error> + '_>, Self::Error>>

Begins an optional all-or-nothing static-weight import transaction. Returning None selects the portable zero-and-upload path. The default preserves existing CUDA, CPU, and test runtime behavior.
Source§

fn configure_reusable_executables( &self, _stream: &mut Self::Stream, _plan: DeviceReusableExecutionPlan, ) -> Result<DeviceReusableExecutionPreparation, Self::Error>

Opens the bounded cold-path preparation window for one stream. Backends without reusable executable support retain the no-op receipt.
Source§

fn seal_reusable_executables( &self, _stream: &mut Self::Stream, ) -> Result<DeviceReusableExecutionPreparation, Self::Error>

Permanently closes the preparation window for this stream. A sealed stream may replay or fall back to eager execution but cannot capture on a later product request.
Source§

fn reusable_executable_preparation( &self, _stream: &Self::Stream, ) -> Result<DeviceReusableExecutionPreparation, Self::Error>

Returns the current preparation receipt without changing lifecycle state. Product startup uses two snapshots to prove that its validation pass replayed stable executables instead of compiling more work.
Source§

fn reusable_execution_catalog( &self, _stream: &Self::Stream, ) -> Result<Vec<DeviceReusableExecutionProgram>, Self::Error>

Returns the immutable direct-submit catalog after preparation is sealed. Read more
Source§

fn encode_reusable_execution( &self, _invocation: DeviceReusableExecutionInvocation, ) -> Result<Option<Self::Command>, Self::Error>

Encodes one lightweight reference to a resident reusable segment. Read more
Source§

fn trim_reusable_executables( &self, _stream: &mut Self::Stream, ) -> Result<DeviceReusableExecutionTrim, Self::Error>

Releases reusable executable cache entries on a proven-quiescent stream. Backends without such a cache retain the no-op default.
Source§

fn coalesce_program_bindings( &self, commands: Vec<Self::Command>, ) -> Result<Vec<Self::Command>, Self::Error>

Coalesces independent provider binding writes into a wave prelude. Read more
Source§

fn submit_with_timing<S>( &self, stream: &mut Self::Stream, commands: DeviceCommandBatch<Self::Command>, timing_sink: &S, ) -> Result<Self::Fence, DefinitelyNotSubmitted<Self::Error>>

Profile-attached submission entrypoint. Backends override this only when they can expose typed internal boundaries without changing submission ownership or error semantics.

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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