2019-02-21 23:59:10 +08:00
|
|
|
/*
|
2019-12-18 00:04:57 +08:00
|
|
|
* Copyright (C) 2019-2020 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
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
void Kernel::reconfigureKernel() {
|
|
|
|
}
|
2019-12-18 00:04:57 +08:00
|
|
|
int Kernel::setKernelThreadArbitrationPolicy(uint32_t policy) {
|
|
|
|
if (policy == CL_KERNEL_EXEC_INFO_THREAD_ARBITRATION_POLICY_ROUND_ROBIN_INTEL) {
|
|
|
|
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
|
|
|
|
|
|
|
bool Kernel::requiresPerDssBackedBuffer() const {
|
|
|
|
return DebugManager.flags.ForcePerDssBackedBufferProgramming.get();
|
|
|
|
}
|
|
|
|
|
2020-05-18 22:33:07 +08:00
|
|
|
bool Kernel::requiresLimitedWorkgroupSize() const {
|
|
|
|
return this->isBuiltIn;
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace NEO
|