refactor: isStateless on init

Related-to: NEO-12938

Signed-off-by: Damian Tomczak <damian.tomczak@intel.com>
This commit is contained in:
Damian Tomczak
2024-10-16 23:33:02 +00:00
committed by Compute-Runtime-Automation
parent c72ebb263d
commit e495b2238a
4 changed files with 5 additions and 5 deletions

View File

@@ -133,6 +133,8 @@ CommandQueue::CommandQueue(Context *context, ClDevice *device, const cl_queue_pr
this->heaplessModeEnabled = compilerProductHelper.isHeaplessModeEnabled();
this->heaplessStateInitEnabled = compilerProductHelper.isHeaplessStateInitEnabled(this->heaplessModeEnabled);
this->isForceStateless = compilerProductHelper.isForceToStatelessRequired();
}
}

View File

@@ -486,6 +486,7 @@ class CommandQueue : public BaseObject<_cl_command_queue> {
bool gpgpuCsrClientRegistered = false;
bool heaplessModeEnabled = false;
bool heaplessStateInitEnabled = false;
bool isForceStateless = false;
};
template <typename PtrType>

View File

@@ -7,7 +7,6 @@
#pragma once
#include "shared/source/command_stream/command_stream_receiver.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "opencl/source/command_queue/command_queue_hw.h"
#include "opencl/source/mem_obj/buffer.h"
@@ -35,7 +34,7 @@ cl_int CommandQueueHw<GfxFamily>::enqueueCopyBufferRect(
CsrSelectionArgs csrSelectionArgs{cmdType, srcBuffer, dstBuffer, device->getRootDeviceIndex(), region};
CommandStreamReceiver &csr = selectCsrForBuiltinOperation(csrSelectionArgs);
bool isStateless = device->getCompilerProductHelper().isForceToStatelessRequired();
bool isStateless = isForceStateless;
if (std::max(srcBuffer->getSize(), dstBuffer->getSize()) >= 4ull * MemoryConstants::gigaByte) {
isStateless = true;
}

View File

@@ -6,8 +6,6 @@
*/
#pragma once
#include "shared/source/helpers/compiler_product_helper.h"
#include "opencl/source/command_queue/command_queue_hw.h"
#include "opencl/source/helpers/mipmap.h"
#include "opencl/source/mem_obj/buffer.h"
@@ -27,7 +25,7 @@ cl_int CommandQueueHw<GfxFamily>::enqueueCopyImageToBuffer(
const cl_event *eventWaitList,
cl_event *event) {
bool isStateless = device->getCompilerProductHelper().isForceToStatelessRequired();
bool isStateless = isForceStateless;
if (dstBuffer->getSize() >= 4ull * MemoryConstants::gigaByte) {
isStateless = true;
}