mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 18:00:01 +08:00
Update mechanism for getting subdeviceId and onSubdevice for memory
Earlier sysman memory module was using logical subdeviceId exposed by core to retrieve memory telmetry data, replace the logical subdeviceId with actual subdeviceId for collecting telemetry data. Related-To: LOCI-2828 Signed-off-by: Mayank Raghuwanshi <mayank.raghuwanshi@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
ae77bd1bd2
commit
90963b95ad
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -9,6 +9,8 @@
|
||||
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
|
||||
#include "level_zero/tools/source/sysman/sysman_imp.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
@@ -184,12 +186,12 @@ void PlatformMonitoringTech::create(const std::vector<ze_device_handle_t> &devic
|
||||
std::map<uint32_t, L0::PlatformMonitoringTech *> &mapOfSubDeviceIdToPmtObject) {
|
||||
if (ZE_RESULT_SUCCESS == PlatformMonitoringTech::enumerateRootTelemIndex(pFsAccess, rootPciPathOfGpuDevice)) {
|
||||
for (const auto &deviceHandle : deviceHandles) {
|
||||
ze_device_properties_t deviceProperties = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
|
||||
Device::fromHandle(deviceHandle)->getProperties(&deviceProperties);
|
||||
auto pPmt = new PlatformMonitoringTech(pFsAccess, deviceProperties.flags & ZE_DEVICE_PROPERTY_FLAG_SUBDEVICE,
|
||||
deviceProperties.subdeviceId);
|
||||
uint32_t subdeviceId = 0;
|
||||
ze_bool_t onSubdevice = false;
|
||||
SysmanDeviceImp::getSysmanDeviceInfo(deviceHandle, subdeviceId, onSubdevice);
|
||||
auto pPmt = new PlatformMonitoringTech(pFsAccess, onSubdevice, subdeviceId);
|
||||
UNRECOVERABLE_IF(nullptr == pPmt);
|
||||
PlatformMonitoringTech::doInitPmtObject(pFsAccess, deviceProperties.subdeviceId, pPmt,
|
||||
PlatformMonitoringTech::doInitPmtObject(pFsAccess, subdeviceId, pPmt,
|
||||
rootPciPathOfGpuDevice, mapOfSubDeviceIdToPmtObject);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user