(On macOS openclc is preinstalled at /System/Library/Frameworks/OpenCL.framework/Libraries/openclc)
Kernel Formatting feature requires clang-format. By default, the extension searches for the utility inside ms-vscode.cpptools extension.
Install the extension following instructions in INSTALL.md.
Open any .cl or .ocl file, the extension will download the compatible version of OpenCL Language Server.
If activation succeeds, syntax highlighting is enabled, the OpenCL Devices explorer view appears, and no error notification is shown from the OpenCL Language Server. See TROUBLESHOOTING.md if extension activation failed.
Configuration
Setting
Description
Default
OpenCL.server.enable
Enables the OpenCL Language Server. Disabling this turns off Kernel Diagnostics, Code Completion, and OpenCL Devices Information.
true
OpenCL.server.path
Path to a local OpenCL language server binary. When set, the extension skips automatic download and uses this binary directly. The binary must be compatible with the extension version. Use the OpenCL: Register Local Language Server command to set this safely - the extension registers the binary to perform integrity checks later.
""
Kernel Diagnostics
OpenCL.server.buildOptions
Build options passed when building the program. See the list of supported options.
[]
OpenCL.server.deviceID
Device ID of the OpenCL device used for diagnostics, or 0 for automatic selection. Use the OpenCL: Select command or the OpenCL Devices explorer to set this.
0
OpenCL.server.maxNumberOfProblems
Maximum number of problems reported by the language server.
100
opencl.trace.server
Traces the communication between VS Code and the OpenCL language server. Useful for debugging.
"off"
OpenCL Devices Information
OpenCL.explorer.localizedProperties
Display localized property names in the explorer view. Disable to show raw OpenCL property names instead.
true
Kernel Formatting
OpenCL.formatting.name
Formatting utility to use. Defaults to clang-format from the ms-vscode.cpptools extension. Specify an absolute path to use a different version.
"clang-format"
Commands
Command
Description
OpenCL: Info
Opens a new tab with information about all available OpenCL devices.
OpenCL: Select
Select the OpenCL device to use for kernel diagnostics.
OpenCL: Toggle View
Toggle the explorer view between localized and raw property names.
OpenCL: Register Local Language Server
Register a user-specified local binary as the OpenCL language server. Use this when GitHub.com is unavailable or a prebuilt binary is missing for your platform.
OpenCL: Unregister Local Language Server
Remove a previously registered local binary. The extension will revert to automatically downloading the language server from GitHub.com.
Offline Kernel Compilation
This extension provides predefined set of VS Code tasks for kernel compilation using ioc32/ioc64 or openclc (on macOS).