mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Avoid adding subdevice flag if ReturnSubDevicesAsApiDevices is set
Related-To: LOCI-3656 Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
ad072b4d5d
commit
522076cf82
@@ -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/helpers/debug_helpers.h"
|
||||
|
||||
#include "level_zero/tools/source/sysman/sysman_imp.h"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
ze_result_t PerformanceImp::performanceGetProperties(zes_perf_properties_t *pProperties) {
|
||||
@@ -32,10 +34,12 @@ void PerformanceImp::init() {
|
||||
}
|
||||
|
||||
PerformanceImp::PerformanceImp(OsSysman *pOsSysman, ze_device_handle_t handle, zes_engine_type_flag_t domain) {
|
||||
ze_device_properties_t deviceProperties = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
|
||||
Device::fromHandle(handle)->getProperties(&deviceProperties);
|
||||
pOsPerformance = OsPerformance::create(pOsSysman, deviceProperties.flags & ZE_DEVICE_PROPERTY_FLAG_SUBDEVICE,
|
||||
deviceProperties.subdeviceId, domain);
|
||||
uint32_t subdeviceId = std::numeric_limits<uint32_t>::max();
|
||||
ze_bool_t onSubdevice = false;
|
||||
SysmanDeviceImp::getSysmanDeviceInfo(handle, subdeviceId, onSubdevice, false);
|
||||
pOsPerformance = OsPerformance::create(pOsSysman, onSubdevice,
|
||||
subdeviceId, domain);
|
||||
|
||||
UNRECOVERABLE_IF(nullptr == pOsPerformance);
|
||||
init();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user