diff options
author | Michalis Spyrou <michalis.spyrou@arm.com> | 2018-02-22 18:07:43 +0000 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:48:35 +0000 |
commit | a9676118fd2a0e5bc916969af83ecee049bae76b (patch) | |
tree | f67ff64d962a2f802700f6b26a9ab160c04c721d /arm_compute/core/CL/CLHelpers.h | |
parent | 2bc74410251dcbaf17a7c5447317aa6d0171972a (diff) | |
download | ComputeLibrary-a9676118fd2a0e5bc916969af83ecee049bae76b.tar.gz |
COMPMID-886 Don't use LWS hints by default for GPU post Mali-G72
Change-Id: I64cb2d7f9513d69aebd9307a803b1b2c9c0e04c3
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/121929
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core/CL/CLHelpers.h')
-rw-r--r-- | arm_compute/core/CL/CLHelpers.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/arm_compute/core/CL/CLHelpers.h b/arm_compute/core/CL/CLHelpers.h index 365ecb06c4..66423d648a 100644 --- a/arm_compute/core/CL/CLHelpers.h +++ b/arm_compute/core/CL/CLHelpers.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -103,6 +103,14 @@ std::unique_ptr<Kernel> create_kernel() return k; } +/** Helper function to get the GPU target from a device name + * + * @param[in] device_name A device name + * + * @return the GPU target + */ +GPUTarget get_target_from_name(const std::string &device_name); + /** Helper function to get the GPU target from CL device * * @param[in] device A CL device @@ -140,5 +148,24 @@ bool fp16_support(const cl::Device &device); * @return True if the extension is supported */ bool non_uniform_workgroup_support(const cl::Device &device); +/** Helper function to check whether a gpu target is equal to the provided targets + * + * @param[in] target_to_check gpu target to check + * @param[in] target First target to compare against + * @param[in] targets (Optional) Additional targets to compare with + * + * @return True if the target is equal with at least one of the targets. + */ +template <typename... Args> +bool gpu_target_is_in(GPUTarget target_to_check, GPUTarget target, Args... targets) +{ + return (target_to_check == target) | gpu_target_is_in(target_to_check, targets...); +} + +/** Variant of gpu_target_is_in for comparing two targets */ +inline bool gpu_target_is_in(GPUTarget target_to_check, GPUTarget target) +{ + return target_to_check == target; +} } #endif /* __ARM_COMPUTE_CLHELPERS_H__ */ |