Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright 2025 The Khronos Group, Inc.
# SPDX-License-Identifier: Apache-2.0

# Github CI file for the OpenCL-Guide
# This file is based heavily on the same file for the Vulkan-Guide.

name: CI

# Controls when the action will run.
on:
# Triggers the workflow on push or manual dispatch
push:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'

- name: awesome_bot
run: |
gem install awesome_bot
awesome_bot --allow-dupe chapters/*.md --white-list https://www.youtube.com/,https://github.com/KhronosGroup,https://github.com/microsoft
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion chapters/additional_resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ There are many additional resources to help you find our more about OpenCL and t

The remaining sections of this User Guide will show you how to install the Khronos OpenCL SDK on your machine and start programming using the provided samples as a starting point.

The definitive versions of all OpenCL core specifications and extensions are on the [OpenCL Registry](https://www.khronos.org/registry/OpenCL/).
The definitive versions of all OpenCL core specifications and extensions are on the [OpenCL Registry](https://registry.khronos.org/OpenCL/).

Khronos-supplied OpenCL resources and other key tools are curated by the OpenCL Working Group on the [OpenCL Resource Guide](https://www.khronos.org/opencl/resources).

Expand Down
2 changes: 1 addition & 1 deletion chapters/cpp_for_opencl.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ The bugs and implementation of new features in clang can be tracked via the [Ope

### Online compilation

Kernels written in C++ for OpenCL can be compiled online on devices that support the [cl_ext_cxx_for_opencl](https://www.khronos.org/registry/OpenCL/extensions/ext/cl_ext_cxx_for_opencl.html) extension.
Kernels written in C++ for OpenCL can be compiled online on devices that support the [cl_ext_cxx_for_opencl](https://registry.khronos.org/OpenCL/extensions/ext/cl_ext_cxx_for_opencl.html) extension.

## Libraries

Expand Down
4 changes: 2 additions & 2 deletions chapters/getting_started_windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Steps will be provided to obtain a minimal and productive environment.

## Installation

In this guide we'll be using latest (at the time of writing) Windows 10. Installation for the most part will happen via [winget](https://docs.microsoft.com/en-us/windows/package-manager/winget/), the 1st party command-line tool for installing software on Windows. If for whatever reason you do not have the `winget` client on your PATH, it is bundled with the [App Installer](https://apps.microsoft.com/store/detail/9NBLGGH4NNS1?hl=en-us&gl=US) package in the Microsoft Store. Updating this component should also install the command-line tool.
In this guide we'll be using latest (at the time of writing) Windows 10. Installation for the most part will happen via [winget](https://learn.microsoft.com/en-us/windows/package-manager/winget/), the 1st party command-line tool for installing software on Windows. If for whatever reason you do not have the `winget` client on your PATH, it is bundled with the [App Installer](https://apps.microsoft.com/detail/9nblggh4nns1?hl=en-US&gl=US) package in the Microsoft Store. Updating this component should also install the command-line tool.

_(NOTE: installation commands if not issued from a shell with Administrator privileges, UAC prompts will pop up. If you are in an automated scenario where that's an issue, make sure to work in such a shell.)_

Expand All @@ -36,7 +36,7 @@ winget install "Visual Studio Build Tools 2022"

#### Command-line component selection

In automated scenarios with no GUI available, please consult the [VS docs](https://docs.microsoft.com/en-us/visualstudio/install/command-line-parameter-examples?view=vs-2022) on specifying the required workloads. A minimal configuration which may be imported using the GUI or specfied on the command-line is as:
In automated scenarios with no GUI available, please consult the [VS docs](https://learn.microsoft.com/en-us/visualstudio/install/command-line-parameter-examples?view=vs-2022) on specifying the required workloads. A minimal configuration which may be imported using the GUI or specfied on the command-line is as:

```powershell
& "C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe" install --passive --norestart --productId Microsoft.VisualStudio.Product.BuildTools --channelId VisualStudio.17.Release --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.VC.Redist.14.Latest
Expand Down
2 changes: 1 addition & 1 deletion chapters/how_does_opencl_compare.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ SYCL and OpenVX implementations can be accelerated over lower level Khronos APIs

[Vulkan](https://www.vulkan.org/) is a widely used new generation GPU API that can accelerate compute operations on any compatible GPU using compute shaders (shaders are the graphics equivalent of OpenCL's kernels), as well as rendering 3D graphics. When comparing OpenCL and GPU APIs such as Vulkan, some developers that are just interested in compute find that OpenCL provides a more straightforward programming model, a lighter weight runtime, more language flexibility compared to graphics shading languages - for example OpenCL C has pointers - and more rigorously defined numerical precision for math operations that can be critical for many applications. And of course, Vulkan can only be used to program GPUs, whereas OpenCL can be used to program heterogeneous accelerators.

Vulkan and many implementations of OpenCL use Khronos’ [SPIR-V](https://www.khronos.org/spir/) standard as a programming language intermediate representation that enables significant language compiler tooling flexibility.
Vulkan and many implementations of OpenCL use Khronos’ [SPIR-V](https://www.khronos.org/spirv/) standard as a programming language intermediate representation that enables significant language compiler tooling flexibility.

2 changes: 1 addition & 1 deletion chapters/how_does_opencl_work.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ and executed across the available parallel processors is called *OpenCL C*.
OpenCL C is based on C99 and is defined as part of the OpenCL specification.
Kernels written in other programming languages may be executed using OpenCL by
compiling to an intermediate program representation, such as
[SPIR-V](https://www.khronos.org/spir/).
[SPIR-V](https://www.khronos.org/spirv/).

OpenCL is a low-level programming framework so the programmer has direct,
explicit control over where and when kernels are run, how the memory they use is
Expand Down
2 changes: 1 addition & 1 deletion chapters/programming_opencl_kernels.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ There are two offline compilation approaches:
<br> <br>
</p>

Early OpenCL implementations primarily used proprietary binary formats and caching of driver-compiled binaries to achieve offline compilation. However, the binaries created by the compiler in a specific device driver are not portable to other devices, and so applications using cached binaries lost the portbility to any device that is possible through online compilation of OpenCL C. To solve this portability problem, and to enable a richer language and compiler ecosystem, Khronos has defined a cross-vendor, portable intermediate program representation called [SPIR-V](https://www.khronos.org/spir/). An increasing number of OpenCL implementations are supporting ingestion of offline-compiled kernel programs in the SPIR-V format.
Early OpenCL implementations primarily used proprietary binary formats and caching of driver-compiled binaries to achieve offline compilation. However, the binaries created by the compiler in a specific device driver are not portable to other devices, and so applications using cached binaries lost the portbility to any device that is possible through online compilation of OpenCL C. To solve this portability problem, and to enable a richer language and compiler ecosystem, Khronos has defined a cross-vendor, portable intermediate program representation called [SPIR-V](https://www.khronos.org/spirv/). An increasing number of OpenCL implementations are supporting ingestion of offline-compiled kernel programs in the SPIR-V format.

SPIR-V enables independent innovation by the compiler and silicon communities. Compiler front ends that generate SPIR-V kernels that can be ingested and executed by any OpenCL driver that understands the SPIR-V format. For example the [C++ for OpenCL](cpp_for_opencl.md) open source front-end and compilers for [SYCL](https://www.khronos.org/sycl/) can generate SPIR-V code. Both languages bring C++ functionality to programming OpenCL. While C++ for OpenCL allows using C++ features in the traditional OpenCL kernel code, SYCL provides single-source C++ solution both for the host code and the kernel code. There is also ongoing work on providing SPIR-V support in non C/C++-based languages e.g. [Julia](https://github.com/JuliaGPU/GPUCompiler.jl).

Expand Down