mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-01 18:44:07 +00:00
18c88296d0
hip-common: 5.4.1 → 5.4.2 hipblas: 5.4.1 → 5.4.2 hipcc: 5.4.1 → 5.4.2 hip: 5.4.1 → 5.4.2 hipfft: 5.4.1 → 5.4.2 hipcub: 5.4.1 → 5.4.2 hipify: 5.4.1 → 5.4.2 hipfort: 5.4.1 → 5.4.2 clang-ocl: 5.4.1 → 5.4.2 hipsolver: 5.4.1 → 5.4.2 llvmPackages_rocm.llvm: 5.4.1 → 5.4.2 migraphx: 5.4.1 → 5.4.2 miopen: 5.4.1 → 5.4.2 rdc: 5.4.1 → 5.4.2 rccl: 5.4.1 → 5.4.2 rocblas: 5.4.1 → 5.4.2 miopengemm: 5.4.1 → 5.4.2 hipsparse: 5.4.1 → 5.4.2 rocdbgapi: 5.4.1 → 5.4.2 rocfft: 5.4.1 → 5.4.2 rocgdb: 5.4.1 → 5.4.2 rocclr: 5.4.1 → 5.4.2 rocalution: 5.4.1 → 5.4.2 rocm-device-libs: 5.4.1 → 5.4.2 rocm-opencl-runtime: 5.4.1 → 5.4.2 rocm-cmake: 5.4.1 → 5.4.2 rocm-thunk: 5.4.1 → 5.4.2 rocminfo: 5.4.1 → 5.4.2 rocmlir: 5.4.0 → 5.4.1 rocm-comgr: 5.4.1 → 5.4.2 rocprofiler: 5.4.1 → 5.4.2 rocr-debug-agent: 5.4.1 → 5.4.2 rocrand: 5.4.1 → 5.4.2 rocsolver: 5.4.1 → 5.4.2 roctracer: 5.4.1 → 5.4.2 rocm-smi: 5.4.1 → 5.4.2 rocwmma: 5.4.1 → 5.4.2 rocprim: 5.4.1 → 5.4.2 rocsparse: 5.4.1 → 5.4.2 rocthrust: 5.4.1 → 5.4.2 tensile: 5.4.1 → 5.4.2
100 lines
2.4 KiB
Nix
100 lines
2.4 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, rocmUpdateScript
|
|
, cmake
|
|
, rocm-cmake
|
|
, hip
|
|
, gfortran
|
|
, rocblas
|
|
, rocsolver
|
|
, gtest
|
|
, lapack-reference
|
|
, buildTests ? false
|
|
, buildBenchmarks ? false
|
|
, buildSamples ? false
|
|
}:
|
|
|
|
# Can also use cuBLAS
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "hipblas";
|
|
version = "5.4.2";
|
|
|
|
outputs = [
|
|
"out"
|
|
] ++ lib.optionals buildTests [
|
|
"test"
|
|
] ++ lib.optionals buildBenchmarks [
|
|
"benchmark"
|
|
] ++ lib.optionals buildSamples [
|
|
"sample"
|
|
];
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ROCmSoftwarePlatform";
|
|
repo = "hipBLAS";
|
|
rev = "rocm-${finalAttrs.version}";
|
|
hash = "sha256-mSZCq8UaiffMzWVflW1nAX6CQZ1DqwWJaSIzKslZSEk=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
rocm-cmake
|
|
hip
|
|
gfortran
|
|
];
|
|
|
|
buildInputs = [
|
|
rocblas
|
|
rocsolver
|
|
] ++ lib.optionals buildTests [
|
|
gtest
|
|
] ++ lib.optionals (buildTests || buildBenchmarks) [
|
|
lapack-reference
|
|
];
|
|
|
|
cmakeFlags = [
|
|
"-DCMAKE_C_COMPILER=hipcc"
|
|
"-DCMAKE_CXX_COMPILER=hipcc"
|
|
# Manually define CMAKE_INSTALL_<DIR>
|
|
# See: https://github.com/NixOS/nixpkgs/pull/197838
|
|
"-DCMAKE_INSTALL_BINDIR=bin"
|
|
"-DCMAKE_INSTALL_LIBDIR=lib"
|
|
"-DCMAKE_INSTALL_INCLUDEDIR=include"
|
|
] ++ lib.optionals buildTests [
|
|
"-DBUILD_CLIENTS_TESTS=ON"
|
|
] ++ lib.optionals buildBenchmarks [
|
|
"-DBUILD_CLIENTS_BENCHMARKS=ON"
|
|
] ++ lib.optionals buildSamples [
|
|
"-DBUILD_CLIENTS_SAMPLES=ON"
|
|
];
|
|
|
|
postInstall = lib.optionalString buildTests ''
|
|
mkdir -p $test/bin
|
|
mv $out/bin/hipblas-test $test/bin
|
|
'' + lib.optionalString buildBenchmarks ''
|
|
mkdir -p $benchmark/bin
|
|
mv $out/bin/hipblas-bench $benchmark/bin
|
|
'' + lib.optionalString buildSamples ''
|
|
mkdir -p $sample/bin
|
|
mv $out/bin/example-* $sample/bin
|
|
'' + lib.optionalString (buildTests || buildBenchmarks || buildSamples) ''
|
|
rmdir $out/bin
|
|
'';
|
|
|
|
passthru.updateScript = rocmUpdateScript {
|
|
name = finalAttrs.pname;
|
|
owner = finalAttrs.src.owner;
|
|
repo = finalAttrs.src.repo;
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "ROCm BLAS marshalling library";
|
|
homepage = "https://github.com/ROCmSoftwarePlatform/hipBLAS";
|
|
license = with licenses; [ mit ];
|
|
maintainers = teams.rocm.members;
|
|
# Fixed in develop branch by using C++17 and related refactor
|
|
broken = versions.minor finalAttrs.version != versions.minor hip.version || buildTests || buildBenchmarks || buildSamples;
|
|
};
|
|
})
|