Please see the new portal for OpenCL™ deployments prior to accessing this legacy content. Runtimes and OpenCL™ tool support for downloads listed on this article are deprecated in favor of newer products.

Installation has two parts:

Installing OpenCL on Mac¶ While the OpenCL framework is available by default on most modern Macs, the C header “cl.hpp” or “cl2.hpp” is usually not. One option for building for OpenCL is to download this header file and include it in include/OpenCL (as “cl.hpp”). The OpenCL C header can be found at the Khronos OpenCL registry. The GPGPU frameworks you have access to depend on the GPU you have in your Mac. Nvidia cards support CUDA and OpenCL, AMD cards support OpenCL and Metal. 2015 Article, what’s new? You may remember, we first published an article on this very topic back in 2015, some of it still stands, but a lot has changed and it’s definitely time for an. What Operating System are you running on the MacBook Pro? If it is OS X, it comes preinstalled with an OpenCL driver. Intel does not provide the driver for Mac, Apple does. If you think you are missing an OpenCL driver on your Mac, please contact Apple Developer Forum. The Mac mini has a very feeble video card and it cannot be upgraded! According to this Mac computers that use OpenCL and OpenGL graphics - Apple Support the version of OpenCL for the Mac mini is probably 1.2 but it depends on how old your Mac mini is.

  1. Intel® SDK for OpenCL™ Applications Package
  2. Driver and library(runtime) packages

The SDK includes components to develop applications: IDE integration, offline compiler, debugger, and other tools. Usually on a development machine the driver/runtime package is also installed for testing. For deployment you can pick the package that best matches the target environment.

The illustration below shows some example install configurations.

SDK Packages

Please note: A GPU/CPU driver package or CPU-only runtime package is required in addition to the SDK to execute applications

Standalone:

  • Intel® SDK for OpenCL™ Applications 2017 R2 for Windows* (64-bit) (assumes Windows* graphics driver installed)

Suite: (also includes driver and Intel® Media SDK)

Driver/Runtime Packages Available

GPU/CPU Driver Packages

  • (Also automatically shipped with Windows graphics drivers)

CPU-only Runtime Packages

Intel® SDK for OpenCL™ Applications 2017 R2 for Linux (64-bit)

This is a standalone release for customers who do not need integration with the Intel® Media Server Studio. It provides components to develop OpenCL applications for Intel processors.

Visit https://software.intel.com/en-us/intel-opencl to download the version for your platform. For details check out the Release Notes.

Intel® SDK for OpenCL™ Applications 2017 R2 for Windows* (64-bit)

This is a standalone release for customers who do not need integration with the Intel® Media Server Studio. The standard Windows graphics driver packages contains the driver and runtime library components necessary to run OpenCL applications. This package provides components for OpenCL development.

Visit https://software.intel.com/en-us/intel-opencl to download the version for your platform. For details check out the Release Notes.

OpenCL™ 2.0 GPU/CPU driver package for Linux* (64-bit)

The intel-opencl-r5.0 (SRB5.0) Linux driver package enables OpenCL 1.2 or 2.0 on the GPU/CPU for the following Intel® processors:

  • Intel® 5th, 6th or 7th generation Core™ processor
  • Intel® Celeron® Processor J3000 Series with Intel® HD Graphics 500 (J3455, J3355), Intel® Pentium® Processor J4000 Series with Intel® HD Graphics 505 (J4205), Intel® Celeron® Processor N3000 Series with Intel® HD Graphics 500 (N3350, N3450), Intel® Pentium Processor N4000 Series with Intel® HD Graphics 505 (N4200)
  • Intel® Xeon® v4, or Intel® Xeon® v5 Processors with Intel® Graphics Technology (if enabled by OEM in BIOS and motherboard)

Installation Instructions. Scripts to automate install and additional install documentation available here.

Intel validates the intel-opencl-r5.0 driver on CentOS 7.2 and 7.3 when running the following 64-bit kernels:

Opencl App Mac

  • Linux 4.7 kernel patched for OpenCL
  • Linux 4.4 kernel patched for Intel® Media Server Studio 2017 R3

Although Intel validates and provides technical support only for the above Linux kernels on CentOS 7.2 and 7.3, other distributions may be adapted by utilizing our generic operating system installation steps as well as MSS 2017 R3 installation steps.

In addition: Intel also validates Ubuntu 16.04.2 when running the following 64-bit kernel:

•Ubuntu 16.04.2 default 4.8 kernel

Ubuntu 16.04 with the default kernel works fairly well but some core features (i.e. device enqueue, SVM memory coherency, VTune support) won’t work without kernel patches. This configuration has been minimally validated to prove that it is viable to suggest for experimental use, but it is not fully supported or certified.

Supported OpenCL devices:

  • Intel® graphics (GPU)
  • CPU
Software

For detailed information please see the driver package Release Notes.

Previous Linux driver packages:

Intel intel-opencl-r4.1 (SRB4.1) Linux driver packageInstallation instructionsRelease Notes
Intel intel-opencl-r4.0 (SRB4) Linux driver packageInstallation instructionsRelease Notes
SRB3.1 Linux driver packageInstallation instructionsRelease Notes

For Linux drivers covering earlier platforms such as 4th generation Intel Core processor please see the versions of Media Server Studio in the Driver Support Matrix.

OpenCL™ Driver for Iris™ graphics and Intel® HD Graphics for Windows* OS (64-bit and 32-bit)

The standard Intel graphics drivers for Windows* include components needed to run OpenCL* and Intel® Media SDK applications on processors with Intel® Iris™ Graphics or Intel® HD Graphics on Windows* OS.

Macbook Pro Opencl

You can use the Intel Driver Update Utility to automatically detect and update your drivers and software. Using the latest available graphics driver for your processor is usually recommended.

Supported OpenCL devices:

  • Intel graphics (GPU)
  • CPU

For the full list of Intel® Architecture processors with OpenCL support on Intel Graphics under Windows*, refer to the Release Notes.

Deprecated Releases

Machine learning opencl

Note: These releases are no longer maintained or supported by Intel®.

OpenCL™ Runtime for Intel® Core™ and Intel® Xeon® Processors

This runtime software package adds OpenCL CPU device support on systems with Intel Core and Intel Xeon processors.

Supported OpenCL devices:

  • CPU

12 Aug 2019: This listing is posted for archival purposes only. Version 16.1.2 and earlier runtimes are deprecated and unavailable. Please consider using version 18.1 or newer on supported platforms.

16.1.2

16.1.1

16.1

15.1:

For the full list of supported Intel® architecture processors, refer to the OpenCL™ Runtime Release Notes.

OpenCL™ Runtime 14.2 for Intel® CPU and Intel® Xeon Phi™ Coprocessors

This runtime software package adds OpenCL support to Intel Core and Xeon processors and Intel Xeon Phi coprocessors.

Supported OpenCL devices:

  • Intel Xeon Phi coprocessor
  • CPU

Available Runtimes

For the full list of supported Intel architecture processors, refer to the OpenCL™ Runtime Release Notes.

Spin had a great blog post a few days ago on Mean Shift Clustering. It’s a powerful algorithm with a ton of applications, but an Achille’s heel:

The most glaring disadvantage is its slowness. …it can take a long time to execute. The one silver lining is that, while it is slow, it is also embarrassingly parallelizable.

How many times has that happened to you? Your code solves a small problem perfectly, but it just isn’t fast enough for the real world. Sometimes the solution can be to just find a bigger computer. Luckily almost every computer has a bigger computer inside it: the graphics hardware. Where your computer’s CPU might have 8 cores, its GPU can have hundreds. OpenCL is a standard framework that gives you access to all that power.

Mac

The sample I’m going to show was built on Mac OS 10.10 running Xcode 6. Apple has done a nice job integrating OpenCL into their environment while preserving the data types and language features defined in OpenCL. Hopefully Windows and Linux will be in similar good situations. Much of it will come down to your graphics hardware vendor support for OpenCL–debugging especially may be rough. I’ve found online materials and Apple’s documentation to be usable, but a good book really helped. “OpenCL Programming Guide” was a nice introduction and also included useful summaries of data types and built-in functions that really helped.

Opencl 1.2 Mac Free Download - SourceForge

I started by creating a Mac OS X command line app in Xcode. Then I added the OpenCL framework. The OpenCL documentation on Apple’s developer site is brief and worth reading.

Apple’s OpenCL can use a grand central dispatch queue on either the GPU or the CPU. Be very careful running OpenCL code on a CPU queue because it’s a lot less efficient than the GPU for running massively parallel code. My machine was completely hammered at 800% utilization with the fans at max. Running on the GPU queue in comparison has machine utilization at less than 100% with the fan off.

That said, there’s one good reason to run on the CPU during development: your GPU has no memory protection. A bug in the code running on the GPU can be very difficult to find. I strongly recommend a disciplined approach going from verification of the algorithm in plain C code, followed by porting to OpenCL on the CPU and finally to the GPU.

Which brings us to the code that actually runs on the GPU:

That looks like C code, but it’s really a “kernel” that is compiled by a separate OpenCL toolchain provided by your graphics hardware vendor. The language has nice support for small vectors (float2 for example is a 2D point) and lots of built-in and optimized math routines. The main difficulty in writing OpenCL code is getting the data in and out of the GPU.

You have two copies of the data that the kernel will work on: one is accessible by the CPU and the other by the GPU (called the “device” by OpenCL). The CPU is responsible for preparing the data, loading it from disk, sending it to the GPU, etc. The copy of the data in the GPU is only for use by the GPU–it’s not in the same memory as your CPU uses.

Here are the data buffers that the CPU uses:

Here are the associated data buffers that the GPU uses:

Cached

At first I was confused as why they were not properly typed like the CPU data buffers, but then I realized that’s sort of a feature to help prevent you from accidentally using those buffers on the CPU. The only thing you can do with them is pass them to OpenCL functions.

AMD OpenCL™ 2.0 Driver | Community

Everything is now setup and ready to schedule the kernel on the GPU. This code fits into Apple’s normal multi-threading approach quite well. It will look much different on Windows or Linux, but I’m not so worried about portability that this glue code bothers me.

Opencl For Mac Download

If you’re interested in building the code yourself, it’s on github under an MIT license.