2023-10-07 12:20:04 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rocmUpdateScript
|
|
|
|
, cmake
|
|
|
|
, rocm-cmake
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "half";
|
2023-10-17 05:53:19 +00:00
|
|
|
version = "5.7.1";
|
2023-10-07 12:20:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-12-17 11:41:00 +00:00
|
|
|
owner = "ROCm";
|
2023-10-07 12:20:04 +00:00
|
|
|
repo = "half";
|
|
|
|
rev = "rocm-${finalAttrs.version}";
|
|
|
|
hash = "sha256-82It+/wm8+umBdQYn7lz/fS69h+f0mzwPdGxoJNYUq0=";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
rocm-cmake
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.updateScript = rocmUpdateScript {
|
|
|
|
name = finalAttrs.pname;
|
|
|
|
owner = finalAttrs.src.owner;
|
|
|
|
repo = finalAttrs.src.repo;
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "C++ library for half precision floating point arithmetics";
|
2023-12-17 11:41:00 +00:00
|
|
|
homepage = "https://github.com/ROCm/half";
|
2023-10-07 12:20:04 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = teams.rocm.members;
|
|
|
|
platforms = platforms.unix;
|
2023-12-17 11:15:23 +00:00
|
|
|
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "6.0.0";
|
2023-10-07 12:20:04 +00:00
|
|
|
};
|
|
|
|
})
|