Expand showpids to provide more details
Provide details of GPU usage by an application. Change-Id: I0f36df7d358754c2c8a60432b736d98f667ee99c
Этот коммит содержится в:
коммит произвёл
Shuzhou Liu
родитель
0478d53e23
Коммит
d9b6af7a09
@@ -3768,6 +3768,29 @@ rsmi_compute_process_info_by_pid_get(uint32_t pid,
|
||||
CATCH
|
||||
}
|
||||
|
||||
rsmi_status_t
|
||||
rsmi_compute_process_info_by_device_get(uint32_t pid, uint32_t dv_ind,
|
||||
rsmi_process_info_t *proc) {
|
||||
TRY
|
||||
if (proc == nullptr) {
|
||||
return RSMI_STATUS_INVALID_ARGS;
|
||||
}
|
||||
// Check the device and kfdnode exist
|
||||
GET_DEV_AND_KFDNODE_FROM_INDX
|
||||
|
||||
std::unordered_set<uint64_t> gpu_set;
|
||||
gpu_set.insert(dev->kfd_gpu_id());
|
||||
int err = amd::smi::GetProcessInfoForPID(pid, proc, &gpu_set);
|
||||
|
||||
if (err) {
|
||||
return amd::smi::ErrnoToRsmiStatus(err);
|
||||
}
|
||||
|
||||
return RSMI_STATUS_SUCCESS;
|
||||
|
||||
CATCH
|
||||
}
|
||||
|
||||
rsmi_status_t
|
||||
rsmi_dev_xgmi_error_status(uint32_t dv_ind, rsmi_xgmi_status_t *status) {
|
||||
TRY
|
||||
|
||||
Ссылка в новой задаче
Block a user