Skip to content

Commit 373592d

Browse files
pszymichigcbot
authored andcommitted
Set LLVM 11 as the default version
IGC now fully supports building against LLVM 11. Updated `build_ubuntu.md` documentation to use LLVM 11 components.
1 parent bba8ff9 commit 373592d

File tree

2 files changed

+21
-32
lines changed

2 files changed

+21
-32
lines changed

documentation/build_ubuntu.md

Lines changed: 20 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@ $ git config --global user.email "your@email.com"
2626

2727
### 2. Install LLVM, LLD, Clang and OpenCL Clang
2828

29-
> <span style="color: firebrick; font-weight: 600;">Important notice</span>
30-
Every LLVM/LLD/Clang version brings some restrictions and in some cases needs different configuration. Please refer to [LLVM/LLD/Clang version information](#LLVM/Clang-version-information) section for more information.
29+
> **Important notice**
30+
> Every LLVM/LLD/Clang version brings some restrictions and in some cases needs different configuration. Please refer to [LLVM/LLD/Clang version information](#LLVM/Clang-version-information) section for more information.
3131
3232
In this step you need to prepare VC Intrinsics, SPIRV-LLVM Translator, LLVM, LLD, OpenCL-Clang libraries and Clang for IGC.
3333
It can be done either by using packaged releases or building those yourself:
3434

3535
#### Use preinstalled packages
3636

3737
For **LLVM**, **LLD** and **Clang** packages please visit this [link](https://apt.llvm.org/) to download and install desired version.
38-
Using for example the APT command it will be:
38+
For `apt` package manager you can use this command:
3939
```shell
40-
$ sudo apt-get install llvm-10 llvm-10-dev clang-10 liblld-10 liblld-10-dev
40+
$ sudo apt-get install llvm-11 llvm-11-dev clang-11 liblld-11 liblld-11-dev
4141
```
4242
As of now **OpenCL Clang** is still needed to be built and installed manually. Sources are available [here](https://github.com/intel/opencl-clang). You can use out-of-tree build method with LLVM and Clang preinstalled.
4343
**VC Intrinsics** is a lightweight library that is built from sources with IGC and there is no package for it.
@@ -59,11 +59,11 @@ You can use following commands for setup:
5959
```shell
6060
$ cd <workspace>
6161
$ git clone https://github.com/intel/vc-intrinsics vc-intrinsics
62-
$ git clone -b release/10.x https://github.com/llvm/llvm-project llvm-project
63-
$ git clone -b ocl-open-100 https://github.com/intel/opencl-clang llvm-project/llvm/projects/opencl-clang
64-
$ git clone -b llvm_release_100 https://github.com/KhronosGroup/SPIRV-LLVM-Translator llvm-project/llvm/projects/llvm-spirv
62+
$ git clone -b llvmorg-11.1.0 https://github.com/llvm/llvm-project llvm-project
63+
$ git clone -b ocl-open-110 https://github.com/intel/opencl-clang llvm-project/llvm/projects/opencl-clang
64+
$ git clone -b llvm_release_110 https://github.com/KhronosGroup/SPIRV-LLVM-Translator llvm-project/llvm/projects/llvm-spirv
6565
```
66-
These commands will set up a workspace with LLVM 10. If you wish to use any other version please refer to the [component revision table](#Revision-table)
66+
These commands will set up a workspace with LLVM 11. If you wish to use any other version please refer to the [component revision table](#Revision-table)
6767

6868
Correct directory tree looks like this:
6969
```
@@ -75,21 +75,15 @@ Correct directory tree looks like this:
7575
|- llvm/projects/llvm-spirv https://github.com/KhronosGroup/SPIRV-LLVM-Translator
7676
```
7777

78-
All dependencies will be build in the next step.
79-
80-
If you have problems with LLVM patching during IGC build, you can try listed steps:
81-
```shell
82-
$ cd llvm-project
83-
$ git checkout llvmorg-10.0.0
84-
```
78+
All dependencies will be built in the next step.
8579

8680
#### Additional notes on build modes
8781

8882
There are several flags for these builds modes that you can pass to
8983
cmake command.
9084

9185
- `IGC_OPTION__LLVM_PREFERRED_VERSION` -- sets version of LLVM that
92-
will be used by IGC (defaults to "10.0.0").
86+
will be used by IGC (defaults to "11.1.0").
9387
- `IGC_OPTION__LLVM_MODE` -- select LLVM mode for IGC to use. Possible
9488
values are: **Source**, **Prebuilds** or empty (that is
9589
default). **Source** mode uses LLVM sources to build LLVM in-tree with
@@ -152,9 +146,9 @@ $ sudo make install
152146

153147
| Version | Product quality |
154148
|:----------------:|-----------------|
155-
| LLVM 11 | Experimental |
156-
| LLVM 10 | **Production** |
157-
| LLVM 9 and older | Experimental |
149+
| LLVM 12 | Experimental |
150+
| LLVM 11 | **Production** |
151+
| LLVM 10 and older | Experimental |
158152

159153
| Terminology | Description |
160154
|-------------------|-|
@@ -168,10 +162,10 @@ When checking out the components refer to the following table, replace **XX** wi
168162

169163
| Repository name | Version specific | Branch | LLVM 10 example |
170164
|-----------------------|:----------------:|----------------------|------------------|
171-
| llvm-project | - | release/**XX**.x | release/10.x |
165+
| llvm-project | - | release/**XX**.x | release/11.x |
172166
| vc-intrinsics | no | master | master |
173-
| SPIRV-LLVM-Translator | yes | llvm_release_**XX**0 | llvm_release_100 |
174-
| opencl-clang | yes | ocl-open-**XX**0 | ocl-open-100 |
167+
| SPIRV-LLVM-Translator | yes | llvm_release_**XX**0 | llvm_release_110 |
168+
| opencl-clang | yes | ocl-open-**XX**0 | ocl-open-110 |
175169

176170
### LLVM/LLD/Clang version specific caveats
177171

@@ -205,14 +199,9 @@ No additional steps are needed.
205199

206200
#### LLVM11/Clang11
207201

208-
**This configuration is experimental and problems with compilation and functionality are to be expected.**
202+
No additional steps are needed.
209203

210-
Latest known configuration that compiles successfully:
204+
#### LLVM12/Clang12
211205

212-
| Component | Branch | Revision |
213-
|-|-|-|
214-
| igc | master | 7d11ff43f42564fdfe2753b4d008abfd56ec9671 |
215-
| vc-intrinsics | master | eabcd2022cf868a658b257b8ea6ad62acbbe7dc5 |
216-
| llvm-project | release/11.x | llvmorg-11.0.0 |
217-
| opencl-clang | ocl-open-110 | cdacb8a1dba95e8ebc5d948c0e0e574f87b1e861 |
218-
| SPIRV-LLVM-Translator | llvm_release_110 | d6dc999eee381158a26f048a333467c9ce7e77f2 |
206+
**Experimental**
207+
Currently there are none LLVM12/Clang12 conformance/performance guarantees.

external/llvm/llvm_preferred_version.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
#
77
#============================ end_copyright_notice =============================
88

9-
set(DEFAULT_IGC_LLVM_VERSION "10.0.0")
9+
set(DEFAULT_IGC_LLVM_VERSION "11.1.0")

0 commit comments

Comments
 (0)