pub struct GfxTarget {
pub major: u32,
pub minor: u32,
pub step: u32,
}Expand description
AMD GPU architecture target, e.g. gfx1013 — the identifier a ROCm/HIP
code object is built for (--offload-arch=gfx1013).
The AMD counterpart of ComputeCapability, and read the same way: to pick
a prebuilt artifact the host can actually run. Ordered major first, so a
host can be checked against a minimum:
use gpu_probe::GfxTarget;
assert!(GfxTarget::new(10, 3, 0) >= GfxTarget::new(10, 1, 3));
assert!(GfxTarget::new(11, 0, 0) >= GfxTarget::new(10, 3, 0));Constructible so callers can express such a requirement.
Fields§
§major: u32Major version — the 10 in gfx1013.
minor: u32Minor version — the 1 in gfx1013.
step: u32Stepping — the 3 in gfx1013, and the a in gfx90a.
Implementations§
Trait Implementations§
impl Copy for GfxTarget
impl Eq for GfxTarget
Source§impl Ord for GfxTarget
impl Ord for GfxTarget
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for GfxTarget
impl PartialOrd for GfxTarget
impl StructuralPartialEq for GfxTarget
Auto Trait Implementations§
impl Freeze for GfxTarget
impl RefUnwindSafe for GfxTarget
impl Send for GfxTarget
impl Sync for GfxTarget
impl Unpin for GfxTarget
impl UnsafeUnpin for GfxTarget
impl UnwindSafe for GfxTarget
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