Skip to content

Commit

Permalink
Version 0.5.0-pre.
Browse files Browse the repository at this point in the history
  • Loading branch information
Galarius committed Sep 19, 2018
1 parent fc6ac67 commit 28e58b1
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 14 deletions.
64 changes: 60 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,65 @@
# OpenCL for Visual Studio Code Change Log

## Version 0.5.0-pre

**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](https://raw.githubusercontent.com/Galarius/vscode-opencl/feature/taskProvider/images/vscode-opencl-clc-2.png)

*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](https://developer.arm.com/products/software-development-tools/graphics-development-tools/mali-offline-compiler) as OpenCL offline compiler:

```json
{
"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
}
}
]
}
```

## Version 0.4.0: August 22, 2018

* Added auto closing pairs (brackets and quotes)
Expand Down Expand Up @@ -32,10 +92,6 @@

## Version 0.1.4: January 2, 2018

`Happy New Year!`

![logo-ny](https://www.dropbox.com/s/yp46odwnkxwxvlq/OpenCL_128x_ny.png?dl=1)

* Fixed: Unsigned types and types with `_t` at the end were not highlighted for some color themes;
* Fixed: `Toggle Line Comment` and `Toggle Block Comment` commands did not work in `*.cl` files.

Expand Down
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# OpenCL for Visual Studio Code

![](images/kernel.png)[![Current Version](https://vsmarketplacebadge.apphb.com/version-short/galarius.vscode-opencl.svg)](https://marketplace.visualstudio.com/items?itemName=galarius.vscode-opencl)
![](https://raw.githubusercontent.com/Galarius/vscode-opencl/feature/taskProvider/images/kernel.png)[![Current Version](https://vsmarketplacebadge.apphb.com/version-short/galarius.vscode-opencl.svg)](https://marketplace.visualstudio.com/items?itemName=galarius.vscode-opencl)
[![Install Count](https://vsmarketplacebadge.apphb.com/installs/galarius.vscode-opencl.svg)](https://marketplace.visualstudio.com/items?itemName=galarius.vscode-opencl)

This extension adds OpenCL C/C++ language support to [VS Code](https://code.visualstudio.com).
Expand All @@ -16,7 +16,8 @@ This extension adds OpenCL C/C++ language support to [VS Code](https://code.visu
* Support for External Code Formatters (e.g. [AStyle](http://astyle.sourceforge.net))
* OpenCL Platforms & Devices Info

[Features Preview](PREVIEW.md) (GIFs)
[Features Preview](https://github.com/Galarius/vscode-opencl/blob/master/PREVIEW.md) (GIFs)


## Prerequisites

Expand Down Expand Up @@ -45,7 +46,7 @@ This extension adds OpenCL C/C++ language support to [VS Code](https://code.visu

Install and open [VS Code](https://code.visualstudio.com). 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](https://github.com/Galarius/vscode-opencl/blob/master/INSTALL.md)). 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](https://software.intel.com/en-us/articles/opencl-drivers) [Windows, Linux] to be installed on the system. For macOS `openclc` should be a part of `OpenCL.framework`. It is possible to customize command and arguments (see [Offline Kernel Compilation](#offline-kernel-compilation) for details).
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](https://software.intel.com/en-us/articles/opencl-drivers) [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 customize command and arguments (see [Offline Kernel Compilation](#offline-kernel-compilation) for details).

## Offline Kernel Compilation

Expand All @@ -55,29 +56,29 @@ This extension provides predefined set of VS Code tasks for kernel compilation u

1. Press `Tasks > Run Task...` (fig. 1)

![](images/vscode-opencl-clc-1.png)
![fig 1](https://raw.githubusercontent.com/Galarius/vscode-opencl/feature/taskProvider/images/vscode-opencl-clc-1.png)

*Figure 1. Tasks menu.*

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

![](images/vscode-opencl-clc-2.png)
![fig 2](https://raw.githubusercontent.com/Galarius/vscode-opencl/feature/taskProvider/images/vscode-opencl-clc-2.png)

*Figure 2. Predefined Tasks for `ioc64` compiler.*

### Configure Default Build Task

Press `Tasks > Configure Default Build Task...`. Select one of the predefined `opencl` tasks. File `tasks.json` will be created (or extended) with configuration of the selected task (fig. 3). Press `Ctrl+Shift+B` to call it with the shortcut.

![](images/vscode-opencl-clc-3.png)
![fig 3](https://raw.githubusercontent.com/Galarius/vscode-opencl/feature/taskProvider/images/vscode-opencl-clc-3.png)

*Figure 3. Default Build Task Configuration.*

### 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/warnings so messages could be displayed in `Problems` view.
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](https://developer.arm.com/products/software-development-tools/graphics-development-tools/mali-offline-compiler) as OpenCL offline compiler:

Expand Down Expand Up @@ -125,7 +126,7 @@ ERROR: <source>:56:25: error: used type 'float' where floating point type is not
~~~~~~~~~ ^
```

Customized task can also be bound to a custom shortcut (See [Binding keyboard shortcuts to tasks](https://code.visualstudio.com/Docs/editor/tasks#_binding-keyboard-shortcuts-to-tasks)).
Customized tasks can also be bound to a custom shortcuts (See [Binding keyboard shortcuts to tasks](https://code.visualstudio.com/Docs/editor/tasks#_binding-keyboard-shortcuts-to-tasks)).

## Formatting Configuration

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-opencl",
"displayName": "OpenCL",
"description": "OpenCL for Visual Studio Code",
"version": "0.4.0",
"version": "0.5.0-pre",
"publisher": "galarius",
"icon": "images/OpenCL_128x.png",
"author": {
Expand Down

0 comments on commit 28e58b1

Please sign in to comment.