RDC Event Process Start/Stop Fix (#193)
Change-Id: Ib68f9909f2a6e0a1e5764298f1012a2bcf7ce1fc Signed-off-by: adapryor <Adam.pryor@amd.com>
Este commit está contenido en:
@@ -28,7 +28,6 @@ THE SOFTWARE.
|
||||
static const char* topology_link_type_to_str(rdc_topology_link_type_t type) {
|
||||
if (type == RDC_IOLINK_TYPE_PCIEXPRESS) return "RDC_IOLINK_TYPE_PCIEXPRESS";
|
||||
if (type == RDC_IOLINK_TYPE_XGMI) return "RDC_IOLINK_TYPE_XGMI";
|
||||
if (type == RDCI_IOLINK_TYPE_NUMIOLINKTYPES) return "RDCI_IOLINK_TYPE_NUMIOLINKTYPES";
|
||||
return "Unknown_Type";
|
||||
}
|
||||
int main() {
|
||||
@@ -161,4 +160,4 @@ cleanup:
|
||||
rdc_stop_embedded(rdc_handle);
|
||||
rdc_shutdown();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -709,7 +709,6 @@ typedef enum {
|
||||
RDC_IOLINK_TYPE_UNDEFINED = 0, //!< unknown type.
|
||||
RDC_IOLINK_TYPE_PCIEXPRESS = 1, //!< PCI Express
|
||||
RDC_IOLINK_TYPE_XGMI = 2, //!< XGMI
|
||||
RDCI_IOLINK_TYPE_NUMIOLINKTYPES, //!< Number of IO Link types
|
||||
RDC_IOLINK_TYPE_SIZE = 0xFFFFFFFF //!< Max of IO Link types
|
||||
} rdc_topology_link_type_t;
|
||||
|
||||
|
||||
@@ -106,6 +106,17 @@ rdc_status_t RdcWatchTableImpl::rdc_job_start_stats(rdc_gpu_group_t group_id, co
|
||||
|
||||
// At last, when every thing sets up, starts to watch the fields.
|
||||
result = rdc_field_watch(group_id, JOB_FIELD_ID, update_freq, 0, 0);
|
||||
if (result != RDC_ST_OK) {
|
||||
return result;
|
||||
}
|
||||
|
||||
std::vector<RdcFieldKey> proc_events;
|
||||
for (uint32_t ix = 0; ix < ginfo.count; ++ix) {
|
||||
uint32_t gpu = ginfo.entity_ids[ix];
|
||||
proc_events.emplace_back(gpu, RDC_EVNT_NOTIF_PROCESS_START);
|
||||
proc_events.emplace_back(gpu, RDC_EVNT_NOTIF_PROCESS_END);
|
||||
}
|
||||
result = notifications_->set_listen_events(proc_events);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ rdc_status_t RdcStandaloneHandler::rdc_job_get_stats(const char job_id[64],
|
||||
}
|
||||
|
||||
p_job_info->num_processes = reply.num_processes();
|
||||
for (int i = 0; i < reply.num_processes(); i++) {
|
||||
for (uint32_t i = 0; i < reply.num_processes(); i++) {
|
||||
const auto& proc_msg = reply.processes(i);
|
||||
p_job_info->processes[i].pid = proc_msg.pid();
|
||||
|
||||
|
||||
Referencia en una nueva incidencia
Block a user