Minor enqueueHandler cleanup

Change-Id: I07b2d0571b91b797b7a20ec29bb4cf1496b84f96
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2019-08-02 15:56:28 +02:00
committed by sys_ocldev
parent bee2150c45
commit e88371ceff
10 changed files with 47 additions and 102 deletions

View File

@ -612,4 +612,24 @@ bool CommandQueue::isBlockedCommandStreamRequired(uint32_t commandType, const Ev
return false; return false;
} }
void CommandQueue::aubCaptureHook(bool &blocking, bool &clearAllDependencies, const MultiDispatchInfo &multiDispatchInfo) {
if (DebugManager.flags.AUBDumpSubCaptureMode.get()) {
auto status = getGpgpuCommandStreamReceiver().checkAndActivateAubSubCapture(multiDispatchInfo);
if (!status.isActive) {
// make each enqueue blocking when subcapture is not active to split batch buffer
blocking = true;
} else if (!status.wasActiveInPreviousEnqueue) {
// omit timestamp packet dependencies dependencies upon subcapture activation
clearAllDependencies = true;
}
}
if (getGpgpuCommandStreamReceiver().getType() > CommandStreamReceiverType::CSR_HW) {
for (auto &dispatchInfo : multiDispatchInfo) {
auto kernelName = dispatchInfo.getKernel()->getKernelInfo().name;
getGpgpuCommandStreamReceiver().addAubComment(kernelName.c_str());
}
}
}
} // namespace NEO } // namespace NEO

View File

@ -438,6 +438,7 @@ class CommandQueue : public BaseObject<_cl_command_queue> {
void providePerformanceHint(TransferProperties &transferProperties); void providePerformanceHint(TransferProperties &transferProperties);
bool queueDependenciesClearRequired() const; bool queueDependenciesClearRequired() const;
bool blitEnqueueAllowed(bool queueBlocked, cl_command_type cmdType); bool blitEnqueueAllowed(bool queueBlocked, cl_command_type cmdType);
void aubCaptureHook(bool &blocking, bool &clearAllDependencies, const MultiDispatchInfo &multiDispatchInfo);
Context *context = nullptr; Context *context = nullptr;
Device *device = nullptr; Device *device = nullptr;

View File

@ -328,7 +328,6 @@ class CommandQueueHw : public CommandQueue {
EventsRequest &eventsRequest, EventsRequest &eventsRequest,
EventBuilder &eventBuilder, EventBuilder &eventBuilder,
uint32_t taskLevel, uint32_t taskLevel,
bool slmUsed,
PrintfHandler *printfHandler); PrintfHandler *printfHandler);
template <uint32_t commandType> template <uint32_t commandType>
@ -339,7 +338,6 @@ class CommandQueueHw : public CommandQueue {
TimestampPacketContainer *previousTimestampPacketNodes, TimestampPacketContainer *previousTimestampPacketNodes,
std::unique_ptr<KernelOperation> &blockedCommandsData, std::unique_ptr<KernelOperation> &blockedCommandsData,
EventsRequest &eventsRequest, EventsRequest &eventsRequest,
bool slmUsed,
EventBuilder &externalEventBuilder, EventBuilder &externalEventBuilder,
std::unique_ptr<PrintfHandler> printfHandler); std::unique_ptr<PrintfHandler> printfHandler);
@ -386,13 +384,15 @@ class CommandQueueHw : public CommandQueue {
AuxTranslationDirection auxTranslationDirection); AuxTranslationDirection auxTranslationDirection);
template <uint32_t commandType> template <uint32_t commandType>
LinearStream *obtainCommandStream(const CsrDependencies &csrDependencies, bool profilingRequired, LinearStream *obtainCommandStream(const CsrDependencies &csrDependencies, bool blitEnqueue, bool blockedQueue,
bool perfCountersRequired, bool blitEnqueue, bool blockedQueue, const MultiDispatchInfo &multiDispatchInfo, const EventsRequest &eventsRequest,
const MultiDispatchInfo &multiDispatchInfo,
const EventsRequest &eventsRequest,
std::unique_ptr<KernelOperation> &blockedCommandsData, std::unique_ptr<KernelOperation> &blockedCommandsData,
Surface **surfaces, size_t numSurfaces) { Surface **surfaces, size_t numSurfaces) {
LinearStream *commandStream = nullptr; LinearStream *commandStream = nullptr;
bool profilingRequired = (this->isProfilingEnabled() && eventsRequest.outEvent);
bool perfCountersRequired = (this->isPerfCountersEnabled() && eventsRequest.outEvent);
if (isBlockedCommandStreamRequired(commandType, eventsRequest, blockedQueue)) { if (isBlockedCommandStreamRequired(commandType, eventsRequest, blockedQueue)) {
constexpr size_t additionalAllocationSize = CSRequirements::csOverfetchSize; constexpr size_t additionalAllocationSize = CSRequirements::csOverfetchSize;
constexpr size_t allocationSize = MemoryConstants::pageSize64k - CSRequirements::csOverfetchSize; constexpr size_t allocationSize = MemoryConstants::pageSize64k - CSRequirements::csOverfetchSize;
@ -422,11 +422,9 @@ class CommandQueueHw : public CommandQueue {
size_t bufferSlicePitch, size_t bufferSlicePitch,
size_t hostRowPitch, size_t hostRowPitch,
size_t hostSlicePitch); size_t hostSlicePitch);
void processDeviceEnqueue(Kernel *parentKernel, void processDeviceEnqueue(DeviceQueueHw<GfxFamily> *devQueueHw,
DeviceQueueHw<GfxFamily> *devQueueHw,
const MultiDispatchInfo &multiDispatchInfo, const MultiDispatchInfo &multiDispatchInfo,
TagNode<HwTimeStamps> *hwTimeStamps, TagNode<HwTimeStamps> *hwTimeStamps,
PreemptionMode preemption,
bool &blocking); bool &blocking);
template <uint32_t commandType> template <uint32_t commandType>
@ -434,12 +432,10 @@ class CommandQueueHw : public CommandQueue {
std::unique_ptr<PrintfHandler> &printfHandler, std::unique_ptr<PrintfHandler> &printfHandler,
Event *event, Event *event,
TagNode<NEO::HwTimeStamps> *&hwTimeStamps, TagNode<NEO::HwTimeStamps> *&hwTimeStamps,
Kernel *parentKernel,
bool blockQueue, bool blockQueue,
DeviceQueueHw<GfxFamily> *devQueueHw, DeviceQueueHw<GfxFamily> *devQueueHw,
CsrDependencies &csrDeps, CsrDependencies &csrDeps,
KernelOperation *blockedCommandsData, KernelOperation *blockedCommandsData,
TimestampPacketContainer &previousTimestampPacketNodes, TimestampPacketContainer &previousTimestampPacketNodes);
PreemptionMode preemption);
}; };
} // namespace NEO } // namespace NEO

View File

@ -163,12 +163,8 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
DBG_LOG(EventsDebugEnable, "enqueueHandler commandType", commandType, "output Event", eventBuilder.getEvent()); DBG_LOG(EventsDebugEnable, "enqueueHandler commandType", commandType, "output Event", eventBuilder.getEvent());
} }
bool profilingRequired = (this->isProfilingEnabled() && event != nullptr);
bool perfCountersRequired = (this->isPerfCountersEnabled() && event != nullptr);
std::unique_ptr<KernelOperation> blockedCommandsData; std::unique_ptr<KernelOperation> blockedCommandsData;
std::unique_ptr<PrintfHandler> printfHandler; std::unique_ptr<PrintfHandler> printfHandler;
bool slmUsed = multiDispatchInfo.usesSlm() || parentKernel;
auto preemption = PreemptionHelper::taskPreemptionMode(*device, multiDispatchInfo);
TakeOwnershipWrapper<CommandQueueHw<GfxFamily>> queueOwnership(*this); TakeOwnershipWrapper<CommandQueueHw<GfxFamily>> queueOwnership(*this);
auto blockQueue = false; auto blockQueue = false;
@ -185,23 +181,7 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
enqueueHandlerHook(commandType, multiDispatchInfo); enqueueHandlerHook(commandType, multiDispatchInfo);
if (DebugManager.flags.AUBDumpSubCaptureMode.get()) { aubCaptureHook(blocking, clearAllDependencies, multiDispatchInfo);
auto status = getGpgpuCommandStreamReceiver().checkAndActivateAubSubCapture(multiDispatchInfo);
if (!status.isActive) {
// make each enqueue blocking when subcapture is not active to split batch buffer
blocking = true;
} else if (!status.wasActiveInPreviousEnqueue) {
// omit timestamp packet dependencies dependencies upon subcapture activation
clearAllDependencies = true;
}
}
if (getGpgpuCommandStreamReceiver().getType() > CommandStreamReceiverType::CSR_HW) {
for (auto &dispatchInfo : multiDispatchInfo) {
auto kernelName = dispatchInfo.getKernel()->getKernelInfo().name;
getGpgpuCommandStreamReceiver().addAubComment(kernelName.c_str());
}
}
if (DebugManager.flags.MakeEachEnqueueBlocking.get()) { if (DebugManager.flags.MakeEachEnqueueBlocking.get()) {
blocking = true; blocking = true;
@ -227,9 +207,8 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
} }
} }
auto &commandStream = *obtainCommandStream<commandType>(csrDeps, profilingRequired, perfCountersRequired, blitEnqueue, blockQueue, auto &commandStream = *obtainCommandStream<commandType>(csrDeps, blitEnqueue, blockQueue, multiDispatchInfo, eventsRequest,
multiDispatchInfo, eventsRequest, blockedCommandsData, surfacesForResidency, blockedCommandsData, surfacesForResidency, numSurfaceForResidency);
numSurfaceForResidency);
auto commandStreamStart = commandStream.getUsed(); auto commandStreamStart = commandStream.getUsed();
if (eventBuilder.getEvent() && getGpgpuCommandStreamReceiver().peekTimestampPacketWriteEnabled()) { if (eventBuilder.getEvent() && getGpgpuCommandStreamReceiver().peekTimestampPacketWriteEnabled()) {
@ -242,8 +221,8 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
processDispatchForBlitEnqueue(multiDispatchInfo, previousTimestampPacketNodes, eventsRequest, commandStream, commandType); processDispatchForBlitEnqueue(multiDispatchInfo, previousTimestampPacketNodes, eventsRequest, commandStream, commandType);
} else if (multiDispatchInfo.empty() == false) { } else if (multiDispatchInfo.empty() == false) {
processDispatchForKernels<commandType>(multiDispatchInfo, printfHandler, eventBuilder.getEvent(), processDispatchForKernels<commandType>(multiDispatchInfo, printfHandler, eventBuilder.getEvent(),
hwTimeStamps, parentKernel, blockQueue, devQueueHw, csrDeps, blockedCommandsData.get(), hwTimeStamps, blockQueue, devQueueHw, csrDeps, blockedCommandsData.get(),
previousTimestampPacketNodes, preemption); previousTimestampPacketNodes);
} else if (isCacheFlushCommand(commandType)) { } else if (isCacheFlushCommand(commandType)) {
processDispatchForCacheFlush(surfacesForResidency, numSurfaceForResidency, &commandStream, csrDeps); processDispatchForCacheFlush(surfacesForResidency, numSurfaceForResidency, &commandStream, csrDeps);
} else if (getGpgpuCommandStreamReceiver().peekTimestampPacketWriteEnabled()) { } else if (getGpgpuCommandStreamReceiver().peekTimestampPacketWriteEnabled()) {
@ -268,7 +247,7 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
CompletionStamp completionStamp = {Event::eventNotReady, taskLevel, 0}; CompletionStamp completionStamp = {Event::eventNotReady, taskLevel, 0};
if (!blockQueue) { if (!blockQueue) {
if (parentKernel) { if (parentKernel) {
processDeviceEnqueue(parentKernel, devQueueHw, multiDispatchInfo, hwTimeStamps, preemption, blocking); processDeviceEnqueue(devQueueHw, multiDispatchInfo, hwTimeStamps, blocking);
} }
auto kernelSubmissionRequired = !isCommandWithoutKernel(commandType) && !blitEnqueue; auto kernelSubmissionRequired = !isCommandWithoutKernel(commandType) && !blitEnqueue;
@ -285,7 +264,6 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
eventsRequest, eventsRequest,
eventBuilder, eventBuilder,
taskLevel, taskLevel,
slmUsed,
printfHandler.get()); printfHandler.get());
if (parentKernel) { if (parentKernel) {
@ -365,7 +343,6 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
&previousTimestampPacketNodes, &previousTimestampPacketNodes,
blockedCommandsData, blockedCommandsData,
eventsRequest, eventsRequest,
slmUsed,
eventBuilder, eventBuilder,
std::move(printfHandler)); std::move(printfHandler));
} }
@ -393,19 +370,17 @@ void CommandQueueHw<GfxFamily>::processDispatchForKernels(const MultiDispatchInf
std::unique_ptr<PrintfHandler> &printfHandler, std::unique_ptr<PrintfHandler> &printfHandler,
Event *event, Event *event,
TagNode<HwTimeStamps> *&hwTimeStamps, TagNode<HwTimeStamps> *&hwTimeStamps,
Kernel *parentKernel,
bool blockQueue, bool blockQueue,
DeviceQueueHw<GfxFamily> *devQueueHw, DeviceQueueHw<GfxFamily> *devQueueHw,
CsrDependencies &csrDeps, CsrDependencies &csrDeps,
KernelOperation *blockedCommandsData, KernelOperation *blockedCommandsData,
TimestampPacketContainer &previousTimestampPacketNodes, TimestampPacketContainer &previousTimestampPacketNodes) {
PreemptionMode preemption) {
TagNode<HwPerfCounter> *hwPerfCounter = nullptr; TagNode<HwPerfCounter> *hwPerfCounter = nullptr;
DebugManager.dumpKernelArgs(&multiDispatchInfo); DebugManager.dumpKernelArgs(&multiDispatchInfo);
printfHandler.reset(PrintfHandler::create(multiDispatchInfo, *device)); printfHandler.reset(PrintfHandler::create(multiDispatchInfo, *device));
if (printfHandler) { if (printfHandler) {
printfHandler.get()->prepareDispatch(multiDispatchInfo); printfHandler->prepareDispatch(multiDispatchInfo);
} }
if (commandType == CL_COMMAND_NDRANGE_KERNEL) { if (commandType == CL_COMMAND_NDRANGE_KERNEL) {
@ -419,7 +394,7 @@ void CommandQueueHw<GfxFamily>::processDispatchForKernels(const MultiDispatchInf
hwTimeStamps = event->getHwTimeStampNode(); hwTimeStamps = event->getHwTimeStampNode();
} }
if (parentKernel) { if (auto parentKernel = multiDispatchInfo.peekParentKernel()) {
parentKernel->createReflectionSurface(); parentKernel->createReflectionSurface();
parentKernel->patchDefaultDeviceQueue(context->getDefaultDeviceQueue()); parentKernel->patchDefaultDeviceQueue(context->getDefaultDeviceQueue());
parentKernel->patchEventPool(context->getDefaultDeviceQueue()); parentKernel->patchEventPool(context->getDefaultDeviceQueue());
@ -443,7 +418,6 @@ void CommandQueueHw<GfxFamily>::processDispatchForKernels(const MultiDispatchInf
hwPerfCounter, hwPerfCounter,
&previousTimestampPacketNodes, &previousTimestampPacketNodes,
timestampPacketContainer.get(), timestampPacketContainer.get(),
preemption,
commandType); commandType);
if (DebugManager.flags.AddPatchInfoCommentsForAUBDump.get()) { if (DebugManager.flags.AddPatchInfoCommentsForAUBDump.get()) {
@ -502,12 +476,11 @@ void CommandQueueHw<GfxFamily>::processDispatchForCacheFlush(Surface **surfaces,
} }
template <typename GfxFamily> template <typename GfxFamily>
void CommandQueueHw<GfxFamily>::processDeviceEnqueue(Kernel *parentKernel, void CommandQueueHw<GfxFamily>::processDeviceEnqueue(DeviceQueueHw<GfxFamily> *devQueueHw,
DeviceQueueHw<GfxFamily> *devQueueHw,
const MultiDispatchInfo &multiDispatchInfo, const MultiDispatchInfo &multiDispatchInfo,
TagNode<HwTimeStamps> *hwTimeStamps, TagNode<HwTimeStamps> *hwTimeStamps,
PreemptionMode preemption,
bool &blocking) { bool &blocking) {
auto parentKernel = multiDispatchInfo.peekParentKernel();
size_t minSizeSSHForEM = HardwareCommandsHelper<GfxFamily>::getSizeRequiredForExecutionModel(IndirectHeap::SURFACE_STATE, *parentKernel); size_t minSizeSSHForEM = HardwareCommandsHelper<GfxFamily>::getSizeRequiredForExecutionModel(IndirectHeap::SURFACE_STATE, *parentKernel);
uint32_t taskCount = getGpgpuCommandStreamReceiver().peekTaskCount() + 1; uint32_t taskCount = getGpgpuCommandStreamReceiver().peekTaskCount() + 1;
@ -531,10 +504,11 @@ void CommandQueueHw<GfxFamily>::processDeviceEnqueue(Kernel *parentKernel,
this->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0u).getGraphicsAllocation(), this->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0u).getGraphicsAllocation(),
devQueueHw->getDebugQueue()); devQueueHw->getDebugQueue());
auto preemptionMode = PreemptionHelper::taskPreemptionMode(*device, multiDispatchInfo);
GpgpuWalkerHelper<GfxFamily>::dispatchScheduler( GpgpuWalkerHelper<GfxFamily>::dispatchScheduler(
*this->commandStream, *this->commandStream,
*devQueueHw, *devQueueHw,
preemption, preemptionMode,
scheduler, scheduler,
&getIndirectHeap(IndirectHeap::SURFACE_STATE, 0u), &getIndirectHeap(IndirectHeap::SURFACE_STATE, 0u),
devQueueHw->getIndirectHeap(IndirectHeap::DYNAMIC_STATE)); devQueueHw->getIndirectHeap(IndirectHeap::DYNAMIC_STATE));
@ -604,7 +578,6 @@ CompletionStamp CommandQueueHw<GfxFamily>::enqueueNonBlocked(
EventsRequest &eventsRequest, EventsRequest &eventsRequest,
EventBuilder &eventBuilder, EventBuilder &eventBuilder,
uint32_t taskLevel, uint32_t taskLevel,
bool slmUsed,
PrintfHandler *printfHandler) { PrintfHandler *printfHandler) {
UNRECOVERABLE_IF(multiDispatchInfo.empty()); UNRECOVERABLE_IF(multiDispatchInfo.empty());
@ -693,7 +666,7 @@ CompletionStamp CommandQueueHw<GfxFamily>::enqueueNonBlocked(
DispatchFlags dispatchFlags; DispatchFlags dispatchFlags;
dispatchFlags.blocking = blocking; dispatchFlags.blocking = blocking;
dispatchFlags.dcFlush = shouldFlushDC(commandType, printfHandler) || allocNeedsFlushDC; dispatchFlags.dcFlush = shouldFlushDC(commandType, printfHandler) || allocNeedsFlushDC;
dispatchFlags.useSLM = slmUsed; dispatchFlags.useSLM = multiDispatchInfo.usesSlm() || multiDispatchInfo.peekParentKernel();
dispatchFlags.guardCommandBufferWithPipeControl = true; dispatchFlags.guardCommandBufferWithPipeControl = true;
dispatchFlags.GSBA32BitRequired = commandType == CL_COMMAND_NDRANGE_KERNEL; dispatchFlags.GSBA32BitRequired = commandType == CL_COMMAND_NDRANGE_KERNEL;
dispatchFlags.mediaSamplerRequired = mediaSamplerRequired; dispatchFlags.mediaSamplerRequired = mediaSamplerRequired;
@ -740,7 +713,6 @@ void CommandQueueHw<GfxFamily>::enqueueBlocked(
TimestampPacketContainer *previousTimestampPacketNodes, TimestampPacketContainer *previousTimestampPacketNodes,
std::unique_ptr<KernelOperation> &blockedCommandsData, std::unique_ptr<KernelOperation> &blockedCommandsData,
EventsRequest &eventsRequest, EventsRequest &eventsRequest,
bool slmUsed,
EventBuilder &externalEventBuilder, EventBuilder &externalEventBuilder,
std::unique_ptr<PrintfHandler> printfHandler) { std::unique_ptr<PrintfHandler> printfHandler) {
@ -790,6 +762,7 @@ void CommandQueueHw<GfxFamily>::enqueueBlocked(
allSurfaces.push_back(surface->duplicate()); allSurfaces.push_back(surface->duplicate());
} }
PreemptionMode preemptionMode = PreemptionHelper::taskPreemptionMode(*device, multiDispatchInfo); PreemptionMode preemptionMode = PreemptionHelper::taskPreemptionMode(*device, multiDispatchInfo);
bool slmUsed = multiDispatchInfo.usesSlm() || multiDispatchInfo.peekParentKernel();
command = std::make_unique<CommandComputeKernel>(*this, command = std::make_unique<CommandComputeKernel>(*this,
blockedCommandsData, blockedCommandsData,
allSurfaces, allSurfaces,

View File

@ -44,7 +44,6 @@ class HardwareInterface {
TagNode<HwPerfCounter> *hwPerfCounter, TagNode<HwPerfCounter> *hwPerfCounter,
TimestampPacketContainer *previousTimestampPacketNodes, TimestampPacketContainer *previousTimestampPacketNodes,
TimestampPacketContainer *currentTimestampPacketNodes, TimestampPacketContainer *currentTimestampPacketNodes,
PreemptionMode preemptionMode,
uint32_t commandType); uint32_t commandType);
static void getDefaultDshSpace( static void getDefaultDshSpace(

View File

@ -32,13 +32,13 @@ void HardwareInterface<GfxFamily>::dispatchWalker(
TagNode<HwPerfCounter> *hwPerfCounter, TagNode<HwPerfCounter> *hwPerfCounter,
TimestampPacketContainer *previousTimestampPacketNodes, TimestampPacketContainer *previousTimestampPacketNodes,
TimestampPacketContainer *currentTimestampPacketNodes, TimestampPacketContainer *currentTimestampPacketNodes,
PreemptionMode preemptionMode,
uint32_t commandType) { uint32_t commandType) {
LinearStream *commandStream = nullptr; LinearStream *commandStream = nullptr;
IndirectHeap *dsh = nullptr, *ioh = nullptr, *ssh = nullptr; IndirectHeap *dsh = nullptr, *ioh = nullptr, *ssh = nullptr;
auto parentKernel = multiDispatchInfo.peekParentKernel(); auto parentKernel = multiDispatchInfo.peekParentKernel();
auto mainKernel = multiDispatchInfo.peekMainKernel(); auto mainKernel = multiDispatchInfo.peekMainKernel();
auto preemptionMode = PreemptionHelper::taskPreemptionMode(commandQueue.getDevice(), multiDispatchInfo);
for (auto &dispatchInfo : multiDispatchInfo) { for (auto &dispatchInfo : multiDispatchInfo) {
// Compute local workgroup sizes // Compute local workgroup sizes

View File

@ -156,7 +156,6 @@ HWTEST_F(DispatchWalkerTest, shouldntChangeCommandStreamMemory) {
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
EXPECT_EQ(commandStreamBuffer, commandStream.getCpuBase()); EXPECT_EQ(commandStreamBuffer, commandStream.getCpuBase());
@ -204,7 +203,6 @@ HWTEST_F(DispatchWalkerTest, noLocalIdsShouldntCrash) {
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
EXPECT_EQ(commandStreamBuffer, commandStream.getCpuBase()); EXPECT_EQ(commandStreamBuffer, commandStream.getCpuBase());
@ -234,7 +232,6 @@ HWTEST_F(DispatchWalkerTest, dataParameterWorkDimensionswithDefaultLwsAlgorithm)
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
EXPECT_EQ(dimension, *kernel.workDim); EXPECT_EQ(dimension, *kernel.workDim);
@ -265,7 +262,6 @@ HWTEST_F(DispatchWalkerTest, dataParameterWorkDimensionswithSquaredLwsAlgorithm)
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
EXPECT_EQ(dimension, *kernel.workDim); EXPECT_EQ(dimension, *kernel.workDim);
} }
@ -294,7 +290,6 @@ HWTEST_F(DispatchWalkerTest, dataParameterWorkDimensionswithNDLwsAlgorithm) {
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
EXPECT_EQ(dimension, *kernel.workDim); EXPECT_EQ(dimension, *kernel.workDim);
} }
@ -324,7 +319,6 @@ HWTEST_F(DispatchWalkerTest, dataParameterWorkDimensionswithOldLwsAlgorithm) {
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
EXPECT_EQ(dimension, *kernel.workDim); EXPECT_EQ(dimension, *kernel.workDim);
} }
@ -354,7 +348,6 @@ HWTEST_F(DispatchWalkerTest, dataParameterNumWorkGroups) {
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
EXPECT_EQ(2u, *kernel.numWorkGroupsX); EXPECT_EQ(2u, *kernel.numWorkGroupsX);
@ -386,7 +379,6 @@ HWTEST_F(DispatchWalkerTest, dataParameterNoLocalWorkSizeWithOutComputeND) {
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
EXPECT_EQ(2u, *kernel.localWorkSizeX); EXPECT_EQ(2u, *kernel.localWorkSizeX);
EXPECT_EQ(5u, *kernel.localWorkSizeY); EXPECT_EQ(5u, *kernel.localWorkSizeY);
@ -417,7 +409,6 @@ HWTEST_F(DispatchWalkerTest, dataParameterNoLocalWorkSizeWithComputeND) {
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
EXPECT_EQ(2u, *kernel.localWorkSizeX); EXPECT_EQ(2u, *kernel.localWorkSizeX);
EXPECT_EQ(5u, *kernel.localWorkSizeY); EXPECT_EQ(5u, *kernel.localWorkSizeY);
@ -449,7 +440,6 @@ HWTEST_F(DispatchWalkerTest, dataParameterNoLocalWorkSizeWithComputeSquared) {
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
EXPECT_EQ(2u, *kernel.localWorkSizeX); EXPECT_EQ(2u, *kernel.localWorkSizeX);
EXPECT_EQ(5u, *kernel.localWorkSizeY); EXPECT_EQ(5u, *kernel.localWorkSizeY);
@ -481,7 +471,6 @@ HWTEST_F(DispatchWalkerTest, dataParameterNoLocalWorkSizeWithOutComputeSquaredAn
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
EXPECT_EQ(2u, *kernel.localWorkSizeX); EXPECT_EQ(2u, *kernel.localWorkSizeX);
EXPECT_EQ(5u, *kernel.localWorkSizeY); EXPECT_EQ(5u, *kernel.localWorkSizeY);
@ -511,7 +500,6 @@ HWTEST_F(DispatchWalkerTest, dataParameterLocalWorkSize) {
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
EXPECT_EQ(1u, *kernel.localWorkSizeX); EXPECT_EQ(1u, *kernel.localWorkSizeX);
EXPECT_EQ(2u, *kernel.localWorkSizeY); EXPECT_EQ(2u, *kernel.localWorkSizeY);
@ -544,7 +532,6 @@ HWTEST_F(DispatchWalkerTest, dataParameterLocalWorkSizes) {
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
EXPECT_EQ(1u, *kernel.localWorkSizeX); EXPECT_EQ(1u, *kernel.localWorkSizeX);
EXPECT_EQ(2u, *kernel.localWorkSizeY); EXPECT_EQ(2u, *kernel.localWorkSizeY);
@ -581,7 +568,6 @@ HWTEST_F(DispatchWalkerTest, dataParameterLocalWorkSizeForSplitKernel) {
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
auto dispatchId = 0; auto dispatchId = 0;
@ -632,7 +618,6 @@ HWTEST_F(DispatchWalkerTest, dataParameterLocalWorkSizesForSplitWalker) {
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
for (auto &dispatchInfo : multiDispatchInfo) { for (auto &dispatchInfo : multiDispatchInfo) {
@ -684,7 +669,6 @@ HWTEST_F(DispatchWalkerTest, dispatchWalkerDoesntConsumeCommandStreamWhenQueueIs
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
auto &commandStream = pCmdQ->getCS(1024); auto &commandStream = pCmdQ->getCS(1024);
@ -719,7 +703,6 @@ HWTEST_F(DispatchWalkerTest, dispatchWalkerShouldGetRequiredHeapSizesFromKernelW
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
Vec3<size_t> localWorkgroupSize(workGroupSize); Vec3<size_t> localWorkgroupSize(workGroupSize);
@ -746,7 +729,7 @@ HWTEST_F(DispatchWalkerTest, givenBlockedEnqueueWhenObtainingCommandStreamThenAl
CsrDependencies csrDependencies; CsrDependencies csrDependencies;
EventsRequest eventsRequest(0, nullptr, nullptr); EventsRequest eventsRequest(0, nullptr, nullptr);
auto cmdStream = mockCmdQ.template obtainCommandStream<CL_COMMAND_NDRANGE_KERNEL>(csrDependencies, false, false, false, true, auto cmdStream = mockCmdQ.template obtainCommandStream<CL_COMMAND_NDRANGE_KERNEL>(csrDependencies, false, true,
multiDispatchInfo, eventsRequest, blockedKernelData, multiDispatchInfo, eventsRequest, blockedKernelData,
nullptr, 0u); nullptr, 0u);
@ -773,7 +756,6 @@ HWTEST_F(DispatchWalkerTest, dispatchWalkerShouldGetRequiredHeapSizesFromMdiWhen
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
auto expectedSizeDSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredDSH(multiDispatchInfo); auto expectedSizeDSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredDSH(multiDispatchInfo);
@ -800,7 +782,6 @@ HWTEST_F(DispatchWalkerTest, givenBlockedQueueWhenDispatchWalkerIsCalledThenComm
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
EXPECT_NE(nullptr, blockedCommandsData->commandStream->getGraphicsAllocation()); EXPECT_NE(nullptr, blockedCommandsData->commandStream->getGraphicsAllocation());
@ -828,7 +809,6 @@ HWTEST_F(DispatchWalkerTest, givenThereAreAllocationsForReuseWhenDispatchWalkerI
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
EXPECT_TRUE(csr.getInternalAllocationStorage()->getAllocationsForReuse().peekIsEmpty()); EXPECT_TRUE(csr.getInternalAllocationStorage()->getAllocationsForReuse().peekIsEmpty());
@ -852,7 +832,6 @@ HWTEST_F(DispatchWalkerTest, dispatchWalkerWithMultipleDispatchInfo) {
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
for (auto &dispatchInfo : multiDispatchInfo) { for (auto &dispatchInfo : multiDispatchInfo) {
@ -894,7 +873,6 @@ HWCMDTEST_F(IGFX_GEN8_CORE, DispatchWalkerTest, dispatchWalkerWithMultipleDispat
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
auto dshAfterMultiDisptach = indirectHeap.getUsed(); auto dshAfterMultiDisptach = indirectHeap.getUsed();
@ -979,7 +957,6 @@ HWCMDTEST_F(IGFX_GEN8_CORE, DispatchWalkerTest, dispatchWalkerWithMultipleDispat
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
HardwareParse hwParser; HardwareParse hwParser;
@ -1025,7 +1002,6 @@ HWCMDTEST_F(IGFX_GEN8_CORE, DispatchWalkerTest, dispatchWalkerWithMultipleDispat
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
HardwareParse hwParser; HardwareParse hwParser;
@ -1076,7 +1052,6 @@ HWCMDTEST_F(IGFX_GEN8_CORE, DispatchWalkerTest, dispatchWalkerWithMultipleDispat
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
HardwareParse hwParser; HardwareParse hwParser;
@ -1129,7 +1104,6 @@ HWTEST_F(DispatchWalkerTest, GivenCacheFlushAfterWalkerDisabledWhenAllocationReq
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
HardwareParse hwParse; HardwareParse hwParse;
@ -1168,7 +1142,6 @@ HWTEST_F(DispatchWalkerTest, GivenCacheFlushAfterWalkerEnabledWhenWalkerWithTwoK
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
HardwareParse hwParse; HardwareParse hwParse;
@ -1208,7 +1181,6 @@ HWTEST_F(DispatchWalkerTest, GivenCacheFlushAfterWalkerEnabledWhenTwoWalkersForQ
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
HardwareInterface<FamilyType>::dispatchWalker( HardwareInterface<FamilyType>::dispatchWalker(
@ -1220,7 +1192,6 @@ HWTEST_F(DispatchWalkerTest, GivenCacheFlushAfterWalkerEnabledWhenTwoWalkersForQ
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
HardwareParse hwParse; HardwareParse hwParse;
@ -1243,7 +1214,7 @@ HWTEST_F(DispatchWalkerTest, givenMultiDispatchWhenWhitelistedRegisterForCoheren
MockMultiDispatchInfo multiDispatchInfo(std::vector<DispatchInfo *>({&di1, &di2})); MockMultiDispatchInfo multiDispatchInfo(std::vector<DispatchInfo *>({&di1, &di2}));
HardwareInterface<FamilyType>::dispatchWalker(*pCmdQ, multiDispatchInfo, CsrDependencies(), nullptr, nullptr, nullptr, nullptr, nullptr, HardwareInterface<FamilyType>::dispatchWalker(*pCmdQ, multiDispatchInfo, CsrDependencies(), nullptr, nullptr, nullptr, nullptr, nullptr,
pDevice->getPreemptionMode(), CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
hwParser.parseCommands<FamilyType>(cmdStream, 0); hwParser.parseCommands<FamilyType>(cmdStream, 0);
@ -1306,7 +1277,6 @@ HWTEST_F(DispatchWalkerTest, givenKernelWhenAuxToNonAuxWhenTranslationRequiredTh
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
auto sizeUsed = cmdStream.getUsed(); auto sizeUsed = cmdStream.getUsed();
@ -1363,7 +1333,6 @@ HWTEST_F(DispatchWalkerTest, givenKernelWhenNonAuxToAuxWhenTranslationRequiredTh
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
auto sizeUsed = cmdStream.getUsed(); auto sizeUsed = cmdStream.getUsed();

View File

@ -53,7 +53,6 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelDispatchTest, givenParentKernelWhenQueue
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
size_t dshUsedAfter = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 0u).getUsed(); size_t dshUsedAfter = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 0u).getUsed();
@ -109,7 +108,6 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelDispatchTest, givenParentKernelWhenQueue
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
auto iohUsed = ioh.getUsed(); auto iohUsed = ioh.getUsed();
@ -135,7 +133,6 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelDispatchTest, givenParentKernelWhenQueue
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0u); auto &ssh = pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 0u);
@ -171,7 +168,6 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelDispatchTest, givenParentKernelWhenQueue
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
ASSERT_NE(nullptr, blockedCommandsData); ASSERT_NE(nullptr, blockedCommandsData);
@ -283,7 +279,6 @@ HWCMDTEST_F(IGFX_GEN8_CORE, MockParentKernelDispatch, GivenBlockedQueueWhenParen
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
ASSERT_NE(nullptr, blockedCommandsData); ASSERT_NE(nullptr, blockedCommandsData);
@ -316,7 +311,6 @@ HWCMDTEST_F(IGFX_GEN8_CORE, MockParentKernelDispatch, GivenParentKernelWhenDispa
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
LinearStream *commandStream = &pCmdQ->getCS(0); LinearStream *commandStream = &pCmdQ->getCS(0);
@ -374,7 +368,6 @@ HWCMDTEST_F(IGFX_GEN8_CORE, MockParentKernelDispatch, GivenUsedSSHHeapWhenParent
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
EXPECT_EQ(UnitTestHelper<FamilyType>::getDefaultSshUsage(), ssh.getUsed()); EXPECT_EQ(UnitTestHelper<FamilyType>::getDefaultSshUsage(), ssh.getUsed());
@ -410,7 +403,6 @@ HWCMDTEST_F(IGFX_GEN8_CORE, MockParentKernelDispatch, GivenNotUsedSSHHeapWhenPar
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
pDevice->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
EXPECT_EQ(bufferMemory, ssh.getCpuBase()); EXPECT_EQ(bufferMemory, ssh.getCpuBase());

View File

@ -421,7 +421,6 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenBlockedCommand
nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr,
device->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
EXPECT_NE(nullptr, blockedCommandsData); EXPECT_NE(nullptr, blockedCommandsData);

View File

@ -390,7 +390,6 @@ HWCMDTEST_F(IGFX_GEN8_CORE, TimestampPacketTests, givenTimestampPacketWhenDispat
nullptr, nullptr,
nullptr, nullptr,
&timestampPacket, &timestampPacket,
device->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
HardwareParse hwParser; HardwareParse hwParser;
@ -435,7 +434,6 @@ HWCMDTEST_F(IGFX_GEN8_CORE, TimestampPacketTests, givenTimestampPacketDisabledWh
nullptr, nullptr,
nullptr, nullptr,
&timestampPacket, &timestampPacket,
device->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
HardwareParse hwParser; HardwareParse hwParser;
@ -885,7 +883,6 @@ HWTEST_F(TimestampPacketTests, givenTimestampPacketWriteEnabledWhenDispatchingTh
nullptr, nullptr,
nullptr, nullptr,
&timestamp7, &timestamp7,
device->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
HardwareParse hwParser; HardwareParse hwParser;
@ -969,7 +966,6 @@ HWTEST_F(TimestampPacketTests, givenTimestampPacketWriteEnabledOnDifferentCSRsFr
nullptr, nullptr,
nullptr, nullptr,
&timestamp7, &timestamp7,
device->getPreemptionMode(),
CL_COMMAND_NDRANGE_KERNEL); CL_COMMAND_NDRANGE_KERNEL);
HardwareParse hwParser; HardwareParse hwParser;