Skip to content

Commit 0a3c960

Browse files
Enable update task count from wait on DG2
Related-To: NEO-6948 Signed-off-by: Dominik Dabek <[email protected]>
1 parent da52303 commit 0a3c960

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

opencl/source/command_queue/command_queue.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ uint32_t CommandQueue::peekBcsTaskCount(aub_stream::EngineType bcsEngineType) co
793793
}
794794

795795
bool CommandQueue::isTextureCacheFlushNeeded(uint32_t commandType) const {
796-
return commandType == CL_COMMAND_COPY_IMAGE && getGpgpuCommandStreamReceiver().isDirectSubmissionEnabled();
796+
return (commandType == CL_COMMAND_COPY_IMAGE || commandType == CL_COMMAND_WRITE_IMAGE) && getGpgpuCommandStreamReceiver().isDirectSubmissionEnabled();
797797
}
798798

799799
IndirectHeap &CommandQueue::getIndirectHeap(IndirectHeap::Type heapType, size_t minRequiredSize) {

opencl/test/unit_test/command_queue/command_queue_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ HWTEST_F(CommandQueueCommandStreamTest, WhenCheckIsTextureCacheFlushNeededThenRe
423423
EXPECT_FALSE(cmdQ.isTextureCacheFlushNeeded(CL_COMMAND_COPY_BUFFER_RECT));
424424

425425
for (auto i = CL_COMMAND_NDRANGE_KERNEL; i < CL_COMMAND_RELEASE_GL_OBJECTS; i++) {
426-
if (i == CL_COMMAND_COPY_IMAGE) {
426+
if (i == CL_COMMAND_COPY_IMAGE || i == CL_COMMAND_WRITE_IMAGE) {
427427
commandStreamReceiver.directSubmissionAvailable = true;
428428
EXPECT_TRUE(cmdQ.isTextureCacheFlushNeeded(i));
429429
commandStreamReceiver.directSubmissionAvailable = false;

opencl/test/unit_test/helpers/hw_helper_tests_dg2_and_later.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,12 @@ HWTEST2_F(HwHelperTestsDg2AndLater, givenXeHPGAndLaterPlatformWhenCheckingIfUnTy
154154
EXPECT_TRUE(hwHelper.unTypedDataPortCacheFlushRequired());
155155
}
156156

157+
HWTEST2_F(HwHelperTestsDg2AndLater, givenHwHelperWhenCheckIsUpdateTaskCountFromWaitSupportedThenReturnsTrue, IsAtLeastXeHpgCore) {
158+
auto &hwHelper = HwHelper::get(hardwareInfo.platform.eRenderCoreFamily);
159+
160+
EXPECT_TRUE(hwHelper.isUpdateTaskCountFromWaitSupported());
161+
}
162+
157163
using HwInfoConfigTestDg2AndLater = ::testing::Test;
158164

159165
HWTEST2_F(HwInfoConfigTestDg2AndLater, givenDg2AndLaterPlatformWhenAskedIfHeapInLocalMemThenTrueIsReturned, IsAtLeastXeHpgCore) {

shared/source/helpers/hw_helper_dg2_and_later.inl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ void MemorySynchronizationCommands<GfxFamily>::setPipeControlWAFlags(PIPE_CONTRO
5252
pipeControl.setUnTypedDataPortCacheFlush(true);
5353
}
5454

55+
template <>
56+
bool HwHelperHw<Family>::isUpdateTaskCountFromWaitSupported() const {
57+
return true;
58+
}
59+
5560
template <>
5661
bool HwHelperHw<Family>::unTypedDataPortCacheFlushRequired() const {
5762
return true;

shared/source/helpers/hw_helper_pvc_and_later.inl

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ bool HwHelperHw<Family>::isCooperativeDispatchSupported(const EngineGroupType en
3737
return true;
3838
}
3939

40-
template <>
41-
bool HwHelperHw<Family>::isUpdateTaskCountFromWaitSupported() const {
42-
return true;
43-
}
44-
4540
template <>
4641
uint32_t HwHelperHw<Family>::adjustMaxWorkGroupCount(uint32_t maxWorkGroupCount, const EngineGroupType engineGroupType,
4742
const HardwareInfo &hwInfo, bool isEngineInstanced) const {

0 commit comments

Comments
 (0)