pub struct PirlsRowBackend { /* private fields */ }Expand description
Process-wide cache of compiled per-family modules.
Implementations§
Source§impl PirlsRowBackend
impl PirlsRowBackend
pub const fn compiled() -> bool
pub fn probe() -> Result<&'static Self, GpuError>
Sourcepub fn module_for(
&self,
family: PirlsRowFamily,
curvature: CurvatureMode,
) -> Result<Arc<CudaModule>, GpuError>
pub fn module_for( &self, family: PirlsRowFamily, curvature: CurvatureMode, ) -> Result<Arc<CudaModule>, GpuError>
Compile (or fetch from cache) the final-row kernel module for
(family, curvature). Writes all 9 output fields.
Sourcepub fn module_for_solve(
&self,
family: PirlsRowFamily,
curvature: CurvatureMode,
) -> Result<Arc<CudaModule>, GpuError>
pub fn module_for_solve( &self, family: PirlsRowFamily, curvature: CurvatureMode, ) -> Result<Arc<CudaModule>, GpuError>
Compile (or fetch from cache) the solve-row kernel module for
(family, curvature). Writes only grad_eta, w_solver, deviance,
status — used on every hot Newton iteration.
Sourcepub fn module_for_ladder(
&self,
family: PirlsRowFamily,
curvature: CurvatureMode,
) -> Result<Arc<CudaModule>, GpuError>
pub fn module_for_ladder( &self, family: PirlsRowFamily, curvature: CurvatureMode, ) -> Result<Arc<CudaModule>, GpuError>
Compile (or fetch from cache) the alpha-ladder kernel module for
(family, curvature). Evaluates all ALPHA_LADDER_LEN step sizes in
a single launch, accumulating objective[] and status[] per alpha slot.
Sourcepub fn module_for_jit(
&self,
spec: &JitFamilySpec,
curvature: CurvatureMode,
) -> Result<Arc<CudaModule>, GpuError>
pub fn module_for_jit( &self, spec: &JitFamilySpec, curvature: CurvatureMode, ) -> Result<Arc<CudaModule>, GpuError>
Stage 6: JIT-compile and cache a custom-family row module.
The kernel name is pirls_row_jit_{spec.spec_id} so multiple
distinct JIT specs in the same process get distinct cached
modules. The cache key is (spec_id, curvature) which mirrors
the built-in (family, curvature) cache and reuses the same
HashMap-of-Arc<CudaModule> (but with a synthetic ModuleKey
derived from the spec_id).
Note: a fresh (spec_id, curvature) recompiles via NVRTC the
first time; subsequent fits in the same process hit the cache.
Spec changes (different body) must use a different spec_id so
that the cache does NOT return a stale module.
Auto Trait Implementations§
impl !Freeze for PirlsRowBackend
impl RefUnwindSafe for PirlsRowBackend
impl Send for PirlsRowBackend
impl Sync for PirlsRowBackend
impl Unpin for PirlsRowBackend
impl UnsafeUnpin for PirlsRowBackend
impl UnwindSafe for PirlsRowBackend
Blanket Implementations§
impl<T> Allocation for T
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.