[Beignet] [PATCH] libocl: add vload/vstore for half type

Pan, Xiuli xiuli.pan at intel.com
Tue Aug 2 08:56:08 UTC 2016


Hi Jan,

Thanks for your patch, but I have already sent a patch set to deal with missing half type builtin functions with an utest case.
You can find them here: 
https://lists.freedesktop.org/archives/beignet/2016-July/007783.html

Thanks
Xiuli

-----Original Message-----
From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of Jan Vesely
Sent: Sunday, July 31, 2016 7:34 AM
To: beignet at lists.freedesktop.org
Subject: [Beignet] [PATCH] libocl: add vload/vstore for half type

these are required when exposing cl_khr_fp16

Signed-off-by: Jan Vesely <jano.vesely at gmail.com>
---
 backend/src/libocl/include/ocl_vload.h | 1 +
 backend/src/libocl/src/ocl_vload.cl    | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/backend/src/libocl/include/ocl_vload.h b/backend/src/libocl/include/ocl_vload.h
index 1e6871e..c26f640 100644
--- a/backend/src/libocl/include/ocl_vload.h
+++ b/backend/src/libocl/include/ocl_vload.h
@@ -88,6 +88,7 @@ DECL_BYTE_RW_ALL(char)
 DECL_BYTE_RW_ALL(uchar)
 DECL_BYTE_RW_ALL(short)
 DECL_BYTE_RW_ALL(ushort)
+DECL_BYTE_RW_ALL(half)
 DECL_UNTYPED_RW_ALL(int)
 DECL_UNTYPED_RW_ALL(uint)
 DECL_UNTYPED_RW_ALL(long)
diff --git a/backend/src/libocl/src/ocl_vload.cl b/backend/src/libocl/src/ocl_vload.cl
index 38a87c4..dc9ad25 100644
--- a/backend/src/libocl/src/ocl_vload.cl
+++ b/backend/src/libocl/src/ocl_vload.cl
@@ -16,6 +16,7 @@
  *
  */
 #pragma OPENCL EXTENSION cl_khr_fp64 : enable
+#pragma OPENCL EXTENSION cl_khr_fp16 : enable
 #include "ocl_vload.h"
 #include "ocl_relational.h"
 
@@ -123,6 +124,7 @@ DECL_BYTE_RW_ALL(char)
 DECL_BYTE_RW_ALL(uchar)
 DECL_BYTE_RW_ALL(short)
 DECL_BYTE_RW_ALL(ushort)
+DECL_BYTE_RW_ALL(half)
 DECL_UNTYPED_RW_ALL(int)
 DECL_UNTYPED_RW_ALL(uint)
 DECL_UNTYPED_RW_ALL(long)
-- 
2.7.4

_______________________________________________
Beignet mailing list
Beignet at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list