-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[Offload] For AMDGPU driver, use product name #155632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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".
@llvm/pr-subscribers-offload @llvm/pr-subscribers-backend-amdgpu Author: Ross Brunton (RossBrunton) ChangesOn my system, this causes the device to now identify as "Radeon RX 7900 Full diff: https://github.com/llvm/llvm-project/pull/155632.diff 1 Files Affected:
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)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming this still prints both, because users definitely want to know what to pass to --offload-arch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sounds counterproductive. The product name is not really actionable information
As long as we print the actually useful part we can include the marketing name, sometimes good to know. That's what |
What's the sample output with and without this patch, for both fields? |
To clarify, code name is the useful part. If the NVIDIA portion doesn't print that then it should be changed. |
I've pushed up a change which leaves NAME as is, but adds For my AMD device, Although, would |
|
IMHO if both product name and code name are shown, then it'd be fine. |
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".