diff options
author | Vidhya Sudhan Loganathan <vidhyasudhan.loganathan@arm.com> | 2018-05-25 13:21:26 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:52:54 +0000 |
commit | f1f490634f3273e4669f16e663071554df291bea (patch) | |
tree | 3e4e39f3aa5a7ef26cd0d01079a971ad949738e4 /src/core/CL/CLKernelLibrary.cpp | |
parent | 2345f4349761d6c78200f43e1a78289d215825c4 (diff) | |
download | ComputeLibrary-f1f490634f3273e4669f16e663071554df291bea.tar.gz |
COMPMID-655 : Check FP16 is supported by the GPU
Change-Id: I507b04680a4e88426b682bd0be03bccb560ec78d
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/132589
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'src/core/CL/CLKernelLibrary.cpp')
-rw-r--r-- | src/core/CL/CLKernelLibrary.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/CL/CLKernelLibrary.cpp b/src/core/CL/CLKernelLibrary.cpp index bdb26f8b0f..9b0633061f 100644 --- a/src/core/CL/CLKernelLibrary.cpp +++ b/src/core/CL/CLKernelLibrary.cpp @@ -741,7 +741,7 @@ Kernel CLKernelLibrary::create_kernel(const std::string &kernel_name, const Stri } std::string concat_str; - if(fp16_supported(_device)) + if(fp16_supported()) { concat_str += " -DARM_COMPUTE_OPENCL_FP16_ENABLED=1 "; } @@ -794,6 +794,11 @@ void CLKernelLibrary::add_built_program(const std::string &built_program_name, c _built_programs_map.emplace(built_program_name, program); } +bool CLKernelLibrary::fp16_supported() const +{ + return ::fp16_supported(_device); +} + const Program &CLKernelLibrary::load_program(const std::string &program_name) const { const auto program_it = _programs_map.find(program_name); |