From aee6d10f1ff1a3fe5e69e3b132c4df18d6ae89d7 Mon Sep 17 00:00:00 2001 From: Jacek Danecki Date: Wed, 18 Apr 2018 16:27:52 +0200 Subject: [PATCH] update build documentation - add information about libdrm and libva compilation libva is needed to support cl_intel_va_api_media_sharing extension libdrm is needed to compile libva - add information about building on Centos 7 Change-Id: I56df50c7d312b4e5be0f85576300a5d1ba311e80 --- README.md | 31 ++++--- documentation/BUILD_Centos.md | 80 +++++++++++++++++++ documentation/{BUILD.md => BUILD_Ubuntu.md} | 16 ++-- .../cl_intel_va_api_media_sharing.md | 50 ++++++++++++ 4 files changed, 158 insertions(+), 19 deletions(-) create mode 100644 documentation/BUILD_Centos.md rename documentation/{BUILD.md => BUILD_Ubuntu.md} (86%) create mode 100644 documentation/cl_intel_va_api_media_sharing.md diff --git a/README.md b/README.md index 9f891d8076..225bf31103 100644 --- a/README.md +++ b/README.md @@ -13,23 +13,28 @@ motivation and intentions wrt OpenCL support in the open source. The Intel(R) Graphics Compute Runtime for OpenCL(TM) is distributed under the MIT License. -You may obtain a copy of the License at: - -https://opensource.org/licenses/MIT +You may obtain a copy of the License at: https://opensource.org/licenses/MIT ## Dependencies -GmmLib - https://github.com/intel/gmmlib -Intel Graphics Compiler - https://github.com/intel/intel-graphics-compiler -Google Test v1.7.0 - https://github.com/google/googletest -Google Mock v1.7.0 - https://github.com/google/googlemock -Khronos OpenCL Headers - https://github.com/KhronosGroup/OpenCL-Headers +* GmmLib - https://github.com/intel/gmmlib +* Intel Graphics Compiler - https://github.com/intel/intel-graphics-compiler +* Google Test v1.7.0 - https://github.com/google/googletest +* Google Mock v1.7.0 - https://github.com/google/googlemock +* Khronos OpenCL Headers - https://github.com/KhronosGroup/OpenCL-Headers + +## Optional dependencies + +Below packages are needed to enable [cl_intel_va_api_media_sharing](https://www.khronos.org/registry/OpenCL/extensions/intel/cl_intel_va_api_media_sharing.txt) extension + +* libdrm - https://anongit.freedesktop.org/git/mesa/drm.git +* libva - https://github.com/intel/libva.git ## Supported Platforms -Intel Core Processors with Gen8 graphics devices (formerly Broadwell) - OpenCL 2.1 -Intel Core Processors with Gen9 graphics devices (formerly Skylake, Kaby Lake, Coffee Lake) - OpenCL 2.1 -Intel Atom Processors with Gen9 graphics devices (formerly Apollo Lake, Gemini Lake) - OpenCL 1.2 +* Intel Core Processors with Gen8 graphics devices (formerly Broadwell) - OpenCL 2.1 +* Intel Core Processors with Gen9 graphics devices (formerly Skylake, Kaby Lake, Coffee Lake) - OpenCL 2.1 +* Intel Atom Processors with Gen9 graphics devices (formerly Apollo Lake, Gemini Lake) - OpenCL 1.2 ## Linking applications @@ -46,7 +51,9 @@ Create a pull request on github.com with your patch. Make sure your change is cl A maintainer will contact you if there are questions or concerns. ## See also -* Building and installation: [BUILD.md](https://github.com/intel/compute-runtime/blob/master/documentation/BUILD.md) +* Building and installation: + * [Ubuntu 16.04](https://github.com/intel/compute-runtime/blob/master/documentation/BUILD_Ubuntu.md) + * [Centos 7](https://github.com/intel/compute-runtime/blob/master/documentation/BUILD_Centos.md) * Contribution guidelines: [CONTRIB.md](https://github.com/intel/compute-runtime/blob/master/documentation/CONTRIB.md) * Known issues and limitations: [LIMITATIONS.md](https://github.com/intel/compute-runtime/blob/master/documentation/LIMITATIONS.md) * Frequently asked questions: [FAQ.md](https://github.com/intel/compute-runtime/blob/master/documentation/FAQ.md) diff --git a/documentation/BUILD_Centos.md b/documentation/BUILD_Centos.md new file mode 100644 index 0000000000..3bc950d338 --- /dev/null +++ b/documentation/BUILD_Centos.md @@ -0,0 +1,80 @@ +# Intel(R) Graphics Compute Runtime for OpenCL(TM) + +## Building + +*Instructions assume clean Centos 7.4.1708 installation.** + +1. Download & install required dependencies + +Example: + +```shell +sudo yum groups install "Development Tools" +sudo yum install centos-release-scl epel-release +sudo yum install devtoolset-4-gcc-c++ llvm-toolset-7-clang cmake3 ninja-build p7zip rpm-build dpkg xorg-x11-util-macros libpciaccess-devel which zlib-devel +sudo /usr/sbin/alternatives --install /usr/bin/cmake cmake /usr/bin/cmake3 50 +``` + +2. Create workspace folder and download sources: +``` + 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 + |- llvm_source https://github.com/llvm-mirror/llvm + |- gmmlib https://github.com/intel/gmmlib + |- gmock https://github.com/google/googlemock + |- gtest https://github.com/google/googletest + |- igc https://github.com/intel/intel-graphics-compiler + |- khronos https://github.com/KhronosGroup/OpenCL-Headers + |- neo https://github.com/intel/compute-runtime +``` + +Example: + +```shell +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 +git clone -b release_40 https://github.com/llvm-mirror/llvm llvm_source +git clone https://github.com/intel/gmmlib gmmlib +git clone -b release-1.7.0 https://github.com/google/googlemock gmock +git clone -b release-1.7.0 https://github.com/google/googletest gtest +git clone https://github.com/intel/intel-graphics-compiler igc +git clone https://github.com/KhronosGroup/OpenCL-Headers khronos +git clone https://github.com/intel/compute-runtime neo +``` + +Note: Instructions for compiling *Intel Graphics Compiler* copied from https://github.com/intel/intel-graphics-compiler/blob/master/README.md + +3. Create folder for build: + +Example: + +```shell +mkdir build +``` + +4. Enabling additional extension + +* [cl_intel_va_api_media_sharing](https://github.com/intel/compute-runtime/blob/master/documentation/cl_intel_va_api_media_sharing.md) + +5. Build complete driver: + +```shell +cd build +scl enable devtoolset-4 llvm-toolset-7 "cmake -DBUILD_TYPE=Release -DCMAKE_BUILD_TYPE=Release ../neo" +scl enable devtoolset-4 llvm-toolset-7 "make -j `nproc` package" +``` + +## Installing + +To install OpenCL driver please use rpm package generated during build + +Example: + +```shell +sudo rpm -i intel-opencl-1.0-0.x86_64-igdrcl.rpm +``` + +___(*) Other names and brands my be claimed as property of others.___ diff --git a/documentation/BUILD.md b/documentation/BUILD_Ubuntu.md similarity index 86% rename from documentation/BUILD.md rename to documentation/BUILD_Ubuntu.md index f1f1758fa7..c5e245901a 100644 --- a/documentation/BUILD.md +++ b/documentation/BUILD_Ubuntu.md @@ -2,14 +2,14 @@ ## Building -*Instructions assume clean Ubuntu* 16.04.3 LTS installation.* +*Instructions assume clean Ubuntu 16.04.3 LTS installation.** 1. Download & install required dependencies Example: ```shell -sudo apt-get install ccache flex bison clang-4.0 cmake g++ git patch zlib1g-dev +sudo apt-get install ccache flex bison clang-4.0 cmake g++ git patch zlib1g-dev autoconf xutils-dev libtool pkg-config libpciaccess-dev ``` See [LIMITATIONS.md](https://github.com/intel/compute-runtime/blob/master/documentation/LIMITATIONS.md) for other requirements and dependencies, when building and installing NEO. @@ -26,7 +26,6 @@ See [LIMITATIONS.md](https://github.com/intel/compute-runtime/blob/master/docume |- gtest https://github.com/google/googletest |- igc https://github.com/intel/intel-graphics-compiler |- khronos https://github.com/KhronosGroup/OpenCL-Headers - |- libdrm https://anongit.freedesktop.org/git/mesa/drm.git |- neo https://github.com/intel/compute-runtime ``` @@ -42,7 +41,6 @@ git clone -b release-1.7.0 https://github.com/google/googlemock gmock git clone -b release-1.7.0 https://github.com/google/googletest gtest git clone https://github.com/intel/intel-graphics-compiler igc git clone https://github.com/KhronosGroup/OpenCL-Headers khronos -git clone https://anongit.freedesktop.org/git/mesa/drm.git libdrm git clone https://github.com/intel/compute-runtime neo ``` @@ -56,7 +54,11 @@ Example: mkdir build ``` -4. Build complete driver: +4. Enabling additional extension + +* [cl_intel_va_api_media_sharing](https://github.com/intel/compute-runtime/blob/master/documentation/cl_intel_va_api_media_sharing.md) + +5. Build complete driver: ```shell cd build @@ -64,7 +66,7 @@ cmake -DBUILD_TYPE=Release -DCMAKE_BUILD_TYPE=Release ../neo make -j`nproc` package ``` -## Install +## Installing To install OpenCL driver please use deb package generated during build @@ -74,4 +76,4 @@ Example: sudo dpkg -i intel-opencl-1.0-0.x86_64-igdrcl.deb ``` -___(*) Other names and brands my be claimed as property of others.___ \ No newline at end of file +___(*) Other names and brands my be claimed as property of others.___ diff --git a/documentation/cl_intel_va_api_media_sharing.md b/documentation/cl_intel_va_api_media_sharing.md new file mode 100644 index 0000000000..5428dda80e --- /dev/null +++ b/documentation/cl_intel_va_api_media_sharing.md @@ -0,0 +1,50 @@ +# Intel(R) Graphics Compute Runtime for OpenCL(TM) + +## Enabling [cl_intel_va_api_media_sharing](https://www.khronos.org/registry/OpenCL/extensions/intel/cl_intel_va_api_media_sharing.txt) extension + +To enable cl_intel_va_api_media_sharing extension Neo needs to be compiled on system with libva 2.x installed. +Before compilation additional packages have to be installed. + +1. Download sources: + +* libdrm https://anongit.freedesktop.org/git/mesa/drm.git +* libva https://github.com/intel/libva.git + +Example: + +```shell +git clone https://anongit.freedesktop.org/git/mesa/drm.git libdrm +git clone https://github.com/intel/libva.git libva + +2. Compile and install libdrm + +Example: + +```shell +cd libdrm +./autogen.sh +make -j `nproc` +sudo make install +``` + +3. Compile and install libva + +Example: + +```shell +cd libva +export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig +./autogen.sh +make -j `nproc` +sudo make install +``` + +4. During Neo compilation verify libva was discovered + +```shell +-- Checking for module 'libva>=1.0.0' +-- Found libva, version 1.1.0 +-- Looking for vaGetLibFunc in va +-- Looking for vaGetLibFunc in va - found +-- Using libva +```