pub enum DispatchOp {
Gemm {
m: usize,
n: usize,
k: usize,
},
BatchedGemm {
batch: usize,
m: usize,
n: usize,
k: usize,
},
Potrf {
p: usize,
batch: usize,
},
SmallDenseBatchedPotrf {
p: usize,
batch: usize,
},
Trsm {
m: usize,
n: usize,
},
Gemv {
m: usize,
k: usize,
},
XtDiagX {
n: usize,
p: usize,
},
XtDiagY {
n: usize,
px: usize,
q: usize,
},
JointHessian2x2 {
n: usize,
pa: usize,
pb: usize,
},
}Expand description
Discriminator used by route_through_gpu to apply the right
size threshold from super::policy::GpuDispatchPolicy.
Variants§
Gemm
Generic matrix-matrix product with the given output dims and reduction depth.
BatchedGemm
Batch of independent matrix-matrix products.
Potrf
Dense Cholesky factorization.
SmallDenseBatchedPotrf
Batched small-dense Cholesky factorization where each block has the
same small width p (≲ 32) but the batch is large. Routed through
cusolverDnDpotrfBatched and kept device-resident for downstream
triangular solves (Arrow-Schur, Stage-3 PIRLS).
Trsm
Triangular matrix solve.
Gemv
Matrix-vector (or matrix · single-column) product.
XtDiagX
Xᵀ · diag(w) · X reduction with n rows and p columns.
XtDiagY
Xᵀ · diag(w) · Y reduction; px and q are the design and response widths.
JointHessian2x2
2×2 joint Hessian block with two design widths.
Implementations§
Source§impl DispatchOp
impl DispatchOp
Sourcepub const fn flops(self) -> u128
pub const fn flops(self) -> u128
Conservative flop estimate used for the generic gemm_min_flops gate.
Sourcepub fn admissible_under_any_policy(self) -> bool
pub fn admissible_under_any_policy(self) -> bool
True when SOME reachable Auto dispatch policy could admit this op.
Pre-probe Auto size gate (the CUDA startup-tax ordering fix): evaluated with
the MOST PERMISSIVE values any production policy can carry — the
calibration crossover floors (GpuDispatchPolicy::MIN_CALIBRATABLE_GEMM_FLOPS,
GpuDispatchPolicy::MIN_CALIBRATABLE_POTRF_P) for the calibrated
fields, and the GpuDispatchPolicy::default values for the
small-dense-batched-POTRF fields, which calibration::calibrate_device
never adjusts. A false here means EVERY reachable policy’s
route_through_gpu admission would also refuse, so the caller may
return to the CPU path WITHOUT resolving GPU availability — i.e.
without triggering the device probe and its per-GPU
cuDevicePrimaryCtxRetain context creation. A true decides nothing:
the probed runtime’s real policy still gates the op exactly as before.
Trait Implementations§
Source§impl Clone for DispatchOp
impl Clone for DispatchOp
Source§fn clone(&self) -> DispatchOp
fn clone(&self) -> DispatchOp
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for DispatchOp
Auto Trait Implementations§
impl Freeze for DispatchOp
impl RefUnwindSafe for DispatchOp
impl Send for DispatchOp
impl Sync for DispatchOp
impl Unpin for DispatchOp
impl UnsafeUnpin for DispatchOp
impl UnwindSafe for DispatchOp
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> 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