Struct HardwareProperties

Source
pub struct HardwareProperties {
    pub plane_size_min: u32,
    pub plane_size_max: u32,
    pub max_bindings: u32,
    pub max_shared_memory_size: usize,
    pub max_cube_count: CubeCount,
    pub max_units_per_cube: u32,
    pub max_cube_dim: CubeDim,
    pub num_streaming_multiprocessors: Option<u32>,
    pub num_tensor_cores: Option<u32>,
    pub min_tensor_cores_dim: Option<u32>,
}
Expand description

Properties of the device related to the accelerator hardware.

§Plane size min/max

This is a range of possible values for the plane size.

For Nvidia GPUs and HIP, this is a single fixed value.

For wgpu with AMD GPUs this is a range of possible values, but the actual configured value is undefined and can only be queried at runtime. Should usually be 32, but not guaranteed.

For Intel GPUs, this is variable based on the number of registers used in the kernel. No way to query this at compile time is currently available. As a result, the minimum value should usually be assumed.

Fields§

§plane_size_min: u32

The minimum size of a plane on this device

§plane_size_max: u32

The maximum size of a plane on this device

§max_bindings: u32

minimum number of bindings for a kernel that can be used at once.

§max_shared_memory_size: usize

Maximum amount of shared memory, in bytes

§max_cube_count: CubeCount

Maximum CubeCount in x, y and z dimensions

§max_units_per_cube: u32

Maximum number of total units in a cube

§max_cube_dim: CubeDim

Maximum CubeDim in x, y, and z dimensions

§num_streaming_multiprocessors: Option<u32>

Number of streaming multiprocessors (SM), if available

§num_tensor_cores: Option<u32>

Number of tensor cores per SM, if any

§min_tensor_cores_dim: Option<u32>

The minimum tiling dimension for a single axis in tensor cores.

For a backend that only supports 16x16x16, the value would be 16. For a backend that also supports 32x8x16, the value would be 8.

Trait Implementations§

Source§

impl Clone for HardwareProperties

Source§

fn clone(&self) -> HardwareProperties

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for HardwareProperties

Source§

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

Formats the value using the given formatter. Read more

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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> 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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V