pyopencl 2024.2.2__tar.gz → 2024.2.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pyopencl might be problematic. Click here for more details.
- pyopencl-2024.2.5/.gitignore +77 -0
- pyopencl-2024.2.5/.gitlab-ci.yml +254 -0
- pyopencl-2024.2.5/.gitmodules +3 -0
- pyopencl-2024.2.5/.pylintrc-local.yml +7 -0
- pyopencl-2024.2.5/.test-conda-env-py3.yml +13 -0
- pyopencl-2024.2.5/CMakeLists.txt +221 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/PKG-INFO +13 -13
- pyopencl-2024.2.5/doc/.gitignore +1 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/doc/misc.rst +32 -10
- pyopencl-2024.2.5/examples/.gitignore +1 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/__init__.py +16 -4
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/algorithm.py +3 -1
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/bitonic_sort.py +2 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/characterize/__init__.py +23 -0
- pyopencl-2024.2.5/pyopencl/compyte/.git +1 -0
- pyopencl-2024.2.5/pyopencl/compyte/.gitignore +21 -0
- pyopencl-2024.2.5/pyopencl/compyte/ndarray/Makefile +31 -0
- pyopencl-2024.2.5/pyopencl/compyte/ndarray/gpu_ndarray.h +35 -0
- pyopencl-2024.2.5/pyopencl/compyte/ndarray/pygpu_language.h +207 -0
- pyopencl-2024.2.5/pyopencl/compyte/ndarray/pygpu_language_cuda.cu +622 -0
- pyopencl-2024.2.5/pyopencl/compyte/ndarray/pygpu_language_opencl.cpp +317 -0
- pyopencl-2024.2.5/pyopencl/compyte/ndarray/pygpu_ndarray.cpp +1546 -0
- pyopencl-2024.2.5/pyopencl/compyte/ndarray/pygpu_ndarray.h +71 -0
- pyopencl-2024.2.5/pyopencl/compyte/ndarray/pygpu_ndarray_object.h +232 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/tools.py +60 -56
- pyopencl-2024.2.5/pyopencl/version.py +9 -0
- pyopencl-2024.2.5/pyproject.toml +110 -0
- pyopencl-2024.2.5/scripts/build-ocl-macos.sh +18 -0
- pyopencl-2024.2.5/scripts/build-ocl-windows.sh +22 -0
- pyopencl-2024.2.5/scripts/build-ocl.sh +23 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/src/mempool.hpp +14 -3
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/src/wrap_cl.cpp +16 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/src/wrap_cl.hpp +11 -12
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/src/wrap_cl_part_1.cpp +12 -2
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/src/wrap_cl_part_2.cpp +1 -1
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/src/wrap_helpers.hpp +2 -1
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/src/wrap_mempool.cpp +46 -26
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/test/test_algorithm.py +2 -2
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/test/test_array.py +13 -3
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/test/test_wrapper.py +5 -1
- pyopencl-2024.2.2/CMakeLists.txt +0 -83
- pyopencl-2024.2.2/MANIFEST.in +0 -32
- pyopencl-2024.2.2/Makefile.in +0 -21
- pyopencl-2024.2.2/README_SETUP.txt +0 -34
- pyopencl-2024.2.2/aksetup_helper.py +0 -1013
- pyopencl-2024.2.2/configure.py +0 -6
- pyopencl-2024.2.2/pyopencl/version.py +0 -3
- pyopencl-2024.2.2/pyopencl.egg-info/PKG-INFO +0 -105
- pyopencl-2024.2.2/pyopencl.egg-info/SOURCES.txt +0 -127
- pyopencl-2024.2.2/pyopencl.egg-info/dependency_links.txt +0 -1
- pyopencl-2024.2.2/pyopencl.egg-info/not-zip-safe +0 -1
- pyopencl-2024.2.2/pyopencl.egg-info/requires.txt +0 -16
- pyopencl-2024.2.2/pyopencl.egg-info/top_level.txt +0 -1
- pyopencl-2024.2.2/pyproject.toml +0 -55
- pyopencl-2024.2.2/setup.cfg +0 -56
- pyopencl-2024.2.2/setup.py +0 -239
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/CITATION.cff +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/LICENSE +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/README.rst +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/contrib/cldis.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/contrib/fortran-to-opencl/README +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/contrib/fortran-to-opencl/translate.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/contrib/pyopencl.vim +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/doc/Makefile +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/doc/algorithm.rst +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/doc/array.rst +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/doc/conf.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/doc/howto.rst +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/doc/index.rst +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/doc/make_constants.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/doc/runtime.rst +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/doc/runtime_const.rst +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/doc/runtime_gl.rst +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/doc/runtime_memory.rst +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/doc/runtime_platform.rst +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/doc/runtime_program.rst +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/doc/runtime_queue.rst +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/doc/subst.rst +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/doc/tools.rst +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/doc/types.rst +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/examples/black-hole-accretion.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/examples/demo-struct-reduce.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/examples/demo.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/examples/demo_array.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/examples/demo_array_svm.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/examples/demo_elementwise.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/examples/demo_elementwise_complex.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/examples/demo_mandelbrot.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/examples/demo_meta_codepy.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/examples/demo_meta_template.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/examples/dump-performance.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/examples/dump-properties.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/examples/gl_interop_demo.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/examples/gl_particle_animation.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/examples/ipython-demo.ipynb +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/examples/median-filter.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/examples/n-body.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/examples/narray.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/examples/noisyImage.jpg +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/examples/pi-monte-carlo.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/examples/svm.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/examples/transpose.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/_cluda.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/_mymako.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/array.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/bitonic_sort_templates.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/cache.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/capture_call.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/characterize/performance.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/cl/pyopencl-airy.cl +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/cl/pyopencl-bessel-j-complex.cl +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/cl/pyopencl-bessel-j.cl +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/cl/pyopencl-bessel-y.cl +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/cl/pyopencl-complex.h +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/cl/pyopencl-eval-tbl.cl +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/cl/pyopencl-hankel-complex.cl +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/cl/pyopencl-random123/array.h +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/cl/pyopencl-random123/openclfeatures.h +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/cl/pyopencl-random123/philox.cl +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/cl/pyopencl-random123/threefry.cl +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/clmath.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/clrandom.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/cltypes.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/compyte/__init__.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/compyte/array.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/compyte/dtypes.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/compyte/ndarray/__init__.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/compyte/ndarray/gen_elemwise.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/compyte/ndarray/gen_reduction.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/compyte/ndarray/setup_opencl.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/compyte/ndarray/test_gpu_elemwise.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/compyte/ndarray/test_gpu_ndarray.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/elementwise.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/invoker.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/ipython_ext.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/reduction.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pyopencl/scan.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/pytest.ini +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/src/bitlog.cpp +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/src/bitlog.hpp +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/src/clinfo_ext.h +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/src/pyopencl_ext.h +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/src/tools.hpp +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/src/wrap_constants.cpp +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/test/add-vectors-32.spv +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/test/add-vectors-64.spv +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/test/empty-header.h +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/test/test_arrays_in_structs.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/test/test_clmath.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/test/test_clrandom.py +0 -0
- {pyopencl-2024.2.2 → pyopencl-2024.2.5}/test/test_enqueue_copy.py +0 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
_skbuild
|
|
2
|
+
|
|
3
|
+
.pydevproject
|
|
4
|
+
.project
|
|
5
|
+
.settings
|
|
6
|
+
*~
|
|
7
|
+
.*.sw[po]
|
|
8
|
+
.sw[po]
|
|
9
|
+
*.dat
|
|
10
|
+
*.pyc
|
|
11
|
+
build
|
|
12
|
+
*.prof
|
|
13
|
+
doc/hedge-notes.pdf
|
|
14
|
+
*.vtk
|
|
15
|
+
*.silo
|
|
16
|
+
*.session
|
|
17
|
+
dump.py
|
|
18
|
+
*.orig
|
|
19
|
+
/Makefile
|
|
20
|
+
*.png
|
|
21
|
+
tags
|
|
22
|
+
*.vtu
|
|
23
|
+
*.pvtu
|
|
24
|
+
*.pvd
|
|
25
|
+
doc/user-reference
|
|
26
|
+
doc/dev-reference
|
|
27
|
+
*.poly
|
|
28
|
+
*.node
|
|
29
|
+
*.bak
|
|
30
|
+
*.pdf
|
|
31
|
+
*.tif
|
|
32
|
+
*.so
|
|
33
|
+
*.pyd
|
|
34
|
+
*.mpeg
|
|
35
|
+
*-journal
|
|
36
|
+
visitlog.py
|
|
37
|
+
*.log
|
|
38
|
+
.figleaf
|
|
39
|
+
dist
|
|
40
|
+
*.egg*
|
|
41
|
+
MANIFEST
|
|
42
|
+
*.patch
|
|
43
|
+
*.LOCAL.[0-9]*
|
|
44
|
+
*.REMOTE.[0-9]*
|
|
45
|
+
*.BASE.[0-9]*
|
|
46
|
+
tmp
|
|
47
|
+
temp*
|
|
48
|
+
setuptools.pth
|
|
49
|
+
distribute-*.tar.gz
|
|
50
|
+
core
|
|
51
|
+
*.sess
|
|
52
|
+
_build
|
|
53
|
+
__pycache__
|
|
54
|
+
*.o
|
|
55
|
+
.ipynb_checkpoints
|
|
56
|
+
cscope.*
|
|
57
|
+
|
|
58
|
+
# needed by jenkins env
|
|
59
|
+
.env
|
|
60
|
+
virtualenv-[0-9]*
|
|
61
|
+
pytest.xml
|
|
62
|
+
setuptools*tar.gz
|
|
63
|
+
build-and-test-py-project.sh
|
|
64
|
+
|
|
65
|
+
cffi_build.py
|
|
66
|
+
|
|
67
|
+
.cache
|
|
68
|
+
.pytest_cache
|
|
69
|
+
.idea
|
|
70
|
+
|
|
71
|
+
wheelhouse
|
|
72
|
+
|
|
73
|
+
memray-*.bin
|
|
74
|
+
memray-*.html
|
|
75
|
+
|
|
76
|
+
.pylintrc.yml
|
|
77
|
+
.run-pylint.py
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
Python 3 Intel CPU:
|
|
2
|
+
script: |
|
|
3
|
+
source /opt/enable-intel-cl.sh
|
|
4
|
+
export PYOPENCL_TEST="intel(r):pu"
|
|
5
|
+
export EXTRA_INSTALL="numpy mako"
|
|
6
|
+
|
|
7
|
+
curl -L -O https://tiker.net/ci-support-v0
|
|
8
|
+
. ci-support-v0
|
|
9
|
+
build_py_project_in_venv
|
|
10
|
+
test_py_project
|
|
11
|
+
tags:
|
|
12
|
+
- python3
|
|
13
|
+
- intel-cl-cpu
|
|
14
|
+
except:
|
|
15
|
+
- tags
|
|
16
|
+
artifacts:
|
|
17
|
+
reports:
|
|
18
|
+
junit: test/pytest.xml
|
|
19
|
+
|
|
20
|
+
Python 3 Nvidia Titan X:
|
|
21
|
+
script: |
|
|
22
|
+
export PYOPENCL_TEST=nvi:titan
|
|
23
|
+
export EXTRA_INSTALL="numpy mako"
|
|
24
|
+
|
|
25
|
+
curl -L -O https://tiker.net/ci-support-v0
|
|
26
|
+
. ci-support-v0
|
|
27
|
+
build_py_project_in_venv
|
|
28
|
+
test_py_project
|
|
29
|
+
tags:
|
|
30
|
+
- python3
|
|
31
|
+
- nvidia-titan-x
|
|
32
|
+
except:
|
|
33
|
+
- tags
|
|
34
|
+
artifacts:
|
|
35
|
+
reports:
|
|
36
|
+
junit: test/pytest.xml
|
|
37
|
+
|
|
38
|
+
Python 3 Nvidia Titan V:
|
|
39
|
+
script: |
|
|
40
|
+
export PYOPENCL_TEST=nvi:titan
|
|
41
|
+
export EXTRA_INSTALL="numpy mako"
|
|
42
|
+
|
|
43
|
+
curl -L -O https://tiker.net/ci-support-v0
|
|
44
|
+
. ci-support-v0
|
|
45
|
+
build_py_project_in_venv
|
|
46
|
+
test_py_project
|
|
47
|
+
tags:
|
|
48
|
+
- python3
|
|
49
|
+
- nvidia-titan-v
|
|
50
|
+
except:
|
|
51
|
+
- tags
|
|
52
|
+
artifacts:
|
|
53
|
+
reports:
|
|
54
|
+
junit: test/pytest.xml
|
|
55
|
+
|
|
56
|
+
Python 3 Nvidia K40:
|
|
57
|
+
script: |
|
|
58
|
+
export PYOPENCL_TEST=nvi:k40
|
|
59
|
+
export EXTRA_INSTALL="numpy mako"
|
|
60
|
+
|
|
61
|
+
curl -L -O https://tiker.net/ci-support-v0
|
|
62
|
+
. ci-support-v0
|
|
63
|
+
build_py_project_in_venv
|
|
64
|
+
test_py_project
|
|
65
|
+
tags:
|
|
66
|
+
- python3
|
|
67
|
+
- nvidia-k40
|
|
68
|
+
except:
|
|
69
|
+
- tags
|
|
70
|
+
artifacts:
|
|
71
|
+
reports:
|
|
72
|
+
junit: test/pytest.xml
|
|
73
|
+
|
|
74
|
+
Python 3 POCL:
|
|
75
|
+
script: |
|
|
76
|
+
export PYOPENCL_TEST=portable:cpu
|
|
77
|
+
export EXTRA_INSTALL="numpy mako"
|
|
78
|
+
|
|
79
|
+
curl -L -O https://tiker.net/ci-support-v0
|
|
80
|
+
. ci-support-v0
|
|
81
|
+
build_py_project_in_venv
|
|
82
|
+
test_py_project
|
|
83
|
+
tags:
|
|
84
|
+
- python3
|
|
85
|
+
- pocl
|
|
86
|
+
except:
|
|
87
|
+
- tags
|
|
88
|
+
artifacts:
|
|
89
|
+
reports:
|
|
90
|
+
junit: test/pytest.xml
|
|
91
|
+
|
|
92
|
+
Python 3 POCL CL 1.1:
|
|
93
|
+
script: |
|
|
94
|
+
export PYOPENCL_TEST=portable:cpu
|
|
95
|
+
export EXTRA_INSTALL="numpy mako"
|
|
96
|
+
export PYOPENCL_PRETEND_CL_VERSION='1.1'
|
|
97
|
+
|
|
98
|
+
curl -L -O https://tiker.net/ci-support-v0
|
|
99
|
+
. ci-support-v0
|
|
100
|
+
build_py_project_in_venv
|
|
101
|
+
test_py_project
|
|
102
|
+
tags:
|
|
103
|
+
- python3
|
|
104
|
+
- pocl
|
|
105
|
+
except:
|
|
106
|
+
- tags
|
|
107
|
+
artifacts:
|
|
108
|
+
reports:
|
|
109
|
+
junit: test/pytest.xml
|
|
110
|
+
|
|
111
|
+
Python 3 POCL K40:
|
|
112
|
+
script: |
|
|
113
|
+
export PYOPENCL_TEST=portable:k40
|
|
114
|
+
export EXTRA_INSTALL="numpy mako"
|
|
115
|
+
|
|
116
|
+
curl -L -O https://tiker.net/ci-support-v0
|
|
117
|
+
. ci-support-v0
|
|
118
|
+
build_py_project_in_venv
|
|
119
|
+
test_py_project
|
|
120
|
+
tags:
|
|
121
|
+
- python3
|
|
122
|
+
- pocl
|
|
123
|
+
- nvidia-k40
|
|
124
|
+
except:
|
|
125
|
+
- tags
|
|
126
|
+
artifacts:
|
|
127
|
+
reports:
|
|
128
|
+
junit: test/pytest.xml
|
|
129
|
+
|
|
130
|
+
Python 3 POCL Titan V:
|
|
131
|
+
script: |
|
|
132
|
+
export PYOPENCL_TEST=portable:titan
|
|
133
|
+
export EXTRA_INSTALL="numpy mako"
|
|
134
|
+
|
|
135
|
+
curl -L -O https://tiker.net/ci-support-v0
|
|
136
|
+
. ci-support-v0
|
|
137
|
+
build_py_project_in_venv
|
|
138
|
+
test_py_project
|
|
139
|
+
tags:
|
|
140
|
+
- python3
|
|
141
|
+
- pocl
|
|
142
|
+
- nvidia-titan-v
|
|
143
|
+
except:
|
|
144
|
+
- tags
|
|
145
|
+
artifacts:
|
|
146
|
+
reports:
|
|
147
|
+
junit: test/pytest.xml
|
|
148
|
+
|
|
149
|
+
Python 3 POCL (+GL and special functions):
|
|
150
|
+
script: |
|
|
151
|
+
export PYOPENCL_TEST=portable:cpu
|
|
152
|
+
export EXTRA_INSTALL="numpy mako scipy pyfmmlib"
|
|
153
|
+
export PYOPENCL_ENABLE_GL=ON
|
|
154
|
+
|
|
155
|
+
curl -L -O https://tiker.net/ci-support-v0
|
|
156
|
+
. ci-support-v0
|
|
157
|
+
build_py_project_in_venv
|
|
158
|
+
test_py_project
|
|
159
|
+
tags:
|
|
160
|
+
- python3
|
|
161
|
+
- pocl
|
|
162
|
+
except:
|
|
163
|
+
- tags
|
|
164
|
+
artifacts:
|
|
165
|
+
reports:
|
|
166
|
+
junit: test/pytest.xml
|
|
167
|
+
|
|
168
|
+
Flake8:
|
|
169
|
+
script: |
|
|
170
|
+
curl -L -O https://tiker.net/ci-support-v0
|
|
171
|
+
. ci-support-v0
|
|
172
|
+
build_py_project_in_venv
|
|
173
|
+
install_and_run_flake8 "$(get_proj_name)" examples/*.py test/*.py
|
|
174
|
+
tags:
|
|
175
|
+
- python3
|
|
176
|
+
except:
|
|
177
|
+
- tags
|
|
178
|
+
|
|
179
|
+
Pylint:
|
|
180
|
+
script: |
|
|
181
|
+
export EXTRA_INSTALL="numpy mako matplotlib PyOpenGl IPython"
|
|
182
|
+
|
|
183
|
+
curl -L -O https://tiker.net/ci-support-v0
|
|
184
|
+
. ci-support-v0
|
|
185
|
+
|
|
186
|
+
build_py_project_in_venv
|
|
187
|
+
|
|
188
|
+
# Avoid linting local directory, where native module
|
|
189
|
+
# cannot be imported.
|
|
190
|
+
rm -Rf "$(get_proj_name)"
|
|
191
|
+
|
|
192
|
+
run_pylint "$(get_proj_name)" test/*.py
|
|
193
|
+
tags:
|
|
194
|
+
- python3
|
|
195
|
+
except:
|
|
196
|
+
- tags
|
|
197
|
+
|
|
198
|
+
Mypy:
|
|
199
|
+
script: |
|
|
200
|
+
export EXTRA_INSTALL="numpy mako mypy importlib-resources"
|
|
201
|
+
|
|
202
|
+
curl -L -O https://tiker.net/ci-support-v0
|
|
203
|
+
. ci-support-v0
|
|
204
|
+
build_py_project_in_venv
|
|
205
|
+
python -m mypy --show-error-codes pyopencl test
|
|
206
|
+
tags:
|
|
207
|
+
- python3
|
|
208
|
+
except:
|
|
209
|
+
- tags
|
|
210
|
+
|
|
211
|
+
Documentation:
|
|
212
|
+
script: |
|
|
213
|
+
export EXTRA_INSTALL="numpy mako"
|
|
214
|
+
|
|
215
|
+
curl -L -O https://tiker.net/ci-support-v0
|
|
216
|
+
. ci-support-v0
|
|
217
|
+
build_py_project_in_venv
|
|
218
|
+
build_docs
|
|
219
|
+
maybe_upload_docs
|
|
220
|
+
tags:
|
|
221
|
+
- linux
|
|
222
|
+
|
|
223
|
+
Examples:
|
|
224
|
+
script: |
|
|
225
|
+
export EXTRA_INSTALL="pillow cgen mako imageio"
|
|
226
|
+
|
|
227
|
+
curl -L -O https://tiker.net/ci-support-v0
|
|
228
|
+
. ci-support-v0
|
|
229
|
+
build_py_project_in_venv
|
|
230
|
+
(cd examples; rm -f gl_*)
|
|
231
|
+
run_examples --no-require-main
|
|
232
|
+
except:
|
|
233
|
+
- tags
|
|
234
|
+
tags:
|
|
235
|
+
- python3
|
|
236
|
+
- pocl
|
|
237
|
+
|
|
238
|
+
Downstream:
|
|
239
|
+
parallel:
|
|
240
|
+
matrix:
|
|
241
|
+
- DOWNSTREAM_PROJECT: [loopy, boxtree, meshmode]
|
|
242
|
+
tags:
|
|
243
|
+
- large-node
|
|
244
|
+
- "docker-runner"
|
|
245
|
+
script: |
|
|
246
|
+
curl -L -O https://tiker.net/ci-support-v0
|
|
247
|
+
. ci-support-v0
|
|
248
|
+
|
|
249
|
+
prepare_downstream_build "https://github.com/inducer/$DOWNSTREAM_PROJECT.git"
|
|
250
|
+
sed -i 's/pyopencl/ocl-icd/' .test-conda-env-py3.yml
|
|
251
|
+
build_py_project_in_conda_env
|
|
252
|
+
test_py_project
|
|
253
|
+
|
|
254
|
+
# vim: sw=2
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.17...3.26)
|
|
2
|
+
|
|
3
|
+
project(pyopencl LANGUAGES CXX VERSION ${SKBUILD_PROJECT_VERSION})
|
|
4
|
+
|
|
5
|
+
if(NOT SKBUILD)
|
|
6
|
+
message(WARNING "\
|
|
7
|
+
This CMake file is meant to be executed using 'scikit-build'. Running
|
|
8
|
+
it directly will almost certainly not produce the desired result. If
|
|
9
|
+
you are a user trying to install this package, please use the command
|
|
10
|
+
below, which will install all necessary build dependencies, compile
|
|
11
|
+
the package in an isolated environment, and then install it.
|
|
12
|
+
=====================================================================
|
|
13
|
+
$ pip install .
|
|
14
|
+
=====================================================================
|
|
15
|
+
If you are a software developer, and this is your own package, then
|
|
16
|
+
it is usually much more efficient to install the build dependencies
|
|
17
|
+
in your environment once and use the following command that avoids
|
|
18
|
+
a costly creation of a new virtual environment at every compilation:
|
|
19
|
+
=====================================================================
|
|
20
|
+
$ pip install nanobind scikit-build-core[pyproject]
|
|
21
|
+
$ pip install --no-build-isolation -ve .
|
|
22
|
+
=====================================================================
|
|
23
|
+
You may optionally add -Ceditable.rebuild=true to auto-rebuild when
|
|
24
|
+
the package is imported. Otherwise, you need to re-run the above
|
|
25
|
+
after editing C++ files.")
|
|
26
|
+
endif()
|
|
27
|
+
|
|
28
|
+
# {{{ Options
|
|
29
|
+
|
|
30
|
+
option(PYOPENCL_TRACE "Enable OpenCL tracing" $ENV{PYOPENCL_TRACE})
|
|
31
|
+
option(PYOPENCL_ENABLE_GL "Enable OpenGL interoperability" $ENV{PYOPENCL_ENABLE_GL})
|
|
32
|
+
option(PYOPENCL_USE_SHIPPED_EXT "Use shipped CL extension header" $ENV{PYOPENCL_USE_SHIPPED_EXT})
|
|
33
|
+
|
|
34
|
+
set(CL_INC_DIR CACHE STRING "OpenCL include directory")
|
|
35
|
+
set(CL_LIB_DIR CACHE STRING "OpenCL library directory")
|
|
36
|
+
set(CL_LIBNAME CACHE STRING "OpenCL library name")
|
|
37
|
+
|
|
38
|
+
set(PYOPENCL_PRETEND_CL_VERSION CACHE STRING "Pretend to be a different OpenCL version")
|
|
39
|
+
|
|
40
|
+
if(NOT CL_INC_DIR)
|
|
41
|
+
message(STATUS "CL_INC_DIR not set, trying to guess it from environment variables.")
|
|
42
|
+
if(DEFINED ENV{CL_INC_DIR})
|
|
43
|
+
message(STATUS "Using OpenCL include directory from environment '$ENV{CL_INC_DIR}'")
|
|
44
|
+
set(CL_INC_DIR $ENV{CL_INC_DIR})
|
|
45
|
+
endif()
|
|
46
|
+
|
|
47
|
+
if(DEFINED ENV{CL_LIB_DIR})
|
|
48
|
+
message(STATUS "Using OpenCL library directory from environment '$ENV{CL_INC_DIR}'")
|
|
49
|
+
set(CL_LIB_DIR $ENV{CL_LIB_DIR})
|
|
50
|
+
endif()
|
|
51
|
+
|
|
52
|
+
if(DEFINED ENV{CL_LIBNAME})
|
|
53
|
+
message(STATUS "Using OpenCL library name from environment '$ENV{CL_LIBNAME}'")
|
|
54
|
+
set(CL_LIBNAME $ENV{CL_LIBNAME})
|
|
55
|
+
endif()
|
|
56
|
+
endif(NOT CL_INC_DIR)
|
|
57
|
+
|
|
58
|
+
if(NOT CL_INC_DIR)
|
|
59
|
+
message(STATUS "CL_INC_DIR not set, trying to guess it from conda environment.")
|
|
60
|
+
if(DEFINED ENV{CONDA_PREFIX})
|
|
61
|
+
# Linux/MacOS:
|
|
62
|
+
if(EXISTS $ENV{CONDA_PREFIX}/lib/libOpenCL${CMAKE_SHARED_LIBRARY_SUFFIX})
|
|
63
|
+
message(STATUS "Found OpenCL in conda environment '$ENV{CONDA_PREFIX}'")
|
|
64
|
+
set(CL_INC_DIR $ENV{CONDA_PREFIX}/include)
|
|
65
|
+
set(CL_LIB_DIR $ENV{CONDA_PREFIX}/lib)
|
|
66
|
+
set(CL_LIBNAME OpenCL)
|
|
67
|
+
# Windows:
|
|
68
|
+
elseif(EXISTS $ENV{CONDA_PREFIX}/Library/lib/OpenCL${CMAKE_STATIC_LIBRARY_SUFFIX})
|
|
69
|
+
message(STATUS "Found OpenCL in conda environment '$ENV{CONDA_PREFIX}'")
|
|
70
|
+
set(CL_INC_DIR $ENV{CONDA_PREFIX}/Library/include)
|
|
71
|
+
set(CL_LIB_DIR $ENV{CONDA_PREFIX}/Library/lib)
|
|
72
|
+
set(CL_LIBNAME OpenCL)
|
|
73
|
+
endif()
|
|
74
|
+
|
|
75
|
+
endif(DEFINED ENV{CONDA_PREFIX})
|
|
76
|
+
endif(NOT CL_INC_DIR)
|
|
77
|
+
|
|
78
|
+
if(NOT PYOPENCL_PRETEND_CL_VERSION)
|
|
79
|
+
if(DEFINED ENV{PYOPENCL_PRETEND_CL_VERSION})
|
|
80
|
+
set(PYOPENCL_PRETEND_CL_VERSION $ENV{PYOPENCL_PRETEND_CL_VERSION})
|
|
81
|
+
endif()
|
|
82
|
+
endif()
|
|
83
|
+
|
|
84
|
+
if(PYOPENCL_PRETEND_CL_VERSION)
|
|
85
|
+
# Split the version string into a list
|
|
86
|
+
string(REPLACE "." ";" VERSION_LIST ${PYOPENCL_PRETEND_CL_VERSION})
|
|
87
|
+
|
|
88
|
+
# Get the major and minor version numbers
|
|
89
|
+
list(GET VERSION_LIST 0 MAJOR)
|
|
90
|
+
list(GET VERSION_LIST 1 MINOR)
|
|
91
|
+
|
|
92
|
+
# Calculate the numerical value
|
|
93
|
+
math(EXPR ARG "0x1000*${MAJOR} + 0x10*${MINOR}")
|
|
94
|
+
message(STATUS "Pretending to use OpenCL version ${PYOPENCL_PRETEND_CL_VERSION} (${ARG})")
|
|
95
|
+
set(PYOPENCL_PRETEND_CL_VERSION ${ARG})
|
|
96
|
+
endif()
|
|
97
|
+
|
|
98
|
+
message(STATUS "CL_INC_DIR ${CL_INC_DIR}")
|
|
99
|
+
message(STATUS "CL_LIB_DIR ${CL_LIB_DIR}")
|
|
100
|
+
message(STATUS "CL_LIBNAME ${CL_LIBNAME}")
|
|
101
|
+
|
|
102
|
+
# }}}
|
|
103
|
+
|
|
104
|
+
# {{{ Get version information
|
|
105
|
+
|
|
106
|
+
find_program(GIT git)
|
|
107
|
+
|
|
108
|
+
if(GIT AND EXISTS ${CMAKE_SOURCE_DIR}/.git)
|
|
109
|
+
# Exact tag match => released version
|
|
110
|
+
execute_process(COMMAND git describe --exact-match --dirty=*
|
|
111
|
+
OUTPUT_VARIABLE PYOPENCL_VERSION_GIT
|
|
112
|
+
RESULT_VARIABLE git_result
|
|
113
|
+
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
114
|
+
ERROR_QUIET
|
|
115
|
+
)
|
|
116
|
+
if(NOT ${git_result} EQUAL 0)
|
|
117
|
+
# No exact tag match => development version
|
|
118
|
+
execute_process(COMMAND git describe --long --always --dirty=*
|
|
119
|
+
OUTPUT_VARIABLE PYOPENCL_VERSION_GIT
|
|
120
|
+
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
121
|
+
)
|
|
122
|
+
set(PYOPENCL_REL "(dev)")
|
|
123
|
+
else()
|
|
124
|
+
set(PYOPENCL_REL "(release)")
|
|
125
|
+
endif()
|
|
126
|
+
else()
|
|
127
|
+
set(PYOPENCL_VERSION_GIT "v${PROJECT_VERSION}")
|
|
128
|
+
set(PYOPENCL_REL "(non-git)")
|
|
129
|
+
endif()
|
|
130
|
+
|
|
131
|
+
# }}}
|
|
132
|
+
|
|
133
|
+
find_package(Python COMPONENTS Interpreter Development.Module NumPy REQUIRED)
|
|
134
|
+
|
|
135
|
+
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
|
136
|
+
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
|
|
137
|
+
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
|
|
138
|
+
endif()
|
|
139
|
+
|
|
140
|
+
# {{{ Detect nanobind and import it
|
|
141
|
+
|
|
142
|
+
execute_process(
|
|
143
|
+
COMMAND
|
|
144
|
+
"${PYTHON_EXECUTABLE}" -c "import nanobind; print(nanobind.__version__)"
|
|
145
|
+
OUTPUT_VARIABLE NANOBIND_VERSION
|
|
146
|
+
OUTPUT_STRIP_TRAILING_WHITESPACE COMMAND_ECHO STDOUT)
|
|
147
|
+
|
|
148
|
+
execute_process(
|
|
149
|
+
COMMAND
|
|
150
|
+
"${PYTHON_EXECUTABLE}" -c "import nanobind; print(nanobind.cmake_dir())"
|
|
151
|
+
OUTPUT_VARIABLE _tmp_dir
|
|
152
|
+
OUTPUT_STRIP_TRAILING_WHITESPACE COMMAND_ECHO STDOUT)
|
|
153
|
+
list(APPEND CMAKE_PREFIX_PATH "${_tmp_dir}")
|
|
154
|
+
|
|
155
|
+
# }}}
|
|
156
|
+
|
|
157
|
+
link_directories(${CL_LIB_DIR})
|
|
158
|
+
include_directories(${CL_INC_DIR} ${Python_NumPy_INCLUDE_DIRS})
|
|
159
|
+
|
|
160
|
+
find_package(nanobind CONFIG REQUIRED)
|
|
161
|
+
|
|
162
|
+
set(OpenCL_ROOT ${CL_LIB_DIR})
|
|
163
|
+
set(OpenCL_INCLUDE_DIR ${CL_INC_DIR})
|
|
164
|
+
set(OpenCL_LIBRARY ${CL_LIBNAME})
|
|
165
|
+
find_package(OpenCL REQUIRED)
|
|
166
|
+
|
|
167
|
+
nanobind_add_module(
|
|
168
|
+
_cl
|
|
169
|
+
NB_STATIC # Build static libnanobind (the extension module itself remains a shared library)
|
|
170
|
+
src/wrap_constants.cpp
|
|
171
|
+
src/wrap_cl.cpp
|
|
172
|
+
src/wrap_cl_part_1.cpp
|
|
173
|
+
src/wrap_cl_part_2.cpp
|
|
174
|
+
src/wrap_mempool.cpp
|
|
175
|
+
src/bitlog.cpp
|
|
176
|
+
)
|
|
177
|
+
|
|
178
|
+
target_link_libraries(_cl PRIVATE ${OpenCL_LIBRARY})
|
|
179
|
+
|
|
180
|
+
target_compile_definitions(_cl
|
|
181
|
+
PRIVATE
|
|
182
|
+
PYGPU_PACKAGE=pyopencl
|
|
183
|
+
PYGPU_PYOPENCL
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
if (PYOPENCL_PRETEND_CL_VERSION)
|
|
187
|
+
target_compile_definitions(
|
|
188
|
+
_cl PRIVATE PYOPENCL_PRETEND_CL_VERSION=${PYOPENCL_PRETEND_CL_VERSION})
|
|
189
|
+
endif()
|
|
190
|
+
|
|
191
|
+
if (PYOPENCL_ENABLE_GL)
|
|
192
|
+
target_compile_definitions(_cl PRIVATE HAVE_GL=1)
|
|
193
|
+
endif()
|
|
194
|
+
|
|
195
|
+
if (PYOPENCL_TRACE)
|
|
196
|
+
target_compile_definitions(_cl PRIVATE PYOPENCL_TRACE=1)
|
|
197
|
+
endif()
|
|
198
|
+
|
|
199
|
+
if (PYOPENCL_USE_SHIPPED_EXT)
|
|
200
|
+
target_compile_definitions(_cl PRIVATE PYOPENCL_USE_SHIPPED_EXT=1)
|
|
201
|
+
endif()
|
|
202
|
+
|
|
203
|
+
install(TARGETS _cl LIBRARY DESTINATION pyopencl)
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
# {{{ Print configuration
|
|
207
|
+
|
|
208
|
+
message("==============================")
|
|
209
|
+
message("PyOpenCL ${PYOPENCL_VERSION_GIT} ${PYOPENCL_REL} configuration: ")
|
|
210
|
+
message(" PyOpenCL options: PYOPENCL_TRACE=${PYOPENCL_TRACE} PYOPENCL_ENABLE_GL=${PYOPENCL_ENABLE_GL} PYOPENCL_USE_SHIPPED_EXT=${PYOPENCL_USE_SHIPPED_EXT} PYOPENCL_PRETEND_CL_VERSION=${PYOPENCL_PRETEND_CL_VERSION}")
|
|
211
|
+
message(" OpenCL: ${OpenCL_LIBRARIES} [${OpenCL_VERSION_STRING}]")
|
|
212
|
+
message(" Python: ${Python_VERSION} [${Python_EXECUTABLE}]")
|
|
213
|
+
message(" Build type: ${CMAKE_BUILD_TYPE}")
|
|
214
|
+
message(" C++ compiler: ${CMAKE_CXX_COMPILER} [${CMAKE_CXX_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}]")
|
|
215
|
+
message(" CMake: ${CMAKE_COMMAND} [${CMAKE_VERSION}]")
|
|
216
|
+
message(" Nanobind: ${NANOBIND_VERSION}")
|
|
217
|
+
message("==============================")
|
|
218
|
+
|
|
219
|
+
# }}}
|
|
220
|
+
|
|
221
|
+
# vim: foldmethod=marker:sw=2
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyopencl
|
|
3
|
-
Version: 2024.2.
|
|
3
|
+
Version: 2024.2.5
|
|
4
4
|
Summary: Python wrapper for OpenCL
|
|
5
|
-
|
|
6
|
-
Author: Andreas Kloeckner
|
|
7
|
-
Author-email: inform@tiker.net
|
|
8
|
-
License: MIT
|
|
9
|
-
Classifier: Environment :: Console
|
|
5
|
+
Author-Email: Andreas Kloeckner <inform@tiker.net>
|
|
10
6
|
Classifier: Development Status :: 5 - Production/Stable
|
|
7
|
+
Classifier: Environment :: Console
|
|
11
8
|
Classifier: Intended Audience :: Developers
|
|
12
9
|
Classifier: Intended Audience :: Other Audience
|
|
13
10
|
Classifier: Intended Audience :: Science/Research
|
|
@@ -19,19 +16,22 @@ Classifier: Programming Language :: Python :: 3
|
|
|
19
16
|
Classifier: Topic :: Scientific/Engineering
|
|
20
17
|
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
21
18
|
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
19
|
+
Project-URL: Homepage, https://mathema.tician.de/software/pyopencl
|
|
20
|
+
Project-URL: Documentation, https://documen.tician.de/pyopencl
|
|
21
|
+
Project-URL: Repository, https://github.com/inducer/pyopencl
|
|
22
22
|
Requires-Python: ~=3.8
|
|
23
|
-
|
|
23
|
+
Requires-Dist: importlib-resources; python_version < "3.9"
|
|
24
24
|
Requires-Dist: numpy
|
|
25
|
-
Requires-Dist: pytools>=2022.1.13
|
|
26
25
|
Requires-Dist: platformdirs>=2.2.0
|
|
27
|
-
Requires-Dist:
|
|
28
|
-
|
|
26
|
+
Requires-Dist: pytools>=2022.1.13
|
|
27
|
+
Requires-Dist: oclgrind_binary_distribution>=18.3; extra == "oclgrind"
|
|
29
28
|
Requires-Dist: pocl_binary_distribution>=1.2; extra == "pocl"
|
|
29
|
+
Requires-Dist: Mako; extra == "test"
|
|
30
|
+
Requires-Dist: pytest>=7.0.0; extra == "test"
|
|
30
31
|
Provides-Extra: oclgrind
|
|
31
|
-
|
|
32
|
+
Provides-Extra: pocl
|
|
32
33
|
Provides-Extra: test
|
|
33
|
-
|
|
34
|
-
Requires-Dist: Mako; extra == "test"
|
|
34
|
+
Description-Content-Type: text/x-rst
|
|
35
35
|
|
|
36
36
|
PyOpenCL: Pythonic Access to OpenCL, with Arrays and Algorithms
|
|
37
37
|
===============================================================
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
constants.inc
|
|
@@ -177,19 +177,41 @@ To install pyopencl with oclgrind, an OpenCL debugger do::
|
|
|
177
177
|
For example, installing PyOpenCL from pip followed by OCL-ICD from Conda Forge can
|
|
178
178
|
redirect the ICD loader, removing access to system-wide ICDs.
|
|
179
179
|
|
|
180
|
-
Installing via Christoph Gohlke's binary wheels (Windows)
|
|
181
|
-
---------------------------------------------------------
|
|
182
|
-
|
|
183
|
-
Christoph Gohlke distributes `binary wheels for PyOpenCL on Windows
|
|
184
|
-
<https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyopencl>`__.
|
|
185
|
-
|
|
186
180
|
Installing from source
|
|
187
181
|
----------------------
|
|
188
182
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
183
|
+
Installing PyOpenCL *from source* should mostly not be necessary unless you
|
|
184
|
+
have very specific needs or would like to modify PyOpenCL yourself.
|
|
185
|
+
You can find generic installation instructions for ``nanobind``-based packages `here <https://nanobind.readthedocs.io/en/latest/packaging.html#step-4-install-the-package-locally>`__.
|
|
186
|
+
|
|
187
|
+
For PyOpenCL, the basic process is as follows:
|
|
188
|
+
|
|
189
|
+
.. code-block:: bash
|
|
190
|
+
|
|
191
|
+
$ cd pyopencl
|
|
192
|
+
|
|
193
|
+
# non-editable install:
|
|
194
|
+
$ pip install -v .
|
|
195
|
+
|
|
196
|
+
# editable install - make sure to disable build isolation:
|
|
197
|
+
$ pip install nanobind scikit-build-core[pyproject] numpy ninja
|
|
198
|
+
$ pip install --no-build-isolation -ve .
|
|
199
|
+
|
|
200
|
+
# editable install with automatic recompilation if needed (somewhat experimental):
|
|
201
|
+
$ pip install --no-build-isolation -Ceditable.rebuild=true -Cbuild-dir=build -ve .
|
|
202
|
+
|
|
203
|
+
PyOpenCL will attempt to automatically find and use the OpenCL headers and libraries
|
|
204
|
+
while building. You can also specify the paths to the OpenCL headers and libraries manually:
|
|
205
|
+
|
|
206
|
+
.. code-block:: bash
|
|
207
|
+
|
|
208
|
+
# Option 1: specify the paths via environment variables:
|
|
209
|
+
$ export CL_INC_DIR=</path/to/OpenCL/include>
|
|
210
|
+
$ export CL_LIB_DIR=</path/to/OpenCL/lib>
|
|
211
|
+
$ export CL_LIBNAME=<OpenCL libname>
|
|
212
|
+
|
|
213
|
+
# Option 2: specify the paths via arguments to pip install:
|
|
214
|
+
$ pip install -v . --config-settings='cmake.args=-DCL_INC_DIR=/path/to/OpenCL/include;-DCL_LIB_DIR=/path/to/OpenCL/lib'
|
|
193
215
|
|
|
194
216
|
Tips
|
|
195
217
|
====
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wiki-examples
|