mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-03 02:33:15 +00:00
9e0472e206
clang-ocl: 5.4.0 → 5.4.1 hipsparse: 5.4.0 → 5.4.1 composable_kernel: unstable-2022-12-08 → unstable-2022-12-15 llvmPackages_rocm.llvm: 5.4.0 → 5.4.1 miopen: 5.4.0 → 5.4.1 miopengemm: 5.4.0 → 5.4.1 rccl: 5.4.0 → 5.4.1 rocalution: 5.4.0 → 5.4.1 hipcub: 5.4.0 → 5.4.1 rocclr: 5.4.0 → 5.4.1 rocfft: 5.4.0 → 5.4.1 rocm-cmake: 5.4.0 → 5.4.1 rocm-comgr: 5.4.0 → 5.4.1 rocm-device-libs: 5.4.0 → 5.4.1 hip: 5.4.0 → 5.4.1 rocblas: 5.4.0 → 5.4.1 rocm-runtime: 5.4.0 → 5.4.1 rocm-opencl-runtime: 5.4.0 → 5.4.1 rocm-thunk: 5.4.0 → 5.4.1 rocprim: 5.4.0 → 5.4.1 rocm-smi: 5.4.0 → 5.4.1 rocminfo: 5.4.0 → 5.4.1 rocsolver: 5.4.0 → 5.4.1 rocrand: 5.4.0 → 5.4.1 rocthrust: 5.4.0 → 5.4.1 rocprofiler: 5.4.0 → 5.4.1 rocwmma: 5.4.0 → 5.4.1 roctracer: 5.4.0 → 5.4.1 rocsparse: 5.4.0 → 5.4.1 tensile: 5.4.0 → 5.4.1
76 lines
1.7 KiB
Nix
76 lines
1.7 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, rocmUpdateScript
|
|
, pkg-config
|
|
, cmake
|
|
, xxd
|
|
, rocm-device-libs
|
|
, rocm-thunk
|
|
, libelf
|
|
, libdrm
|
|
, numactl
|
|
, valgrind
|
|
, libxml2
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "rocm-runtime";
|
|
version = "5.4.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "RadeonOpenCompute";
|
|
repo = "ROCR-Runtime";
|
|
rev = "rocm-${finalAttrs.version}";
|
|
hash = "sha256-JkTXTQmdESHSFbA6HZdMK3pYEApz9aoAlMzdXayzdyY=";
|
|
};
|
|
|
|
sourceRoot = "${finalAttrs.src.name}/src";
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
cmake
|
|
xxd
|
|
];
|
|
|
|
buildInputs = [
|
|
rocm-thunk
|
|
libelf
|
|
libdrm
|
|
numactl
|
|
valgrind
|
|
libxml2
|
|
];
|
|
|
|
postPatch = ''
|
|
patchShebangs image/blit_src/create_hsaco_ascii_file.sh
|
|
patchShebangs core/runtime/trap_handler/create_trap_handler_header.sh
|
|
|
|
substituteInPlace CMakeLists.txt \
|
|
--replace 'hsa/include/hsa' 'include/hsa'
|
|
|
|
# We compile clang before rocm-device-libs, so patch it in afterwards
|
|
substituteInPlace image/blit_src/CMakeLists.txt \
|
|
--replace '-cl-denorms-are-zero' '-cl-denorms-are-zero --rocm-device-lib-path=${rocm-device-libs}/amdgcn/bitcode'
|
|
'';
|
|
|
|
fixupPhase = ''
|
|
rm -rf $out/hsa/*
|
|
ln -s $out/{include,lib} $out/hsa
|
|
'';
|
|
|
|
passthru.updateScript = rocmUpdateScript {
|
|
name = finalAttrs.pname;
|
|
owner = finalAttrs.src.owner;
|
|
repo = finalAttrs.src.repo;
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Platform runtime for ROCm";
|
|
homepage = "https://github.com/RadeonOpenCompute/ROCR-Runtime";
|
|
license = with licenses; [ ncsa ];
|
|
maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members;
|
|
broken = finalAttrs.version != stdenv.cc.version;
|
|
};
|
|
})
|