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 <Harish.Kasiviswanathan@amd.com>
Change-Id: I08ef4b4bc7491a40f318791803aeaf261f7fac25


[ROCm/rocm_smi_lib commit: 142dcfa8f4]
Este commit está contenido en:
Harish Kasiviswanathan
2023-01-29 21:31:13 -05:00
padre 1e7502f300
commit 37cfd53304
-5
Ver fichero
@@ -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);