[Beignet] [PATCH 00/19] Add half float support.
junyan.he at inbox.com
junyan.he at inbox.com
Thu Jun 11 04:23:50 PDT 2015
From: Junyan He <junyan.he at linux.intel.com>
Add the half float support for BDW later platform.
Some accurate problems need to verify, for example, when the value
of sin(x) is close to pi/2, the difference is about 15% to float
version.
The builtin functions for geometric and convert_rtp _rtn _rtz _rte
is absent, will be added later.
Signed-off-by: Junyan He <junyan.he at linux.intel.com>
---
backend/src/CMakeLists.txt | 2 +
backend/src/backend/gen/gen_mesa_disasm.c | 83 +++++++++++++++-
backend/src/backend/gen_defs.hpp | 2 +
backend/src/backend/gen_insn_selection.cpp | 189 +++++++++++++++++++++++++++++-------
backend/src/backend/gen_register.hpp | 7 ++
backend/src/ir/function.cpp | 2 +-
backend/src/ir/half.cpp | 220 ++++++++++++++++++++++++++++++++++++++++++
backend/src/ir/half.hpp | 64 +++++++++++++
backend/src/ir/immediate.cpp | 5 +-
backend/src/ir/immediate.hpp | 48 +++++++++-
backend/src/ir/instruction.cpp | 2 +-
backend/src/libocl/include/ocl.h | 2 +-
backend/src/libocl/include/ocl_types.h | 2 +
backend/src/libocl/script/gen_vector.py | 16 +++-
backend/src/libocl/script/ocl_as.sh | 2 +-
backend/src/libocl/script/ocl_common.def | 6 ++
backend/src/libocl/script/ocl_convert.sh | 49 +++++++++-
backend/src/libocl/script/ocl_math.def | 31 +++++-
backend/src/libocl/script/ocl_relational.def | 16 +++-
backend/src/libocl/tmpl/ocl_common.tmpl.cl | 46 ++++++++-
backend/src/libocl/tmpl/ocl_common.tmpl.h | 13 +++
backend/src/libocl/tmpl/ocl_math.tmpl.cl | 373 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
backend/src/libocl/tmpl/ocl_math.tmpl.h | 102 +++++++++++++++++++-
backend/src/libocl/tmpl/ocl_relational.tmpl.cl | 66 ++++++++++++-
backend/src/libocl/tmpl/ocl_relational.tmpl.h | 23 ++++-
backend/src/llvm/llvm_gen_backend.cpp | 50 +++++++++-
backend/src/llvm/llvm_gen_ocl_function.hxx | 7 ++
kernels/compiler_half.cl | 11 +++
kernels/compiler_half_convert.cl | 56 +++++++++++
kernels/compiler_half_math.cl | 28 ++++++
kernels/compiler_half_relation.cl | 10 ++
src/cl_device_id.c | 123 ++++++++++++++----------
src/cl_device_id.h | 1 +
src/cl_extensions.c | 29 +++++-
src/cl_extensions.h | 2 +
src/cl_gt_device.h | 1 +
src/cl_platform_id.c | 2 +-
utests/CMakeLists.txt | 1 +
utests/compiler_half.cpp | 924 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
39 files changed, 2493 insertions(+), 123 deletions(-)
More information about the Beignet
mailing list