2022-01-03 16:56:52 +00:00
|
|
|
{ buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, jax
|
|
|
|
, jaxlib
|
|
|
|
, lib
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "jmp";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "0.0.4";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2022-01-03 16:56:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "deepmind";
|
|
|
|
repo = pname;
|
2023-08-22 20:05:09 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-+PefZU1209vvf1SfF8DXiTvKYEnZ4y8iiIr8yKikx9Y=";
|
2022-01-03 16:56:52 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
# Wheel requires only `numpy`, but the import needs `jax`.
|
2022-01-03 16:56:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
jax
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"jmp"
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-02-10 20:34:41 +00:00
|
|
|
jaxlib
|
2022-01-03 16:56:52 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "This library implements support for mixed precision training in JAX.";
|
|
|
|
homepage = "https://github.com/deepmind/jmp";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ ndl ];
|
|
|
|
};
|
|
|
|
}
|