diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000..851f223db2 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,39 @@ +language: c +compiler: + - gcc +sudo: required +services: + - docker + +matrix: + include: + - os: linux + compiler: gcc + env: BUILD_OS=ubuntu-16.04 COMPILER=gcc-5 + - os: linux + compiler: clang + env: BUILD_OS=ubuntu-16.04 COMPILER=clang-4 + - os: linux + compiler: clang + env: BUILD_OS=ubuntu-16.04 COMPILER=clang-5 + - os: linux + compiler: clang + env: BUILD_OS=ubuntu-18.04 COMPILER=clang-4 + - os: linux + compiler: clang + env: BUILD_OS=ubuntu-18.04 COMPILER=clang-5 + - os: linux + compiler: gcc + env: BUILD_OS=ubuntu-18.04 COMPILER=gcc-5 + - os: linux + compiler: gcc + env: BUILD_OS=ubuntu-18.04 COMPILER=gcc-6 + - os: linux + compiler: gcc + env: BUILD_OS=ubuntu-18.04 COMPILER=gcc-7 + - os: linux + compiler: gcc + env: BUILD_OS=arch COMPILER=gcc-5 + +script: ./scripts/run-build.sh + diff --git a/scripts/build-arch-dep.sh b/scripts/build-arch-dep.sh new file mode 100755 index 0000000000..f3afc03dee --- /dev/null +++ b/scripts/build-arch-dep.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# Copyright (c) 2018, Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + +wget https://aur.archlinux.org/cgit/aur.git/snapshot/dpkg.tar.gz +tar -xzf dpkg.tar.gz +pushd dpkg +makepkg -i --noconfirm +popd + +wget https://aur.archlinux.org/cgit/aur.git/snapshot/ncurses5-compat-libs.tar.gz +tar -xzf ncurses5-compat-libs.tar.gz +pushd ncurses5-compat-libs +makepkg --skippgpcheck -i --noconfirm +popd + diff --git a/scripts/build-arch-docker.sh b/scripts/build-arch-docker.sh new file mode 100755 index 0000000000..7a1de790f1 --- /dev/null +++ b/scripts/build-arch-docker.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# Copyright (c) 2018, Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + +git clone --depth 1 ../compute-runtime neo +docker build -f scripts/docker/Dockerfile-arch-gcc-5 -t neo-arch-gcc-5:ci . + diff --git a/scripts/build-ubuntu-16.04.sh b/scripts/build-ubuntu-16.04.sh new file mode 100755 index 0000000000..1b3991e329 --- /dev/null +++ b/scripts/build-ubuntu-16.04.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# Copyright (c) 2018, Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + +mkdir workspace; cd workspace +git clone --depth 1 https://github.com/intel/gmmlib gmmlib +git clone --depth 1 https://github.com/KhronosGroup/OpenCL-Headers khronos +git clone --depth 1 ../../compute-runtime neo +pushd neo/scripts/igc ; ./prepare.sh ; popd +mkdir build; cd build + +cmake -G Ninja -DBUILD_TYPE=Release -DCMAKE_BUILD_TYPE=Release ../neo +ninja + diff --git a/scripts/build-ubuntu-16.4-docker.sh b/scripts/build-ubuntu-16.4-docker.sh new file mode 100755 index 0000000000..93b1b191d4 --- /dev/null +++ b/scripts/build-ubuntu-16.4-docker.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# Copyright (c) 2018, Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + +git clone --depth 1 ../compute-runtime neo +docker build -f scripts/docker/Dockerfile-ubuntu-16.04-gcc-5 -t neo-ubuntu-16.04-gcc-5:ci . + diff --git a/scripts/build-ubuntu-18.4-docker.sh b/scripts/build-ubuntu-18.4-docker.sh new file mode 100755 index 0000000000..fa0f0bdbd8 --- /dev/null +++ b/scripts/build-ubuntu-18.4-docker.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# Copyright (c) 2018, Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + +git clone --depth 1 ../compute-runtime neo +docker build -f scripts/docker/Dockerfile-ubuntu-18.04-gcc-7 -t neo-ubuntu-18.4-gcc-7:ci . + diff --git a/scripts/docker/Dockerfile-arch-gcc-5 b/scripts/docker/Dockerfile-arch-gcc-5 new file mode 100644 index 0000000000..242c5a5082 --- /dev/null +++ b/scripts/docker/Dockerfile-arch-gcc-5 @@ -0,0 +1,14 @@ +FROM docker.io/base/archlinux +MAINTAINER Jacek Danecki + +COPY neo /root/neo +COPY scripts/prepare-arch-gcc-5.sh /root +COPY scripts/build-arch-dep.sh /root +COPY scripts/prepare-workspace.sh /root + +RUN /root/prepare-arch-gcc-5.sh +RUN /root/prepare-workspace.sh +RUN cd /root/build ; cmake -G Ninja -DBUILD_TYPE=Release -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER=gcc-5 -DCMAKE_CXX_COMPILER=g++-5 ../neo; \ + ninja -j `nproc` +CMD ["/bin/bash"] diff --git a/scripts/docker/Dockerfile-ubuntu-16.04-clang-4 b/scripts/docker/Dockerfile-ubuntu-16.04-clang-4 new file mode 100644 index 0000000000..556e1b80ab --- /dev/null +++ b/scripts/docker/Dockerfile-ubuntu-16.04-clang-4 @@ -0,0 +1,12 @@ +FROM docker.io/ubuntu:16.04 +MAINTAINER Jacek Danecki + +COPY neo /root/neo +COPY scripts/prepare-workspace.sh /root + +RUN apt-get -y update; apt-get install -y --allow-unauthenticated cmake git wget pkg-config ninja-build clang-4.0 +RUN /root/prepare-workspace.sh +RUN cd /root/build ; cmake -G Ninja -DBUILD_TYPE=Release -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER=clang-4.0 -DCMAKE_CXX_COMPILER=clang++-4.0 \ + -DDO_NOT_RUN_AUB_TESTS=1 -DDONT_CARE_OF_VIRTUALS=1 ../neo ; ninja -j `nproc` +CMD ["/bin/bash"] diff --git a/scripts/docker/Dockerfile-ubuntu-16.04-clang-5 b/scripts/docker/Dockerfile-ubuntu-16.04-clang-5 new file mode 100644 index 0000000000..339c2b7d2e --- /dev/null +++ b/scripts/docker/Dockerfile-ubuntu-16.04-clang-5 @@ -0,0 +1,12 @@ +FROM docker.io/ubuntu:16.04 +MAINTAINER Jacek Danecki + +COPY neo /root/neo +COPY scripts/prepare-workspace.sh /root + +RUN apt-get -y update; apt-get install -y --allow-unauthenticated cmake git wget pkg-config ninja-build clang-5.0 +RUN /root/prepare-workspace.sh +RUN cd /root/build ; cmake -G Ninja -DBUILD_TYPE=Release -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER=clang-5.0 -DCMAKE_CXX_COMPILER=clang++-5.0 \ + -DDO_NOT_RUN_AUB_TESTS=1 -DDONT_CARE_OF_VIRTUALS=1 ../neo ; ninja -j `nproc` +CMD ["/bin/bash"] diff --git a/scripts/docker/Dockerfile-ubuntu-16.04-gcc-5 b/scripts/docker/Dockerfile-ubuntu-16.04-gcc-5 new file mode 100644 index 0000000000..8340d1c192 --- /dev/null +++ b/scripts/docker/Dockerfile-ubuntu-16.04-gcc-5 @@ -0,0 +1,12 @@ +FROM docker.io/ubuntu:16.04 +MAINTAINER Jacek Danecki + +COPY neo /root/neo +COPY scripts/prepare-workspace.sh /root + +RUN apt-get -y update; apt-get install -y --allow-unauthenticated cmake g++-5 git wget pkg-config ninja-build +RUN /root/prepare-workspace.sh +RUN cd /root/build ; cmake -G Ninja -DBUILD_TYPE=Release -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER=gcc-5 -DCMAKE_CXX_COMPILER=g++-5 \ + -DDO_NOT_RUN_AUB_TESTS=1 -DDONT_CARE_OF_VIRTUALS=1 ../neo ; ninja -j `nproc` +CMD ["/bin/bash"] diff --git a/scripts/docker/Dockerfile-ubuntu-18.04-clang-4 b/scripts/docker/Dockerfile-ubuntu-18.04-clang-4 new file mode 100644 index 0000000000..89377e62d1 --- /dev/null +++ b/scripts/docker/Dockerfile-ubuntu-18.04-clang-4 @@ -0,0 +1,12 @@ +FROM docker.io/ubuntu:18.04 +MAINTAINER Jacek Danecki + +COPY neo /root/neo +COPY scripts/prepare-workspace.sh /root + +RUN apt-get -y update; apt-get install -y --allow-unauthenticated cmake git wget pkg-config ninja-build clang-4.0 +RUN /root/prepare-workspace.sh +RUN cd /root/build ; cmake -G Ninja -DBUILD_TYPE=Release -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER=clang-4.0 -DCMAKE_CXX_COMPILER=clang++-4.0 \ + -DDO_NOT_RUN_AUB_TESTS=1 -DDONT_CARE_OF_VIRTUALS=1 ../neo ; ninja -j `nproc` +CMD ["/bin/bash"] diff --git a/scripts/docker/Dockerfile-ubuntu-18.04-clang-5 b/scripts/docker/Dockerfile-ubuntu-18.04-clang-5 new file mode 100644 index 0000000000..99e3b02165 --- /dev/null +++ b/scripts/docker/Dockerfile-ubuntu-18.04-clang-5 @@ -0,0 +1,12 @@ +FROM docker.io/ubuntu:18.04 +MAINTAINER Jacek Danecki + +COPY neo /root/neo +COPY scripts/prepare-workspace.sh /root + +RUN apt-get -y update; apt-get install -y --allow-unauthenticated cmake git wget pkg-config ninja-build clang-5.0 +RUN /root/prepare-workspace.sh +RUN cd /root/build ; cmake -G Ninja -DBUILD_TYPE=Release -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER=clang-5.0 -DCMAKE_CXX_COMPILER=clang++-5.0 \ + -DDO_NOT_RUN_AUB_TESTS=1 -DDONT_CARE_OF_VIRTUALS=1 ../neo ; ninja -j `nproc` +CMD ["/bin/bash"] diff --git a/scripts/docker/Dockerfile-ubuntu-18.04-gcc-5 b/scripts/docker/Dockerfile-ubuntu-18.04-gcc-5 new file mode 100644 index 0000000000..0ca64cd1a7 --- /dev/null +++ b/scripts/docker/Dockerfile-ubuntu-18.04-gcc-5 @@ -0,0 +1,12 @@ +FROM docker.io/ubuntu:18.04 +MAINTAINER Jacek Danecki + +COPY neo /root/neo +COPY scripts/prepare-workspace.sh /root + +RUN apt-get -y update; apt-get install -y --allow-unauthenticated cmake g++-5 git wget pkg-config ninja-build +RUN /root/prepare-workspace.sh +RUN cd /root/build ; cmake -G Ninja -DBUILD_TYPE=Release -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER=gcc-5 -DCMAKE_CXX_COMPILER=g++-5 \ + -DDO_NOT_RUN_AUB_TESTS=1 -DDONT_CARE_OF_VIRTUALS=1 ../neo ; ninja -j `nproc` +CMD ["/bin/bash"] diff --git a/scripts/docker/Dockerfile-ubuntu-18.04-gcc-6 b/scripts/docker/Dockerfile-ubuntu-18.04-gcc-6 new file mode 100644 index 0000000000..97edce8981 --- /dev/null +++ b/scripts/docker/Dockerfile-ubuntu-18.04-gcc-6 @@ -0,0 +1,12 @@ +FROM docker.io/ubuntu:18.04 +MAINTAINER Jacek Danecki + +COPY neo /root/neo +COPY scripts/prepare-workspace.sh /root + +RUN apt-get -y update; apt-get install -y --allow-unauthenticated cmake g++-6 git wget pkg-config ninja-build +RUN /root/prepare-workspace.sh +RUN cd /root/build ; cmake -G Ninja -DBUILD_TYPE=Release -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER=gcc-6 -DCMAKE_CXX_COMPILER=g++-6 \ + -DDO_NOT_RUN_AUB_TESTS=1 -DDONT_CARE_OF_VIRTUALS=1 ../neo ; ninja -j `nproc` +CMD ["/bin/bash"] diff --git a/scripts/docker/Dockerfile-ubuntu-18.04-gcc-7 b/scripts/docker/Dockerfile-ubuntu-18.04-gcc-7 new file mode 100644 index 0000000000..655876ac36 --- /dev/null +++ b/scripts/docker/Dockerfile-ubuntu-18.04-gcc-7 @@ -0,0 +1,12 @@ +FROM docker.io/ubuntu:18.04 +MAINTAINER Jacek Danecki + +COPY neo /root/neo +COPY scripts/prepare-workspace.sh /root + +RUN apt-get -y update; apt-get install -y --allow-unauthenticated cmake g++-7 git wget pkg-config ninja-build +RUN /root/prepare-workspace.sh +RUN cd /root/build ; cmake -G Ninja -DBUILD_TYPE=Release -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER=gcc-7 -DCMAKE_CXX_COMPILER=g++-7 \ + -DDO_NOT_RUN_AUB_TESTS=1 -DDONT_CARE_OF_VIRTUALS=1 ../neo ; ninja -j `nproc` +CMD ["/bin/bash"] diff --git a/scripts/igc/CMakeLists.txt b/scripts/igc/CMakeLists.txt new file mode 100644 index 0000000000..67a31729f5 --- /dev/null +++ b/scripts/igc/CMakeLists.txt @@ -0,0 +1,43 @@ +# Copyright (c) 2017 - 2018, Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +cmake_minimum_required(VERSION 3.2.0 FATAL_ERROR) + +project(IntelGraphicsCompiler) + +add_library(igc SHARED IMPORTED GLOBAL) +set_property(TARGET igc PROPERTY "IMPORTED_LOCATION" "${CMAKE_CURRENT_SOURCE_DIR}/lib/libigdccl.so") +set_property(TARGET igc PROPERTY "INTERFACE_INCLUDE_DIRECTORIES" "${CMAKE_CURRENT_SOURCE_DIR}/inc/") + +add_library(opencl_clang SHARED IMPORTED GLOBAL) +set_property(TARGET opencl_clang PROPERTY "IMPORTED_LOCATION" "${CMAKE_CURRENT_SOURCE_DIR}/lib/libopencl_clang.so") + +add_library(iga SHARED IMPORTED GLOBAL) +set_property(TARGET iga PROPERTY "IMPORTED_LOCATION" "${CMAKE_CURRENT_SOURCE_DIR}/lib/libiga64.so") + +add_library(fcl SHARED IMPORTED GLOBAL) +set_property(TARGET fcl PROPERTY "IMPORTED_LOCATION" "${CMAKE_CURRENT_SOURCE_DIR}/lib/libigdfcl.so") + +list(APPEND IGC__IGC_TARGETS "igc") +list(APPEND IGC__IGC_TARGETS "iga") +list(APPEND IGC__IGC_TARGETS "fcl") +list(APPEND IGC__IGC_TARGETS "opencl_clang") + +set(IGC__IGC_TARGETS "${IGC__IGC_TARGETS}" PARENT_SCOPE) diff --git a/scripts/igc/prepare.sh b/scripts/igc/prepare.sh new file mode 100755 index 0000000000..9b5ee7bfef --- /dev/null +++ b/scripts/igc/prepare.sh @@ -0,0 +1,51 @@ +#!/bin/bash +# Copyright (c) 2018, Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + + +NEO_TOP_DIR=`git rev-parse --show-toplevel` +ARCH=`dpkg --print-architecture` +WRK_DIR=${NEO_TOP_DIR}/.. +mkdir -p ${WRK_DIR}/igc/inc +cp CMakeLists.txt ${WRK_DIR}/igc +pushd ${WRK_DIR}/igc + +VER=2018ww18-010782 +IGC_REV=dbb9f9f + +wget https://github.com/intel/compute-runtime/releases/download/${VER}/intel-opencl_${VER}_${ARCH}.deb +dpkg-deb -x intel-opencl_${VER}_${ARCH}.deb . +rm opt/intel/opencl/libigdrcl.so +ln -s opt/intel/opencl lib + +git clone https://github.com/intel/intel-graphics-compiler igc +pushd igc; git checkout ${IGC_REV}; popd + +pushd inc +ln -s ../igc/IGC/AdaptorOCL/cif/cif cif +ln -s ../igc/IGC/AdaptorOCL/ocl_igc_interface ocl_igc_interface +ln -s ../igc/IGC/AdaptorOCL/ocl_igc_shared/device_enqueue/DeviceEnqueueInternalTypes.h DeviceEnqueueInternalTypes.h +ln -s ../igc/IGC/AdaptorOCL/ocl_igc_shared/executable_format/patch_g7.h patch_g7.h +ln -s ../igc/IGC/AdaptorOCL/ocl_igc_shared/executable_format/patch_list.h patch_list.h +ln -s ../igc/IGC/AdaptorOCL/ocl_igc_shared/executable_format/patch_shared.h patch_shared.h +ln -s ../igc/IGC/AdaptorOCL/ocl_igc_shared/executable_format/program_debug_data.h program_debug_data.h +popd + +popd diff --git a/scripts/install-deps.sh b/scripts/install-deps.sh new file mode 100755 index 0000000000..af760e913a --- /dev/null +++ b/scripts/install-deps.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# Copyright (c) 2018, Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + +wait_apt() { + while fuser -u -v /var/lib/dpkg/lock + do + echo wait + sleep 5 + done +} + +apt-get -y update +if [ $? -ne 0 ] +then + wait_apt + apt-get -y update +fi + +apt-get install -y --allow-unauthenticated cmake ninja-build +if [ $? -ne 0 ] +then + wait_apt + apt-get install -y --allow-unauthenticated cmake ninja-build +fi + +dpkg -r ccache + diff --git a/scripts/prepare-arch-gcc-5.sh b/scripts/prepare-arch-gcc-5.sh new file mode 100755 index 0000000000..96517dd3ee --- /dev/null +++ b/scripts/prepare-arch-gcc-5.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# Copyright (c) 2018, Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + +pacman -Sy --noconfirm gcc54 cmake git make wget pkg-config fakeroot ninja sudo \ + perl-io-string perl-test-pod autoconf automake patch +ln -s /usr/bin/gcc-5 /usr/bin/gcc +ln -s /usr/bin/g++-5 /usr/bin/g++ +useradd -m build -g wheel +sed -i "s/^# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/" /etc/sudoers +sed -i "s/ -fno-plt//g" /etc/makepkg.conf +cp -a /root/*.sh /home/build +su -l build /home/build/build-arch-dep.sh + diff --git a/scripts/prepare-workspace.sh b/scripts/prepare-workspace.sh new file mode 100755 index 0000000000..6a81e35bc4 --- /dev/null +++ b/scripts/prepare-workspace.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# Copyright (c) 2018, Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + +cd /root +git clone --depth 1 https://github.com/intel/gmmlib gmmlib +git clone --depth 1 https://github.com/KhronosGroup/OpenCL-Headers khronos +pushd neo/scripts/igc +./prepare.sh +popd +mkdir build + diff --git a/scripts/run-build.sh b/scripts/run-build.sh new file mode 100755 index 0000000000..b92251dc2f --- /dev/null +++ b/scripts/run-build.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# Copyright (c) 2018, Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + +git clone --depth 1 ../compute-runtime neo && \ +docker build -f scripts/docker/Dockerfile-${BUILD_OS}-${COMPILER} -t neo-${BUILD_OS}-${COMPILER}:ci . && \ +docker images diff --git a/shippable.yml b/shippable.yml new file mode 100644 index 0000000000..b04c1853e0 --- /dev/null +++ b/shippable.yml @@ -0,0 +1,7 @@ +language: c +compiler: + - gcc +build: + ci: + - sudo scripts/install-deps.sh + - scripts/build-ubuntu-16.04.sh