Skip to content

Commit 7af07b6

Browse files
Update cooperative dispatch logic
Signed-off-by: Filip Hazubski <[email protected]>
1 parent 1bb7e50 commit 7af07b6

File tree

3 files changed

+5
-15
lines changed

3 files changed

+5
-15
lines changed

level_zero/core/source/cmdlist/cmdlist_hw.inl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,12 +1920,6 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendWaitOnEvents(uint32_t nu
19201920
template <GFXCORE_FAMILY gfxCoreFamily>
19211921
ze_result_t CommandListCoreFamily<gfxCoreFamily>::programSyncBuffer(Kernel &kernel, NEO::Device &device,
19221922
const ze_group_count_t *pThreadGroupDimensions) {
1923-
auto &hwInfo = device.getHardwareInfo();
1924-
auto &hwHelper = NEO::HwHelper::get(hwInfo.platform.eRenderCoreFamily);
1925-
if (!hwHelper.isCooperativeDispatchSupported(this->engineGroupType, hwInfo)) {
1926-
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
1927-
}
1928-
19291923
uint32_t maximalNumberOfWorkgroupsAllowed;
19301924
auto ret = kernel.suggestMaxCooperativeGroupCount(&maximalNumberOfWorkgroupsAllowed, this->engineGroupType,
19311925
device.isEngineInstanced());

level_zero/core/source/device/device_imp.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -225,18 +225,14 @@ ze_result_t DeviceImp::getCommandQueueGroupProperties(uint32_t *pCount,
225225
if (i == static_cast<uint32_t>(NEO::EngineGroupType::RenderCompute)) {
226226
pCommandQueueGroupProperties[engineGroupCount].flags = ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE |
227227
ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY |
228-
ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_METRICS;
229-
if (hwHelper.isCooperativeDispatchSupported(static_cast<NEO::EngineGroupType>(i), hardwareInfo)) {
230-
pCommandQueueGroupProperties[engineGroupCount].flags |= ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS;
231-
}
228+
ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_METRICS |
229+
ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS;
232230
pCommandQueueGroupProperties[engineGroupCount].maxMemoryFillPatternSize = std::numeric_limits<size_t>::max();
233231
}
234232
if (i == static_cast<uint32_t>(NEO::EngineGroupType::Compute)) {
235233
pCommandQueueGroupProperties[engineGroupCount].flags = ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE |
236-
ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY;
237-
if (hwHelper.isCooperativeDispatchSupported(static_cast<NEO::EngineGroupType>(i), hardwareInfo)) {
238-
pCommandQueueGroupProperties[engineGroupCount].flags |= ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS;
239-
}
234+
ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY |
235+
ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS;
240236
pCommandQueueGroupProperties[engineGroupCount].maxMemoryFillPatternSize = std::numeric_limits<size_t>::max();
241237
}
242238
if (i == static_cast<uint32_t>(NEO::EngineGroupType::Copy)) {

level_zero/core/test/unit_tests/sources/device/test_device.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2156,7 +2156,7 @@ HWTEST_F(DeviceTest, givenCooperativeDispatchSupportedWhenQueryingPropertiesFlag
21562156
continue;
21572157
}
21582158
auto actualValue = NEO::isValueSet(properties[groupOrdinal].flags, ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS);
2159-
EXPECT_EQ(isCooperativeDispatchSupported, actualValue);
2159+
EXPECT_TRUE(actualValue);
21602160
}
21612161
}
21622162
}

0 commit comments

Comments
 (0)