Use highest OpenCL C version (#1081)

* Set the highest supported OpenCL C version.

* Remove gDeviceLt20 variable - not used anymore.

* Fix formatting issues
diff --git a/test_conformance/SVM/main.cpp b/test_conformance/SVM/main.cpp
index 0a052f0..56fb24f 100644
--- a/test_conformance/SVM/main.cpp
+++ b/test_conformance/SVM/main.cpp
@@ -1,6 +1,6 @@
 //
 // Copyright (c) 2017 The Khronos Group Inc.
-// 
+//
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
@@ -213,14 +213,15 @@
       return -1;
     }
     bool extensions_supported = true;
-    for (auto extension : extensions_list) 
+    for (auto extension : extensions_list)
     {
-      if (!is_extension_available(devices[i], extension.c_str())) 
-      {
-        log_error("Required extension not found - device id %d - %s\n", i, extension.c_str());
-        extensions_supported = false;
-        break;
-      }
+        if (!is_extension_available(devices[i], extension.c_str()))
+        {
+            log_error("Required extension not found - device id %d - %s\n", i,
+                      extension.c_str());
+            extensions_supported = false;
+            break;
+        }
     }
     if((caps & required_svm_caps) == required_svm_caps && extensions_supported)
     {
@@ -249,10 +250,11 @@
     test_error(error, "clCreateCommandQueue failed");
   }
 
-  if(ppCodeString)
+  if (ppCodeString)
   {
-    error = create_single_kernel_helper(*context, program, 0, 1, ppCodeString, 0, "-cl-std=CL2.0");
-    test_error( error, "failed to create program" );
+      error =
+          create_single_kernel_helper(*context, program, 0, 1, ppCodeString, 0);
+      test_error(error, "failed to create program");
   }
 
   return 0;
diff --git a/test_conformance/api/test_sub_group_dispatch.cpp b/test_conformance/api/test_sub_group_dispatch.cpp
index 387d6c3..01d0ffa 100644
--- a/test_conformance/api/test_sub_group_dispatch.cpp
+++ b/test_conformance/api/test_sub_group_dispatch.cpp
@@ -1,6 +1,6 @@
 //
 // Copyright (c) 2017 The Khronos Group Inc.
-// 
+//
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
@@ -95,7 +95,9 @@
         }
     }
 
-    error = create_single_kernel_helper_with_build_options(context, &program, &kernel, 1, subgroup_dispatch_kernel, "subgroup_dispatch_kernel", "-cl-std=CL2.0");
+    error = create_single_kernel_helper(context, &program, &kernel, 1,
+                                        subgroup_dispatch_kernel,
+                                        "subgroup_dispatch_kernel");
     if (error != 0)
         return error;
 
diff --git a/test_conformance/device_execution/enqueue_profiling.cpp b/test_conformance/device_execution/enqueue_profiling.cpp
index 8e5bab7..b9e1a17 100644
--- a/test_conformance/device_execution/enqueue_profiling.cpp
+++ b/test_conformance/device_execution/enqueue_profiling.cpp
@@ -89,9 +89,9 @@
 
     cl_event kernel_event;
 
-    err_ret = create_single_kernel_helper_with_build_options(
-        context, &program, &kernel, 1, &enqueue_multi_level,
-        "enqueue_multi_level", "-cl-std=CL2.0");
+    err_ret = create_single_kernel_helper(context, &program, &kernel, 1,
+                                          &enqueue_multi_level,
+                                          "enqueue_multi_level");
     if (check_error(err_ret, "Create single kernel failed")) return -1;
 
     res_mem = clCreateBuffer(context, CL_MEM_READ_WRITE | CL_MEM_COPY_HOST_PTR,
diff --git a/test_conformance/device_execution/host_multi_queue.cpp b/test_conformance/device_execution/host_multi_queue.cpp
index e9a675c..661d33d 100644
--- a/test_conformance/device_execution/host_multi_queue.cpp
+++ b/test_conformance/device_execution/host_multi_queue.cpp
@@ -1,6 +1,6 @@
 //
 // Copyright (c) 2017 The Khronos Group Inc.
-// 
+//
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
@@ -184,7 +184,11 @@
                 global = 16;
             }
 
-            err_ret |= create_single_kernel_helper_with_build_options(context, &program[i], &kernel[i], sources_multi_queue_block[i].num_lines, sources_multi_queue_block[i].lines, sources_multi_queue_block[i].kernel_name, "-cl-std=CL2.0");
+            err_ret |= create_single_kernel_helper(
+                context, &program[i], &kernel[i],
+                sources_multi_queue_block[i].num_lines,
+                sources_multi_queue_block[i].lines,
+                sources_multi_queue_block[i].kernel_name);
             if(check_error(err_ret, "Create single kernel failed")) { res = -1; break; }
 
             mem[i] = clCreateBuffer(context, CL_MEM_READ_WRITE | CL_MEM_COPY_HOST_PTR, sizeof(kernel_results), kernel_results, &err_ret);
diff --git a/test_conformance/device_execution/host_queue_order.cpp b/test_conformance/device_execution/host_queue_order.cpp
index 5dce160..2b5688d 100644
--- a/test_conformance/device_execution/host_queue_order.cpp
+++ b/test_conformance/device_execution/host_queue_order.cpp
@@ -1,6 +1,6 @@
 //
 // Copyright (c) 2017 The Khronos Group Inc.
-// 
+//
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
@@ -133,10 +133,14 @@
 
     cl_event kernel_event;
 
-    err_ret = create_single_kernel_helper_with_build_options(context, &program1, &kernel1,  arr_size(enqueue_block_first_kernel), enqueue_block_first_kernel, "enqueue_block_first_kernel", "-cl-std=CL2.0");
+    err_ret = create_single_kernel_helper(
+        context, &program1, &kernel1, arr_size(enqueue_block_first_kernel),
+        enqueue_block_first_kernel, "enqueue_block_first_kernel");
     if(check_error(err_ret, "Create single kernel failed")) return -1;
 
-    err_ret = create_single_kernel_helper_with_build_options(context, &program2, &kernel2, arr_size(enqueue_block_second_kernel), enqueue_block_second_kernel, "enqueue_block_second_kernel", "-cl-std=CL2.0");
+    err_ret = create_single_kernel_helper(
+        context, &program2, &kernel2, arr_size(enqueue_block_second_kernel),
+        enqueue_block_second_kernel, "enqueue_block_second_kernel");
     if(check_error(err_ret, "Create single kernel failed")) return -1;
 
     res_mem = clCreateBuffer(context, CL_MEM_READ_WRITE|CL_MEM_COPY_HOST_PTR, sizeof(kernel_results), kernel_results, &err_ret);
diff --git a/test_conformance/device_execution/utils.cpp b/test_conformance/device_execution/utils.cpp
index 66a2211..05b6949 100644
--- a/test_conformance/device_execution/utils.cpp
+++ b/test_conformance/device_execution/utils.cpp
@@ -1,6 +1,6 @@
 //
 // Copyright (c) 2017 The Khronos Group Inc.
-// 
+//
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
@@ -40,7 +40,8 @@
     cl_uint i;
     size_t ret_len;
 
-    err_ret = create_single_kernel_helper_with_build_options(context, &program, &kernel, num_lines, source, kernel_name, "-cl-std=CL2.0");
+    err_ret = create_single_kernel_helper(context, &program, &kernel, num_lines,
+                                          source, kernel_name);
     if(check_error(err_ret, "Create single kernel failed")) return -1;
 
     mem = clCreateBuffer(context, CL_MEM_READ_WRITE | CL_MEM_USE_HOST_PTR, res_size, results, &err_ret);
diff --git a/test_conformance/generic_address_space/basic_tests.cpp b/test_conformance/generic_address_space/basic_tests.cpp
index 0b81564..b2e745c 100644
--- a/test_conformance/generic_address_space/basic_tests.cpp
+++ b/test_conformance/generic_address_space/basic_tests.cpp
@@ -1,6 +1,6 @@
 //
 // Copyright (c) 2017 The Khronos Group Inc.
-// 
+//
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
@@ -39,7 +39,9 @@
 
         const char *srcPtr = src.c_str();
 
-        if (create_single_kernel_helper_with_build_options(context, &program, &kernel, 1, &srcPtr, "testKernel", "-cl-std=CL2.0")) {
+        if (create_single_kernel_helper(context, &program, &kernel, 1, &srcPtr,
+                                        "testKernel"))
+        {
             log_error("create_single_kernel_helper failed");
             return -1;
         }
diff --git a/test_conformance/generic_address_space/stress_tests.cpp b/test_conformance/generic_address_space/stress_tests.cpp
index 4f94a5d..7193e69 100644
--- a/test_conformance/generic_address_space/stress_tests.cpp
+++ b/test_conformance/generic_address_space/stress_tests.cpp
@@ -1,6 +1,6 @@
 //
 // Copyright (c) 2017 The Khronos Group Inc.
-// 
+//
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
@@ -41,7 +41,9 @@
 
         const char *srcPtr = src.c_str();
 
-        if (create_single_kernel_helper_with_build_options(context, &program, &kernel, 1, &srcPtr, "testKernel", "-cl-std=CL2.0")) {
+        if (create_single_kernel_helper(context, &program, &kernel, 1, &srcPtr,
+                                        "testKernel"))
+        {
             log_error("create_single_kernel_helper failed");
             return -1;
         }
diff --git a/test_conformance/images/kernel_image_methods/main.cpp b/test_conformance/images/kernel_image_methods/main.cpp
index e1320ce..50653ef 100644
--- a/test_conformance/images/kernel_image_methods/main.cpp
+++ b/test_conformance/images/kernel_image_methods/main.cpp
@@ -23,7 +23,6 @@
 bool gDebugTrace;
 bool gTestSmallImages;
 bool gTestMaxImages;
-bool gDeviceLt20 = false;
 
 cl_channel_type gChannelTypeToUse = (cl_channel_type)-1;
 cl_channel_order gChannelOrderToUse = (cl_channel_order)-1;
diff --git a/test_conformance/images/kernel_image_methods/test_1D.cpp b/test_conformance/images/kernel_image_methods/test_1D.cpp
index 1ea8eb8..0059d4c 100644
--- a/test_conformance/images/kernel_image_methods/test_1D.cpp
+++ b/test_conformance/images/kernel_image_methods/test_1D.cpp
@@ -15,7 +15,6 @@
 //
 #include "../testBase.h"
 
-extern bool gDeviceLt20;
 
 struct image_kernel_data
 {
@@ -98,7 +97,8 @@
     if (error)
         print_error(error, "clFinish failed.\n");
     const char *ptr = programSrc;
-    error = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &ptr, "sample_kernel", gDeviceLt20 ? "" : "-cl-std=CL2.0" );
+    error = create_single_kernel_helper(context, &program, &kernel, 1, &ptr,
+                                        "sample_kernel");
     test_error( error, "Unable to create kernel to test against" );
 
     // Create an output buffer
diff --git a/test_conformance/images/kernel_image_methods/test_1D_array.cpp b/test_conformance/images/kernel_image_methods/test_1D_array.cpp
index 18c190b..797161c 100644
--- a/test_conformance/images/kernel_image_methods/test_1D_array.cpp
+++ b/test_conformance/images/kernel_image_methods/test_1D_array.cpp
@@ -15,7 +15,6 @@
 //
 #include "../testBase.h"
 
-extern bool gDeviceLt20;
 
 struct image_kernel_data
 {
@@ -102,7 +101,8 @@
     if (error)
         print_error(error, "clFinish failed.\n");
     const char *ptr = programSrc;
-    error = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &ptr, "sample_kernel", gDeviceLt20 ? "" : "-cl-std=CL2.0");
+    error = create_single_kernel_helper(context, &program, &kernel, 1, &ptr,
+                                        "sample_kernel");
     test_error( error, "Unable to create kernel to test against" );
 
     // Create an output buffer
diff --git a/test_conformance/images/kernel_image_methods/test_2D.cpp b/test_conformance/images/kernel_image_methods/test_2D.cpp
index 2ebc546..b0d4a70 100644
--- a/test_conformance/images/kernel_image_methods/test_2D.cpp
+++ b/test_conformance/images/kernel_image_methods/test_2D.cpp
@@ -15,7 +15,6 @@
 //
 #include "../testBase.h"
 
-extern bool gDeviceLt20;
 
 struct image_kernel_data
 {
@@ -133,7 +132,8 @@
     if (error)
         print_error(error, "clFinish failed.\n");
     const char *ptr = programSrc;
-    error = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &ptr, "sample_kernel", gDeviceLt20 ? "" : "-cl-std=CL2.0" );
+    error = create_single_kernel_helper(context, &program, &kernel, 1, &ptr,
+                                        "sample_kernel");
     test_error( error, "Unable to create kernel to test against" );
 
     // Create an output buffer
diff --git a/test_conformance/images/kernel_image_methods/test_2D_array.cpp b/test_conformance/images/kernel_image_methods/test_2D_array.cpp
index 98c1106..79248dd 100644
--- a/test_conformance/images/kernel_image_methods/test_2D_array.cpp
+++ b/test_conformance/images/kernel_image_methods/test_2D_array.cpp
@@ -15,7 +15,6 @@
 //
 #include "../testBase.h"
 
-extern bool gDeviceLt20;
 
 struct image_kernel_data
 {
@@ -108,7 +107,8 @@
     if (error)
         print_error(error, "clFinish failed.\n");
     const char *ptr = programSrc;
-    error = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &ptr, "sample_kernel", gDeviceLt20 ? "" : "-cl-std=CL2.0" );
+    error = create_single_kernel_helper(context, &program, &kernel, 1, &ptr,
+                                        "sample_kernel");
     test_error( error, "Unable to create kernel to test against" );
 
     // Create an output buffer
diff --git a/test_conformance/images/kernel_image_methods/test_loops.cpp b/test_conformance/images/kernel_image_methods/test_loops.cpp
index 8dfebd2..4c7b93e 100644
--- a/test_conformance/images/kernel_image_methods/test_loops.cpp
+++ b/test_conformance/images/kernel_image_methods/test_loops.cpp
@@ -16,7 +16,6 @@
 #include "../testBase.h"
 #include "../common.h"
 
-extern bool gDeviceLt20;
 
 extern int test_get_image_info_1D(cl_device_id device, cl_context context,
                                   cl_command_queue queue,
@@ -117,9 +116,6 @@
 {
     int version_check;
     auto version = get_device_cl_version(device);
-    if (version < Version(2, 0)) {
-        gDeviceLt20 = true;
-    }
 
     if ((version_check = (version < Version(1, 2))))
     {
diff --git a/test_conformance/images/kernel_read_write/main.cpp b/test_conformance/images/kernel_read_write/main.cpp
index f430c7f..31dceb3 100644
--- a/test_conformance/images/kernel_read_write/main.cpp
+++ b/test_conformance/images/kernel_read_write/main.cpp
@@ -35,7 +35,6 @@
 bool gTestMaxImages;
 bool gTestImage2DFromBuffer;
 bool gTestMipmaps;
-bool gDeviceLt20 = false;
 cl_filter_mode    gFilterModeToUse = (cl_filter_mode)-1;
 // Default is CL_MEM_USE_HOST_PTR for the test
 cl_mem_flags    gMemFlagsToUse = CL_MEM_USE_HOST_PTR;
@@ -107,10 +106,6 @@
     bool            tDisableOffsets = false;
     bool            tNormalizedModeToUse = false;
     cl_filter_mode  tFilterModeToUse = (cl_filter_mode)-1;
-    auto version = get_device_cl_version(device);
-    if (version < Version(2, 0)) {
-        gDeviceLt20 = true;
-    }
 
     if( testTypesToRun & kReadTests )
     {
diff --git a/test_conformance/images/kernel_read_write/test_iterations.cpp b/test_conformance/images/kernel_read_write/test_iterations.cpp
index 06c6c9c..08a4fd2 100644
--- a/test_conformance/images/kernel_read_write/test_iterations.cpp
+++ b/test_conformance/images/kernel_read_write/test_iterations.cpp
@@ -26,7 +26,6 @@
 extern uint64_t gRoundingStartValue;
 extern cl_mem_flags gMemFlagsToUse;
 extern int gtestTypesToRun;
-extern bool gDeviceLt20;
 
 // Utility function to clamp down image sizes for certain tests to avoid
 // using too much memory.
@@ -1664,7 +1663,8 @@
             gTestMipmaps?", lod":" ");
 
     ptr = programSrc;
-    error = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &ptr, "sample_kernel", gDeviceLt20 ? "" : "-cl-std=CL2.0");
+    error = create_single_kernel_helper(context, &program, &kernel, 1, &ptr,
+                                        "sample_kernel");
     test_error( error, "Unable to create testing kernel" );
 
     if( gTestSmallImages )
diff --git a/test_conformance/images/kernel_read_write/test_read_1D.cpp b/test_conformance/images/kernel_read_write/test_read_1D.cpp
index 3e3b930..ed38753 100644
--- a/test_conformance/images/kernel_read_write/test_read_1D.cpp
+++ b/test_conformance/images/kernel_read_write/test_read_1D.cpp
@@ -26,7 +26,6 @@
 extern uint64_t gRoundingStartValue;
 extern cl_mem_flags gMemFlagsToUse;
 extern int gtestTypesToRun;
-extern bool gDeviceLt20;
 
 const char *read1DKernelSourcePattern =
 "__kernel void sample_kernel( read_only image1d_t input,%s __global float *xOffsets, __global %s4 *results %s)\n"
@@ -1056,7 +1055,8 @@
 
     ptr = programSrc;
 
-    error = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &ptr, "sample_kernel", gDeviceLt20 ? "" : "-cl-std=CL2.0");
+    error = create_single_kernel_helper(context, &program, &kernel, 1, &ptr,
+                                        "sample_kernel");
     if(error)
     {
         exit(1);
diff --git a/test_conformance/images/kernel_read_write/test_read_1D_array.cpp b/test_conformance/images/kernel_read_write/test_read_1D_array.cpp
index 44797b1..1ffd598 100644
--- a/test_conformance/images/kernel_read_write/test_read_1D_array.cpp
+++ b/test_conformance/images/kernel_read_write/test_read_1D_array.cpp
@@ -25,7 +25,6 @@
 extern uint64_t gRoundingStartValue;
 extern cl_mem_flags gMemFlagsToUse;
 extern int gtestTypesToRun;
-extern bool gDeviceLt20;
 
 const char *read1DArrayKernelSourcePattern =
 "__kernel void sample_kernel( read_only image1d_array_t input,%s __global float *xOffsets, __global float *yOffsets, __global %s4 *results %s)\n"
@@ -1165,7 +1164,8 @@
             gTestMipmaps ? ", lod" : "" );
 
     ptr = programSrc;
-    error = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &ptr, "sample_kernel", gDeviceLt20 ? "" : "-cl-std=CL2.0");
+    error = create_single_kernel_helper(context, &program, &kernel, 1, &ptr,
+                                        "sample_kernel");
     test_error( error, "Unable to create testing kernel" );
 
     if( gTestSmallImages )
diff --git a/test_conformance/images/kernel_read_write/test_read_2D_array.cpp b/test_conformance/images/kernel_read_write/test_read_2D_array.cpp
index d424fbd..558b126 100644
--- a/test_conformance/images/kernel_read_write/test_read_2D_array.cpp
+++ b/test_conformance/images/kernel_read_write/test_read_2D_array.cpp
@@ -18,7 +18,6 @@
 
 extern cl_mem_flags gMemFlagsToUse;
 extern int gtestTypesToRun;
-extern bool gDeviceLt20;
 
 // Utility function to clamp down image sizes for certain tests to avoid
 // using too much memory.
@@ -1392,7 +1391,8 @@
             gTestMipmaps ? ", lod" : " " );
 
     ptr = programSrc;
-    error = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &ptr, "sample_kernel", gDeviceLt20 ? "" : "-cl-std=CL2.0");
+    error = create_single_kernel_helper(context, &program, &kernel, 1, &ptr,
+                                        "sample_kernel");
     test_error( error, "Unable to create testing kernel" );
 
     // Run tests
diff --git a/test_conformance/images/kernel_read_write/test_read_3D.cpp b/test_conformance/images/kernel_read_write/test_read_3D.cpp
index ae8d737..0fd777f 100644
--- a/test_conformance/images/kernel_read_write/test_read_3D.cpp
+++ b/test_conformance/images/kernel_read_write/test_read_3D.cpp
@@ -18,7 +18,6 @@
 
 extern cl_mem_flags gMemFlagsToUse;
 extern int gtestTypesToRun;
-extern bool gDeviceLt20;
 
 // Utility function to clamp down image sizes for certain tests to avoid
 // using too much memory.
@@ -1230,7 +1229,8 @@
             gTestMipmaps? ",lod":" ");
 
     ptr = programSrc;
-    error = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &ptr, "sample_kernel", gDeviceLt20 ? "" : "-cl-std=CL2.0");
+    error = create_single_kernel_helper(context, &program, &kernel, 1, &ptr,
+                                        "sample_kernel");
     test_error( error, "Unable to create testing kernel" );
 
     // Run tests
diff --git a/test_conformance/images/kernel_read_write/test_write_1D.cpp b/test_conformance/images/kernel_read_write/test_write_1D.cpp
index 68b913e..bae88b2 100644
--- a/test_conformance/images/kernel_read_write/test_write_1D.cpp
+++ b/test_conformance/images/kernel_read_write/test_write_1D.cpp
@@ -21,7 +21,6 @@
 
 extern cl_mem_flags gMemFlagsToUse;
 extern int gtestTypesToRun;
-extern bool gDeviceLt20;
 
 extern bool validate_float_write_results( float *expected, float *actual, image_descriptor *imageInfo );
 extern bool validate_half_write_results( cl_half *expected, cl_half *actual, image_descriptor* imageInfo );
@@ -580,7 +579,8 @@
              gTestMipmaps ? ", lod" :"" );
 
     ptr = programSrc;
-    error = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &ptr, "sample_kernel", gDeviceLt20 ? "" : "-cl-std=CL2.0");
+    error = create_single_kernel_helper(context, &program, &kernel, 1, &ptr,
+                                        "sample_kernel");
     test_error( error, "Unable to create testing kernel" );
 
     // Run tests
diff --git a/test_conformance/images/kernel_read_write/test_write_1D_array.cpp b/test_conformance/images/kernel_read_write/test_write_1D_array.cpp
index 57bdd54..6242797 100644
--- a/test_conformance/images/kernel_read_write/test_write_1D_array.cpp
+++ b/test_conformance/images/kernel_read_write/test_write_1D_array.cpp
@@ -21,7 +21,6 @@
 
 extern cl_mem_flags gMemFlagsToUse;
 extern int gtestTypesToRun;
-extern bool gDeviceLt20;
 
 extern bool validate_float_write_results( float *expected, float *actual, image_descriptor *imageInfo );
 extern bool validate_half_write_results( cl_half *expected, cl_half *actual, image_descriptor *imageInfo );
@@ -603,7 +602,8 @@
              gTestMipmaps ? ", lod" :"" );
 
     ptr = programSrc;
-    error = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &ptr, "sample_kernel", gDeviceLt20 ? "" : "-cl-std=CL2.0");
+    error = create_single_kernel_helper(context, &program, &kernel, 1, &ptr,
+                                        "sample_kernel");
     test_error( error, "Unable to create testing kernel" );
 
     // Run tests
diff --git a/test_conformance/images/kernel_read_write/test_write_2D_array.cpp b/test_conformance/images/kernel_read_write/test_write_2D_array.cpp
index 3de4671..b0dc1cc 100644
--- a/test_conformance/images/kernel_read_write/test_write_2D_array.cpp
+++ b/test_conformance/images/kernel_read_write/test_write_2D_array.cpp
@@ -21,7 +21,6 @@
 
 extern cl_mem_flags gMemFlagsToUse;
 extern int gtestTypesToRun;
-extern bool gDeviceLt20;
 
 extern bool validate_float_write_results( float *expected, float *actual, image_descriptor *imageInfo );
 extern bool validate_half_write_results( cl_half *expected, cl_half *actual, image_descriptor *imageInfo );
@@ -630,7 +629,8 @@
              gTestMipmaps ? ", lod" : "" );
 
     ptr = programSrc;
-    error = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &ptr, "sample_kernel", gDeviceLt20 ? "" : "-cl-std=CL2.0");
+    error = create_single_kernel_helper(context, &program, &kernel, 1, &ptr,
+                                        "sample_kernel");
     test_error( error, "Unable to create testing kernel" );
 
     // Run tests
diff --git a/test_conformance/images/kernel_read_write/test_write_3D.cpp b/test_conformance/images/kernel_read_write/test_write_3D.cpp
index c6223d8..7df29ca 100644
--- a/test_conformance/images/kernel_read_write/test_write_3D.cpp
+++ b/test_conformance/images/kernel_read_write/test_write_3D.cpp
@@ -21,7 +21,6 @@
 
 extern cl_mem_flags gMemFlagsToUse;
 extern int gtestTypesToRun;
-extern bool gDeviceLt20;
 
 extern bool validate_float_write_results( float *expected, float *actual, image_descriptor *imageInfo );
 extern bool validate_half_write_results( cl_half *expected, cl_half *actual, image_descriptor *imageInfo );
@@ -636,7 +635,8 @@
              gTestMipmaps ? ", lod" : "" );
 
     ptr = programSrc;
-    error = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &ptr, "sample_kernel", gDeviceLt20 ? "" : "-cl-std=CL2.0");
+    error = create_single_kernel_helper(context, &program, &kernel, 1, &ptr,
+                                        "sample_kernel");
     test_error( error, "Unable to create testing kernel" );
 
     // Run tests
diff --git a/test_conformance/images/kernel_read_write/test_write_image.cpp b/test_conformance/images/kernel_read_write/test_write_image.cpp
index e848ab4..2beaf40 100644
--- a/test_conformance/images/kernel_read_write/test_write_image.cpp
+++ b/test_conformance/images/kernel_read_write/test_write_image.cpp
@@ -22,7 +22,6 @@
 extern bool gTestImage2DFromBuffer;
 extern cl_mem_flags gMemFlagsToUse;
 extern int gtestTypesToRun;
-extern bool gDeviceLt20;
 
 extern int test_write_image_1D_set( cl_device_id device, cl_context context, cl_command_queue queue, cl_image_format *format, ExplicitType inputType, MTdata d );
 extern int test_write_image_3D_set( cl_device_id device, cl_context context, cl_command_queue queue, cl_image_format *format, ExplicitType inputType, MTdata d );
@@ -682,7 +681,8 @@
              gTestMipmaps ? ", lod" : "" );
 
     ptr = programSrc;
-    error = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &ptr, "sample_kernel", gDeviceLt20 ? "" : "-cl-std=CL2.0");
+    error = create_single_kernel_helper(context, &program, &kernel, 1, &ptr,
+                                        "sample_kernel");
     test_error( error, "Unable to create testing kernel" );
 
     // Run tests
diff --git a/test_conformance/images/samplerlessReads/main.cpp b/test_conformance/images/samplerlessReads/main.cpp
index cb44259..cd37779 100644
--- a/test_conformance/images/samplerlessReads/main.cpp
+++ b/test_conformance/images/samplerlessReads/main.cpp
@@ -36,7 +36,6 @@
 cl_channel_type     gChannelTypeToUse = (cl_channel_type)-1;
 cl_channel_order    gChannelOrderToUse = (cl_channel_order)-1;
 bool                gEnablePitch = false;
-bool                gDeviceLt20 = false;
 
 static void printUsage( const char *execName );
 
diff --git a/test_conformance/images/samplerlessReads/test_iterations.cpp b/test_conformance/images/samplerlessReads/test_iterations.cpp
index 11b364f..f6bb42a 100644
--- a/test_conformance/images/samplerlessReads/test_iterations.cpp
+++ b/test_conformance/images/samplerlessReads/test_iterations.cpp
@@ -22,7 +22,6 @@
     #include <setjmp.h>
 #endif
 
-extern bool gDeviceLt20;
 extern bool gTestReadWrite;
 
 const char *read2DKernelSourcePattern =
@@ -254,7 +253,8 @@
     }
 
     ptr = programSrc;
-    error = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &ptr, "sample_kernel", gDeviceLt20 ? "" : "-cl-std=CL2.0" );
+    error = create_single_kernel_helper(context, &program, &kernel, 1, &ptr,
+                                        "sample_kernel");
     test_error( error, "Unable to create testing kernel" );
 
     if ( gTestSmallImages )
diff --git a/test_conformance/images/samplerlessReads/test_loops.cpp b/test_conformance/images/samplerlessReads/test_loops.cpp
index 27840ca..b5a956c 100644
--- a/test_conformance/images/samplerlessReads/test_loops.cpp
+++ b/test_conformance/images/samplerlessReads/test_loops.cpp
@@ -17,7 +17,6 @@
 #include "../common.h"
 
 extern int gTypesToTest;
-extern bool gDeviceLt20;
 extern bool gTestReadWrite;
 
 extern int test_read_image_set_1D( cl_device_id device, cl_context context, cl_command_queue queue, cl_image_format *format, image_sampler_data *imageSampler, ExplicitType outputType );
@@ -99,10 +98,6 @@
     cl_image_format *formatList;
     bool *filterFlags;
     unsigned int numFormats;
-    auto version = get_device_cl_version(device);
-    if (version < Version(2, 0)) {
-        gDeviceLt20 = true;
-    }
 
     if (gTestReadWrite && checkForReadWriteImageSupport(device))
     {
diff --git a/test_conformance/images/samplerlessReads/test_read_1D.cpp b/test_conformance/images/samplerlessReads/test_read_1D.cpp
index d17fdfc..a55d2be 100644
--- a/test_conformance/images/samplerlessReads/test_read_1D.cpp
+++ b/test_conformance/images/samplerlessReads/test_read_1D.cpp
@@ -22,7 +22,6 @@
     #include <setjmp.h>
 #endif
 
-extern bool gDeviceLt20;
 extern bool gTestReadWrite;
 
 const char *read1DKernelSourcePattern =
@@ -252,7 +251,8 @@
 
 
     ptr = programSrc;
-    error = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &ptr, "sample_kernel", gDeviceLt20 ? "" : "-cl-std=CL2.0" );
+    error = create_single_kernel_helper(context, &program, &kernel, 1, &ptr,
+                                        "sample_kernel");
     test_error( error, "Unable to create testing kernel" );
 
     if ( gTestSmallImages )
diff --git a/test_conformance/images/samplerlessReads/test_read_1D_array.cpp b/test_conformance/images/samplerlessReads/test_read_1D_array.cpp
index 6a0e1d5..b63fed4 100644
--- a/test_conformance/images/samplerlessReads/test_read_1D_array.cpp
+++ b/test_conformance/images/samplerlessReads/test_read_1D_array.cpp
@@ -22,7 +22,6 @@
     #include <setjmp.h>
 #endif
 
-extern bool gDeviceLt20;
 extern bool gTestReadWrite;
 
 const char *read1DArrayKernelSourcePattern =
@@ -251,7 +250,8 @@
 
 
     ptr = programSrc;
-    error = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &ptr, "sample_kernel", gDeviceLt20 ? "" : "-cl-std=CL2.0" );
+    error = create_single_kernel_helper(context, &program, &kernel, 1, &ptr,
+                                        "sample_kernel");
     test_error( error, "Unable to create testing kernel" );
 
     if ( gTestSmallImages )
diff --git a/test_conformance/images/samplerlessReads/test_read_1D_buffer.cpp b/test_conformance/images/samplerlessReads/test_read_1D_buffer.cpp
index c21b12c..ee48ec8 100644
--- a/test_conformance/images/samplerlessReads/test_read_1D_buffer.cpp
+++ b/test_conformance/images/samplerlessReads/test_read_1D_buffer.cpp
@@ -22,7 +22,6 @@
     #include <setjmp.h>
 #endif
 
-extern bool gDeviceLt20;
 
 const char *read1DBufferKernelSourcePattern =
 "__kernel void sample_kernel( read_only image1d_buffer_t inputA, read_only image1d_t inputB, sampler_t sampler, __global int *results )\n"
@@ -244,7 +243,8 @@
              readFormat );
 
     ptr = programSrc;
-    error = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &ptr, "sample_kernel", gDeviceLt20 ? "" : "-cl-std=CL2.0" );
+    error = create_single_kernel_helper(context, &program, &kernel, 1, &ptr,
+                                        "sample_kernel");
     test_error( error, "Unable to create testing kernel" );
 
     if ( gTestSmallImages )
diff --git a/test_conformance/images/samplerlessReads/test_read_2D_array.cpp b/test_conformance/images/samplerlessReads/test_read_2D_array.cpp
index cfc1272..95a973c 100644
--- a/test_conformance/images/samplerlessReads/test_read_2D_array.cpp
+++ b/test_conformance/images/samplerlessReads/test_read_2D_array.cpp
@@ -16,7 +16,6 @@
 #include "../testBase.h"
 #include <float.h>
 
-extern bool gDeviceLt20;
 extern bool gTestReadWrite;
 
 const char *read2DArrayKernelSourcePattern =
@@ -241,7 +240,8 @@
 
 
     ptr = programSrc;
-    error = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &ptr, "sample_kernel", gDeviceLt20 ? "" : "-cl-std=CL2.0" );
+    error = create_single_kernel_helper(context, &program, &kernel, 1, &ptr,
+                                        "sample_kernel");
     test_error( error, "Unable to create testing kernel" );
 
 
diff --git a/test_conformance/images/samplerlessReads/test_read_3D.cpp b/test_conformance/images/samplerlessReads/test_read_3D.cpp
index da5466f..39ca71a 100644
--- a/test_conformance/images/samplerlessReads/test_read_3D.cpp
+++ b/test_conformance/images/samplerlessReads/test_read_3D.cpp
@@ -16,7 +16,6 @@
 #include "../testBase.h"
 #include <float.h>
 
-extern bool gDeviceLt20;
 extern bool gTestReadWrite;
 
 const char *read3DKernelSourcePattern =
@@ -244,7 +243,8 @@
 
 
     ptr = programSrc;
-    error = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &ptr, "sample_kernel", gDeviceLt20 ? "" : "-cl-std=CL2.0" );
+    error = create_single_kernel_helper(context, &program, &kernel, 1, &ptr,
+                                        "sample_kernel");
     test_error( error, "Unable to create testing kernel" );
 
 
diff --git a/test_conformance/pipes/test_pipe_limits.cpp b/test_conformance/pipes/test_pipe_limits.cpp
index 85247f8..169ab80 100644
--- a/test_conformance/pipes/test_pipe_limits.cpp
+++ b/test_conformance/pipes/test_pipe_limits.cpp
@@ -1,6 +1,6 @@
 //
 // Copyright (c) 2017 The Khronos Group Inc.
-// 
+//
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
@@ -218,9 +218,8 @@
     const char *sources[] = { kernel_source.c_str() };
 
     // Create producer kernel
-    err = create_single_kernel_helper_with_build_options(
-        context, &program, &kernel[0], 1, sources, kernelName[0],
-        "-cl-std=CL2.0");
+    err = create_single_kernel_helper(context, &program, &kernel[0], 1, sources,
+                                      kernelName[0]);
     test_error_ret(err, " Error creating program", -1);
 
     //Create consumer kernel
@@ -368,9 +367,8 @@
     const char *sources[] = { kernel_source.c_str() };
 
     // Create producer kernel
-    err = create_single_kernel_helper_with_build_options(
-        context, &program, &kernel[0], 1, sources, kernelName[0],
-        "-cl-std=CL2.0");
+    err = create_single_kernel_helper(context, &program, &kernel[0], 1, sources,
+                                      kernelName[0]);
     test_error_ret(err, " Error creating program", -1);
 
     //Create consumer kernel
@@ -533,9 +531,8 @@
     const char *sources[] = { kernel_source.c_str() };
 
     // Create producer kernel
-    err = create_single_kernel_helper_with_build_options(
-        context, &program, &kernel[0], 1, sources, kernelName[0],
-        "-cl-std=CL2.0");
+    err = create_single_kernel_helper(context, &program, &kernel[0], 1, sources,
+                                      kernelName[0]);
     test_error_ret(err, " Error creating program", -1);
 
     // Create consumer kernel
diff --git a/test_conformance/pipes/test_pipe_query_functions.cpp b/test_conformance/pipes/test_pipe_query_functions.cpp
index f9c93aa..21d1950 100644
--- a/test_conformance/pipes/test_pipe_query_functions.cpp
+++ b/test_conformance/pipes/test_pipe_query_functions.cpp
@@ -1,6 +1,6 @@
 //
 // Copyright (c) 2017 The Khronos Group Inc.
-// 
+//
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
@@ -140,7 +140,9 @@
     test_error_ret(err, " clCreatePipe failed", -1);
 
     // Create producer kernel
-    err = create_single_kernel_helper_with_build_options(context, &program, &kernel[0], 1, (const char**)&pipe_query_functions_kernel_code, kernelName[0], "-cl-std=CL2.0");
+    err = create_single_kernel_helper(
+        context, &program, &kernel[0], 1,
+        (const char **)&pipe_query_functions_kernel_code, kernelName[0]);
     test_error_ret(err, " Error creating program", -1);
 
     //Create consumer kernel
diff --git a/test_conformance/pipes/test_pipe_read_write.cpp b/test_conformance/pipes/test_pipe_read_write.cpp
index 64ee31b..dd0d121 100644
--- a/test_conformance/pipes/test_pipe_read_write.cpp
+++ b/test_conformance/pipes/test_pipe_read_write.cpp
@@ -1,6 +1,6 @@
 //
 // Copyright (c) 2017 The Khronos Group Inc.
-// 
+//
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
@@ -531,9 +531,8 @@
         std::string kernel_source = sourceCode[i].str();
         const char *sources[] = { kernel_source.c_str() };
         // Create producer kernel
-        err = create_single_kernel_helper_with_build_options(
-            context, &program[i], &kernel[ii], 1, sources, kernelName[ii],
-            "-cl-std=CL2.0");
+        err = create_single_kernel_helper(context, &program[i], &kernel[ii], 1,
+                                          sources, kernelName[ii]);
 
         test_error_ret(err, " Error creating program", -1);
 
@@ -659,7 +658,8 @@
     test_error_ret(err, " clCreatePipe failed", -1);
 
     // Create producer kernel
-    err = create_single_kernel_helper_with_build_options(context, &program, &kernel[0], 1, &kernelCode, kernelName[0], "-cl-std=CL2.0");
+    err = create_single_kernel_helper(context, &program, &kernel[0], 1,
+                                      &kernelCode, kernelName[0]);
     test_error_ret(err, " Error creating program", -1);
 
     //Create consumer kernel
diff --git a/test_conformance/pipes/test_pipe_readwrite_errors.cpp b/test_conformance/pipes/test_pipe_readwrite_errors.cpp
index 1b9fc31..d4b4524 100644
--- a/test_conformance/pipes/test_pipe_readwrite_errors.cpp
+++ b/test_conformance/pipes/test_pipe_readwrite_errors.cpp
@@ -1,6 +1,6 @@
 //
 // Copyright (c) 2017 The Khronos Group Inc.
-// 
+//
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
@@ -115,7 +115,9 @@
     test_error_ret(err, " clCreatePipe failed", -1);
 
     // Create producer kernel
-    err = create_single_kernel_helper_with_build_options(context, &program, &kernel[0], 1, (const char**)&pipe_readwrite_errors_kernel_code, kernelName[0], "-cl-std=CL2.0");
+    err = create_single_kernel_helper(
+        context, &program, &kernel[0], 1,
+        (const char **)&pipe_readwrite_errors_kernel_code, kernelName[0]);
     test_error_ret(err, " Error creating program", -1);
 
     //Create consumer kernel
diff --git a/test_conformance/pipes/test_pipe_subgroups.cpp b/test_conformance/pipes/test_pipe_subgroups.cpp
index b41170c..b3e1718 100644
--- a/test_conformance/pipes/test_pipe_subgroups.cpp
+++ b/test_conformance/pipes/test_pipe_subgroups.cpp
@@ -1,6 +1,6 @@
 //
 // Copyright (c) 2017 The Khronos Group Inc.
-// 
+//
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
@@ -146,7 +146,9 @@
     test_error_ret(err, " clCreatePipe failed", -1);
 
     // Create producer kernel
-    err = create_single_kernel_helper_with_build_options(context, &program, &kernel[0], 1, (const char**)&pipe_subgroups_kernel_code, kernelName[0], "-cl-std=CL2.0");
+    err = create_single_kernel_helper(
+        context, &program, &kernel[0], 1,
+        (const char **)&pipe_subgroups_kernel_code, kernelName[0]);
     test_error_ret(err, " Error creating program", -1);
 
     //Create consumer kernel
diff --git a/test_conformance/subgroups/subhelpers.h b/test_conformance/subgroups/subhelpers.h
index 6e84ccb..dc49af2 100644
--- a/test_conformance/subgroups/subhelpers.h
+++ b/test_conformance/subgroups/subhelpers.h
@@ -377,8 +377,8 @@
         const std::string &kernel_str = kernel_sstr.str();
         const char *kernel_src = kernel_str.c_str();
 
-        error = create_single_kernel_helper_with_build_options(
-            context, &program, &kernel, 1, &kernel_src, kname, "-cl-std=CL2.0");
+        error = create_single_kernel_helper(context, &program, &kernel, 1,
+                                            &kernel_src, kname);
         if (error != 0) return error;
 
         // Determine some local dimensions to use for the test.
diff --git a/test_conformance/subgroups/test_queries.cpp b/test_conformance/subgroups/test_queries.cpp
index 2ad3d7f..761ca7a 100644
--- a/test_conformance/subgroups/test_queries.cpp
+++ b/test_conformance/subgroups/test_queries.cpp
@@ -67,9 +67,8 @@
 
     const std::string &kernel_str = kernel_sstr.str();
     const char *kernel_src = kernel_str.c_str();
-    error = create_single_kernel_helper_with_build_options(
-        context, &program, &kernel, 1, &kernel_src, "query_kernel",
-        "-cl-std=CL2.0");
+    error = create_single_kernel_helper(context, &program, &kernel, 1,
+                                        &kernel_src, "query_kernel");
     if (error != 0) return error;
 
     // Determine some local dimensions to use for the test.
diff --git a/test_conformance/subgroups/test_workitem.cpp b/test_conformance/subgroups/test_workitem.cpp
index b77bfe1..7ffa6a7 100644
--- a/test_conformance/subgroups/test_workitem.cpp
+++ b/test_conformance/subgroups/test_workitem.cpp
@@ -227,9 +227,8 @@
            "}";
     const std::string &kernel_str = kernel_sstr.str();
     const char *kernel_src = kernel_str.c_str();
-    error = create_single_kernel_helper_with_build_options(
-        context, &program, &kernel, 1, &kernel_src, "get_test",
-        "-cl-std=CL2.0");
+    error = create_single_kernel_helper(context, &program, &kernel, 1,
+                                        &kernel_src, "get_test");
     if (error != 0) return error;
 
     error = get_max_allowed_work_group_size(context, kernel, &local, NULL);
diff --git a/test_conformance/workgroups/test_wg_all.cpp b/test_conformance/workgroups/test_wg_all.cpp
index 2148fba..ccf17b6 100644
--- a/test_conformance/workgroups/test_wg_all.cpp
+++ b/test_conformance/workgroups/test_wg_all.cpp
@@ -1,6 +1,6 @@
 //
 // Copyright (c) 2017 The Khronos Group Inc.
-// 
+//
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
@@ -79,7 +79,8 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_all_kernel_code, "test_wg_all", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_all_kernel_code, "test_wg_all");
     if (err)
         return -1;
 
diff --git a/test_conformance/workgroups/test_wg_any.cpp b/test_conformance/workgroups/test_wg_any.cpp
index 35ce0d5..4785ad5 100644
--- a/test_conformance/workgroups/test_wg_any.cpp
+++ b/test_conformance/workgroups/test_wg_any.cpp
@@ -1,6 +1,6 @@
 //
 // Copyright (c) 2017 The Khronos Group Inc.
-// 
+//
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
@@ -79,7 +79,8 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_any_kernel_code, "test_wg_any", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_any_kernel_code, "test_wg_any");
     if (err)
         return -1;
 
diff --git a/test_conformance/workgroups/test_wg_broadcast.cpp b/test_conformance/workgroups/test_wg_broadcast.cpp
index 3da14fb..3555947 100644
--- a/test_conformance/workgroups/test_wg_broadcast.cpp
+++ b/test_conformance/workgroups/test_wg_broadcast.cpp
@@ -1,6 +1,6 @@
 //
 // Copyright (c) 2017 The Khronos Group Inc.
-// 
+//
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
@@ -174,7 +174,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_broadcast_1D_kernel_code, "test_wg_broadcast_1D", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_broadcast_1D_kernel_code,
+                                      "test_wg_broadcast_1D");
     if (err)
         return -1;
 
@@ -281,7 +283,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_broadcast_2D_kernel_code, "test_wg_broadcast_2D", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_broadcast_2D_kernel_code,
+                                      "test_wg_broadcast_2D");
     if (err)
         return -1;
 
@@ -406,7 +410,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_broadcast_3D_kernel_code, "test_wg_broadcast_3D", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_broadcast_3D_kernel_code,
+                                      "test_wg_broadcast_3D");
     if (err)
         return -1;
 
diff --git a/test_conformance/workgroups/test_wg_reduce.cpp b/test_conformance/workgroups/test_wg_reduce.cpp
index 5da7284..eb26f49 100644
--- a/test_conformance/workgroups/test_wg_reduce.cpp
+++ b/test_conformance/workgroups/test_wg_reduce.cpp
@@ -1,6 +1,6 @@
 //
 // Copyright (c) 2017 The Khronos Group Inc.
-// 
+//
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
@@ -176,7 +176,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_reduce_add_kernel_code_int, "test_wg_reduce_add_int", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_reduce_add_kernel_code_int,
+                                      "test_wg_reduce_add_int");
     if (err)
         return -1;
 
@@ -279,7 +281,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_reduce_add_kernel_code_uint, "test_wg_reduce_add_uint", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_reduce_add_kernel_code_uint,
+                                      "test_wg_reduce_add_uint");
     if (err)
         return -1;
 
@@ -381,7 +385,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_reduce_add_kernel_code_long, "test_wg_reduce_add_long", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_reduce_add_kernel_code_long,
+                                      "test_wg_reduce_add_long");
     if (err)
         return -1;
 
@@ -484,7 +490,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_reduce_add_kernel_code_ulong, "test_wg_reduce_add_ulong", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_reduce_add_kernel_code_ulong,
+                                      "test_wg_reduce_add_ulong");
     if (err)
         return -1;
 
diff --git a/test_conformance/workgroups/test_wg_reduce_max.cpp b/test_conformance/workgroups/test_wg_reduce_max.cpp
index 2464bed..3bbd3f2 100644
--- a/test_conformance/workgroups/test_wg_reduce_max.cpp
+++ b/test_conformance/workgroups/test_wg_reduce_max.cpp
@@ -1,6 +1,6 @@
 //
 // Copyright (c) 2017 The Khronos Group Inc.
-// 
+//
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
@@ -177,7 +177,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_reduce_max_kernel_code_int, "test_wg_reduce_max_int", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_reduce_max_kernel_code_int,
+                                      "test_wg_reduce_max_int");
     if (err)
         return -1;
 
@@ -289,7 +291,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_reduce_max_kernel_code_uint, "test_wg_reduce_max_uint", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_reduce_max_kernel_code_uint,
+                                      "test_wg_reduce_max_uint");
     if (err)
         return -1;
 
@@ -400,7 +404,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_reduce_max_kernel_code_long, "test_wg_reduce_max_long", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_reduce_max_kernel_code_long,
+                                      "test_wg_reduce_max_long");
     if (err)
         return -1;
 
@@ -512,7 +518,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_reduce_max_kernel_code_ulong, "test_wg_reduce_max_ulong", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_reduce_max_kernel_code_ulong,
+                                      "test_wg_reduce_max_ulong");
     if (err)
         return -1;
 
diff --git a/test_conformance/workgroups/test_wg_reduce_min.cpp b/test_conformance/workgroups/test_wg_reduce_min.cpp
index f415aa7..7b1b22e 100644
--- a/test_conformance/workgroups/test_wg_reduce_min.cpp
+++ b/test_conformance/workgroups/test_wg_reduce_min.cpp
@@ -1,6 +1,6 @@
 //
 // Copyright (c) 2017 The Khronos Group Inc.
-// 
+//
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
@@ -177,7 +177,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_reduce_min_kernel_code_int, "test_wg_reduce_min_int", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_reduce_min_kernel_code_int,
+                                      "test_wg_reduce_min_int");
     if (err)
         return -1;
 
@@ -289,7 +291,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_reduce_min_kernel_code_uint, "test_wg_reduce_min_uint", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_reduce_min_kernel_code_uint,
+                                      "test_wg_reduce_min_uint");
     if (err)
         return -1;
 
@@ -400,7 +404,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_reduce_min_kernel_code_long, "test_wg_reduce_min_long", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_reduce_min_kernel_code_long,
+                                      "test_wg_reduce_min_long");
     if (err)
         return -1;
 
@@ -512,7 +518,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_reduce_min_kernel_code_ulong, "test_wg_reduce_min_ulong", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_reduce_min_kernel_code_ulong,
+                                      "test_wg_reduce_min_ulong");
     if (err)
         return -1;
 
diff --git a/test_conformance/workgroups/test_wg_scan_exclusive_add.cpp b/test_conformance/workgroups/test_wg_scan_exclusive_add.cpp
index 07eedc1..e695a16 100644
--- a/test_conformance/workgroups/test_wg_scan_exclusive_add.cpp
+++ b/test_conformance/workgroups/test_wg_scan_exclusive_add.cpp
@@ -1,6 +1,6 @@
 //
 // Copyright (c) 2017 The Khronos Group Inc.
-// 
+//
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
@@ -184,7 +184,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_scan_exclusive_add_kernel_code_int, "test_wg_scan_exclusive_add_int", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_scan_exclusive_add_kernel_code_int,
+                                      "test_wg_scan_exclusive_add_int");
     if (err)
         return -1;
 
@@ -287,7 +289,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_scan_exclusive_add_kernel_code_uint, "test_wg_scan_exclusive_add_uint", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_scan_exclusive_add_kernel_code_uint,
+                                      "test_wg_scan_exclusive_add_uint");
     if (err)
         return -1;
 
@@ -389,7 +393,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_scan_exclusive_add_kernel_code_long, "test_wg_scan_exclusive_add_long", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_scan_exclusive_add_kernel_code_long,
+                                      "test_wg_scan_exclusive_add_long");
     if (err)
         return -1;
 
@@ -492,7 +498,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_scan_exclusive_add_kernel_code_ulong, "test_wg_scan_exclusive_add_ulong", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_scan_exclusive_add_kernel_code_ulong,
+                                      "test_wg_scan_exclusive_add_ulong");
     if (err)
         return -1;
 
diff --git a/test_conformance/workgroups/test_wg_scan_exclusive_max.cpp b/test_conformance/workgroups/test_wg_scan_exclusive_max.cpp
index d20a319..12338b6 100644
--- a/test_conformance/workgroups/test_wg_scan_exclusive_max.cpp
+++ b/test_conformance/workgroups/test_wg_scan_exclusive_max.cpp
@@ -1,6 +1,6 @@
 //
 // Copyright (c) 2017 The Khronos Group Inc.
-// 
+//
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
@@ -176,7 +176,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_scan_exclusive_max_kernel_code_int, "test_wg_scan_exclusive_max_int", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_scan_exclusive_max_kernel_code_int,
+                                      "test_wg_scan_exclusive_max_int");
     if (err)
         return -1;
 
@@ -288,7 +290,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_scan_exclusive_max_kernel_code_uint, "test_wg_scan_exclusive_max_uint", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_scan_exclusive_max_kernel_code_uint,
+                                      "test_wg_scan_exclusive_max_uint");
     if (err)
         return -1;
 
@@ -399,7 +403,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_scan_exclusive_max_kernel_code_long, "test_wg_scan_exclusive_max_long", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_scan_exclusive_max_kernel_code_long,
+                                      "test_wg_scan_exclusive_max_long");
     if (err)
         return -1;
 
@@ -511,7 +517,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_scan_exclusive_max_kernel_code_ulong, "test_wg_scan_exclusive_max_ulong", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_scan_exclusive_max_kernel_code_ulong,
+                                      "test_wg_scan_exclusive_max_ulong");
     if (err)
         return -1;
 
diff --git a/test_conformance/workgroups/test_wg_scan_exclusive_min.cpp b/test_conformance/workgroups/test_wg_scan_exclusive_min.cpp
index eb99796..f4e6bf9 100644
--- a/test_conformance/workgroups/test_wg_scan_exclusive_min.cpp
+++ b/test_conformance/workgroups/test_wg_scan_exclusive_min.cpp
@@ -1,6 +1,6 @@
 //
 // Copyright (c) 2017 The Khronos Group Inc.
-// 
+//
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
@@ -177,7 +177,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_scan_exclusive_min_kernel_code_int, "test_wg_scan_exclusive_min_int", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_scan_exclusive_min_kernel_code_int,
+                                      "test_wg_scan_exclusive_min_int");
     if (err)
         return -1;
 
@@ -289,7 +291,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_scan_exclusive_min_kernel_code_uint, "test_wg_scan_exclusive_min_uint", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_scan_exclusive_min_kernel_code_uint,
+                                      "test_wg_scan_exclusive_min_uint");
     if (err)
         return -1;
 
@@ -400,7 +404,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_scan_exclusive_min_kernel_code_long, "test_wg_scan_exclusive_min_long", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_scan_exclusive_min_kernel_code_long,
+                                      "test_wg_scan_exclusive_min_long");
     if (err)
         return -1;
 
@@ -512,7 +518,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_scan_exclusive_min_kernel_code_ulong, "test_wg_scan_exclusive_min_ulong", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_scan_exclusive_min_kernel_code_ulong,
+                                      "test_wg_scan_exclusive_min_ulong");
     if (err)
         return -1;
 
diff --git a/test_conformance/workgroups/test_wg_scan_inclusive_add.cpp b/test_conformance/workgroups/test_wg_scan_inclusive_add.cpp
index bff0b0f..51c98a4 100644
--- a/test_conformance/workgroups/test_wg_scan_inclusive_add.cpp
+++ b/test_conformance/workgroups/test_wg_scan_inclusive_add.cpp
@@ -1,6 +1,6 @@
 //
 // Copyright (c) 2017 The Khronos Group Inc.
-// 
+//
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
@@ -173,7 +173,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_scan_inclusive_add_kernel_code_int, "test_wg_scan_inclusive_add_int", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_scan_inclusive_add_kernel_code_int,
+                                      "test_wg_scan_inclusive_add_int");
     if (err)
         return -1;
 
@@ -276,7 +278,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_scan_inclusive_add_kernel_code_uint, "test_wg_scan_inclusive_add_uint", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_scan_inclusive_add_kernel_code_uint,
+                                      "test_wg_scan_inclusive_add_uint");
     if (err)
         return -1;
 
@@ -378,7 +382,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_scan_inclusive_add_kernel_code_long, "test_wg_scan_inclusive_add_long", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_scan_inclusive_add_kernel_code_long,
+                                      "test_wg_scan_inclusive_add_long");
     if (err)
         return -1;
 
@@ -481,7 +487,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_scan_inclusive_add_kernel_code_ulong, "test_wg_scan_inclusive_add_ulong", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_scan_inclusive_add_kernel_code_ulong,
+                                      "test_wg_scan_inclusive_add_ulong");
     if (err)
         return -1;
 
diff --git a/test_conformance/workgroups/test_wg_scan_inclusive_max.cpp b/test_conformance/workgroups/test_wg_scan_inclusive_max.cpp
index c2455e9..44ebf80 100644
--- a/test_conformance/workgroups/test_wg_scan_inclusive_max.cpp
+++ b/test_conformance/workgroups/test_wg_scan_inclusive_max.cpp
@@ -1,6 +1,6 @@
 //
 // Copyright (c) 2017 The Khronos Group Inc.
-// 
+//
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
@@ -175,7 +175,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_scan_inclusive_max_kernel_code_int, "test_wg_scan_inclusive_max_int", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_scan_inclusive_max_kernel_code_int,
+                                      "test_wg_scan_inclusive_max_int");
     if (err)
         return -1;
 
@@ -278,7 +280,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_scan_inclusive_max_kernel_code_uint, "test_wg_scan_inclusive_max_uint", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_scan_inclusive_max_kernel_code_uint,
+                                      "test_wg_scan_inclusive_max_uint");
     if (err)
         return -1;
 
@@ -380,7 +384,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_scan_inclusive_max_kernel_code_long, "test_wg_scan_inclusive_max_long", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_scan_inclusive_max_kernel_code_long,
+                                      "test_wg_scan_inclusive_max_long");
     if (err)
         return -1;
 
@@ -483,7 +489,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_scan_inclusive_max_kernel_code_ulong, "test_wg_scan_inclusive_max_ulong", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_scan_inclusive_max_kernel_code_ulong,
+                                      "test_wg_scan_inclusive_max_ulong");
     if (err)
         return -1;
 
diff --git a/test_conformance/workgroups/test_wg_scan_inclusive_min.cpp b/test_conformance/workgroups/test_wg_scan_inclusive_min.cpp
index a73c35a..f2f0578 100644
--- a/test_conformance/workgroups/test_wg_scan_inclusive_min.cpp
+++ b/test_conformance/workgroups/test_wg_scan_inclusive_min.cpp
@@ -1,6 +1,6 @@
 //
 // Copyright (c) 2017 The Khronos Group Inc.
-// 
+//
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
@@ -175,7 +175,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_scan_inclusive_min_kernel_code_int, "test_wg_scan_inclusive_min_int", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_scan_inclusive_min_kernel_code_int,
+                                      "test_wg_scan_inclusive_min_int");
     if (err)
         return -1;
 
@@ -278,7 +280,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_scan_inclusive_min_kernel_code_uint, "test_wg_scan_inclusive_min_uint", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_scan_inclusive_min_kernel_code_uint,
+                                      "test_wg_scan_inclusive_min_uint");
     if (err)
         return -1;
 
@@ -380,7 +384,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_scan_inclusive_min_kernel_code_long, "test_wg_scan_inclusive_min_long", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_scan_inclusive_min_kernel_code_long,
+                                      "test_wg_scan_inclusive_min_long");
     if (err)
         return -1;
 
@@ -483,7 +489,9 @@
     int          i;
     MTdata       d;
 
-    err = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &wg_scan_inclusive_min_kernel_code_ulong, "test_wg_scan_inclusive_min_ulong", "-cl-std=CL2.0" );
+    err = create_single_kernel_helper(context, &program, &kernel, 1,
+                                      &wg_scan_inclusive_min_kernel_code_ulong,
+                                      "test_wg_scan_inclusive_min_ulong");
     if (err)
         return -1;