[2/3] Fix enabling of fp64 extension

Submitted by Mark Thompson on Jan. 31, 2018, 7:58 p.m.

Details

Message ID 51b751e7-9830-dcb6-f11e-2f72245a1536@jkqxz.net
State New
Series "Series without cover letter"
Headers show

Commit Message

Mark Thompson Jan. 31, 2018, 7:58 p.m.
This should only be enabled after setting the default extensions, because
the default setup overwrites the current extension string rather than
adding to it.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
---
 src/cl_device_id.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/cl_device_id.c b/src/cl_device_id.c
index 5e284193..a4134404 100644
--- a/src/cl_device_id.c
+++ b/src/cl_device_id.c
@@ -571,10 +571,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);
       cl_intel_platform_enable_extension(ret, cl_intel_device_side_avc_motion_estimation_ext_id);
       break;
@@ -597,10 +597,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);
       cl_intel_platform_enable_extension(ret, cl_intel_device_side_avc_motion_estimation_ext_id);
       break;
@@ -641,10 +641,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);
       cl_intel_platform_enable_extension(ret, cl_intel_device_side_avc_motion_estimation_ext_id);
       break;
@@ -687,10 +687,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;
 
@@ -706,10 +706,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;
 
@@ -730,10 +730,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;
 
@@ -745,10 +745,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;
 
@@ -758,10 +758,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;