Skip to main content

DeviceProfile

Struct DeviceProfile 

Source
pub struct DeviceProfile {
Show 32 fields pub backend: &'static str, pub supports_subgroup_ops: bool, pub supports_indirect_dispatch: bool, pub supports_distributed_collectives: bool, pub supports_specialization_constants: bool, pub supports_f16: bool, pub supports_bf16: bool, pub supports_trap_propagation: bool, pub supports_tensor_cores: bool, pub has_mul_high: bool, pub has_dual_issue_fp32_int32: bool, pub has_subgroup_shuffle: bool, pub has_shared_memory: bool, pub max_native_int_width: u32, pub max_workgroup_size: [u32; 3], pub max_invocations_per_workgroup: u32, pub max_shared_memory_bytes: u32, pub max_storage_buffer_binding_size: u64, pub subgroup_size: u32, pub compute_units: u32, pub regs_per_thread_max: u32, pub l1_cache_bytes: u32, pub l2_cache_bytes: u32, pub mem_bw_gbps: u32, pub timing_quality: DeviceTimingQuality, pub supports_device_timestamps: bool, pub supports_hardware_counters: bool, pub ideal_unroll_depth: u32, pub ideal_vector_pack_bits: u32, pub ideal_workgroup_tile: [u32; 3], pub shared_memory_bank_count: u32, pub shared_memory_bank_width_bytes: u32,
}
Expand description

Device capability snapshot used across driver-shared planning.

Fields§

§backend: &'static str

Stable backend identifier.

§supports_subgroup_ops: bool

The device and lowering path support subgroup intrinsics.

§supports_indirect_dispatch: bool

The backend supports indirect dispatch.

§supports_distributed_collectives: bool

The backend lowers distributed collective communication nodes.

§supports_specialization_constants: bool

The backend supports compile-time specialization constants.

§supports_f16: bool

The backend lowers binary16 natively.

§supports_bf16: bool

The backend lowers bfloat16 natively.

§supports_trap_propagation: bool

The backend preserves explicit trap propagation.

§supports_tensor_cores: bool

The backend lowers matrix-engine operations for supported shapes.

§has_mul_high: bool

Native unsigned multiply-high is available to lowering strategies.

§has_dual_issue_fp32_int32: bool

Integer and float pipelines can issue concurrently.

§has_subgroup_shuffle: bool

Subgroup shuffle-like communication is available.

§has_shared_memory: bool

Explicit workgroup/shared memory is available.

§max_native_int_width: u32

Maximum native integer width in bits.

§max_workgroup_size: [u32; 3]

Maximum workgroup dimensions.

§max_invocations_per_workgroup: u32

Maximum invocations in one workgroup.

§max_shared_memory_bytes: u32

Shared memory per workgroup in bytes.

§max_storage_buffer_binding_size: u64

Maximum single storage-buffer binding in bytes.

§subgroup_size: u32

Native subgroup size, or 0 when unknown.

§compute_units: u32

Physical compute-unit count, or 0 when unknown.

§regs_per_thread_max: u32

Maximum registers per thread, or 0 when unknown.

§l1_cache_bytes: u32

L1 cache size in bytes, or 0 when unknown.

§l2_cache_bytes: u32

L2 cache size in bytes, or 0 when unknown.

§mem_bw_gbps: u32

Peak memory bandwidth in GB/s, or 0 when unknown.

§timing_quality: DeviceTimingQuality

Timing-data quality exposed by this backend/device.

§supports_device_timestamps: bool

Device timestamp queries/events are available for dispatch timing.

§supports_hardware_counters: bool

Hardware counter sampling is available for benchmark telemetry.

§ideal_unroll_depth: u32

Device-profile preferred unroll depth, or 0 when unknown.

§ideal_vector_pack_bits: u32

Device-profile preferred vector pack width in bits, or 0 when unknown.

§ideal_workgroup_tile: [u32; 3]

Device-profile preferred workgroup tile, or [0, 0, 0] when unknown.

§shared_memory_bank_count: u32

Shared-memory bank count, or 0 when unknown.

§shared_memory_bank_width_bytes: u32

Shared-memory bank width in bytes, or 0 when unknown.

Implementations§

Source§

impl DeviceProfile

Source

pub const fn conservative(backend: &'static str) -> Self

Conservative profile for a backend that has not probed a device.

Source

pub fn from_backend(backend: &dyn VyreBackend) -> Self

Build a profile from the stable backend trait capability methods.

Source

pub const fn validation_capabilities(self) -> BackendCapabilities

Validation capability projection.

Source

pub const fn adapter_caps(self) -> AdapterCaps

Optimizer capability projection.

Source

pub const fn strategy_capabilities(self) -> BackendCapabilities

Strategy capability projection.

Trait Implementations§

Source§

impl Clone for DeviceProfile

Source§

fn clone(&self) -> DeviceProfile

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for DeviceProfile

Source§

impl Debug for DeviceProfile

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DeviceProfile

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for DeviceProfile

Source§

impl From<DeviceProfile> for AdapterCaps

Source§

fn from(profile: DeviceProfile) -> Self

Converts to this type from the input type.
Source§

impl From<DeviceProfile> for BackendCapabilities

Source§

fn from(profile: DeviceProfile) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for DeviceProfile

Source§

fn eq(&self, other: &DeviceProfile) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for DeviceProfile

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more