1{
2 lib,
3 fetchPypi,
4 buildPythonPackage,
5 sphinx,
6 pytest-cov-stub,
7 pytestCheckHook,
8 mako,
9 numpy,
10 funcsigs,
11 withCuda ? false,
12 pycuda,
13 withOpenCL ? true,
14 pyopencl,
15}:
16
17buildPythonPackage rec {
18 pname = "reikna";
19 version = "0.9.0";
20 format = "setuptools";
21
22 src = fetchPypi {
23 inherit pname version;
24 hash = "sha256-uzIoGCkIINgmO+r0vAzmihS14GWv5ygakMz3tKIG3zA=";
25 };
26
27 nativeCheckInputs = [
28 sphinx
29 pytest-cov-stub
30 pytestCheckHook
31 ];
32
33 propagatedBuildInputs = [
34 mako
35 numpy
36 funcsigs
37 ]
38 ++ lib.optional withCuda pycuda
39 ++ lib.optional withOpenCL pyopencl;
40
41 # Requires device
42 doCheck = false;
43
44 meta = with lib; {
45 description = "GPGPU algorithms for PyCUDA and PyOpenCL";
46 homepage = "https://github.com/fjarri/reikna";
47 license = licenses.mit;
48 };
49}