socl_opencl_extensions.doxy 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * This file is part of the StarPU Handbook.
  3. * Copyright (C) 2009--2011 Universit@'e de Bordeaux 1
  4. * Copyright (C) 2010, 2011, 2012, 2013 Centre National de la Recherche Scientifique
  5. * Copyright (C) 2011, 2012 Institut National de Recherche en Informatique et Automatique
  6. * See the file version.doxy for copying conditions.
  7. */
  8. /*! \page SOCLOpenclExtensions SOCL OpenCL Extensions
  9. SOCL is an OpenCL implementation based on StarPU. It gives a unified access to
  10. every available OpenCL device: applications can now share entities such as
  11. Events, Contexts or Command Queues between several OpenCL implementations.
  12. In addition, command queues that are created without specifying a device provide
  13. automatic scheduling of the submitted commands on OpenCL devices contained in
  14. the context to which the command queue is attached.
  15. Note: this is still an area under development and subject to change.
  16. When compiling StarPU, SOCL will be enabled if a valid OpenCL
  17. implementation is found on your system. To be able to run the SOCL
  18. test suite, the environment variable \ref SOCL_OCL_LIB_OPENCL needs to
  19. be defined to the location of the file <c>libOpenCL.so</c> of the OCL
  20. ICD implementation. You should for example add the following line in
  21. your file <c>.bashrc</c>
  22. \verbatim
  23. export SOCL_OCL_LIB_OPENCL=/usr/lib/x86_64-linux-gnu/libOpenCL.so
  24. \endverbatim
  25. You can then run the test suite in the directory <c>socl/examples</c>.
  26. \verbatim
  27. $ make check
  28. ...
  29. PASS: basic/basic
  30. PASS: testmap/testmap
  31. PASS: clinfo/clinfo
  32. PASS: matmul/matmul
  33. PASS: mansched/mansched
  34. ==================
  35. All 5 tests passed
  36. ==================
  37. \endverbatim
  38. The environment variable \ref OCL_ICD_VENDORS has to point to the directory
  39. where the ICD files are installed. When compiling StarPU, the files
  40. are in the directory <c>socl/vendors</c>. With an installed version of
  41. StarPU, the files are installed in the directory
  42. <c>$prefix/share/starpu/opencl/vendors</c>.
  43. To run the tests by hand, you have to call for example,
  44. \verbatim
  45. $ LD_PRELOAD=$SOCL_OCL_LIB_OPENCL OCL_ICD_VENDORS=socl/vendors/ socl/examples/clinfo/clinfo
  46. Number of platforms: 2
  47. Plaform Profile: FULL_PROFILE
  48. Plaform Version: OpenCL 1.1 CUDA 4.2.1
  49. Plaform Name: NVIDIA CUDA
  50. Plaform Vendor: NVIDIA Corporation
  51. 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
  52. Plaform Profile: FULL_PROFILE
  53. Plaform Version: OpenCL 1.0 SOCL Edition (0.1.0)
  54. Plaform Name: SOCL Platform
  55. Plaform Vendor: INRIA
  56. Plaform Extensions: cl_khr_icd
  57. ....
  58. $
  59. \endverbatim
  60. */