From 142dcfa8f4bb3724ce1d5cbf3441351430675fad Mon Sep 17 00:00:00 2001 From: Harish Kasiviswanathan Date: Sun, 29 Jan 2023 21:31:13 -0500 Subject: [PATCH] Don't depend on vbios_version sysfs file On APU's vbios_version string might not be exposed. Relying on vendor ID to detect AMDGPU is sufficient Signed-off-by: Harish Kasiviswanathan Change-Id: I08ef4b4bc7491a40f318791803aeaf261f7fac25 --- src/rocm_smi_main.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/rocm_smi_main.cc b/src/rocm_smi_main.cc index ca992d51ce..f95ad528d6 100755 --- a/src/rocm_smi_main.cc +++ b/src/rocm_smi_main.cc @@ -543,15 +543,10 @@ static const uint32_t kAmdGpuId = 0x1002; static bool isAMDGPU(std::string dev_path) { std::string vend_path = dev_path + "/device/vendor"; - std::string vbios_v_path = dev_path + "/device/vbios_version"; if (!FileExists(vend_path.c_str())) { return false; } - if (!FileExists(vbios_v_path.c_str())) { - return false; - } - std::ifstream fs; fs.open(vend_path);