Skip disabled engines when round robin over copy engines

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2022-02-07 11:28:51 +00:00
committed by Compute-Runtime-Automation
parent 538e0aea87
commit ae357c79ed
3 changed files with 8 additions and 5 deletions

View File

@@ -162,8 +162,8 @@ aub_stream::EngineType selectLinkCopyEngine(const HardwareInfo &hwInfo, const De
if (enableCmdQRoundRobindBcsEngineAssign) {
aub_stream::EngineType engineType;
do {
engineType = static_cast<aub_stream::EngineType>(aub_stream::EngineType::ENGINE_BCS1 + (selectorCopyEngine.fetch_add(1u) % 8));
} while (!HwHelper::get(hwInfo.platform.eRenderCoreFamily).isSubDeviceEngineSupported(hwInfo, deviceBitfield, engineType));
engineType = static_cast<aub_stream::EngineType>(aub_stream::EngineType::ENGINE_BCS1 + (selectorCopyEngine.fetch_add(1u) % EngineHelpers::numLinkedCopyEngines));
} while (!HwHelper::get(hwInfo.platform.eRenderCoreFamily).isSubDeviceEngineSupported(hwInfo, deviceBitfield, engineType) || !hwInfo.featureTable.ftrBcsInfo.test(engineType - aub_stream::EngineType::ENGINE_BCS1 + 1));
return engineType;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2021 Intel Corporation
* Copyright (C) 2019-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -64,6 +64,8 @@ constexpr bool isLinkBcs(aub_stream::EngineType engineType) {
return engineType >= aub_stream::ENGINE_BCS1 && engineType <= aub_stream::ENGINE_BCS8;
}
constexpr uint32_t numLinkedCopyEngines = 8u;
bool linkCopyEnginesSupported(const HardwareInfo &hwInfo, const DeviceBitfield &deviceBitfield);
aub_stream::EngineType selectLinkCopyEngine(const HardwareInfo &hwInfo, const DeviceBitfield &deviceBitfield, std::atomic<uint32_t> &selectorCopyEngine);