2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchPypi,
|
|
|
|
buildPythonPackage,
|
|
|
|
sphinx,
|
|
|
|
pytest-cov,
|
|
|
|
pytest,
|
|
|
|
mako,
|
|
|
|
numpy,
|
|
|
|
funcsigs,
|
|
|
|
withCuda ? false,
|
|
|
|
pycuda,
|
|
|
|
withOpenCL ? true,
|
|
|
|
pyopencl,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "reikna";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "0.8.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-fpa1Pfo5EAafg7Pgha17G6k5G13fdErjclv0On/uYyI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
sphinx
|
|
|
|
pytest-cov
|
|
|
|
pytest
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
mako
|
|
|
|
numpy
|
|
|
|
funcsigs
|
|
|
|
] ++ lib.optional withCuda pycuda ++ lib.optional withOpenCL pyopencl;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
py.test
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Requires device
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "GPGPU algorithms for PyCUDA and PyOpenCL";
|
|
|
|
homepage = "https://github.com/fjarri/reikna";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = licenses.mit;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|