2022-11-04 12:27:35 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2022-12-17 10:02:37 +00:00
|
|
|
, rocmUpdateScript
|
2022-11-04 12:27:35 +00:00
|
|
|
, cmake
|
2022-12-17 10:02:37 +00:00
|
|
|
, clang
|
|
|
|
, git
|
|
|
|
, libxml2
|
|
|
|
, libedit
|
2022-11-04 12:27:35 +00:00
|
|
|
, python3
|
|
|
|
}:
|
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2022-11-04 12:27:35 +00:00
|
|
|
pname = "rocmlir";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "5.4.0";
|
2022-11-04 12:27:35 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ROCmSoftwarePlatform";
|
|
|
|
repo = "rocMLIR";
|
2022-12-02 08:20:57 +00:00
|
|
|
rev = "rocm-${finalAttrs.version}";
|
2022-12-17 10:02:37 +00:00
|
|
|
hash = "sha256-MokE7Ej8mLHTQeLYvKr7PPlsNG6ul91fqfXDlGu5JpI=";
|
2022-11-04 12:27:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
2022-12-17 10:02:37 +00:00
|
|
|
clang
|
2022-11-04 12:27:35 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2022-12-17 10:02:37 +00:00
|
|
|
git
|
|
|
|
libxml2
|
|
|
|
libedit
|
2022-11-04 12:27:35 +00:00
|
|
|
python3
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
2022-12-17 10:02:37 +00:00
|
|
|
"-DCMAKE_C_COMPILER=clang"
|
|
|
|
"-DCMAKE_CXX_COMPILER=clang++"
|
|
|
|
"-DBUILD_FAT_LIBROCKCOMPILER=ON"
|
2022-11-04 12:27:35 +00:00
|
|
|
];
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
passthru.updateScript = rocmUpdateScript {
|
|
|
|
name = finalAttrs.pname;
|
|
|
|
owner = finalAttrs.src.owner;
|
|
|
|
repo = finalAttrs.src.repo;
|
|
|
|
page = "tags?per_page=2";
|
|
|
|
filter = ".[1].name | split(\"-\") | .[1]";
|
|
|
|
};
|
2022-11-27 09:42:12 +00:00
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "MLIR-based convolution and GEMM kernel generator";
|
|
|
|
homepage = "https://github.com/ROCmSoftwarePlatform/rocMLIR";
|
|
|
|
license = with licenses; [ asl20 ];
|
2022-11-27 09:42:12 +00:00
|
|
|
maintainers = teams.rocm.members;
|
2022-12-17 10:02:37 +00:00
|
|
|
broken = finalAttrs.version != clang.version;
|
2022-11-04 12:27:35 +00:00
|
|
|
};
|
2022-11-27 09:42:12 +00:00
|
|
|
})
|