refactor: encapsulate condition

Related-To: NEO-14844

Signed-off-by: Tomasz Biernacik <tomasz.biernacik@intel.com>
This commit is contained in:
Tomasz Biernacik
2025-07-21 13:06:43 +00:00
committed by Compute-Runtime-Automation
parent 9619adbf4e
commit 2da77209dc
8 changed files with 40 additions and 28 deletions

View File

@@ -1574,4 +1574,10 @@ size_t CommandQueue::calculateHostPtrSizeForImage(const size_t *region, size_t r
return Image::calculateHostPtrSize(region, dstRowPitch, dstSlicePitch, bytesPerPixel, image->getImageDesc().image_type);
}
void CommandQueue::registerWalkerWithProfilingEnqueued(Event *event) {
if (this->shouldRegisterEnqueuedWalkerWithProfiling && isProfilingEnabled() && event) {
this->isWalkerWithProfilingEnqueued = true;
}
}
} // namespace NEO

View File

@@ -415,14 +415,7 @@ class CommandQueue : public BaseObject<_cl_command_queue> {
return this->isCacheFlushOnNextBcsWriteRequired && this->isImageWriteOperation(cmdType);
}
bool getShouldRegisterEnqueuedWalkerWithProfiling() {
return this->shouldRegisterEnqueuedWalkerWithProfiling;
}
void registerWalkerWithProfilingEnqueued() {
this->isWalkerWithProfilingEnqueued = true;
}
void registerWalkerWithProfilingEnqueued(Event *event);
bool getAndClearIsWalkerWithProfilingEnqueued() {
bool retVal = this->isWalkerWithProfilingEnqueued;
this->isWalkerWithProfilingEnqueued = false;

View File

@@ -155,9 +155,7 @@ void HardwareInterface<GfxFamily>::dispatchWalker(
dispatchInfo.dispatchEpilogueCommands(*commandStream, walkerArgs.timestampPacketDependencies, commandQueue.getDevice().getRootDeviceEnvironment());
}
if (commandQueue.getShouldRegisterEnqueuedWalkerWithProfiling() && commandQueue.isProfilingEnabled() && walkerArgs.event) {
commandQueue.registerWalkerWithProfilingEnqueued();
}
commandQueue.registerWalkerWithProfilingEnqueued(walkerArgs.event);
if (PauseOnGpuProperties::gpuScratchRegWriteAllowed(debugManager.flags.GpuScratchRegWriteAfterWalker.get(), commandQueue.getGpgpuCommandStreamReceiver().peekTaskCount())) {
uint32_t registerOffset = debugManager.flags.GpuScratchRegWriteRegisterOffset.get();