[Beignet] [PATCH] Runtime: must call cl_intel_platform_enable_extension after cl_intel_platform_enable_extension.

Yang Rong rong.r.yang at intel.com
Thu May 4 11:03:38 UTC 2017


Signed-off-by: Yang Rong <rong.r.yang at intel.com>
---
 src/cl_device_id.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/cl_device_id.c b/src/cl_device_id.c
index 50ed0d9..7748e5a 100644
--- a/src/cl_device_id.c
+++ b/src/cl_device_id.c
@@ -551,10 +551,10 @@ skl_gt1_break:
       intel_skl_gt1_device.device_id = device_id;
       intel_skl_gt1_device.platform = cl_get_platform_default();
       ret = &intel_skl_gt1_device;
+      cl_intel_platform_get_default_extension(ret);
 #ifdef ENABLE_FP64
       cl_intel_platform_enable_extension(ret, cl_khr_fp64_ext_id);
 #endif
-      cl_intel_platform_get_default_extension(ret);
       cl_intel_platform_enable_extension(ret, cl_khr_fp16_ext_id);
       break;
 
@@ -576,10 +576,10 @@ skl_gt2_break:
       intel_skl_gt2_device.device_id = device_id;
       intel_skl_gt2_device.platform = cl_get_platform_default();
       ret = &intel_skl_gt2_device;
+      cl_intel_platform_get_default_extension(ret);
 #ifdef ENABLE_FP64
       cl_intel_platform_enable_extension(ret, cl_khr_fp64_ext_id);
 #endif
-      cl_intel_platform_get_default_extension(ret);
       cl_intel_platform_enable_extension(ret, cl_khr_fp16_ext_id);
       break;
 
@@ -614,10 +614,10 @@ skl_gt4_break:
       intel_skl_gt4_device.device_id = device_id;
       intel_skl_gt4_device.platform = cl_get_platform_default();
       ret = &intel_skl_gt4_device;
+      cl_intel_platform_get_default_extension(ret);
 #ifdef ENABLE_FP64
       cl_intel_platform_enable_extension(ret, cl_khr_fp64_ext_id);
 #endif
-      cl_intel_platform_get_default_extension(ret);
       cl_intel_platform_enable_extension(ret, cl_khr_fp16_ext_id);
       break;
 
@@ -659,10 +659,10 @@ kbl_gt1_break:
       intel_kbl_gt1_device.device_id = device_id;
       intel_kbl_gt1_device.platform = cl_get_platform_default();
       ret = &intel_kbl_gt1_device;
+      cl_intel_platform_get_default_extension(ret);
 #ifdef ENABLE_FP64
       cl_intel_platform_enable_extension(ret, cl_khr_fp64_ext_id);
 #endif
-      cl_intel_platform_get_default_extension(ret);
       cl_intel_platform_enable_extension(ret, cl_khr_fp16_ext_id);
       break;
 
@@ -678,10 +678,10 @@ kbl_gt15_break:
       intel_kbl_gt15_device.device_id = device_id;
       intel_kbl_gt15_device.platform = cl_get_platform_default();
       ret = &intel_kbl_gt15_device;
+      cl_intel_platform_get_default_extension(ret);
 #ifdef ENABLE_FP64
       cl_intel_platform_enable_extension(ret, cl_khr_fp64_ext_id);
 #endif
-      cl_intel_platform_get_default_extension(ret);
       cl_intel_platform_enable_extension(ret, cl_khr_fp16_ext_id);
       break;
 
@@ -702,10 +702,10 @@ kbl_gt2_break:
       intel_kbl_gt2_device.device_id = device_id;
       intel_kbl_gt2_device.platform = cl_get_platform_default();
       ret = &intel_kbl_gt2_device;
+      cl_intel_platform_get_default_extension(ret);
 #ifdef ENABLE_FP64
       cl_intel_platform_enable_extension(ret, cl_khr_fp64_ext_id);
 #endif
-      cl_intel_platform_get_default_extension(ret);
       cl_intel_platform_enable_extension(ret, cl_khr_fp16_ext_id);
       break;
 
@@ -717,10 +717,10 @@ kbl_gt3_break:
       intel_kbl_gt3_device.device_id = device_id;
       intel_kbl_gt3_device.platform = cl_get_platform_default();
       ret = &intel_kbl_gt3_device;
+      cl_intel_platform_get_default_extension(ret);
 #ifdef ENABLE_FP64
       cl_intel_platform_enable_extension(ret, cl_khr_fp64_ext_id);
 #endif
-      cl_intel_platform_get_default_extension(ret);
       cl_intel_platform_enable_extension(ret, cl_khr_fp16_ext_id);
       break;
 
@@ -730,10 +730,10 @@ kbl_gt4_break:
       intel_kbl_gt4_device.device_id = device_id;
       intel_kbl_gt4_device.platform = cl_get_platform_default();
       ret = &intel_kbl_gt4_device;
+      cl_intel_platform_get_default_extension(ret);
 #ifdef ENABLE_FP64
       cl_intel_platform_enable_extension(ret, cl_khr_fp64_ext_id);
 #endif
-      cl_intel_platform_get_default_extension(ret);
       cl_intel_platform_enable_extension(ret, cl_khr_fp16_ext_id);
       break;
 
-- 
2.7.4



More information about the Beignet mailing list