Make vbios version optional when discover GPU

Not all GPU has the vbios, make vbios_version optional.

Change-Id: Idc00a0c17baccadea8f26b955237c513bb9a14df
This commit is contained in:
Bill(Shuzhou) Liu
2023-07-24 12:26:41 -05:00
orang tua 55bf9cbe13
melakukan 41d0f4ad5c
-5
Melihat File
@@ -470,15 +470,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);