Skip to main content

amdgpu_gpu_info

Struct amdgpu_gpu_info 

Source
#[repr(C)]
pub struct amdgpu_gpu_info {
Show 31 fields pub asic_id: u32, pub chip_rev: u32, pub chip_external_rev: u32, pub family_id: u32, pub ids_flags: u64, pub max_engine_clk: u64, pub max_memory_clk: u64, pub num_shader_engines: u32, pub num_shader_arrays_per_engine: u32, pub avail_quad_shader_pipes: u32, pub max_quad_shader_pipes: u32, pub cache_entries_per_quad_pipe: u32, pub num_hw_gfx_contexts: u32, pub rb_pipes: u32, pub enabled_rb_pipes_mask: u32, pub gpu_counter_freq: u32, pub backend_disable: [u32; 4], pub mc_arb_ramcfg: u32, pub gb_addr_cfg: u32, pub gb_tile_mode: [u32; 32], pub gb_macro_tile_mode: [u32; 16], pub pa_sc_raster_cfg: [u32; 4], pub pa_sc_raster_cfg1: [u32; 4], pub cu_active_number: u32, pub cu_ao_mask: u32, pub cu_bitmap: [[u32; 4]; 4], pub vram_type: u32, pub vram_bit_width: u32, pub ce_ram_size: u32, pub vce_harvest_config: u32, pub pci_rev_id: u32,
}

Fields§

§asic_id: u32§chip_rev: u32§chip_external_rev: u32§family_id: u32§ids_flags: u64§max_engine_clk: u64§max_memory_clk: u64§num_shader_engines: u32§num_shader_arrays_per_engine: u32§avail_quad_shader_pipes: u32§max_quad_shader_pipes: u32§cache_entries_per_quad_pipe: u32§num_hw_gfx_contexts: u32§rb_pipes: u32§enabled_rb_pipes_mask: u32§gpu_counter_freq: u32§backend_disable: [u32; 4]§mc_arb_ramcfg: u32§gb_addr_cfg: u32§gb_tile_mode: [u32; 32]§gb_macro_tile_mode: [u32; 16]§pa_sc_raster_cfg: [u32; 4]§pa_sc_raster_cfg1: [u32; 4]§cu_active_number: u32§cu_ao_mask: u32§cu_bitmap: [[u32; 4]; 4]§vram_type: u32§vram_bit_width: u32§ce_ram_size: u32§vce_harvest_config: u32§pci_rev_id: u32

Trait Implementations§

Source§

impl Clone for amdgpu_gpu_info

Source§

fn clone(&self) -> amdgpu_gpu_info

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 amdgpu_gpu_info

Source§

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

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

impl GPU_INFO for amdgpu_gpu_info

Source§

fn family_id(&self) -> u32

Source§

fn chip_external_rev(&self) -> u32

Source§

fn device_id(&self) -> u32

Source§

fn pci_rev_id(&self) -> u32

Source§

fn vram_type(&self) -> u32

Source§

fn vram_bit_width(&self) -> u32

Note: AMDGPU driver reports VRAM width per memory channel for LPDDR5 as 64-bits. https://gitlab.freedesktop.org/drm/amd/-/issues/2468
Source§

fn max_memory_clock(&self) -> u64

KHz
Source§

fn max_engine_clock(&self) -> u64

KHz
Source§

fn ids_flags(&self) -> u64

Source§

fn rb_pipes(&self) -> u32

Source§

fn cu_active_number(&self) -> u32

Source§

fn max_se(&self) -> u32

Source§

fn max_sa_per_se(&self) -> u32

Source§

fn get_family_name(&self) -> FAMILY_NAME

Source§

fn get_asic_name(&self) -> ASIC_NAME

Source§

fn get_chip_class(&self) -> CHIP_CLASS

Source§

fn get_vram_type(&self) -> VRAM_TYPE

Source§

fn is_apu(&self) -> bool

Source§

fn peak_memory_bw(&self) -> u64

Source§

fn peak_memory_bw_gb(&self) -> u64

Source§

fn rop_per_rb(&self) -> u32

Source§

fn calc_rop_count(&self) -> u32

Source§

fn peak_gflops(&self) -> u32

[CU] * [Lane] * 2 [ops] * [GHz]
Source§

fn find_device_name(&self) -> Option<String>

Find device marketing name from amdgpu.ids
Link: https://gitlab.freedesktop.org/mesa/drm/-/blob/main/data/amdgpu.ids
Source§

fn find_device_name_or_default(&self) -> String

Returns the default marketing name (“AMD Radeon Graphics”) when the device name is not available.
Source§

fn get_max_good_cu_per_sa(&self) -> u32

Source§

fn get_min_good_cu_per_sa(&self) -> u32

Source§

fn get_l1_cache_size(&self) -> u32

Source§

fn get_gl1_cache_size(&self) -> u32

Source§

impl Copy for amdgpu_gpu_info

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.