mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-28 08:37:12 +08:00
Add return CL_INVALID_VALUE from clSetKernelExecInfo
if attempt to set invalid ThreadArbitrationPolicy Change-Id: I8208f9b6761c4dafb6ef4cbde550314778ab505e Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
5ca48f7945
commit
a123cce3e8
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Intel Corporation
|
||||
* Copyright (C) 2019-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -13,4 +13,17 @@ bool Kernel::requiresCacheFlushCommand(const CommandQueue &commandQueue) const {
|
||||
}
|
||||
void Kernel::reconfigureKernel() {
|
||||
}
|
||||
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;
|
||||
}
|
||||
} // namespace NEO
|
||||
Reference in New Issue
Block a user