feature: Add support for BUFFER_SIZE explicit argument

Related-To: NEO-13972

Signed-off-by: Vysochyn, Illia <illia.vysochyn@intel.com>
This commit is contained in:
Vysochyn, Illia
2025-04-07 12:28:48 +00:00
committed by Compute-Runtime-Automation
parent 8978ea5e5a
commit 146a7f7b9b
8 changed files with 43 additions and 5 deletions

View File

@@ -1527,6 +1527,7 @@ cl_int Kernel::setArgBuffer(uint32_t argIndex,
const auto &arg = kernelInfo.kernelDescriptor.payloadMappings.explicitArgs[argIndex];
const auto &argAsPtr = arg.as<ArgDescPointer>();
patch<int64_t, int64_t>(0, crossThreadData, argAsPtr.bufferSize);
if (clMem && *clMem) {
auto clMemObj = *clMem;
@@ -1539,6 +1540,8 @@ cl_int Kernel::setArgBuffer(uint32_t argIndex,
return CL_INVALID_MEM_OBJECT;
}
patch<int64_t, int64_t>(static_cast<int64_t>(buffer->getSize()), getCrossThreadData(), argAsPtr.bufferSize);
auto gfxAllocationType = buffer->getGraphicsAllocation(rootDeviceIndex)->getAllocationType();
if (!isBuiltIn) {
this->anyKernelArgumentUsingSystemMemory |= Kernel::graphicsAllocationTypeUseSystemMemory(gfxAllocationType);