2020-07-15 19:40:26 +02:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, addOpenGLRunpath
|
2020-08-21 08:40:30 +02:00
|
|
|
, clang-unwrapped
|
2020-07-15 19:40:26 +02:00
|
|
|
, cmake
|
2020-08-21 08:40:30 +02:00
|
|
|
, xxd
|
2020-07-15 19:40:26 +02:00
|
|
|
, elfutils
|
2020-08-21 08:40:30 +02:00
|
|
|
, llvm
|
|
|
|
, rocm-device-libs
|
2020-07-15 19:40:26 +02:00
|
|
|
, rocm-thunk }:
|
2020-07-10 17:08:10 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "rocm-runtime";
|
2020-09-19 08:07:27 +02:00
|
|
|
version = "3.8.0";
|
2020-07-10 17:08:10 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "RadeonOpenCompute";
|
|
|
|
repo = "ROCR-Runtime";
|
|
|
|
rev = "rocm-${version}";
|
2020-08-21 08:40:30 +02:00
|
|
|
sha256 = "1lm4cbx1d727zll85vjc1kykc72mk82nfhyyhjljv82gd4mnz00c";
|
2020-07-10 17:08:10 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = "source/src";
|
|
|
|
|
2020-08-21 08:40:30 +02:00
|
|
|
nativeBuildInputs = [ cmake xxd ];
|
2020-07-10 17:08:10 +02:00
|
|
|
|
2020-08-21 08:40:30 +02:00
|
|
|
buildInputs = [ clang-unwrapped elfutils llvm ];
|
2020-07-10 17:08:10 +02:00
|
|
|
|
2020-08-21 08:40:30 +02:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DBITCODE_DIR=${rocm-device-libs}/lib"
|
|
|
|
"-DCMAKE_PREFIX_PATH=${rocm-thunk}"
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs image/blit_src/create_hsaco_ascii_file.sh
|
2020-07-10 17:08:10 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
fixupPhase = ''
|
2020-08-21 08:40:30 +02:00
|
|
|
rm -rf $out/hsa
|
2020-07-10 17:08:10 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Platform runtime for ROCm";
|
|
|
|
homepage = "https://github.com/RadeonOpenCompute/ROCR-Runtime";
|
|
|
|
license = with licenses; [ ncsa ];
|
|
|
|
maintainers = with maintainers; [ danieldk ];
|
|
|
|
};
|
|
|
|
}
|