pyopencl 2025.2.2__tar.gz → 2025.2.4__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-2025.2.2 → pyopencl-2025.2.4}/PKG-INFO +1 -1
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/runtime.rst +3 -3
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/array.py +36 -2
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/compyte/dtypes.py +10 -16
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/compyte/pyproject.toml +3 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/typing.py +4 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyproject.toml +2 -1
- pyopencl-2025.2.2/.basedpyright/baseline.json +0 -48956
- pyopencl-2025.2.2/pyopencl/compyte/.basedpyright/baseline.json +0 -1272
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/.gitignore +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/.gitlab-ci.yml +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/.gitmodules +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/.test-conda-env-py3.yml +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/CITATION.cff +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/CMakeLists.txt +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/LICENSE +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/README.rst +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/contrib/cldis.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/contrib/fortran-to-opencl/README +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/contrib/fortran-to-opencl/translate.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/contrib/pyopencl.vim +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/.gitignore +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/Makefile +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/algorithm.rst +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/array.rst +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/conf.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/howto.rst +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/index.rst +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/make_constants.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/misc.rst +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/runtime_const.rst +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/runtime_gl.rst +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/runtime_memory.rst +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/runtime_platform.rst +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/runtime_program.rst +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/runtime_queue.rst +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/subst.rst +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/tools.rst +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/types.rst +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/.gitignore +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/black-hole-accretion.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/demo-struct-reduce.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/demo.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/demo_array.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/demo_array_svm.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/demo_elementwise.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/demo_elementwise_complex.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/demo_mandelbrot.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/demo_meta_codepy.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/demo_meta_template.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/dump-performance.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/dump-properties.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/gl_interop_demo.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/gl_particle_animation.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/image_filters_using_image2d_t.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/ipython-demo.ipynb +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/median-filter.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/n-body.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/narray.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/noisyImage.jpg +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/pi-monte-carlo.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/svm.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/transpose.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/__init__.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/_cl.pyi +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/_cluda.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/_monkeypatch.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/_mymako.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/algorithm.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/bitonic_sort.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/bitonic_sort_templates.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/cache.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/capture_call.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/characterize/__init__.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/characterize/performance.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/cl/pyopencl-airy.cl +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/cl/pyopencl-bessel-j-complex.cl +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/cl/pyopencl-bessel-j.cl +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/cl/pyopencl-bessel-y.cl +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/cl/pyopencl-complex.h +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/cl/pyopencl-eval-tbl.cl +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/cl/pyopencl-hankel-complex.cl +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/cl/pyopencl-random123/array.h +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/cl/pyopencl-random123/openclfeatures.h +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/cl/pyopencl-random123/philox.cl +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/cl/pyopencl-random123/threefry.cl +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/clmath.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/clrandom.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/cltypes.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/compyte/.gitignore +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/compyte/__init__.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/compyte/array.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/elementwise.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/invoker.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/ipython_ext.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/py.typed +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/reduction.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/scan.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/tools.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/version.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/scripts/build-ocl-macos.sh +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/scripts/build-ocl-windows.sh +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/scripts/build-ocl.sh +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/src/bitlog.cpp +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/src/bitlog.hpp +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/src/clinfo_ext.h +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/src/mempool.hpp +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/src/pyopencl_ext.h +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/src/tools.hpp +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/src/wrap_cl.cpp +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/src/wrap_cl.hpp +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/src/wrap_cl_part_1.cpp +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/src/wrap_cl_part_2.cpp +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/src/wrap_constants.cpp +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/src/wrap_helpers.hpp +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/src/wrap_mempool.cpp +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/stubgen/stubgen.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/test/add-vectors-32.spv +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/test/add-vectors-64.spv +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/test/empty-header.h +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/test/test_algorithm.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/test/test_array.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/test/test_arrays_in_structs.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/test/test_clmath.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/test/test_clrandom.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/test/test_enqueue_copy.py +0 -0
- {pyopencl-2025.2.2 → pyopencl-2025.2.4}/test/test_wrapper.py +0 -0
|
@@ -57,7 +57,7 @@ resolve them.
|
|
|
57
57
|
|
|
58
58
|
.. class:: WaitList
|
|
59
59
|
|
|
60
|
-
A :class:`Sequence` of :class:`Event`\ s
|
|
60
|
+
A :class:`Sequence` of :class:`Event`\ s or *None*.
|
|
61
61
|
|
|
62
62
|
.. class:: NDArray
|
|
63
63
|
|
|
@@ -95,11 +95,11 @@ resolve them.
|
|
|
95
95
|
|
|
96
96
|
.. class:: WaitList
|
|
97
97
|
|
|
98
|
-
A :class:`Sequence` of :class:`Event`\ s
|
|
98
|
+
A :class:`Sequence` of :class:`Event`\ s or *None*.
|
|
99
99
|
|
|
100
100
|
.. class:: Context
|
|
101
101
|
|
|
102
|
-
See :class:`pyopencl.
|
|
102
|
+
See :class:`pyopencl.Context`.
|
|
103
103
|
|
|
104
104
|
.. class:: CommandQueue
|
|
105
105
|
|
|
@@ -59,6 +59,7 @@ from pyopencl.compyte.array import (
|
|
|
59
59
|
equal_strides as _equal_strides,
|
|
60
60
|
f_contiguous_strides as _f_contiguous_strides,
|
|
61
61
|
)
|
|
62
|
+
from pyopencl.typing import Allocator
|
|
62
63
|
|
|
63
64
|
|
|
64
65
|
if TYPE_CHECKING:
|
|
@@ -66,8 +67,6 @@ if TYPE_CHECKING:
|
|
|
66
67
|
|
|
67
68
|
from numpy.typing import DTypeLike, NDArray
|
|
68
69
|
|
|
69
|
-
from pyopencl.typing import Allocator
|
|
70
|
-
|
|
71
70
|
|
|
72
71
|
SCALAR_CLASSES = (Number, np.bool_, bool)
|
|
73
72
|
|
|
@@ -3404,4 +3403,39 @@ def cumsum(a, output_dtype=None, queue: cl.CommandQueue | None = None,
|
|
|
3404
3403
|
|
|
3405
3404
|
# }}}
|
|
3406
3405
|
|
|
3406
|
+
|
|
3407
|
+
__all__ = [
|
|
3408
|
+
"Allocator",
|
|
3409
|
+
"Array",
|
|
3410
|
+
"all",
|
|
3411
|
+
"any",
|
|
3412
|
+
"arange",
|
|
3413
|
+
"as_strided",
|
|
3414
|
+
"concatenate",
|
|
3415
|
+
"cumsum",
|
|
3416
|
+
"diff",
|
|
3417
|
+
"dot",
|
|
3418
|
+
"empty_like",
|
|
3419
|
+
"hstack",
|
|
3420
|
+
"if_positive",
|
|
3421
|
+
"logical_and",
|
|
3422
|
+
"logical_not",
|
|
3423
|
+
"logical_or",
|
|
3424
|
+
"maximum",
|
|
3425
|
+
"minimum",
|
|
3426
|
+
"multi_put",
|
|
3427
|
+
"multi_take",
|
|
3428
|
+
"multi_take_put",
|
|
3429
|
+
"reshape",
|
|
3430
|
+
"stack",
|
|
3431
|
+
"subset_dot",
|
|
3432
|
+
"sum",
|
|
3433
|
+
"take",
|
|
3434
|
+
"to_device",
|
|
3435
|
+
"transpose",
|
|
3436
|
+
"vdot",
|
|
3437
|
+
"zeros",
|
|
3438
|
+
"zeros_like",
|
|
3439
|
+
]
|
|
3440
|
+
|
|
3407
3441
|
# vim: foldmethod=marker
|
|
@@ -48,8 +48,8 @@ class DTypeRegistry:
|
|
|
48
48
|
self.name_to_dtype = {}
|
|
49
49
|
|
|
50
50
|
def get_or_register_dtype(self,
|
|
51
|
-
|
|
52
|
-
dtype: DTypeLike | None = None):
|
|
51
|
+
names: str | Sequence[str],
|
|
52
|
+
dtype: DTypeLike | None = None) -> np.dtype[Any]:
|
|
53
53
|
"""Get or register a :class:`numpy.dtype` associated with the C type names
|
|
54
54
|
in the string list *c_names*. If *dtype* is `None`, no registration is
|
|
55
55
|
performed, and the :class:`numpy.dtype` must already have been registered.
|
|
@@ -66,12 +66,12 @@ class DTypeRegistry:
|
|
|
66
66
|
.. versionadded:: 2012.2
|
|
67
67
|
"""
|
|
68
68
|
|
|
69
|
-
if isinstance(
|
|
70
|
-
|
|
69
|
+
if isinstance(names, str):
|
|
70
|
+
names = [names]
|
|
71
71
|
|
|
72
72
|
if dtype is None:
|
|
73
73
|
from pytools import single_valued
|
|
74
|
-
return single_valued(self.name_to_dtype[name] for name in
|
|
74
|
+
return single_valued(self.name_to_dtype[name] for name in names)
|
|
75
75
|
|
|
76
76
|
dtype = np.dtype(dtype)
|
|
77
77
|
|
|
@@ -86,7 +86,7 @@ class DTypeRegistry:
|
|
|
86
86
|
assert existing_dtype == dtype
|
|
87
87
|
dtype = existing_dtype
|
|
88
88
|
|
|
89
|
-
for nm in
|
|
89
|
+
for nm in names:
|
|
90
90
|
try:
|
|
91
91
|
name_dtype = self.name_to_dtype[nm]
|
|
92
92
|
except KeyError:
|
|
@@ -97,14 +97,14 @@ class DTypeRegistry:
|
|
|
97
97
|
f"name '{nm}' already registered to different dtype")
|
|
98
98
|
|
|
99
99
|
if not existed:
|
|
100
|
-
self.dtype_to_name[dtype] =
|
|
100
|
+
self.dtype_to_name[dtype] = names[0]
|
|
101
101
|
if str(dtype) not in self.dtype_to_name:
|
|
102
|
-
self.dtype_to_name[str(dtype)] =
|
|
102
|
+
self.dtype_to_name[str(dtype)] = names[0]
|
|
103
103
|
|
|
104
104
|
return dtype
|
|
105
105
|
|
|
106
|
-
def dtype_to_ctype(self, dtype:
|
|
107
|
-
if dtype is None:
|
|
106
|
+
def dtype_to_ctype(self, dtype: DTypeLike) -> str:
|
|
107
|
+
if dtype is None:
|
|
108
108
|
raise ValueError("dtype may not be None")
|
|
109
109
|
|
|
110
110
|
dtype = np.dtype(dtype)
|
|
@@ -160,12 +160,6 @@ def fill_registry_with_c_types(
|
|
|
160
160
|
f"{i64_name} unsigned int"],
|
|
161
161
|
np.uint64)
|
|
162
162
|
|
|
163
|
-
# https://github.com/numpy/numpy/issues/2610
|
|
164
|
-
if is_64_bit:
|
|
165
|
-
reg.get_or_register_dtype([f"unsigned {i64_name}"], np.uintp)
|
|
166
|
-
else:
|
|
167
|
-
reg.get_or_register_dtype(["unsigned"], np.uintp)
|
|
168
|
-
|
|
169
163
|
reg.get_or_register_dtype("float", np.float32)
|
|
170
164
|
reg.get_or_register_dtype("double", np.float64)
|
|
171
165
|
|
|
@@ -40,6 +40,9 @@ reportUnnecessaryIsInstance = "none"
|
|
|
40
40
|
reportUnusedCallResult = "none"
|
|
41
41
|
reportExplicitAny = "none"
|
|
42
42
|
reportUnreachable = "hint"
|
|
43
|
+
# array.py looks like stdlib array, but pyright doesn't know this
|
|
44
|
+
# won't ever be a top-level anything.
|
|
45
|
+
reportShadowedImports = "none"
|
|
43
46
|
|
|
44
47
|
# This reports even cycles that are qualified by 'if TYPE_CHECKING'. Not what
|
|
45
48
|
# we care about at this moment.
|
|
@@ -11,7 +11,7 @@ requires = [
|
|
|
11
11
|
|
|
12
12
|
[project]
|
|
13
13
|
name = "pyopencl"
|
|
14
|
-
version = "2025.2.
|
|
14
|
+
version = "2025.2.4"
|
|
15
15
|
description = "Python wrapper for OpenCL"
|
|
16
16
|
readme = "README.rst"
|
|
17
17
|
license = "MIT"
|
|
@@ -65,6 +65,7 @@ Repository = "https://github.com/inducer/pyopencl"
|
|
|
65
65
|
|
|
66
66
|
[tool.scikit-build]
|
|
67
67
|
sdist.exclude = [
|
|
68
|
+
".basedpyright",
|
|
68
69
|
".mypy_cache",
|
|
69
70
|
".ci",
|
|
70
71
|
".github",
|