[rocm_smi_kfd.cc] Handle return value from ReadSysfsStr function.
Return value from ReadSysfsStr function that reads cu_occupancy file
was not handled correctly. Modified the script to handle any fail conditions.
Change-Id: I3c71e0f6f288f196ed1f833e8709255c2b6e78ee
[ROCm/amdsmi commit: e9e3ba541e]
Этот коммит содержится в:
@@ -484,6 +484,7 @@ int GetProcessInfoForPID(uint32_t pid, rsmi_process_info_t *proc,
|
||||
cu_occupancy_path += "/stats_";
|
||||
cu_occupancy_path += std::to_string(gpu_id);
|
||||
cu_occupancy_path += "/cu_occupancy";
|
||||
|
||||
err = ReadSysfsStr(cu_occupancy_path, &tmp);
|
||||
if (err == 0) {
|
||||
if (!is_number(tmp)) {
|
||||
@@ -494,6 +495,8 @@ int GetProcessInfoForPID(uint32_t pid, rsmi_process_info_t *proc,
|
||||
|
||||
// Collect count of compute units
|
||||
cu_count += kfd_node_map[gpu_id]->cu_count();
|
||||
} else {
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user