From 6554f1bd60571cbd4de3cb69c866babb3d41038f Mon Sep 17 00:00:00 2001 From: rowanG077 Date: Sat, 23 Oct 2021 22:24:06 +0200 Subject: [PATCH 1/4] spirv-llvm-translator: 8.0.1-2 -> 2021-06-13 --- .../compilers/spirv-llvm-translator/default.nix | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pkgs/development/compilers/spirv-llvm-translator/default.nix b/pkgs/development/compilers/spirv-llvm-translator/default.nix index e4549a7d65d7..0dff7f0e1b09 100644 --- a/pkgs/development/compilers/spirv-llvm-translator/default.nix +++ b/pkgs/development/compilers/spirv-llvm-translator/default.nix @@ -2,29 +2,30 @@ , fetchFromGitHub , cmake , pkg-config - , lit -, llvm_8 +, llvm_11 }: stdenv.mkDerivation rec { pname = "SPIRV-LLVM-Translator"; - version = "8.0.1-2"; + version = "unstable-2021-06-13"; src = fetchFromGitHub { owner = "KhronosGroup"; repo = "SPIRV-LLVM-Translator"; - rev = "v${version}"; - sha256 = "0hxalc3fkliqs61hpr97phbm3qsx4b8vgnlg30aimzr6aas403r5"; + rev = "c67e6f26a7285aa753598ef792593ac4a545adf9"; + sha256 = "sha256-1s3lVNTQDl+pUvbzSMsp3cOUSm6I4DzqJxnLMeeE3F4="; }; - nativeBuildInputs = [ pkg-config cmake llvm_8.dev ]; + nativeBuildInputs = [ pkg-config cmake llvm_11.dev ]; - buildInputs = [ llvm_8 ]; + buildInputs = [ llvm_11 ]; checkInputs = [ lit ]; - cmakeFlags = [ "-DLLVM_INCLUDE_TESTS=ON" ]; + cmakeFlags = [ + "-DLLVM_INCLUDE_TESTS=ON" + ]; # FIXME: CMake tries to run "/llvm-lit" which of course doesn't exist doCheck = false; From 58482b71b21f93e446604cbbcdd8b00d73b5b6b8 Mon Sep 17 00:00:00 2001 From: rowanG077 Date: Sat, 23 Oct 2021 22:24:13 +0200 Subject: [PATCH 2/4] opencl-clang: 2019-08-16 -> 2021-06-22 --- .../libraries/opencl-clang/default.nix | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/pkgs/development/libraries/opencl-clang/default.nix b/pkgs/development/libraries/opencl-clang/default.nix index 48c681973d16..243dfa44d5b3 100644 --- a/pkgs/development/libraries/opencl-clang/default.nix +++ b/pkgs/development/libraries/opencl-clang/default.nix @@ -5,14 +5,14 @@ , cmake , git -, llvmPackages_8 +, llvmPackages_11 , spirv-llvm-translator , buildWithPatches ? true }: let - llvmPkgs = llvmPackages_8 // { + llvmPkgs = llvmPackages_11 // { inherit spirv-llvm-translator; }; @@ -31,7 +31,8 @@ let }); passthru = rec { - + spirv-llvm-translator = llvmPkgs.spirv-llvm-translator; + llvm = addPatches "llvm" llvmPkgs.llvm; libclang = addPatches "clang" llvmPkgs.libclang; clang-unwrapped = libclang.out; @@ -43,14 +44,21 @@ let patchesOut = stdenv.mkDerivation rec { pname = "opencl-clang-patches"; inherit (library) version src patches; + # Clang patches assume the root is the llvm root dir + # but clang root in nixpkgs is the clang sub-directory + postPatch = '' + for filename in patches/clang/*.patch; do + substituteInPlace "$filename" \ + --replace "a/clang/" "a/" \ + --replace "b/clang/" "b/" + done + ''; + installPhase = '' [ -d patches ] && cp -r patches/ $out || mkdir $out - mkdir -p $out/clang $out/spirv + mkdir -p $out/clang $out/llvm ''; }; - - spirv-llvm-translator = addPatches "spirv" llvmPkgs.spirv-llvm-translator; - }; library = let @@ -59,15 +67,15 @@ let in stdenv.mkDerivation rec { pname = "opencl-clang"; - version = "unstable-2019-08-16"; + version = "unstable-2021-06-22"; inherit passthru; src = fetchFromGitHub { owner = "intel"; repo = "opencl-clang"; - rev = "94af090661d7c953c516c97a25ed053c744a0737"; - sha256 = "05cg89m62nqjqm705h7gpdz4jd4hiczg8944dcjsvaybrqv3hcm5"; + rev = "fd68f64b33e67d58f6c36b9e25c31c1178a1962a"; + sha256 = "sha256-q1YPBb/LY67iEuQx1fMUQD/I7OsNfobW3yNfJxLXx3E="; }; patches = [ From 0eb2ab9fc73046a98f875d046edd0a3c866292f9 Mon Sep 17 00:00:00 2001 From: rowanG077 Date: Sat, 23 Oct 2021 22:24:24 +0200 Subject: [PATCH 3/4] intel-graphics-compiler: 1.0.4241 -> 1.0.8744 --- .../intel-graphics-compiler/default.nix | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/pkgs/development/compilers/intel-graphics-compiler/default.nix b/pkgs/development/compilers/intel-graphics-compiler/default.nix index 1c40d7fe516b..85332a946450 100644 --- a/pkgs/development/compilers/intel-graphics-compiler/default.nix +++ b/pkgs/development/compilers/intel-graphics-compiler/default.nix @@ -5,7 +5,8 @@ , runCommandLocal , bison , flex -, llvmPackages_8 +, llvmPackages_11 +, lld_11 , opencl-clang , python3 , spirv-llvm-translator @@ -14,7 +15,13 @@ }: let - llvmPkgs = llvmPackages_8 // { + vc_intrinsics_src = fetchFromGitHub { + owner = "intel"; + repo = "vc-intrinsics"; + rev = "e5ad7e02aa4aa21a3cd7b3e5d1f3ec9b95f58872"; + sha256 = "Vg1mngwpIQ3Tik0GgRXPG22lE4sLEAEFch492G2aIXs="; + }; + llvmPkgs = llvmPackages_11 // { inherit spirv-llvm-translator; }; inherit (llvmPkgs) llvm; @@ -24,18 +31,18 @@ in stdenv.mkDerivation rec { pname = "intel-graphics-compiler"; - version = "1.0.4241"; + version = "1.0.8744"; src = fetchFromGitHub { owner = "intel"; repo = "intel-graphics-compiler"; rev = "igc-${version}"; - sha256 = "1jp3c67ppl1x4pazr5nzy52615cpx0kyckaridhc0fsmrkgilyxq"; + sha256 = "G5+dYD8uZDPkRyn1sgXsRngdq4NJndiCJCYTRXyUgTA="; }; nativeBuildInputs = [ clang cmake bison flex python3 ]; - buildInputs = [ clang opencl-clang spirv-llvm-translator llvm ]; + buildInputs = [ clang opencl-clang spirv-llvm-translator llvm lld_11 ]; strictDeps = true; @@ -53,9 +60,12 @@ stdenv.mkDerivation rec { ln -s clang $out/clang-${versions.major (getVersion clang)} ln -s ${opencl-clang}/lib/* $out/ ln -s ${lib.getLib libclang}/lib/clang/${getVersion clang}/include/opencl-c.h $out/ + ln -s ${lib.getLib libclang}/lib/clang/${getVersion clang}/include/opencl-c-base.h $out/ ''; cmakeFlags = [ + "-DVC_INTRINSICS_SRC=${vc_intrinsics_src}" + "-DINSTALL_SPIRVDLL=0" "-DCCLANG_BUILD_PREBUILDS=ON" "-DCCLANG_BUILD_PREBUILDS_DIR=${prebuilds}" "-DIGC_PREFERRED_LLVM_VERSION=${getVersion llvm}" From c6791b730ba50a0838e6b9c9dc585c324ca1d14d Mon Sep 17 00:00:00 2001 From: rowanG077 Date: Sat, 23 Oct 2021 22:24:17 +0200 Subject: [PATCH 4/4] intel-compute-runtime: 20.34.17727 -> 21.42.21270 --- pkgs/os-specific/linux/intel-compute-runtime/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/intel-compute-runtime/default.nix b/pkgs/os-specific/linux/intel-compute-runtime/default.nix index 980b1fad0dfb..1d1d5667fe98 100644 --- a/pkgs/os-specific/linux/intel-compute-runtime/default.nix +++ b/pkgs/os-specific/linux/intel-compute-runtime/default.nix @@ -11,13 +11,13 @@ stdenv.mkDerivation rec { pname = "intel-compute-runtime"; - version = "20.34.17727"; + version = "21.42.21270"; src = fetchFromGitHub { owner = "intel"; repo = "compute-runtime"; rev = version; - sha256 = "19scbbr6jf3yp2v7z8xyzzm01g44jym7xfkf1dz64d5nhvjw6ig5"; + sha256 = "N9MsDcsL8kBWxfZjhukcxZiSJnXxqMgWF0etOhf2/AE="; }; nativeBuildInputs = [ cmake pkg-config ];