pub struct JitFamilySpec {
pub spec_id: u64,
pub body: String,
}Expand description
Stage 6 custom-family JIT specification.
Two levels per the charter:
- Level A (
JitFamilySpec::glm): provide a(family, link)enum value plus an optional shape constant. The generator emits the matching built-in row body, identical to the cached built-in kernel — useful for end-to-end JIT path validation against the built-in cache. - Level B (
JitFamilySpec::raw): provide raw CUDA source for the row body. The body must define the same per-row locals the kernel shell expects:mu,grad_eta,w_fisher,w_hessian,w_solver,z_f,z_h,dev, and updateflags. The shell wraps it in the canonicalextern "C" __global__ void pirls_row_jit_{spec_id}(...)signature thatlaunch_row_reweight_on_streamexpects.
Fields§
§spec_id: u64Process-unique identifier for this spec; the module cache uses
it as a key so callers must reuse the same spec_id for the
same body and pick a new one whenever the body changes.
body: StringCUDA body source. Must read from eta_c, y_i, wp, set
flags, and assign to mu, grad_eta, w_fisher, w_hessian,
w_solver, z_f, z_h, dev. See [COMMON_DEVICE_PROLOG] for
the available helpers.
Implementations§
Source§impl JitFamilySpec
impl JitFamilySpec
Sourcepub fn glm(
spec_id: u64,
family: PirlsRowFamily,
curvature: CurvatureMode,
) -> Self
pub fn glm( spec_id: u64, family: PirlsRowFamily, curvature: CurvatureMode, ) -> Self
Level A: build a spec from a built-in (family, curvature)
pair. The generator reuses the same per-family body as the
built-in cached kernel — useful to validate the JIT pipeline
end-to-end against the built-in numerical reference.
Sourcepub fn raw(spec_id: u64, body: impl Into<String>) -> Self
pub fn raw(spec_id: u64, body: impl Into<String>) -> Self
Level B: build a spec from caller-supplied body source. The
kernel shell wraps it; the body must define the required locals
listed on JitFamilySpec.
Sourcepub fn kernel_name(&self) -> String
pub fn kernel_name(&self) -> String
The extern "C" kernel symbol the JIT-compiled module exposes.
Sourcepub fn cuda_source(&self, curvature: CurvatureMode) -> String
pub fn cuda_source(&self, curvature: CurvatureMode) -> String
Build the full CUDA source ready for NVRTC compilation. The
shell + prolog match the built-in cuda_source_for so the JIT
kernel ABI is bit-identical to the cached built-ins;
launch_row_reweight_on_stream cannot tell the difference.
Trait Implementations§
Source§impl Clone for JitFamilySpec
impl Clone for JitFamilySpec
Source§fn clone(&self) -> JitFamilySpec
fn clone(&self) -> JitFamilySpec
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 JitFamilySpec
impl RefUnwindSafe for JitFamilySpec
impl Send for JitFamilySpec
impl Sync for JitFamilySpec
impl Unpin for JitFamilySpec
impl UnsafeUnpin for JitFamilySpec
impl UnwindSafe for JitFamilySpec
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> 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 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.