pub struct AreaPtx { /* private fields */ }Expand description
The PTX variants of one area embedded by this build
A tier feature may embed an older variant when that is the best the area ships.
Every variant exports the same kernels with the same parameters, which
cudakit-build checks, so the host can load any of them
Implementations§
Source§impl AreaPtx
impl AreaPtx
Sourcepub const EMPTY: Self
pub const EMPTY: Self
An area with no embedded variant yet; add them with Self::with
Sourcepub const fn baseline(sm75: Option<EmbeddedPtx>) -> Self
pub const fn baseline(sm75: Option<EmbeddedPtx>) -> Self
An area that ships only the baseline variant
Sourcepub const fn with(self, tier: PtxTier, ptx: Option<EmbeddedPtx>) -> Self
pub const fn with(self, tier: PtxTier, ptx: Option<EmbeddedPtx>) -> Self
This area with ptx as its tier variant, usually from embed_tier!, which
is None when the build does not embed it
Sourcepub fn fixture(variants: &[(PtxTier, &'static str)]) -> Self
Available on crate feature test-support only.
pub fn fixture(variants: &[(PtxTier, &'static str)]) -> Self
test-support only.Embedded variants without cubins, for host-only tests such as a fake higher tier
Sourcepub fn iter(&self) -> impl Iterator<Item = (PtxTier, &'static str)>
pub fn iter(&self) -> impl Iterator<Item = (PtxTier, &'static str)>
The embedded variants, lowest tier first
Sourcepub fn embedded(&self, tier: PtxTier) -> Option<EmbeddedPtx>
pub fn embedded(&self, tier: PtxTier) -> Option<EmbeddedPtx>
The embedded bytes for one specific tier
Sourcepub fn runnable_tier(
self,
limit: PtxTier,
device: ComputeCapability,
) -> Option<PtxTier>
pub fn runnable_tier( self, limit: PtxTier, device: ComputeCapability, ) -> Option<PtxTier>
The highest runnable embedded tier, without hashing its artifact
Sourcepub fn driver_request<K: KernelArea>(
self,
area: K,
limit: PtxTier,
device: ComputeCapability,
) -> Option<ModuleRequest<K>>
pub fn driver_request<K: KernelArea>( self, area: K, limit: PtxTier, device: ComputeCapability, ) -> Option<ModuleRequest<K>>
The best runnable tier and this device’s exact cubin, or its PTX when the area embeds no cubin for the device