Add KernelExecutionType

Add possibility to set Kernel execution type via clSetKernelExecInfo.

Change-Id: I2de0bf4e067921440e34e14c6975f640d3f47162
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2020-01-21 19:02:36 +01:00
committed by sys_ocldev
parent 257275fa26
commit 0b141ed4ea
9 changed files with 140 additions and 2 deletions

View File

@@ -984,6 +984,21 @@ void Kernel::clearUnifiedMemoryExecInfo() {
kernelUnifiedMemoryGfxAllocations.clear();
}
cl_int Kernel::setKernelExecutionType(cl_execution_info_kernel_type_intel executionType) {
switch (executionType) {
case CL_KERNEL_EXEC_INFO_DEFAULT_TYPE_INTEL:
this->executionType = KernelExecutionType::Default;
break;
case CL_KERNEL_EXEC_INFO_CONCURRENT_TYPE_INTEL:
this->executionType = KernelExecutionType::Concurrent;
break;
default: {
return CL_INVALID_VALUE;
}
}
return CL_SUCCESS;
}
uint32_t Kernel::getMaxWorkGroupCount(const cl_uint workDim, const size_t *localWorkSize) const {
auto &hardwareInfo = getDevice().getHardwareInfo();
auto executionEnvironment = kernelInfo.patchInfo.executionEnvironment;