From 6096263d2a404d4ba7088a2470133a98d3b8870b Mon Sep 17 00:00:00 2001 From: Mateusz Jablonski Date: Fri, 24 Aug 2018 15:02:37 +0200 Subject: [PATCH] Process extra tokens when create command queue with properties Change-Id: I8f7d1aeaa7ed1a21e9c35794e5453ffa1ab67d5f Signed-off-by: Mateusz Jablonski --- Jenkinsfile | 2 +- runtime/api/api.cpp | 3 ++- runtime/helpers/CMakeLists.txt | 1 + runtime/helpers/queue_helpers.cpp | 29 +++++++++++++++++++++++++++++ runtime/helpers/queue_helpers.h | 1 + 5 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 runtime/helpers/queue_helpers.cpp diff --git a/Jenkinsfile b/Jenkinsfile index 6ea25dc25d..08bf2407f0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,4 +1,4 @@ #!groovy neoDependenciesRev='794280-1087' strategy='EQUAL' -allowedCD=272 +allowedCD=273 diff --git a/runtime/api/api.cpp b/runtime/api/api.cpp index 4f60702b10..332f45497a 100644 --- a/runtime/api/api.cpp +++ b/runtime/api/api.cpp @@ -3879,7 +3879,8 @@ cl_command_queue CL_API_CALL clCreateCommandQueueWithProperties(cl_context conte if (tokenValue != CL_QUEUE_PROPERTIES && tokenValue != CL_QUEUE_SIZE && tokenValue != CL_QUEUE_PRIORITY_KHR && - tokenValue != CL_QUEUE_THROTTLE_KHR) { + tokenValue != CL_QUEUE_THROTTLE_KHR && + !processExtraTokens(pDevice, propertiesAddress)) { err.set(CL_INVALID_VALUE); return commandQueue; } diff --git a/runtime/helpers/CMakeLists.txt b/runtime/helpers/CMakeLists.txt index cff489359d..cb4e6b5793 100644 --- a/runtime/helpers/CMakeLists.txt +++ b/runtime/helpers/CMakeLists.txt @@ -75,6 +75,7 @@ set(RUNTIME_SRCS_HELPERS_BASE ${CMAKE_CURRENT_SOURCE_DIR}/properties_helper.h ${CMAKE_CURRENT_SOURCE_DIR}/properties_helper.cpp ${CMAKE_CURRENT_SOURCE_DIR}/ptr_math.h + ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/queue_helpers.cpp ${CMAKE_CURRENT_SOURCE_DIR}/queue_helpers.h ${CMAKE_CURRENT_SOURCE_DIR}/sampler_helpers.h ${CMAKE_CURRENT_SOURCE_DIR}/selectors.h diff --git a/runtime/helpers/queue_helpers.cpp b/runtime/helpers/queue_helpers.cpp new file mode 100644 index 0000000000..f01f9b8de1 --- /dev/null +++ b/runtime/helpers/queue_helpers.cpp @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2018, Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#include "runtime/helpers/queue_helpers.h" + +namespace OCLRT { +bool processExtraTokens(Device *&device, const cl_queue_properties *property) { + return false; +} +} // namespace OCLRT diff --git a/runtime/helpers/queue_helpers.h b/runtime/helpers/queue_helpers.h index 372b58e697..57f97f281d 100644 --- a/runtime/helpers/queue_helpers.h +++ b/runtime/helpers/queue_helpers.h @@ -117,4 +117,5 @@ returnType getCmdQueueProperties(const cl_queue_properties *properties, } return retVal; } +bool processExtraTokens(Device *&device, const cl_queue_properties *property); } // namespace OCLRT