2019-02-21 23:59:10 +08:00
|
|
|
/*
|
2021-03-22 23:26:03 +08:00
|
|
|
* Copyright (C) 2019-2021 Intel Corporation
|
2019-02-21 23:59:10 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/debug_settings/debug_settings_manager.h"
|
2020-02-24 17:22:30 +08:00
|
|
|
|
2021-04-06 17:51:30 +08:00
|
|
|
#include "opencl/source/helpers/cl_hw_helper.h"
|
2020-02-23 05:50:57 +08:00
|
|
|
#include "opencl/source/kernel/kernel.h"
|
2019-02-21 23:59:10 +08:00
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2019-02-21 23:59:10 +08:00
|
|
|
bool Kernel::requiresCacheFlushCommand(const CommandQueue &commandQueue) const {
|
|
|
|
return false;
|
|
|
|
}
|
2021-03-22 23:26:03 +08:00
|
|
|
void Kernel::reconfigureKernel() {
|
2019-02-21 23:59:10 +08:00
|
|
|
}
|
2019-12-18 00:04:57 +08:00
|
|
|
int Kernel::setKernelThreadArbitrationPolicy(uint32_t policy) {
|
2021-04-06 17:51:30 +08:00
|
|
|
auto hwInfo = clDevice.getHardwareInfo();
|
|
|
|
auto &hwHelper = NEO::ClHwHelper::get(hwInfo.platform.eRenderCoreFamily);
|
|
|
|
if (!hwHelper.isSupportedKernelThreadArbitrationPolicy()) {
|
|
|
|
this->threadArbitrationPolicy = ThreadArbitrationPolicy::NotPresent;
|
|
|
|
return CL_INVALID_DEVICE;
|
|
|
|
} else if (policy == CL_KERNEL_EXEC_INFO_THREAD_ARBITRATION_POLICY_ROUND_ROBIN_INTEL) {
|
2019-12-18 00:04:57 +08:00
|
|
|
this->threadArbitrationPolicy = ThreadArbitrationPolicy::RoundRobin;
|
|
|
|
} else if (policy == CL_KERNEL_EXEC_INFO_THREAD_ARBITRATION_POLICY_OLDEST_FIRST_INTEL) {
|
|
|
|
this->threadArbitrationPolicy = ThreadArbitrationPolicy::AgeBased;
|
|
|
|
} else if (policy == CL_KERNEL_EXEC_INFO_THREAD_ARBITRATION_POLICY_AFTER_DEPENDENCY_ROUND_ROBIN_INTEL) {
|
|
|
|
this->threadArbitrationPolicy = ThreadArbitrationPolicy::RoundRobinAfterDependency;
|
|
|
|
} else {
|
|
|
|
this->threadArbitrationPolicy = ThreadArbitrationPolicy::NotPresent;
|
|
|
|
return CL_INVALID_VALUE;
|
|
|
|
}
|
|
|
|
return CL_SUCCESS;
|
|
|
|
}
|
2020-01-29 21:15:10 +08:00
|
|
|
|
2021-03-22 23:26:03 +08:00
|
|
|
bool Kernel::requiresPerDssBackedBuffer() const {
|
2020-01-29 21:15:10 +08:00
|
|
|
return DebugManager.flags.ForcePerDssBackedBufferProgramming.get();
|
|
|
|
}
|
|
|
|
|
2021-03-22 23:26:03 +08:00
|
|
|
bool Kernel::requiresLimitedWorkgroupSize() const {
|
2020-05-18 22:33:07 +08:00
|
|
|
return this->isBuiltIn;
|
|
|
|
}
|
|
|
|
|
2020-11-04 21:03:51 +08:00
|
|
|
int32_t Kernel::setAdditionalKernelExecInfoWithParam(uint32_t paramName, size_t paramValueSize, const void *paramValue) {
|
2020-09-02 17:38:54 +08:00
|
|
|
return CL_INVALID_VALUE;
|
|
|
|
}
|
|
|
|
|
2020-12-16 01:13:28 +08:00
|
|
|
void Kernel::updateAuxTranslationRequired() {
|
|
|
|
}
|
2020-05-18 22:33:07 +08:00
|
|
|
} // namespace NEO
|