README.md 3.01 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 31 32 33 34 35

## Supported Linux versions

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

* Ubuntu 14.04, 16.04, 17.04

## Building

1. Install prerequisites
36

Irene Wu's avatar
Irene Wu committed
37
Building IGC needs flex, bison, clang 4.0, cmake version later than 3.4.3 and
38
 libz.  You can install required packages on ubuntu 16.04 like below:
39
```
40
$ sudo apt-get install flex bison clang-4.0 libz-dev cmake
41 42 43 44 45 46 47 48
```

2. Download all dependencies and create workspace folder as below:
```
workspace
      |- clang_source           https://github.com/llvm-mirror/clang
      |- common_clang           https://github.com/intel/opencl-clang
      |- llvm_patches           https://github.com/intel/llvm-patches
pguo's avatar
pguo committed
49
      |- llvm_source            https://github.com/llvm-mirror/llvm
50
      |- igc                    https://github.com/intel/intel-graphics-compiler
pguo's avatar
pguo committed
51 52 53 54 55 56
      |- opencl_headers         https://github.com/KhronosGroup/OpenCL-Headers

Example command:
$ git clone -b release_40 https://github.com/llvm-mirror/clang clang_source
$ git clone https://github.com/intel/opencl-clang common_clang
$ git clone https://github.com/intel/llvm-patches llvm_patches
57 58
$ git clone -b release_40 https://github.com/llvm-mirror/llvm llvm_source
$ git clone -b release_70 https://github.com/llvm-mirror/llvm llvm7.0.0_source
pguo's avatar
pguo committed
59
$ git clone https://github.com/intel/intel-graphics-compiler igc
pguo's avatar
pguo committed
60
$ git clone https://github.com/KhronosGroup/OpenCL-Headers opencl_headers
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
```

3. Under workspace create a build folder.  For example:
```
$ mkdir build
```

4. Build IGC using commands:
```
$ cd build
$ cmake -DIGC_OPTION__OUTPUT_DIR=../igc-install/Release \
    -DCMAKE_BUILD_TYPE=Release -DIGC_OPTION__ARCHITECTURE_TARGET=Linux64 \
    ../igc/IGC
$ make -j`nproc`
```

## Supported Platforms

79 80 81 82
* 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
83 84 85 86 87 88 89 90 91

## 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.