| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 | /* * This file is part of the StarPU Handbook. * Copyright (C) 2009--2011  Universit@'e de Bordeaux * Copyright (C) 2010, 2011, 2012, 2013, 2016  CNRS * Copyright (C) 2011, 2012 INRIA * See the file version.doxy for copying conditions. *//*! \page SOCLOpenclExtensions SOCL OpenCL ExtensionsSOCL is an OpenCL implementation based on StarPU. It gives a unified access toevery available OpenCL device: applications can now share entities such asEvents, Contexts or Command Queues between several OpenCL implementations.In addition, command queues that are created without specifying a device provideautomatic scheduling of the submitted commands on OpenCL devices contained inthe context to which the command queue is attached.Setting the <c>CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE</c> flag on a commandqueue also allows StarPU to reorder kernels queued on the queue, otherwise theywould be serialized and several command queues would be necessary to see kernelsdispatched on the various OpenCL devices.Note: this is still an area under development and subject to change.When compiling StarPU, SOCL will be enabled if a valid OpenCLimplementation is found on your system. To be able to run the SOCLtest suite, the environment variable \ref SOCL_OCL_LIB_OPENCL needs tobe defined to the location of the file <c>libOpenCL.so</c> of the OCLICD implementation. You should for example add the following line inyour file <c>.bashrc</c>\verbatimexport SOCL_OCL_LIB_OPENCL=/usr/lib/x86_64-linux-gnu/libOpenCL.so\endverbatimYou can then run the test suite in the directory <c>socl/examples</c>.\verbatim$ make check...PASS: basic/basicPASS: testmap/testmapPASS: clinfo/clinfoPASS: matmul/matmulPASS: mansched/mansched==================All 5 tests passed==================\endverbatimThe environment variable \ref OCL_ICD_VENDORS has to point to the directorywhere the socl.icd ICD file is installed. When compiling StarPU, the filesare in the directory <c>socl/vendors</c>. With an installed version ofStarPU, the files are installed in the directory<c>$prefix/share/starpu/opencl/vendors</c>.To run the tests by hand, you have to call for example,\verbatim$ LD_PRELOAD=$SOCL_OCL_LIB_OPENCL OCL_ICD_VENDORS=socl/vendors/ socl/examples/clinfo/clinfoNumber of platforms:	2  Plaform Profile:	FULL_PROFILE  Plaform Version:	OpenCL 1.1 CUDA 4.2.1  Plaform Name:		NVIDIA CUDA  Plaform Vendor:	NVIDIA Corporation  Plaform Extensions:	cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll   Plaform Profile:	FULL_PROFILE  Plaform Version:	OpenCL 1.0 SOCL Edition (0.1.0)  Plaform Name:		SOCL Platform  Plaform Vendor:	INRIA  Plaform Extensions:	cl_khr_icd....$\endverbatimTo enable the use of CPU cores via OpenCL, one can set the \ref STARPU_OPENCL_ON_CPUSenvironment variable to 1 and \ref STARPU_NCPUS to 0 (to avoid using CPUs both viathe OpenCL driver and the normal CPU driver).*/
 |