Unverified Commit e08d9112 authored by Markus Kowalewski's avatar Markus Kowalewski Committed by GitHub
Browse files

amd-libflame: 4.2 -> 5.0 (#348058)

parents 5e30d970 36652974
Loading
Loading
Loading
Loading
+38 −27
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchFromGitHub
, cmake
, gfortran
, python3
, amd-blis
, aocl-utils

, withOpenMP ? true
, blas64 ? false
, withAMDOpt ? true
{
  lib,
  stdenv,
  fetchFromGitHub,
  cmake,
  gfortran,
  python3,
  amd-blis,
  aocl-utils,

  withOpenMP ? true,
  blas64 ? false,
  withAMDOpt ? true,
}:

stdenv.mkDerivation rec {
  pname = "amd-libflame";
  version = "4.2";
  version = "5.0";

  src = fetchFromGitHub {
    owner = "amd";
    repo = "libflame";
    rev = version;
    hash = "sha256-eiH2eq+nKUjlB1bZTZNRW1+efCHZ68UOSFy0NpcY1FI=";
    hash = "sha256-Shsv5Zd59FN5tq1LY7QqPRtAHEysHIVbPeKIIZ/2eMw=";
  };

  postPatch = ''
@@ -30,13 +31,23 @@ stdenv.mkDerivation rec {
    substituteInPlace CMakeLists.txt --replace '-mtune=native' ""
  '';

  passthru = { inherit blas64; };
  passthru = {
    inherit blas64;
  };

  nativeBuildInputs = [ cmake gfortran python3 ];
  nativeBuildInputs = [
    cmake
    gfortran
    python3
  ];

  buildInputs = [ amd-blis aocl-utils ];
  buildInputs = [
    amd-blis
    aocl-utils
  ];

  cmakeFlags = [
  cmakeFlags =
    [
      "-DLIBAOCLUTILS_LIBRARY_PATH=${lib.getLib aocl-utils}/lib/libaoclutils${stdenv.hostPlatform.extensions.sharedLibrary}"
      "-DLIBAOCLUTILS_INCLUDE_PATH=${lib.getDev aocl-utils}/include"
      "-DENABLE_BUILTIN_LAPACK2FLAME=ON"