Skip to content

Galarius/opencl-language-server

Repository files navigation

OpenCL Language Server

Build status

Supported Capabilities:

Prerequisites

OpenCL Language Server requires OpenCL Runtime [Intel, NVidia, AMD]

Parameters

You can configure diagnostics with json-rpc request during the intitialization:

{
    "jsonrpc": "2.0",
    "id": 0,
    "method": "initialize",
    "params": {
        "initializationOptions": {
            "configuration": {
                "buildOptions": [],
                "deviceID": 0,
                "maxNumberOfProblems": 127
            }
        }
    }
}

Options

buildOptions Options to be utilized when building the program. The list of supported build options.
deviceID Device ID or 0 (automatic selection) of the OpenCL device to be used for diagnostics.
Run ./opencl-language-server clinfo to get information about available OpenCL devices including identifiers.
maxNumberOfProblems Controls the maximum number of errors parsed by the language server.

CLI

The language server communicates with a client using JSON-RPC protocol.
Optionally, you can use subcommands to access functionality without starting the server.

.build/Debug/opencl-language-server [OPTIONS] [SUBCOMMANDS]


OPTIONS:
  -h,     --help              Print this help message and exit
  -e,     --enable-file-logging 
                              Enable file logging
  -f,     --log-file TEXT [opencl-language-server.log]  
                              Path to log file
  -l,     --log-level ENUM:{0,1,2,3,4,5} [0]  
                              Log level
          --stdio             Use stdio transport channel for the language server
  -v,     --version           Show version

SUBCOMMANDS:
  clinfo                      Show information about available OpenCL devices
  diagnostics                 Provides an OpenCL kernel diagnostics
  completion                  Provides an OpenCL kernel completions
  definition                  Resolves the definition location of a symbol at a given text
                              document position
  typedef                     Resolves the type definition location of a symbol at a given text 
                              document position
  declaration                 Resolves the declaration location of a symbol at a given text 
                              document position

Clients

vscode-opencl - OpenCL for Visual Studio Code

Development

See development notes.

License

MIT License

Disclaimer

OpenCL is the trademark of Apple Inc.

About

Provides an OpenCL kernel diagnostics and completion

Topics

Resources

License

Stars

13 stars

Watchers

2 watching

Forks

Sponsor this project

  •  

Packages

 
 
 

Contributors