pyopencl 2025.2.3__cp310-cp310-win_amd64.whl → 2025.2.5__cp310-cp310-win_amd64.whl

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.

Binary file
pyopencl/_monkeypatch.py CHANGED
@@ -196,6 +196,12 @@ class ProfilingInfoGetter:
196
196
  def __getattr__(self, name: str):
197
197
  info_cls = _cl.profiling_info
198
198
 
199
+ if not name.islower():
200
+ warn(f"Using non-lower-case attributes with Event.profile "
201
+ f"is deprecated. Got: '{name}', expected: '{name.lower()}'. "
202
+ "This will stop working in 2026.",
203
+ DeprecationWarning, stacklevel=2)
204
+
199
205
  try:
200
206
  inf_attr = getattr(info_cls, name.upper())
201
207
  except AttributeError as err:
@@ -204,11 +210,11 @@ class ProfilingInfoGetter:
204
210
  else:
205
211
  return self.event.get_profiling_info(inf_attr)
206
212
 
207
- QUEUED: int # pyright: ignore[reportUninitializedInstanceVariable]
208
- SUBMIT: int # pyright: ignore[reportUninitializedInstanceVariable]
209
- START: int # pyright: ignore[reportUninitializedInstanceVariable]
210
- END: int # pyright: ignore[reportUninitializedInstanceVariable]
211
- COMPLETE: int # pyright: ignore[reportUninitializedInstanceVariable]
213
+ queued: int # pyright: ignore[reportUninitializedInstanceVariable]
214
+ submit: int # pyright: ignore[reportUninitializedInstanceVariable]
215
+ start: int # pyright: ignore[reportUninitializedInstanceVariable]
216
+ end: int # pyright: ignore[reportUninitializedInstanceVariable]
217
+ complete: int # pyright: ignore[reportUninitializedInstanceVariable]
212
218
 
213
219
 
214
220
  kernel_old_get_info = _cl.Kernel.get_info
pyopencl/array.py CHANGED
@@ -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
 
@@ -2381,7 +2380,7 @@ def _arange_knl(result, start, step):
2381
2380
  result.context, result.dtype)
2382
2381
 
2383
2382
 
2384
- def arange(queue, *args, **kwargs):
2383
+ def arange(queue: cl.CommandQueue, *args: Any, **kwargs: Any) -> Array:
2385
2384
  """arange(queue, [start, ] stop [, step], **kwargs)
2386
2385
  Create a :class:`Array` filled with numbers spaced *step* apart,
2387
2386
  starting from *start* and ending at *stop*. If not given, *start*
@@ -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
pyopencl/elementwise.py CHANGED
@@ -29,7 +29,7 @@ OTHER DEALINGS IN THE SOFTWARE.
29
29
 
30
30
 
31
31
  import enum
32
- from typing import Any
32
+ from typing import TYPE_CHECKING, Any
33
33
 
34
34
  import numpy as np
35
35
 
@@ -47,6 +47,10 @@ from pyopencl.tools import (
47
47
  )
48
48
 
49
49
 
50
+ if TYPE_CHECKING:
51
+ from collections.abc import Sequence
52
+
53
+
50
54
  # {{{ elementwise kernel code generator
51
55
 
52
56
  def get_elwise_program(
@@ -119,7 +123,7 @@ def get_elwise_program(
119
123
 
120
124
  def get_elwise_kernel_and_types(
121
125
  context: cl.Context,
122
- arguments: str | list[DtypedArgument],
126
+ arguments: str | Sequence[DtypedArgument],
123
127
  operation: str, *,
124
128
  name: str = "elwise_kernel",
125
129
  options: Any = None,
@@ -229,7 +233,7 @@ class ElementwiseKernel:
229
233
  def __init__(
230
234
  self,
231
235
  context: cl.Context,
232
- arguments: str | list[DtypedArgument],
236
+ arguments: str | Sequence[DtypedArgument],
233
237
  operation: str,
234
238
  name: str = "elwise_kernel",
235
239
  options: Any = None, **kwargs: Any) -> None:
pyopencl/tools.py CHANGED
@@ -806,8 +806,8 @@ class VectorArg(DtypedArgument):
806
806
  """
807
807
  with_offset: bool
808
808
 
809
- def __init__(self, name: str, dtype: DTypeLike, with_offset: bool = False):
810
- super().__init__(name, dtype)
809
+ def __init__(self, dtype: DTypeLike, name: str, with_offset: bool = False):
810
+ super().__init__(dtype, name)
811
811
  object.__setattr__(self, "with_offset", with_offset)
812
812
 
813
813
  @override
@@ -860,7 +860,7 @@ def parse_c_arg(c_arg: str, with_offset: bool = False) -> DtypedArgument:
860
860
 
861
861
 
862
862
  def parse_arg_list(
863
- arguments: str | list[str] | list[DtypedArgument],
863
+ arguments: str | list[str] | Sequence[DtypedArgument],
864
864
  with_offset: bool = False) -> list[DtypedArgument]:
865
865
  """Parse a list of kernel arguments. *arguments* may be a comma-separate
866
866
  list of C declarators in a string, a list of strings representing C
pyopencl/typing.py CHANGED
@@ -55,3 +55,7 @@ KernelArg: TypeAlias = """
55
55
  | None"""
56
56
 
57
57
  Allocator: TypeAlias = "Callable[[int], _cl.MemoryObjectHolder | _cl.SVMPointer]"
58
+
59
+
60
+ __all__ = [
61
+ ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyopencl
3
- Version: 2025.2.3
3
+ Version: 2025.2.5
4
4
  Summary: Python wrapper for OpenCL
5
5
  Author-Email: Andreas Kloeckner <inform@tiker.net>
6
6
  License-Expression: MIT
@@ -1,11 +1,11 @@
1
1
  pyopencl/__init__.py,sha256=JAui3XXEV-mVuAeufIOvmvg4TwagUkNsppoJewozayg,65173
2
- pyopencl/_cl.cp310-win_amd64.pyd,sha256=qSnSkn1ybZcyvn4IY0MnnYNkia1iVxWI4e5__CZn5qA,632320
2
+ pyopencl/_cl.cp310-win_amd64.pyd,sha256=vwvgf0TkG902AQKnwDLpVklvitJSc2OV6GLnks1_cPg,615936
3
3
  pyopencl/_cl.pyi,sha256=QnCqG_fjW3VyUQsxcdcZ8M3ZePQ1BtA4XWFfgjfwGPg,58241
4
4
  pyopencl/_cluda.py,sha256=zlp4ECLzlQOF5ERjXeDJ6j5wYsxPm3VAYwd7adnNYo0,2168
5
- pyopencl/_monkeypatch.py,sha256=EyC-4DeFCaSBKQ00kJZxF6z-e44P-XSL6xAN2X0oDXM,35908
5
+ pyopencl/_monkeypatch.py,sha256=q8omznpygcoesDhV3UH3AwuK01crBAzrBwDaMuwuPnY,36200
6
6
  pyopencl/_mymako.py,sha256=Ki5F6iY5oAdm_R6Mll-ltbO-DZF37FDEINimG2HRyRY,674
7
7
  pyopencl/algorithm.py,sha256=Gx7xqny_g7SA56gbApRdWUvm8UHWJDNvkdL1L3eQ4rY,52824
8
- pyopencl/array.py,sha256=a99NDsxrpzEWfLx8vqUmLF9RY9U3XIgxjAQY5AIjhag,114958
8
+ pyopencl/array.py,sha256=pT3Q2NSixWODEPKo2BvhIdB9dNHRzSLDAH28OSjlJPY,115519
9
9
  pyopencl/bitonic_sort.py,sha256=RQUC8tpezdTQGzSEFyue86gVjc76vLKDwaNkqi4afa8,8297
10
10
  pyopencl/bitonic_sort_templates.py,sha256=RQaGOQf7f3f4FPX80h4rxOq3_gAq0e6OKaZIuBjcoUI,16785
11
11
  pyopencl/cache.py,sha256=R_EW9ekoMe9V4Am6MbIgtnMm-BbRQyWZgzfscKEtkB0,16552
@@ -31,16 +31,16 @@ pyopencl/compyte/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
31
31
  pyopencl/compyte/array.py,sha256=uJWC8KBRU29Wzx35VZ-bXRjC-2Qzr8y-4J0UdgldVik,8276
32
32
  pyopencl/compyte/dtypes.py,sha256=oNDNExqCOwjI5P17zuGhxcNSbXzEbSMlgEWMdnSZ6JU,10862
33
33
  pyopencl/compyte/pyproject.toml,sha256=iUOcs-BY0oYBQyIjT0knJM95TYcoWF-nB7E_FmuyIaE,1332
34
- pyopencl/elementwise.py,sha256=9VOX-sg8vkPne3PGROxuXLSf1FeQ8E8uGKRYvxrRIg4,39852
34
+ pyopencl/elementwise.py,sha256=MqPeAFja0oxlleANgzxkutRi53nKyj50o80Lf-NeQK8,39940
35
35
  pyopencl/invoker.py,sha256=hMmVaXOgmOjTjCI6Evjx4x_c8FrbBPlClFGCqirAtOE,14123
36
36
  pyopencl/ipython_ext.py,sha256=Hfx5go15On4B0CRDuZcsa3d-lme4-xPNHPdgEa9fbJ8,2021
37
37
  pyopencl/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
38
  pyopencl/reduction.py,sha256=QypvaTblYw0oKcNv_Gs-pYz96RvcQa2GouAkVhvft58,27459
39
39
  pyopencl/scan.py,sha256=tmYbMbSx0CfilgZoRzbROX9TbjptPCxHD-WDUx11uTg,67535
40
- pyopencl/tools.py,sha256=jLvZAjCBJKwN0Wg_jH9XAObvqIJh-haz_VXpFSfXB1M,48161
41
- pyopencl/typing.py,sha256=JX9tpZPtwyDb2IpM8Ka3YopLpxe1Iidz-Ot7IFprrU8,2027
40
+ pyopencl/tools.py,sha256=sLUPfJxoqwjdV8CzeNH3gk0m6hCJk-nsb5k1gpvMFu0,48165
41
+ pyopencl/typing.py,sha256=d1xGKJTTi1TYa6HKD01N-Zd-QrdbBd4Dr5MPHrpoXmw,2047
42
42
  pyopencl/version.py,sha256=Z5G_fsr_KVWqiYzK_pOQ2PbAO20wrFlEuqqKBGiAv4I,315
43
- pyopencl-2025.2.3.dist-info/METADATA,sha256=2_oRPyLkdxIGNHm3rCoXzlT-GQkg97zLWGWae1v0GIo,4756
44
- pyopencl-2025.2.3.dist-info/WHEEL,sha256=Bg3xfVZCdvCQkqUyMs2y8LOfK6ua4a-d4Njc-PtQZvk,106
45
- pyopencl-2025.2.3.dist-info/licenses/LICENSE,sha256=jib9h6nV8oAvCkKPKDecpLakmQi1SktCn4YXmllgySY,15566
46
- pyopencl-2025.2.3.dist-info/RECORD,,
43
+ pyopencl-2025.2.5.dist-info/METADATA,sha256=jpfnZrTC8aQ64IAV3PyDhQGSPwEEHTRHj8QgMvCYc08,4756
44
+ pyopencl-2025.2.5.dist-info/WHEEL,sha256=dD8EM_eb3pZmEbkvPEPxqrbrFtr3mwlecsbXbps1z7Y,106
45
+ pyopencl-2025.2.5.dist-info/licenses/LICENSE,sha256=jib9h6nV8oAvCkKPKDecpLakmQi1SktCn4YXmllgySY,15566
46
+ pyopencl-2025.2.5.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: scikit-build-core 0.11.4
2
+ Generator: scikit-build-core 0.11.5
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp310-cp310-win_amd64
5
5