@@ -354,36 +354,10 @@ int main(int argc, char* argv[])
354
354
context , 1 , (const char * * )& kernel , & program_size , & error ),
355
355
error , ker );
356
356
357
- // The Khronos extension showcased requires OpenCL 3.0 version.
358
- // Get number of versions supported.
359
- size_t versions_size = 0 ;
360
- OCLERROR_RET (clGetDeviceInfo (cl_device , CL_DEVICE_OPENCL_C_ALL_VERSIONS , 0 ,
361
- NULL , & versions_size ),
362
- error , prg );
363
- size_t versions_count = versions_size / sizeof (cl_name_version );
364
-
365
- // Get and check versions.
366
- cl_name_version * dev_versions = (cl_name_version * )malloc (versions_size );
367
- OCLERROR_RET (clGetDeviceInfo (cl_device , CL_DEVICE_OPENCL_C_ALL_VERSIONS ,
368
- versions_size , dev_versions , NULL ),
369
- error , prg );
370
- char compiler_options [1024 ] = "" ;
371
- for (cl_uint i = 0 ; i < versions_count ; ++ i )
372
- {
373
- if (opencl_version_is_major (& dev_versions [i ], 3 ))
374
- {
375
- strcat (compiler_options , "-cl-std=CL3.0 " );
376
- }
377
- }
378
-
379
- if (compiler_options [0 ] == '\0' )
380
- {
381
- fprintf (stderr , "\nError: OpenCL version must be at least 3.0\n" );
382
- exit (EXIT_FAILURE );
383
- }
384
-
385
- OCLERROR_RET (cl_util_build_program (program , cl_device , compiler_options ),
386
- error , prg );
357
+ // Build OpenCL executable.
358
+ OCLERROR_RET (
359
+ cl_util_build_program (program , cl_device , NULL /*compiler_options*/ ),
360
+ error , prg );
387
361
388
362
// Query maximum workgroup size (WGS) supported based on private mem
389
363
// (registers) constraints.
0 commit comments