[llvm] [Offload] For AMDGPU driver, use product name (PR #155632)

via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 27 07:58:00 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-amdgpu

Author: Ross Brunton (RossBrunton)

<details>
<summary>Changes</summary>

On my system, this causes the device to now identify as "Radeon RX 7900
GRE" rather than "gfx1100". This matches Nvidia, which identifies as
(for example) "NVIDIA GeForce GT 1030".


---
Full diff: https://github.com/llvm/llvm-project/pull/155632.diff


1 Files Affected:

- (modified) offload/plugins-nextgen/amdgpu/src/rtl.cpp (+2-2) 


``````````diff
diff --git a/offload/plugins-nextgen/amdgpu/src/rtl.cpp b/offload/plugins-nextgen/amdgpu/src/rtl.cpp
index 5f397436dffd1..a90bd65a9d908 100644
--- a/offload/plugins-nextgen/amdgpu/src/rtl.cpp
+++ b/offload/plugins-nextgen/amdgpu/src/rtl.cpp
@@ -2807,11 +2807,11 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
 
     Status = getDeviceAttrRaw(HSA_AMD_AGENT_INFO_PRODUCT_NAME, TmpChar);
     if (Status == HSA_STATUS_SUCCESS)
-      Info.add("Product Name", TmpChar);
+      Info.add("Product Name", TmpChar, "", DeviceInfo::NAME);
 
     Status = getDeviceAttrRaw(HSA_AGENT_INFO_NAME, TmpChar);
     if (Status == HSA_STATUS_SUCCESS)
-      Info.add("Device Name", TmpChar, "", DeviceInfo::NAME);
+      Info.add("Device Name", TmpChar);
 
     Status = getDeviceAttrRaw(HSA_AGENT_INFO_VENDOR_NAME, TmpChar);
     if (Status == HSA_STATUS_SUCCESS)

``````````

</details>


https://github.com/llvm/llvm-project/pull/155632


More information about the llvm-commits mailing list