pub struct ComputeCapability { /* private fields */ }Expand description
Compute capability configuration
Implementations§
Source§impl ComputeCapability
impl ComputeCapability
Sourcepub fn with_default(self, cap: usize) -> Self
pub fn with_default(self, cap: usize) -> Self
Set default compute capability (numeric, auto-selects suffix)
Sourcepub fn with_default_arch(self, arch: &str) -> Self
pub fn with_default_arch(self, arch: &str) -> Self
Set default compute capability with explicit arch string (e.g., “90a”, “100a”)
Sourcepub fn with_override(self, pattern: &str, cap: usize) -> Self
pub fn with_override(self, pattern: &str, cap: usize) -> Self
Add compute cap override for files matching pattern (numeric)
Pattern can be:
- Exact filename: “my_kernel.cu”
- Glob pattern: “sm90_.cu”, “_hopper.cu”
Sourcepub fn with_override_arch(self, pattern: &str, arch: &str) -> Self
pub fn with_override_arch(self, pattern: &str, arch: &str) -> Self
Add compute cap override with explicit arch string (e.g., “90a”, “100a”)
Sourcepub fn get_for_file(&self, filename: &str) -> Result<GpuArch>
pub fn get_for_file(&self, filename: &str) -> Result<GpuArch>
Get GPU arch for a specific file
Priority:
- Per-file override matching pattern
- Default compute cap
- Auto-detected from nvidia-smi
- CUDA_COMPUTE_CAP environment variable
Sourcepub fn get_default(&self) -> Result<GpuArch>
pub fn get_default(&self) -> Result<GpuArch>
Get the default GPU architecture
Sourcepub fn has_overrides(&self) -> bool
pub fn has_overrides(&self) -> bool
Check if any overrides are configured
Trait Implementations§
Source§impl Clone for ComputeCapability
impl Clone for ComputeCapability
Source§fn clone(&self) -> ComputeCapability
fn clone(&self) -> ComputeCapability
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ComputeCapability
impl Debug for ComputeCapability
Auto Trait Implementations§
impl Freeze for ComputeCapability
impl RefUnwindSafe for ComputeCapability
impl Send for ComputeCapability
impl Sync for ComputeCapability
impl Unpin for ComputeCapability
impl UnsafeUnpin for ComputeCapability
impl UnwindSafe for ComputeCapability
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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