Fix for error while reading gpu_metrics sysfs file

Signed-off-by: Divya Shikre <DivyaUday.Shikre@amd.com>
Change-Id: If69b7eeb3573ebece9ed0cb539f5ddffbe3c2f09
此提交包含在:
Divya Shikre
2020-12-11 18:41:06 -05:00
提交者 Divya Uday Shikre
父節點 d9da490214
當前提交 efd234c9e3
共有 5 個檔案被更改,包括 34 行新增 和 30 行删除
+4 -3
查看文件
@@ -178,7 +178,8 @@ class Device {
int readDevInfoLine(DevInfoTypes type, std::string *line);
int readDevInfo(DevInfoTypes type, std::string *val);
int readDevInfo(DevInfoTypes type, std::vector<std::string> *retVec);
int readDevInfo(DevInfoTypes type, std::vector<unsigned char> *retVec);
int readDevInfo(DevInfoTypes type, std::size_t b_size,
void *p_binary_data);
int writeDevInfo(DevInfoTypes type, uint64_t val);
int writeDevInfo(DevInfoTypes type, std::string val);
@@ -220,8 +221,8 @@ class Device {
int readDevInfoStr(DevInfoTypes type, std::string *retStr);
int readDevInfoMultiLineStr(DevInfoTypes type,
std::vector<std::string> *retVec);
int readDevInfoBinary(DevInfoTypes type,
std::vector<unsigned char> *retVec);
int readDevInfoBinary(DevInfoTypes type, std::size_t b_size,
void *p_binary_data);
int writeDevInfoStr(DevInfoTypes type, std::string valStr);
uint64_t bdfid_;
uint64_t kfd_gpu_id_;
+2 -2
查看文件
@@ -81,8 +81,8 @@ rsmi_status_t
GetDevValueVec(amd::smi::DevInfoTypes type,
uint32_t dv_ind, std::vector<std::string> *val_vec);
rsmi_status_t
GetDevBinaryVec(amd::smi::DevInfoTypes type,
uint32_t dv_ind, std::vector<unsigned char> *val_vec);
GetDevBinaryBlob(amd::smi::DevInfoTypes type,
uint32_t dv_ind, std::size_t b_size, void* p_binary_data);
rsmi_status_t ErrnoToRsmiStatus(int err);
struct pthread_wrap {