Use correct string conversion function for VRAM and SDMA usage
VRAM and SDMA usage can be 64-bit long numbers. Use stoull()
instead of stoi() to convert the VRAM and SDMA usage strings to
numbers.
Change-Id: Ifadbada9f33320fc67666036ce8439823c1d1fb7
[ROCm/rocm_smi_lib commit: fb2ed24372]
이 커밋은 다음에 포함됨:
1 부모
40bf5754fd
커밋
602f182344
1 파일이 변경됨
+2
-2
@@ -451,7 +451,7 @@ int GetProcessInfoForPID(uint32_t pid, rsmi_process_info_t *proc,
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
proc->vram_usage += std::stoi(tmp);
|
||||
proc->vram_usage += std::stoull(tmp);
|
||||
|
||||
std::string sdma_str_path = proc_str_path;
|
||||
sdma_str_path += "/sdma_";
|
||||
@@ -466,7 +466,7 @@ int GetProcessInfoForPID(uint32_t pid, rsmi_process_info_t *proc,
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
proc->sdma_usage += std::stoi(tmp);
|
||||
proc->sdma_usage += std::stoull(tmp);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
새 이슈에서 참조
사용자 차단