pub enum CubeClient {
Stub,
}Expand description
An initialised CubeCL compute client for one of the supported backends.
The variant is determined by which runtime feature was compiled in and
what CubeDevice the runtime was built for. ops.rs matches on this
enum to dispatch generic CubeCL kernels to the correct backend.
The CubeClient::Stub variant is always present (no cfg gate) and
is reserved for tests — it holds no client state and every kernel
dispatch macro has a Stub => unreachable!() arm. Tests that want to
exercise pre-dispatch paths (shape checks, signature pins) on a
machine without a real backend can build a CubeRuntime via
CubeRuntime::new_for_testing, whose client field is Stub.
Production code paths never construct or observe Stub because
CubeRuntime::new only ever yields a real backend client. (#1083)
Variants§
Stub
Test stub — every kernel dispatch panics; only pre-dispatch paths (shape checks, signature pins) are reachable.
This variant is always compiled in (no cfg gate) so tests in
any feature configuration can construct a runtime without a
real backend client. Reaching a kernel dispatch arm with
Stub is a test-discipline bug — the shape-mismatch test
must fire before dispatch. (#1083)
Trait Implementations§
Source§impl Clone for CubeClient
impl Clone for CubeClient
Source§fn clone(&self) -> CubeClient
fn clone(&self) -> CubeClient
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for CubeClient
impl RefUnwindSafe for CubeClient
impl Send for CubeClient
impl Sync for CubeClient
impl Unpin for CubeClient
impl UnsafeUnpin for CubeClient
impl UnwindSafe for CubeClient
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
Source§impl<C> CloneExpand for Cwhere
C: Clone,
impl<C> CloneExpand for Cwhere
C: Clone,
fn __expand_clone_method(&self, _scope: &mut Scope) -> C
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
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>
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>
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