Install and open VS Code. Press Ctrl+Shift+X or Cmd+Shift+X to open the Extensions pane. Find and install the OpenCL extension. You can also install the extension from the Marketplace (Installation Guide). Open any .cl or .ocl file in VS Code to activate syntax highlighting, auto-completion, code snippets, API reference tooltips and document formatting for OpenCL kernel files. Open any file associated with C or C++ language in VS Code to activate code snippets for OpenCL host device functions.
The extension uses a set of tools to provide offline compilation and OpenCL devices/platforms information. By default ioc32/ioc64 offline compiler is used on Linux and Windows and openclc is used on macOS. This requires Intel OpenCL SDK [Windows, Linux] to be installed on the system. For macOS openclc should be a part of OpenCL.framework (shipped with XCode). It is possible to use another offline OpenCL compiler (see Customize Build Task for details).