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§
Source§impl ReferenceDeviceRuntime
impl ReferenceDeviceRuntime
pub fn snapshot(&self) -> ReferenceDeviceRuntimeSnapshot
Trait Implementations§
Source§impl DeviceRuntime for ReferenceDeviceRuntime
impl DeviceRuntime for ReferenceDeviceRuntime
type Buffer = ReferenceDeviceBuffer
type Stream = ReferenceDeviceStream
type Command = ReferenceDeviceCommand
type Fence = ReferenceDeviceFence
type Error = ReferenceDeviceRuntimeError
fn descriptor(&self) -> &DeviceDescriptor
Source§fn attention_execution_policy(&self) -> AttentionExecutionPolicy
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>
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.fn buffer_descriptor(&self, buffer: &Self::Buffer) -> BufferDescriptor
fn create_stream(&self) -> Result<Self::Stream, Self::Error>
fn stream_state(&self, stream: &Self::Stream) -> StreamState
fn encode_copy( &self, source: &Self::Buffer, destination: &Self::Buffer, region: CopyRegion, ) -> Result<Self::Command, Self::Error>
fn encode_upload( &self, source: &[u8], source_layout: HostTransferLayout, destination: &Self::Buffer, destination_offset_bytes: u64, ) -> Result<Self::Command, Self::Error>
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>>
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>
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>
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>>
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.
fn synchronize(&self, stream: &mut Self::Stream) -> Result<(), Self::Error>
fn readback( &self, stream: &mut Self::Stream, source: &Self::Buffer, region: CopyRegion, output_layout: HostTransferLayout, ) -> Result<Vec<u8>, Self::Error>
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>>
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 encode_static_weight_transform(
&self,
_request: StaticWeightTransformRequest<'_, '_, Self::Buffer>,
) -> Option<Result<Self::Command, Self::Error>>
fn encode_static_weight_transform( &self, _request: StaticWeightTransformRequest<'_, '_, Self::Buffer>, ) -> Option<Result<Self::Command, Self::Error>>
Encode a required source-to-execution static weight transform. Read more
Source§fn configure_reusable_executables(
&self,
_stream: &mut Self::Stream,
_plan: DeviceReusableExecutionPlan,
) -> Result<DeviceReusableExecutionPreparation, Self::Error>
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>
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>
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>
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>
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>
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>
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>>where
Self: Sized,
S: DeviceSubmissionTimingSink,
fn submit_with_timing<S>(
&self,
stream: &mut Self::Stream,
commands: DeviceCommandBatch<Self::Command>,
timing_sink: &S,
) -> Result<Self::Fence, DefinitelyNotSubmitted<Self::Error>>where
Self: Sized,
S: DeviceSubmissionTimingSink,
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§
impl !Freeze for ReferenceDeviceRuntime
impl RefUnwindSafe for ReferenceDeviceRuntime
impl Send for ReferenceDeviceRuntime
impl Sync for ReferenceDeviceRuntime
impl Unpin for ReferenceDeviceRuntime
impl UnsafeUnpin for ReferenceDeviceRuntime
impl UnwindSafe for ReferenceDeviceRuntime
Blanket Implementations§
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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