Add new EngineUsage

Simplify verifying EngineUsage in tryGetEngine function.
Remove unused getGpgpuEnginesCount function.

Related-To: NEO-4940

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2021-08-16 18:24:13 +00:00
committed by Compute-Runtime-Automation
parent fccd22e3c7
commit 63f8c9d98b
29 changed files with 89 additions and 97 deletions

View File

@@ -1874,9 +1874,8 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendWaitOnEvents(uint32_t nu
template <GFXCORE_FAMILY gfxCoreFamily>
ze_result_t CommandListCoreFamily<gfxCoreFamily>::programSyncBuffer(Kernel &kernel, NEO::Device &device,
const ze_group_count_t *pThreadGroupDimensions) {
auto &hwInfo = device.getHardwareInfo();
auto &hwHelper = NEO::HwHelper::get(hwInfo.platform.eRenderCoreFamily);
if (!hwHelper.isCooperativeDispatchSupported(this->engineGroupType, hwInfo.platform.eProductFamily)) {
auto &hwHelper = NEO::HwHelper::get(device.getHardwareInfo().platform.eRenderCoreFamily);
if (!hwHelper.isCooperativeDispatchSupported(this->engineGroupType)) {
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

View File

@@ -433,7 +433,8 @@ void CommandQueueHw<gfxCoreFamily>::programFrontEnd(uint64_t scratchAddress, uin
UNRECOVERABLE_IF(csr == nullptr);
auto &hwInfo = device->getHwInfo();
auto &hwHelper = NEO::HwHelper::get(hwInfo.platform.eRenderCoreFamily);
auto engineGroupType = hwHelper.getEngineGroupType(csr->getOsContext().getEngineType(), hwInfo);
auto engineGroupType = hwHelper.getEngineGroupType(csr->getOsContext().getEngineType(),
csr->getOsContext().getEngineUsage(), hwInfo);
auto pVfeState = NEO::PreambleHelper<GfxFamily>::getSpaceForVfeState(&commandStream, hwInfo, engineGroupType);
NEO::PreambleHelper<GfxFamily>::programVfeState(pVfeState,
hwInfo,

View File

@@ -165,7 +165,7 @@ ze_result_t DeviceImp::getCommandQueueGroupProperties(uint32_t *pCount,
pCommandQueueGroupProperties[engineGroupCount].flags = ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE |
ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY |
ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_METRICS;
if (hwHelper.isCooperativeDispatchSupported(static_cast<NEO::EngineGroupType>(i), hardwareInfo.platform.eProductFamily)) {
if (hwHelper.isCooperativeDispatchSupported(static_cast<NEO::EngineGroupType>(i))) {
pCommandQueueGroupProperties[engineGroupCount].flags |= ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS;
}
pCommandQueueGroupProperties[engineGroupCount].maxMemoryFillPatternSize = std::numeric_limits<size_t>::max();

View File

@@ -1815,7 +1815,7 @@ TEST_F(DeviceTest, givenCooperativeDispatchSupportedWhenQueryingPropertiesFlagsT
if (groupOrdinal >= count) {
continue;
}
auto expectedValue = hwHelper.isCooperativeDispatchSupported(engineGroupType, hwInfo.platform.eProductFamily);
auto expectedValue = hwHelper.isCooperativeDispatchSupported(engineGroupType);
auto actualValue = NEO::isValueSet(properties[groupOrdinal].flags, ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS);
EXPECT_EQ(expectedValue, actualValue);
}