Adjust policy for memory display on APUs (#1967)

* Read the ids_flags when fetching GPU info

The ids_flags contains the flags that can help identify if a GPU
is a dGPU or an APU.

* Show correct memory pool for APUs

The kernel policy for APUs will be to choose the bigger pool of
memory (GTT or VRAM) for KFD work.  Adjust the policy for the monitor
and default commands to show the right memory pool when using an APU.
This commit is contained in:
Mario Limonciello
2025-12-09 21:49:06 -06:00
committed by GitHub
parent 879d010974
commit 73778bf83c
8 changed files with 141 additions and 63 deletions
+2
View File
@@ -1716,6 +1716,7 @@ amdsmi_get_gpu_asic_info(amdsmi_processor_handle processor_handle, amdsmi_asic_i
info->num_of_compute_units = std::numeric_limits<uint32_t>::max();
info->target_graphics_version = std::numeric_limits<uint64_t>::max();
info->subsystem_id = std::numeric_limits<uint32_t>::max();
info->flags = 0;
std::ostringstream ss;
amd::smi::AMDSmiGPUDevice* gpu_device = nullptr;
@@ -1921,6 +1922,7 @@ amdsmi_get_gpu_asic_info(amdsmi_processor_handle processor_handle, amdsmi_asic_i
}
// TODO(cpoag): check if this is correct, might be able to go through KGD/KFD
info->rev_id = static_cast<uint32_t>(dev_info.pci_rev);
info->flags = static_cast<uint64_t>(dev_info.ids_flags);
libdrm.unload();
ss << __PRETTY_FUNCTION__