Skip to content

Commit b89badb

Browse files
refactor: Remove template param from enqueueNonBlocked
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com> Source: bac0207
1 parent 01b44ea commit b89badb

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

opencl/source/command_queue/command_queue_hw.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,6 @@ class CommandQueueHw : public CommandQueue {
367367
template <uint32_t cmdType>
368368
cl_int enqueueBlitSplit(MultiDispatchInfo &dispatchInfo, cl_uint numEventsInWaitList, const cl_event *eventWaitList, cl_event *event, bool blocking, CommandStreamReceiver &csr);
369369

370-
template <uint32_t commandType>
371370
CompletionStamp enqueueNonBlocked(Surface **surfacesForResidency,
372371
size_t surfaceCount,
373372
LinearStream &commandStream,
@@ -381,7 +380,8 @@ class CommandQueueHw : public CommandQueue {
381380
EventBuilder &eventBuilder,
382381
TaskCountType taskLevel,
383382
PrintfHandler *printfHandler,
384-
bool relaxedOrderingEnabled);
383+
bool relaxedOrderingEnabled,
384+
uint32_t commandType);
385385

386386
void enqueueBlocked(uint32_t commandType,
387387
Surface **surfacesForResidency,

opencl/source/command_queue/enqueue_common.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ cl_int CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
343343
if (enqueueProperties.operation == EnqueueProperties::Operation::GpuKernel) {
344344
csrDeps.makeResident(computeCommandStreamReceiver);
345345

346-
completionStamp = enqueueNonBlocked<commandType>(
346+
completionStamp = enqueueNonBlocked(
347347
surfacesForResidency,
348348
numSurfaceForResidency,
349349
commandStream,
@@ -357,7 +357,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
357357
eventBuilder,
358358
taskLevel,
359359
printfHandler.get(),
360-
relaxedOrderingEnabled);
360+
relaxedOrderingEnabled,
361+
commandType);
361362
} else if (enqueueProperties.isFlushWithoutKernelRequired()) {
362363
completionStamp = enqueueCommandWithoutKernel(
363364
surfacesForResidency,
@@ -745,7 +746,6 @@ bool CommandQueueHw<GfxFamily>::isTaskLevelUpdateRequired(const TaskCountType &t
745746
}
746747

747748
template <typename GfxFamily>
748-
template <uint32_t commandType>
749749
CompletionStamp CommandQueueHw<GfxFamily>::enqueueNonBlocked(
750750
Surface **surfaces,
751751
size_t surfaceCount,
@@ -760,7 +760,8 @@ CompletionStamp CommandQueueHw<GfxFamily>::enqueueNonBlocked(
760760
EventBuilder &eventBuilder,
761761
TaskCountType taskLevel,
762762
PrintfHandler *printfHandler,
763-
bool relaxedOrderingEnabled) {
763+
bool relaxedOrderingEnabled,
764+
uint32_t commandType) {
764765

765766
UNRECOVERABLE_IF(multiDispatchInfo.empty());
766767

opencl/test/unit_test/xe_hpg_core/dg2/command_queue_tests_dg2.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ DG2TEST_F(CommandQueueHwTest, GivenKernelWithDpasAndOddWorkGroupWhenenqueueNonBl
8080

8181
bool blocking = false;
8282
pKernel->setSystolicPipelineSelectMode(true);
83-
cmdQ.template enqueueNonBlocked<CL_COMMAND_NDRANGE_KERNEL>(nullptr, 0, commandStream, commandStream.getUsed(), blocking, true,
84-
multiDispatchInfo, enqueueProperties, timestampPacketDependencies, eventsRequest, eventBuilder, 0, nullptr, false);
83+
cmdQ.enqueueNonBlocked(nullptr, 0, commandStream, commandStream.getUsed(), blocking, true,
84+
multiDispatchInfo, enqueueProperties, timestampPacketDependencies, eventsRequest, eventBuilder, 0, nullptr, false, CL_COMMAND_NDRANGE_KERNEL);
8585
EXPECT_TRUE(csr->disableEuFusionPassed);
8686
}
8787

@@ -117,8 +117,8 @@ DG2TEST_F(CommandQueueHwTest, GivenKernelWithDpasAndNotOddWorkGroupWhenenqueueNo
117117

118118
bool blocking = false;
119119
const_cast<NEO::KernelDescriptor &>(pKernel->getDescriptor()).kernelAttributes.flags.usesSystolicPipelineSelectMode = true;
120-
cmdQ.template enqueueNonBlocked<CL_COMMAND_NDRANGE_KERNEL>(nullptr, 0, commandStream, commandStream.getUsed(), blocking, true,
121-
multiDispatchInfo, enqueueProperties, timestampPacketDependencies, eventsRequest, eventBuilder, 0, nullptr, false);
120+
cmdQ.enqueueNonBlocked(nullptr, 0, commandStream, commandStream.getUsed(), blocking, true,
121+
multiDispatchInfo, enqueueProperties, timestampPacketDependencies, eventsRequest, eventBuilder, 0, nullptr, false, CL_COMMAND_NDRANGE_KERNEL);
122122
EXPECT_FALSE(csr->disableEuFusionPassed);
123123
}
124124
DG2TEST_F(CommandQueueHwTest, GivenKernelWithRequiredDisableEuFusionWhenenqueueNonBlockedCalledThenDisableEuFusionPassedToFlushTask) {
@@ -144,8 +144,8 @@ DG2TEST_F(CommandQueueHwTest, GivenKernelWithRequiredDisableEuFusionWhenenqueueN
144144

145145
bool blocking = false;
146146
const_cast<NEO::KernelDescriptor &>(pKernel->getDescriptor()).kernelAttributes.flags.requiresDisabledEUFusion = true;
147-
cmdQ.template enqueueNonBlocked<CL_COMMAND_NDRANGE_KERNEL>(nullptr, 0, commandStream, commandStream.getUsed(), blocking, true,
148-
multiDispatchInfo, enqueueProperties, timestampPacketDependencies, eventsRequest, eventBuilder, 0, nullptr, false);
147+
cmdQ.enqueueNonBlocked(nullptr, 0, commandStream, commandStream.getUsed(), blocking, true,
148+
multiDispatchInfo, enqueueProperties, timestampPacketDependencies, eventsRequest, eventBuilder, 0, nullptr, false, CL_COMMAND_NDRANGE_KERNEL);
149149
EXPECT_TRUE(csr->disableEuFusionPassed);
150150
}
151151
DG2TEST_F(CommandQueueHwTest, GivenKernelWithoutRequiredDisableEuFusionWhenenqueueNonBlockedCalledThenDisableEuFusionNotPassedToFlushTask) {
@@ -171,7 +171,7 @@ DG2TEST_F(CommandQueueHwTest, GivenKernelWithoutRequiredDisableEuFusionWhenenque
171171

172172
bool blocking = false;
173173
const_cast<NEO::KernelDescriptor &>(pKernel->getDescriptor()).kernelAttributes.flags.requiresDisabledEUFusion = false;
174-
cmdQ.template enqueueNonBlocked<CL_COMMAND_NDRANGE_KERNEL>(nullptr, 0, commandStream, commandStream.getUsed(), blocking, true, multiDispatchInfo,
175-
enqueueProperties, timestampPacketDependencies, eventsRequest, eventBuilder, 0, nullptr, false);
174+
cmdQ.enqueueNonBlocked(nullptr, 0, commandStream, commandStream.getUsed(), blocking, true, multiDispatchInfo,
175+
enqueueProperties, timestampPacketDependencies, eventsRequest, eventBuilder, 0, nullptr, false, CL_COMMAND_NDRANGE_KERNEL);
176176
EXPECT_FALSE(csr->disableEuFusionPassed);
177177
}

0 commit comments

Comments
 (0)