README.md 3.12 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
# Intel(R) Graphics Compiler for OpenCL(TM)

## Introduction

The Intel(R) Graphics Compiler for OpenCL(TM) is an llvm based compiler for
OpenCL(TM) targeting Intel Gen graphics hardware architecture.

Please refer to http://01.org/compute-runtime for additional details regarding
 Intel's motivation and intentions wrt OpenCL support in the open source.


## License

The Intel(R) Graphics Compute Runtime for OpenCL(TM) is distributed under the MIT.

You may obtain a copy of the License at:

https://opensource.org/licenses/MIT

## Dependencies

22 23 24 25
* Common Clang - https://github.com/intel/opencl-clang
* Clang Source - https://github.com/llvm-mirror/clang
* Khronos OpenCL Headers - https://github.com/KhronosGroup/OpenCL-Headers
* LLVM Source -  https://github.com/llvm-mirror/llvm
26 27 28 29 30

## Supported Linux versions

IGC is supported on the following 32/64 bits Linux operating systems:

31
* Ubuntu 14.04, 16.04, 17.04, 18.04
32 33 34 35

## Building

1. Install prerequisites
36

37 38
Building IGC needs flex, bison, cmake version later than 3.4.3 and
 libz.  You can install required packages on ubuntu 18.04 like below:
39
```
40
$ sudo apt-get install flex bison libz-dev cmake
41 42 43 44
```

2. Download all dependencies and create workspace folder as below:
```
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
<workspace>
      |- igc                          https://github.com/intel/intel-graphics-compiler
      |- llvm_patches                 https://github.com/intel/llvm-patches
      |- llvm_source                  https://github.com/llvm-mirror/llvm
            |- projects/opencl-clang  https://github.com/intel/opencl-clang
            |- projects/llvm-spirv    https://github.com/KhronosGroup/SPIRV-LLVM-Translator
            |- tools/clang            https://github.com/llvm-mirror/clang
```

This can be done using the following commands:

```
$ cd <workspace>
$ git clone -b release_70 https://github.com/llvm-mirror/llvm llvm_source
$ git clone -b release_70 https://github.com/llvm-mirror/clang llvm_source/tools/clang
60 61
$ git clone -b ocl-open-70 https://github.com/intel/opencl-clang llvm_source/projects/opencl-clang
$ git clone -b llvm_release_70 https://github.com/KhronosGroup/SPIRV-LLVM-Translator llvm_source/projects/llvm-spirv
pguo's avatar
pguo committed
62 63
$ git clone https://github.com/intel/llvm-patches llvm_patches
$ git clone https://github.com/intel/intel-graphics-compiler igc
64
  [If using specific release]
65
$ cd igc && git checkout -b tag igc_release_2019-01-15
66 67
```

68

69 70
3. Under workspace create a build folder.  For example:
```
71
$ cd <workspace>
72 73 74 75 76 77
$ mkdir build
```

4. Build IGC using commands:
```
$ cd build
78
$ cmake ../igc/IGC
79 80 81
$ make -j`nproc`
```

Irene Wu's avatar
Irene Wu committed
82
5. Install IGC
83 84 85 86
```
$ sudo make install
```

87 88
## Supported Platforms

89 90 91 92
* Intel Core Processors supporting Gen8 graphics devices
* Intel Core Processors supporting Gen9 graphics devices
* Intel Core Processors supporting Gen10 graphics devices
* Intel Atom Processors supporting Gen9 graphics devices
93 94 95 96 97 98 99 100 101

## How to provide feedback
Please submit an issue using native github.com interface: https://github.com/intel/intel-graphics-compiler/issues.

## How to contribute

Create a pull request on github.com with your patch. Make sure your change is
cleanly building. A maintainer will contact you if there are questions or concerns.