refactor: improve ImplicitArg struct handling

Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2023-12-15 14:36:11 +00:00
committed by Compute-Runtime-Automation
parent ff45c4e989
commit d99104d5bf
38 changed files with 151 additions and 121 deletions

View File

@@ -7,7 +7,7 @@
#include "shared/source/compiler_interface/external_functions.h"
#include "shared/source/gen11/hw_cmds_base.h"
#include "shared/source/kernel/implicit_args.h"
#include "shared/source/kernel/implicit_args_helper.h"
#include "opencl/source/gtpin/gtpin_gfx_core_helper.h"
#include "opencl/source/gtpin/gtpin_gfx_core_helper.inl"

View File

@@ -7,7 +7,7 @@
#include "shared/source/compiler_interface/external_functions.h"
#include "shared/source/gen12lp/hw_cmds_base.h"
#include "shared/source/kernel/implicit_args.h"
#include "shared/source/kernel/implicit_args_helper.h"
#include "opencl/source/gtpin/gtpin_gfx_core_helper.h"
#include "opencl/source/gtpin/gtpin_gfx_core_helper.inl"

View File

@@ -7,7 +7,7 @@
#include "shared/source/compiler_interface/external_functions.h"
#include "shared/source/gen8/hw_cmds_base.h"
#include "shared/source/kernel/implicit_args.h"
#include "shared/source/kernel/implicit_args_helper.h"
#include "opencl/source/gtpin/gtpin_gfx_core_helper.h"
#include "opencl/source/gtpin/gtpin_gfx_core_helper.inl"

View File

@@ -7,7 +7,7 @@
#include "shared/source/compiler_interface/external_functions.h"
#include "shared/source/gen9/hw_cmds_base.h"
#include "shared/source/kernel/implicit_args.h"
#include "shared/source/kernel/implicit_args_helper.h"
#include "opencl/source/gtpin/gtpin_gfx_core_helper.h"
#include "opencl/source/gtpin/gtpin_gfx_core_helper.inl"

View File

@@ -18,7 +18,7 @@
#include "shared/source/helpers/local_id_gen.h"
#include "shared/source/indirect_heap/indirect_heap.h"
#include "shared/source/kernel/dispatch_kernel_encoder_interface.h"
#include "shared/source/kernel/implicit_args.h"
#include "shared/source/kernel/implicit_args_helper.h"
#include "shared/source/memory_manager/memory_manager.h"
#include "opencl/source/cl_device/cl_device.h"

View File

@@ -11,7 +11,7 @@
#include "shared/source/helpers/gfx_core_helper.h"
#include "shared/source/helpers/l3_range.h"
#include "shared/source/helpers/pipe_control_args.h"
#include "shared/source/kernel/implicit_args.h"
#include "shared/source/kernel/implicit_args_helper.h"
#include "opencl/source/command_queue/command_queue.h"
#include "opencl/source/helpers/hardware_commands_helper.h"
@@ -94,7 +94,7 @@ size_t HardwareCommandsHelper<GfxFamily>::sendCrossThreadData(
const auto &gfxCoreHelper = kernel.getGfxCoreHelper();
auto sizeForImplicitArgsProgramming = ImplicitArgsHelper::getSizeForImplicitArgsPatching(pImplicitArgs, kernelDescriptor, !generationOfLocalIdsByRuntime, gfxCoreHelper);
auto sizeForLocalIdsProgramming = sizeForImplicitArgsProgramming - sizeof(ImplicitArgs);
auto sizeForLocalIdsProgramming = sizeForImplicitArgsProgramming - ImplicitArgs::getSize();
offsetCrossThreadData += sizeForLocalIdsProgramming;
auto ptrToPatchImplicitArgs = indirectHeap.getSpace(sizeForImplicitArgsProgramming);

View File

@@ -9,7 +9,7 @@
#include "shared/source/compiler_interface/external_functions.h"
#include "shared/source/helpers/ptr_math.h"
#include "shared/source/kernel/implicit_args.h"
#include "shared/source/kernel/implicit_args_helper.h"
#include "shared/source/program/kernel_info.h"
#include "opencl/source/mem_obj/image.h"

View File

@@ -27,7 +27,7 @@
#include "shared/source/helpers/ptr_math.h"
#include "shared/source/helpers/simd_helper.h"
#include "shared/source/helpers/surface_format_info.h"
#include "shared/source/kernel/implicit_args.h"
#include "shared/source/kernel/implicit_args_helper.h"
#include "shared/source/kernel/kernel_arg_descriptor_extended_vme.h"
#include "shared/source/kernel/local_ids_cache.h"
#include "shared/source/memory_manager/allocation_properties.h"
@@ -176,7 +176,7 @@ cl_int Kernel::initialize() {
if (kernelDescriptor.kernelAttributes.flags.requiresImplicitArgs) {
pImplicitArgs = std::make_unique<ImplicitArgs>();
*pImplicitArgs = {};
pImplicitArgs->structSize = offsetof(ImplicitArgs, reserved);
pImplicitArgs->structSize = ImplicitArgs::getSize();
pImplicitArgs->structVersion = 0;
pImplicitArgs->simdWidth = maxSimdSize;
}
@@ -426,7 +426,7 @@ cl_int Kernel::cloneKernel(Kernel *pSourceKernel) {
}
if (pImplicitArgs) {
memcpy_s(pImplicitArgs.get(), sizeof(ImplicitArgs), pSourceKernel->getImplicitArgs(), sizeof(ImplicitArgs));
memcpy_s(pImplicitArgs.get(), ImplicitArgs::getSize(), pSourceKernel->getImplicitArgs(), ImplicitArgs::getSize());
}
this->isBuiltIn = pSourceKernel->isBuiltIn;

View File

@@ -11,7 +11,7 @@
#include "shared/source/device/device.h"
#include "shared/source/helpers/aux_translation.h"
#include "shared/source/helpers/vec.h"
#include "shared/source/kernel/implicit_args.h"
#include "shared/source/kernel/implicit_args_helper.h"
#include "shared/source/kernel/kernel_execution_type.h"
#include "shared/source/program/kernel_info.h"
#include "shared/source/unified_memory/unified_memory.h"

View File

@@ -13,7 +13,7 @@
#include "shared/source/helpers/blit_properties.h"
#include "shared/source/helpers/gfx_core_helper.h"
#include "shared/source/helpers/ptr_math.h"
#include "shared/source/kernel/implicit_args.h"
#include "shared/source/kernel/implicit_args_helper.h"
#include "shared/source/memory_manager/allocation_properties.h"
#include "shared/source/memory_manager/compression_selector.h"
#include "shared/source/memory_manager/memory_manager.h"

View File

@@ -6,7 +6,7 @@
*/
#include "shared/source/compiler_interface/external_functions.h"
#include "shared/source/kernel/implicit_args.h"
#include "shared/source/kernel/implicit_args_helper.h"
#include "shared/source/xe_hpc_core/hw_cmds_xe_hpc_core_base.h"
#include "opencl/source/gtpin/gtpin_gfx_core_helper.h"

View File

@@ -6,7 +6,7 @@
*/
#include "shared/source/compiler_interface/external_functions.h"
#include "shared/source/kernel/implicit_args.h"
#include "shared/source/kernel/implicit_args_helper.h"
#include "shared/source/xe_hpg_core/hw_cmds_xe_hpg_core_base.h"
#include "opencl/source/gtpin/gtpin_gfx_core_helper.h"