Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

rocm-runtime: 3.5.0 -> 3.7.0

+19 -39
+16 -15
pkgs/development/libraries/rocm-runtime/default.nix
··· 1 { stdenv 2 , fetchFromGitHub 3 , addOpenGLRunpath 4 , cmake 5 , elfutils 6 , rocm-thunk }: 7 8 stdenv.mkDerivation rec { 9 pname = "rocm-runtime"; 10 - version = "3.5.0"; 11 12 src = fetchFromGitHub { 13 owner = "RadeonOpenCompute"; 14 repo = "ROCR-Runtime"; 15 rev = "rocm-${version}"; 16 - sha256 = "028x1f0if6lw41cpfpysp82ikp6c3fdxxd2a6ixs0vpm4424svb1"; 17 }; 18 19 sourceRoot = "source/src"; 20 21 - buildInputs = [ cmake elfutils ]; 22 23 - cmakeFlags = [ "-DCMAKE_PREFIX_PATH=${rocm-thunk}" ]; 24 25 - # Use the ROCR_EXT_DIR environment variable and/or OpenGL driver 26 - # link path to try to find binary-only ROCm runtime extension 27 - # libraries. Without this change, we would have to rely on 28 - # LD_LIBRARY_PATH to let the HSA runtime discover the shared 29 - # libraries. 30 - patchPhase = '' 31 - substitute '${./rocr-ext-dir.diff}' ./rocr-ext-dir.diff \ 32 - --subst-var-by rocrExtDir "${addOpenGLRunpath.driverLink}/lib/rocm-runtime-ext" 33 - patch -p2 < ./rocr-ext-dir.diff 34 ''; 35 36 fixupPhase = '' 37 - rm -r $out/lib $out/include 38 - mv $out/hsa/lib $out/hsa/include $out 39 ''; 40 41 meta = with stdenv.lib; {
··· 1 { stdenv 2 , fetchFromGitHub 3 , addOpenGLRunpath 4 + , clang-unwrapped 5 , cmake 6 + , xxd 7 , elfutils 8 + , llvm 9 + , rocm-device-libs 10 , rocm-thunk }: 11 12 stdenv.mkDerivation rec { 13 pname = "rocm-runtime"; 14 + version = "3.7.0"; 15 16 src = fetchFromGitHub { 17 owner = "RadeonOpenCompute"; 18 repo = "ROCR-Runtime"; 19 rev = "rocm-${version}"; 20 + sha256 = "1lm4cbx1d727zll85vjc1kykc72mk82nfhyyhjljv82gd4mnz00c"; 21 }; 22 23 sourceRoot = "source/src"; 24 25 + nativeBuildInputs = [ cmake xxd ]; 26 + 27 + buildInputs = [ clang-unwrapped elfutils llvm ]; 28 29 + cmakeFlags = [ 30 + "-DBITCODE_DIR=${rocm-device-libs}/lib" 31 + "-DCMAKE_PREFIX_PATH=${rocm-thunk}" 32 + ]; 33 34 + postPatch = '' 35 + patchShebangs image/blit_src/create_hsaco_ascii_file.sh 36 ''; 37 38 fixupPhase = '' 39 + rm -rf $out/hsa 40 ''; 41 42 meta = with stdenv.lib; {
-23
pkgs/development/libraries/rocm-runtime/rocr-ext-dir.diff
··· 1 - diff --git a/src/core/runtime/runtime.cpp b/src/core/runtime/runtime.cpp 2 - index dd6a15c..fb6de49 100644 3 - --- a/src/core/runtime/runtime.cpp 4 - +++ b/src/core/runtime/runtime.cpp 5 - @@ -1358,7 +1358,17 @@ void Runtime::LoadExtensions() { 6 - core::HsaApiTable::HSA_EXT_FINALIZER_API_TABLE_ID); 7 - 8 - // Update Hsa Api Table with handle of Image extension Apis 9 - - extensions_.LoadImage(kImageLib[os_index(os::current_os)]); 10 - + // 11 - + // Use ROCR_EXT_DIR when it is non-empty. Otherwise, try to load the 12 - + // library from the OpenGL driver path. 13 - + std::string extDirVar = os::GetEnvVar("ROCR_EXT_DIR"); 14 - + if (!extDirVar.empty()) { 15 - + extensions_.LoadImage(extDirVar + "/" + kImageLib[os_index(os::current_os)]); 16 - + } else { 17 - + std::string globalDriverDir("@rocrExtDir@"); 18 - + extensions_.LoadImage(globalDriverDir + "/" + kImageLib[os_index(os::current_os)]); 19 - + } 20 - + 21 - hsa_api_table_.LinkExts(&extensions_.image_api, 22 - core::HsaApiTable::HSA_EXT_IMAGE_API_TABLE_ID); 23 - }
···
+3 -1
pkgs/top-level/all-packages.nix
··· 9354 inherit (llvmPackages_rocm) clang clang-unwrapped lld llvm; 9355 }; 9356 9357 - rocm-runtime = callPackage ../development/libraries/rocm-runtime { }; 9358 9359 rocm-runtime-ext = callPackage ../development/libraries/rocm-runtime-ext { }; 9360
··· 9354 inherit (llvmPackages_rocm) clang clang-unwrapped lld llvm; 9355 }; 9356 9357 + rocm-runtime = callPackage ../development/libraries/rocm-runtime { 9358 + inherit (llvmPackages_rocm) clang-unwrapped llvm; 9359 + }; 9360 9361 rocm-runtime-ext = callPackage ../development/libraries/rocm-runtime-ext { }; 9362