Skip to content

0.5.0

Compare
Choose a tag to compare
@Galarius Galarius released this 19 Sep 16:20
· 159 commits to master since this release

Version 0.5.0: September 19, 2018

Offline OpenCL Kernel Compilation

The extension provides predefined set of VS Code tasks for kernel compilation using ioc32/ioc64 or openclc (on macOS).

Run Predefined Task

  1. Press Tasks > Run Task...

  2. Press Run Task... and select one of the predefined opencl tasks for file kernel.cl. The set of tasks (fig. 1) is generated for each kernel file that was found in the current workspace.

    fig 1

    Figure 1. Predefined Tasks for ioc64 compiler.

Customize Build Task

Press Tasks > Configure Tasks.... Select one of the predefined opencl tasks. File tasks.json will be created (or extended) with configuration of the selected task.

You can override command and args fields to use another compiler. Field label is a displayed task name, problemMatcher should be overriten to match a compiler's errors and warnings so messages could be displayed in Problems view.

An example of modified tasks.json configuration file for using AMD Mali as OpenCL offline compiler:

{
    "version": "2.0.0",
    "tasks": [
        {
            "type": "shell",
            "label": "opencl: malisc compile",
            "task": "compile",
            "command": "malisc",
            "args": [
                "--name kernelName",
                "kernel.cl"
            ],
            "problemMatcher": [
                {
                    "owner": "opencl",
                    "fileLocation": ["relative", "${workspaceFolder}"],
                    "pattern": {
                        "regexp": "^(ERROR|WARNING): <(.*)>:(\\d+):(\\d+): (error|warning): (.*)$",
                        "file": 2,
                        "line": 3,
                        "column": 4,
                        "severity": 1,
                        "message": 6
                    }
                }
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}