Skip to content
Merged
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
10 changes: 5 additions & 5 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ name: "CodeQL"

on:
push:
branches: [ "main" ]
branches: [ "ocl-open-210" ]
pull_request:
branches: [ "main" ]
branches: [ "ocl-open-210" ]

permissions:
contents: read

env:
LLVM_VERSION: 21
LLVM_VERSION_MINOR: 0
LLVM_VERSION_MINOR: 1

jobs:
analyze:
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
run: |
curl -L "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add -
curl -L "https://packages.lunarg.com/lunarg-signing-key-pub.asc" | sudo apt-key add -
echo "deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy main" | sudo tee -a /etc/apt/sources.list
echo "deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-21 main" | sudo tee -a /etc/apt/sources.list
echo "deb https://packages.lunarg.com/vulkan jammy main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get -yq --no-install-suggests --no-install-recommends install \
Expand All @@ -64,7 +64,7 @@ jobs:
with:
repository: KhronosGroup/SPIRV-LLVM-Translator
path: SPIRV-LLVM-Translator
ref: main
ref: llvm_release_210

- name: Build SPIRV-LLVM-Translator
run: |
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/on-push-verification-in-tree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ permissions:
on:
push:
branches:
- main
- ocl-open-*
- ocl-open-210
pull_request:
branches:
- main
- ocl-open-*
- ocl-open-210
types:
- opened
- reopened
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/on-push-verification-out-of-tree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ permissions:

env:
LLVM_VERSION: 21
LLVM_VERSION_MINOR: 0
LLVM_VERSION_MINOR: 1

on:
push:
branches:
- main
- ocl-open-210
pull_request:
branches:
- main
- ocl-open-210
types:
- opened
- reopened
Expand All @@ -38,7 +38,7 @@ jobs:
run: |
curl -L "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add -
curl -L "https://packages.lunarg.com/lunarg-signing-key-pub.asc" | sudo apt-key add -
echo "deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy main" | sudo tee -a /etc/apt/sources.list
echo "deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-21 main" | sudo tee -a /etc/apt/sources.list
echo "deb https://packages.lunarg.com/vulkan jammy main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get -yq --no-install-suggests --no-install-recommends install \
Expand All @@ -58,7 +58,7 @@ jobs:
with:
repository: KhronosGroup/SPIRV-LLVM-Translator
path: SPIRV-LLVM-Translator
ref: main
ref: llvm_release_210

- name: Build SPIRV-LLVM-Translator
run: |
Expand Down
13 changes: 9 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
cmake_minimum_required(VERSION 3.13.4)

if(NOT DEFINED BASE_LLVM_VERSION)
set(BASE_LLVM_VERSION 21.1)
endif(NOT DEFINED BASE_LLVM_VERSION)
set(OPENCL_CLANG_VERSION ${BASE_LLVM_VERSION}.0)

if(NOT DEFINED OPENCL_CLANG_BUILD_EXTERNAL)
# check if we build inside llvm or not
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
Expand Down Expand Up @@ -39,7 +44,7 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
add_definitions(-DUSE_PREBUILT_LLVM)

if(NOT PREFERRED_LLVM_VERSION)
set(PREFERRED_LLVM_VERSION "21.0")
set(PREFERRED_LLVM_VERSION "21.1")
endif(NOT PREFERRED_LLVM_VERSION)
message(STATUS "[OPENCL-CLANG] Looking for LLVM version ${PREFERRED_LLVM_VERSION}")
find_package(LLVM ${PREFERRED_LLVM_VERSION} REQUIRED)
Expand Down Expand Up @@ -152,9 +157,9 @@ if(NOT USE_PREBUILT_LLVM)
)
endif()

set(CLANG_BASE_REVISION master)
set(SPIRV_BASE_REVISION master)
set(TARGET_BRANCH "ocl-open-110")
set(CLANG_BASE_REVISION release/21.x)
set(SPIRV_BASE_REVISION llvm_release_210)
set(TARGET_BRANCH "ocl-open-210")

apply_patches(${CLANG_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/patches/clang
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ Before the build all dependencies must be downloaded and laid out as follows:
This can be done using the following commands:
```bash
cd <workspace>
git clone https://github.com/llvm/llvm-project.git .
git clone https://github.com/KhronosGroup/SPIRV-LLVM-Translator.git
git clone https://github.com/intel/opencl-clang.git
git clone https://github.com/llvm/llvm-project.git . -b release/21.x
git clone https://github.com/KhronosGroup/SPIRV-LLVM-Translator.git -b llvm_release_210
git clone https://github.com/intel/opencl-clang.git -b ocl-open-210
```

Then we need to create a build directory and run the build:
Expand Down Expand Up @@ -61,7 +61,7 @@ documented in [Embedding LLVM in your project](https://llvm.org/docs/CMake.html#
Commands to checkout sources and build:
```bash
cd <workspace>
git clone https://github.com/intel/opencl-clang.git
git clone https://github.com/intel/opencl-clang.git -b ocl-open-210
mkdir build && cd build
cmake ../opencl-clang
make all -j`nproc`
Expand All @@ -71,13 +71,13 @@ make all -j`nproc`

##### Preferred LLVM version

By default, opencl-clang's cmake script is searching for LLVM which is built
based on the latest verion of current branch. You can override target version of
LLVM by using the `PREFERRED_LLVM_VERSION` cmake option:
By default, opencl-clang's cmake script is searching for LLVM 21.1. You can
override target version of LLVM by using the `PREFERRED_LLVM_VERSION` cmake
option:

Example:
```bash
cmake -DPREFERRED_LLVM_VERSION="21.0" ../opencl-clang
cmake -DPREFERRED_LLVM_VERSION="21.1" ../opencl-clang
```

##### Custom LLVM installation
Expand Down
Loading