pyopencl 2025.2.5__cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.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.

Files changed (47) hide show
  1. pyopencl/.libs/libOpenCL-83a5a7fd.so.1.0.0 +0 -0
  2. pyopencl/__init__.py +1995 -0
  3. pyopencl/_cl.cpython-312-x86_64-linux-gnu.so +0 -0
  4. pyopencl/_cl.pyi +2006 -0
  5. pyopencl/_cluda.py +57 -0
  6. pyopencl/_monkeypatch.py +1069 -0
  7. pyopencl/_mymako.py +17 -0
  8. pyopencl/algorithm.py +1454 -0
  9. pyopencl/array.py +3441 -0
  10. pyopencl/bitonic_sort.py +245 -0
  11. pyopencl/bitonic_sort_templates.py +597 -0
  12. pyopencl/cache.py +535 -0
  13. pyopencl/capture_call.py +200 -0
  14. pyopencl/characterize/__init__.py +463 -0
  15. pyopencl/characterize/performance.py +240 -0
  16. pyopencl/cl/pyopencl-airy.cl +324 -0
  17. pyopencl/cl/pyopencl-bessel-j-complex.cl +238 -0
  18. pyopencl/cl/pyopencl-bessel-j.cl +1084 -0
  19. pyopencl/cl/pyopencl-bessel-y.cl +435 -0
  20. pyopencl/cl/pyopencl-complex.h +303 -0
  21. pyopencl/cl/pyopencl-eval-tbl.cl +120 -0
  22. pyopencl/cl/pyopencl-hankel-complex.cl +444 -0
  23. pyopencl/cl/pyopencl-random123/array.h +325 -0
  24. pyopencl/cl/pyopencl-random123/openclfeatures.h +93 -0
  25. pyopencl/cl/pyopencl-random123/philox.cl +486 -0
  26. pyopencl/cl/pyopencl-random123/threefry.cl +864 -0
  27. pyopencl/clmath.py +282 -0
  28. pyopencl/clrandom.py +412 -0
  29. pyopencl/cltypes.py +202 -0
  30. pyopencl/compyte/.gitignore +21 -0
  31. pyopencl/compyte/__init__.py +0 -0
  32. pyopencl/compyte/array.py +241 -0
  33. pyopencl/compyte/dtypes.py +316 -0
  34. pyopencl/compyte/pyproject.toml +52 -0
  35. pyopencl/elementwise.py +1178 -0
  36. pyopencl/invoker.py +417 -0
  37. pyopencl/ipython_ext.py +70 -0
  38. pyopencl/py.typed +0 -0
  39. pyopencl/reduction.py +815 -0
  40. pyopencl/scan.py +1916 -0
  41. pyopencl/tools.py +1565 -0
  42. pyopencl/typing.py +61 -0
  43. pyopencl/version.py +11 -0
  44. pyopencl-2025.2.5.dist-info/METADATA +109 -0
  45. pyopencl-2025.2.5.dist-info/RECORD +47 -0
  46. pyopencl-2025.2.5.dist-info/WHEEL +6 -0
  47. pyopencl-2025.2.5.dist-info/licenses/LICENSE +104 -0
pyopencl/_cl.pyi ADDED
@@ -0,0 +1,2006 @@
1
+ __copyright__ = "Copyright (C) 2025 University of Illinois Board of Trustees"
2
+
3
+ __license__ = """
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in
12
+ all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
+ THE SOFTWARE.
21
+ """
22
+
23
+ from collections.abc import Callable, Sequence
24
+ from enum import IntEnum, auto
25
+ from typing import TYPE_CHECKING, Generic, Literal, overload
26
+
27
+ import numpy as np
28
+ from numpy.typing import NDArray
29
+ from typing_extensions import override
30
+
31
+ import pyopencl._monkeypatch
32
+ from pyopencl.typing import DTypeT, HasBufferInterface, KernelArg, SVMInnerT, WaitList
33
+
34
+ if TYPE_CHECKING:
35
+ from pyopencl import Program
36
+
37
+ class _ErrorRecord:
38
+ def __init__(self, msg: str, code: int, routine: str) -> None: ...
39
+ def routine(self) -> str: ...
40
+ def code(self) -> int: ...
41
+ def what(self) -> str: ...
42
+ def is_out_of_memory(self) -> bool: ...
43
+
44
+ class Error(Exception):
45
+ code: int
46
+ routine: str
47
+ what: _ErrorRecord
48
+
49
+ __str__ = pyopencl._monkeypatch.error_str
50
+
51
+ class MemoryError(Error):
52
+ pass
53
+
54
+ class LogicError(Error):
55
+ pass
56
+
57
+ class RuntimeError(Error):
58
+ pass
59
+
60
+ class status_code(IntEnum): # noqa: N801
61
+ SUCCESS = auto()
62
+ DEVICE_NOT_FOUND = auto()
63
+ DEVICE_NOT_AVAILABLE = auto()
64
+ COMPILER_NOT_AVAILABLE = auto()
65
+ MEM_OBJECT_ALLOCATION_FAILURE = auto()
66
+ OUT_OF_RESOURCES = auto()
67
+ OUT_OF_HOST_MEMORY = auto()
68
+ PROFILING_INFO_NOT_AVAILABLE = auto()
69
+ MEM_COPY_OVERLAP = auto()
70
+ IMAGE_FORMAT_MISMATCH = auto()
71
+ IMAGE_FORMAT_NOT_SUPPORTED = auto()
72
+ BUILD_PROGRAM_FAILURE = auto()
73
+ MAP_FAILURE = auto()
74
+ INVALID_VALUE = auto()
75
+ INVALID_DEVICE_TYPE = auto()
76
+ INVALID_PLATFORM = auto()
77
+ INVALID_DEVICE = auto()
78
+ INVALID_CONTEXT = auto()
79
+ INVALID_QUEUE_PROPERTIES = auto()
80
+ INVALID_COMMAND_QUEUE = auto()
81
+ INVALID_HOST_PTR = auto()
82
+ INVALID_MEM_OBJECT = auto()
83
+ INVALID_IMAGE_FORMAT_DESCRIPTOR = auto()
84
+ INVALID_IMAGE_SIZE = auto()
85
+ INVALID_SAMPLER = auto()
86
+ INVALID_BINARY = auto()
87
+ INVALID_BUILD_OPTIONS = auto()
88
+ INVALID_PROGRAM = auto()
89
+ INVALID_PROGRAM_EXECUTABLE = auto()
90
+ INVALID_KERNEL_NAME = auto()
91
+ INVALID_KERNEL_DEFINITION = auto()
92
+ INVALID_KERNEL = auto()
93
+ INVALID_ARG_INDEX = auto()
94
+ INVALID_ARG_VALUE = auto()
95
+ INVALID_ARG_SIZE = auto()
96
+ INVALID_KERNEL_ARGS = auto()
97
+ INVALID_WORK_DIMENSION = auto()
98
+ INVALID_WORK_GROUP_SIZE = auto()
99
+ INVALID_WORK_ITEM_SIZE = auto()
100
+ INVALID_GLOBAL_OFFSET = auto()
101
+ INVALID_EVENT_WAIT_LIST = auto()
102
+ INVALID_EVENT = auto()
103
+ INVALID_OPERATION = auto()
104
+ INVALID_GL_OBJECT = auto()
105
+ INVALID_BUFFER_SIZE = auto()
106
+ INVALID_MIP_LEVEL = auto()
107
+ PLATFORM_NOT_FOUND_KHR = auto()
108
+ MISALIGNED_SUB_BUFFER_OFFSET = auto()
109
+ EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST = auto()
110
+ INVALID_GLOBAL_WORK_SIZE = auto()
111
+ COMPILE_PROGRAM_FAILURE = auto()
112
+ LINKER_NOT_AVAILABLE = auto()
113
+ LINK_PROGRAM_FAILURE = auto()
114
+ DEVICE_PARTITION_FAILED = auto()
115
+ KERNEL_ARG_INFO_NOT_AVAILABLE = auto()
116
+ INVALID_IMAGE_DESCRIPTOR = auto()
117
+ INVALID_COMPILER_OPTIONS = auto()
118
+ INVALID_LINKER_OPTIONS = auto()
119
+ INVALID_DEVICE_PARTITION_COUNT = auto()
120
+ INVALID_PIPE_SIZE = auto()
121
+ INVALID_DEVICE_QUEUE = auto()
122
+ INVALID_SPEC_ID = auto()
123
+ MAX_SIZE_RESTRICTION_EXCEEDED = auto()
124
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
125
+
126
+ class platform_info(IntEnum): # noqa: N801
127
+ PROFILE = auto()
128
+ VERSION = auto()
129
+ NAME = auto()
130
+ VENDOR = auto()
131
+ EXTENSIONS = auto()
132
+ HOST_TIMER_RESOLUTION = auto()
133
+ NUMERIC_VERSION = auto()
134
+ EXTENSIONS_WITH_VERSION = auto()
135
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
136
+
137
+ class device_type(IntEnum): # noqa: N801
138
+ DEFAULT = auto()
139
+ CPU = auto()
140
+ GPU = auto()
141
+ ACCELERATOR = auto()
142
+ CUSTOM = auto()
143
+ ALL = auto()
144
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
145
+
146
+ class device_info(IntEnum): # noqa: N801
147
+ TYPE = auto()
148
+ VENDOR_ID = auto()
149
+ MAX_COMPUTE_UNITS = auto()
150
+ MAX_WORK_ITEM_DIMENSIONS = auto()
151
+ MAX_WORK_GROUP_SIZE = auto()
152
+ MAX_WORK_ITEM_SIZES = auto()
153
+ PREFERRED_VECTOR_WIDTH_CHAR = auto()
154
+ PREFERRED_VECTOR_WIDTH_SHORT = auto()
155
+ PREFERRED_VECTOR_WIDTH_INT = auto()
156
+ PREFERRED_VECTOR_WIDTH_LONG = auto()
157
+ PREFERRED_VECTOR_WIDTH_FLOAT = auto()
158
+ PREFERRED_VECTOR_WIDTH_DOUBLE = auto()
159
+ MAX_CLOCK_FREQUENCY = auto()
160
+ ADDRESS_BITS = auto()
161
+ MAX_READ_IMAGE_ARGS = auto()
162
+ MAX_WRITE_IMAGE_ARGS = auto()
163
+ MAX_MEM_ALLOC_SIZE = auto()
164
+ IMAGE2D_MAX_WIDTH = auto()
165
+ IMAGE2D_MAX_HEIGHT = auto()
166
+ IMAGE3D_MAX_WIDTH = auto()
167
+ IMAGE3D_MAX_HEIGHT = auto()
168
+ IMAGE3D_MAX_DEPTH = auto()
169
+ IMAGE_SUPPORT = auto()
170
+ MAX_PARAMETER_SIZE = auto()
171
+ MAX_SAMPLERS = auto()
172
+ MEM_BASE_ADDR_ALIGN = auto()
173
+ MIN_DATA_TYPE_ALIGN_SIZE = auto()
174
+ SINGLE_FP_CONFIG = auto()
175
+ DOUBLE_FP_CONFIG = auto()
176
+ HALF_FP_CONFIG = auto()
177
+ GLOBAL_MEM_CACHE_TYPE = auto()
178
+ GLOBAL_MEM_CACHELINE_SIZE = auto()
179
+ GLOBAL_MEM_CACHE_SIZE = auto()
180
+ GLOBAL_MEM_SIZE = auto()
181
+ MAX_CONSTANT_BUFFER_SIZE = auto()
182
+ MAX_CONSTANT_ARGS = auto()
183
+ LOCAL_MEM_TYPE = auto()
184
+ LOCAL_MEM_SIZE = auto()
185
+ ERROR_CORRECTION_SUPPORT = auto()
186
+ PROFILING_TIMER_RESOLUTION = auto()
187
+ ENDIAN_LITTLE = auto()
188
+ AVAILABLE = auto()
189
+ COMPILER_AVAILABLE = auto()
190
+ EXECUTION_CAPABILITIES = auto()
191
+ QUEUE_PROPERTIES = auto()
192
+ QUEUE_ON_HOST_PROPERTIES = auto()
193
+ NAME = auto()
194
+ VENDOR = auto()
195
+ DRIVER_VERSION = auto()
196
+ VERSION = auto()
197
+ PROFILE = auto()
198
+ EXTENSIONS = auto()
199
+ PLATFORM = auto()
200
+ PREFERRED_VECTOR_WIDTH_HALF = auto()
201
+ HOST_UNIFIED_MEMORY = auto()
202
+ NATIVE_VECTOR_WIDTH_CHAR = auto()
203
+ NATIVE_VECTOR_WIDTH_SHORT = auto()
204
+ NATIVE_VECTOR_WIDTH_INT = auto()
205
+ NATIVE_VECTOR_WIDTH_LONG = auto()
206
+ NATIVE_VECTOR_WIDTH_FLOAT = auto()
207
+ NATIVE_VECTOR_WIDTH_DOUBLE = auto()
208
+ NATIVE_VECTOR_WIDTH_HALF = auto()
209
+ OPENCL_C_VERSION = auto()
210
+ COMPUTE_CAPABILITY_MAJOR_NV = auto()
211
+ COMPUTE_CAPABILITY_MINOR_NV = auto()
212
+ REGISTERS_PER_BLOCK_NV = auto()
213
+ WARP_SIZE_NV = auto()
214
+ GPU_OVERLAP_NV = auto()
215
+ KERNEL_EXEC_TIMEOUT_NV = auto()
216
+ INTEGRATED_MEMORY_NV = auto()
217
+ ATTRIBUTE_ASYNC_ENGINE_COUNT_NV = auto()
218
+ PCI_BUS_ID_NV = auto()
219
+ PCI_SLOT_ID_NV = auto()
220
+ PCI_DOMAIN_ID_NV = auto()
221
+ PROFILING_TIMER_OFFSET_AMD = auto()
222
+ TOPOLOGY_AMD = auto()
223
+ BOARD_NAME_AMD = auto()
224
+ GLOBAL_FREE_MEMORY_AMD = auto()
225
+ SIMD_PER_COMPUTE_UNIT_AMD = auto()
226
+ SIMD_WIDTH_AMD = auto()
227
+ SIMD_INSTRUCTION_WIDTH_AMD = auto()
228
+ WAVEFRONT_WIDTH_AMD = auto()
229
+ GLOBAL_MEM_CHANNELS_AMD = auto()
230
+ GLOBAL_MEM_CHANNEL_BANKS_AMD = auto()
231
+ GLOBAL_MEM_CHANNEL_BANK_WIDTH_AMD = auto()
232
+ LOCAL_MEM_SIZE_PER_COMPUTE_UNIT_AMD = auto()
233
+ LOCAL_MEM_BANKS_AMD = auto()
234
+ THREAD_TRACE_SUPPORTED_AMD = auto()
235
+ GFXIP_MAJOR_AMD = auto()
236
+ GFXIP_MINOR_AMD = auto()
237
+ AVAILABLE_ASYNC_QUEUES_AMD = auto()
238
+ PREFERRED_WORK_GROUP_SIZE_AMD = auto()
239
+ MAX_WORK_GROUP_SIZE_AMD = auto()
240
+ PREFERRED_CONSTANT_BUFFER_SIZE_AMD = auto()
241
+ PCIE_ID_AMD = auto()
242
+ MAX_ATOMIC_COUNTERS_EXT = auto()
243
+ LINKER_AVAILABLE = auto()
244
+ BUILT_IN_KERNELS = auto()
245
+ IMAGE_MAX_BUFFER_SIZE = auto()
246
+ IMAGE_MAX_ARRAY_SIZE = auto()
247
+ PARENT_DEVICE = auto()
248
+ PARTITION_MAX_SUB_DEVICES = auto()
249
+ PARTITION_PROPERTIES = auto()
250
+ PARTITION_AFFINITY_DOMAIN = auto()
251
+ PARTITION_TYPE = auto()
252
+ REFERENCE_COUNT = auto()
253
+ PREFERRED_INTEROP_USER_SYNC = auto()
254
+ PRINTF_BUFFER_SIZE = auto()
255
+ IMAGE_PITCH_ALIGNMENT = auto()
256
+ IMAGE_BASE_ADDRESS_ALIGNMENT = auto()
257
+ MAX_READ_WRITE_IMAGE_ARGS = auto()
258
+ MAX_GLOBAL_VARIABLE_SIZE = auto()
259
+ QUEUE_ON_DEVICE_PROPERTIES = auto()
260
+ QUEUE_ON_DEVICE_PREFERRED_SIZE = auto()
261
+ QUEUE_ON_DEVICE_MAX_SIZE = auto()
262
+ MAX_ON_DEVICE_QUEUES = auto()
263
+ MAX_ON_DEVICE_EVENTS = auto()
264
+ SVM_CAPABILITIES = auto()
265
+ GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE = auto()
266
+ MAX_PIPE_ARGS = auto()
267
+ PIPE_MAX_ACTIVE_RESERVATIONS = auto()
268
+ PIPE_MAX_PACKET_SIZE = auto()
269
+ PREFERRED_PLATFORM_ATOMIC_ALIGNMENT = auto()
270
+ PREFERRED_GLOBAL_ATOMIC_ALIGNMENT = auto()
271
+ PREFERRED_LOCAL_ATOMIC_ALIGNMENT = auto()
272
+ IL_VERSION = auto()
273
+ MAX_NUM_SUB_GROUPS = auto()
274
+ SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS = auto()
275
+ NUMERIC_VERSION = auto()
276
+ EXTENSIONS_WITH_VERSION = auto()
277
+ ILS_WITH_VERSION = auto()
278
+ BUILT_IN_KERNELS_WITH_VERSION = auto()
279
+ ATOMIC_MEMORY_CAPABILITIES = auto()
280
+ ATOMIC_FENCE_CAPABILITIES = auto()
281
+ NON_UNIFORM_WORK_GROUP_SUPPORT = auto()
282
+ OPENCL_C_ALL_VERSIONS = auto()
283
+ PREFERRED_WORK_GROUP_SIZE_MULTIPLE = auto()
284
+ WORK_GROUP_COLLECTIVE_FUNCTIONS_SUPPORT = auto()
285
+ GENERIC_ADDRESS_SPACE_SUPPORT = auto()
286
+ OPENCL_C_FEATURES = auto()
287
+ DEVICE_ENQUEUE_CAPABILITIES = auto()
288
+ PIPE_SUPPORT = auto()
289
+ ME_VERSION_INTEL = auto()
290
+ EXT_MEM_PADDING_IN_BYTES_QCOM = auto()
291
+ PAGE_SIZE_QCOM = auto()
292
+ SPIR_VERSIONS = auto()
293
+ SIMULTANEOUS_INTEROPS_INTEL = auto()
294
+ NUM_SIMULTANEOUS_INTEROPS_INTEL = auto()
295
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
296
+
297
+ class device_topology_type_amd(IntEnum): # noqa: N801
298
+ PCIE = auto()
299
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
300
+
301
+ class device_fp_config(IntEnum): # noqa: N801
302
+ DENORM = auto()
303
+ INF_NAN = auto()
304
+ ROUND_TO_NEAREST = auto()
305
+ ROUND_TO_ZERO = auto()
306
+ ROUND_TO_INF = auto()
307
+ FMA = auto()
308
+ SOFT_FLOAT = auto()
309
+ CORRECTLY_ROUNDED_DIVIDE_SQRT = auto()
310
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
311
+
312
+ class device_mem_cache_type(IntEnum): # noqa: N801
313
+ NONE = auto()
314
+ READ_ONLY_CACHE = auto()
315
+ READ_WRITE_CACHE = auto()
316
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
317
+
318
+ class device_local_mem_type(IntEnum): # noqa: N801
319
+ LOCAL = auto()
320
+ GLOBAL = auto()
321
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
322
+
323
+ class device_exec_capabilities(IntEnum): # noqa: N801
324
+ KERNEL = auto()
325
+ NATIVE_KERNEL = auto()
326
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
327
+
328
+ class device_svm_capabilities(IntEnum): # noqa: N801
329
+ COARSE_GRAIN_BUFFER = auto()
330
+ FINE_GRAIN_BUFFER = auto()
331
+ FINE_GRAIN_SYSTEM = auto()
332
+ ATOMICS = auto()
333
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
334
+
335
+ class command_queue_properties(IntEnum): # noqa: N801
336
+ _zero = 0
337
+ OUT_OF_ORDER_EXEC_MODE_ENABLE = auto()
338
+ PROFILING_ENABLE = auto()
339
+ ON_DEVICE = auto()
340
+ ON_DEVICE_DEFAULT = auto()
341
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
342
+
343
+ class context_info(IntEnum): # noqa: N801
344
+ REFERENCE_COUNT = auto()
345
+ DEVICES = auto()
346
+ PROPERTIES = auto()
347
+ NUM_DEVICES = auto()
348
+ INTEROP_USER_SYNC = auto()
349
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
350
+
351
+ class gl_context_info(IntEnum): # noqa: N801
352
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
353
+
354
+ class context_properties(IntEnum): # noqa: N801
355
+ PLATFORM = auto()
356
+ OFFLINE_DEVICES_AMD = auto()
357
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
358
+
359
+ class command_queue_info(IntEnum): # noqa: N801
360
+ CONTEXT = auto()
361
+ DEVICE = auto()
362
+ REFERENCE_COUNT = auto()
363
+ PROPERTIES = auto()
364
+ PROPERTIES_ARRAY = auto()
365
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
366
+
367
+ class queue_properties(IntEnum): # noqa: N801
368
+ PROPERTIES = auto()
369
+ SIZE = auto()
370
+ DEVICE_DEFAULT = auto()
371
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
372
+
373
+ class mem_flags(IntEnum): # noqa: N801
374
+ READ_WRITE = auto()
375
+ WRITE_ONLY = auto()
376
+ READ_ONLY = auto()
377
+ USE_HOST_PTR = auto()
378
+ ALLOC_HOST_PTR = auto()
379
+ COPY_HOST_PTR = auto()
380
+ USE_PERSISTENT_MEM_AMD = auto()
381
+ HOST_WRITE_ONLY = auto()
382
+ HOST_READ_ONLY = auto()
383
+ HOST_NO_ACCESS = auto()
384
+ KERNEL_READ_AND_WRITE = auto()
385
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
386
+
387
+ class svm_mem_flags(IntEnum): # noqa: N801
388
+ READ_WRITE = auto()
389
+ WRITE_ONLY = auto()
390
+ READ_ONLY = auto()
391
+ SVM_FINE_GRAIN_BUFFER = auto()
392
+ SVM_ATOMICS = auto()
393
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
394
+
395
+ class channel_order(IntEnum): # noqa: N801
396
+ R = auto()
397
+ A = auto()
398
+ RG = auto()
399
+ RA = auto()
400
+ RGB = auto()
401
+ RGBA = auto()
402
+ BGRA = auto()
403
+ INTENSITY = auto()
404
+ LUMINANCE = auto()
405
+ Rx = auto()
406
+ RGx = auto()
407
+ RGBx = auto()
408
+ sRGB = auto() # noqa: N815
409
+ sRGBx = auto() # noqa: N815
410
+ sRGBA = auto() # noqa: N815
411
+ sBGRA = auto() # noqa: N815
412
+ ABGR = auto()
413
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
414
+
415
+ class channel_type(IntEnum): # noqa: N801
416
+ SNORM_INT8 = auto()
417
+ SNORM_INT16 = auto()
418
+ UNORM_INT8 = auto()
419
+ UNORM_INT16 = auto()
420
+ UNORM_SHORT_565 = auto()
421
+ UNORM_SHORT_555 = auto()
422
+ UNORM_INT_101010 = auto()
423
+ SIGNED_INT8 = auto()
424
+ SIGNED_INT16 = auto()
425
+ SIGNED_INT32 = auto()
426
+ UNSIGNED_INT8 = auto()
427
+ UNSIGNED_INT16 = auto()
428
+ UNSIGNED_INT32 = auto()
429
+ HALF_FLOAT = auto()
430
+ FLOAT = auto()
431
+ UNORM_INT_101010_2 = auto()
432
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
433
+
434
+ class mem_object_type(IntEnum): # noqa: N801
435
+ BUFFER = auto()
436
+ IMAGE2D = auto()
437
+ IMAGE3D = auto()
438
+ IMAGE2D_ARRAY = auto()
439
+ IMAGE1D = auto()
440
+ IMAGE1D_ARRAY = auto()
441
+ IMAGE1D_BUFFER = auto()
442
+ PIPE = auto()
443
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
444
+
445
+ class mem_info(IntEnum): # noqa: N801
446
+ TYPE = auto()
447
+ FLAGS = auto()
448
+ SIZE = auto()
449
+ HOST_PTR = auto()
450
+ MAP_COUNT = auto()
451
+ REFERENCE_COUNT = auto()
452
+ CONTEXT = auto()
453
+ ASSOCIATED_MEMOBJECT = auto()
454
+ OFFSET = auto()
455
+ USES_SVM_POINTER = auto()
456
+ PROPERTIES = auto()
457
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
458
+
459
+ class image_info(IntEnum): # noqa: N801
460
+ FORMAT = auto()
461
+ ELEMENT_SIZE = auto()
462
+ ROW_PITCH = auto()
463
+ SLICE_PITCH = auto()
464
+ WIDTH = auto()
465
+ HEIGHT = auto()
466
+ DEPTH = auto()
467
+ ARRAY_SIZE = auto()
468
+ BUFFER = auto()
469
+ NUM_MIP_LEVELS = auto()
470
+ NUM_SAMPLES = auto()
471
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
472
+
473
+ class pipe_info(IntEnum): # noqa: N801
474
+ PACKET_SIZE = auto()
475
+ MAX_PACKETS = auto()
476
+ PROPERTIES = auto()
477
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
478
+
479
+ class pipe_properties(IntEnum): # noqa: N801
480
+ PACKET_SIZE = auto()
481
+ MAX_PACKETS = auto()
482
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
483
+
484
+ class addressing_mode(IntEnum): # noqa: N801
485
+ NONE = auto()
486
+ CLAMP_TO_EDGE = auto()
487
+ CLAMP = auto()
488
+ REPEAT = auto()
489
+ MIRRORED_REPEAT = auto()
490
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
491
+
492
+ class filter_mode(IntEnum): # noqa: N801
493
+ NEAREST = auto()
494
+ LINEAR = auto()
495
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
496
+
497
+ class sampler_info(IntEnum): # noqa: N801
498
+ REFERENCE_COUNT = auto()
499
+ CONTEXT = auto()
500
+ NORMALIZED_COORDS = auto()
501
+ ADDRESSING_MODE = auto()
502
+ FILTER_MODE = auto()
503
+ MIP_FILTER_MODE = auto()
504
+ LOD_MIN = auto()
505
+ LOD_MAX = auto()
506
+ PROPERTIES = auto()
507
+ MIP_FILTER_MODE_KHR = auto()
508
+ LOD_MIN_KHR = auto()
509
+ LOD_MAX_KHR = auto()
510
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
511
+
512
+ class sampler_properties(IntEnum): # noqa: N801
513
+ NORMALIZED_COORDS = auto()
514
+ ADDRESSING_MODE = auto()
515
+ FILTER_MODE = auto()
516
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
517
+
518
+ class map_flags(IntEnum): # noqa: N801
519
+ READ = auto()
520
+ WRITE = auto()
521
+ WRITE_INVALIDATE_REGION = auto()
522
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
523
+
524
+ class program_info(IntEnum): # noqa: N801
525
+ REFERENCE_COUNT = auto()
526
+ CONTEXT = auto()
527
+ NUM_DEVICES = auto()
528
+ DEVICES = auto()
529
+ SOURCE = auto()
530
+ BINARY_SIZES = auto()
531
+ BINARIES = auto()
532
+ NUM_KERNELS = auto()
533
+ KERNEL_NAMES = auto()
534
+ IL = auto()
535
+ SCOPE_GLOBAL_CTORS_PRESENT = auto()
536
+ SCOPE_GLOBAL_DTORS_PRESENT = auto()
537
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
538
+
539
+ class program_build_info(IntEnum): # noqa: N801
540
+ STATUS = auto()
541
+ OPTIONS = auto()
542
+ LOG = auto()
543
+ BINARY_TYPE = auto()
544
+ GLOBAL_VARIABLE_TOTAL_SIZE = auto()
545
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
546
+
547
+ class program_binary_type(IntEnum): # noqa: N801
548
+ NONE = auto()
549
+ COMPILED_OBJECT = auto()
550
+ LIBRARY = auto()
551
+ EXECUTABLE = auto()
552
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
553
+
554
+ class kernel_info(IntEnum): # noqa: N801
555
+ FUNCTION_NAME = auto()
556
+ NUM_ARGS = auto()
557
+ REFERENCE_COUNT = auto()
558
+ CONTEXT = auto()
559
+ PROGRAM = auto()
560
+ ATTRIBUTES = auto()
561
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
562
+
563
+ class kernel_arg_info(IntEnum): # noqa: N801
564
+ ADDRESS_QUALIFIER = auto()
565
+ ACCESS_QUALIFIER = auto()
566
+ TYPE_NAME = auto()
567
+ TYPE_QUALIFIER = auto()
568
+ NAME = auto()
569
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
570
+
571
+ class kernel_arg_address_qualifier(IntEnum): # noqa: N801
572
+ GLOBAL = auto()
573
+ LOCAL = auto()
574
+ CONSTANT = auto()
575
+ PRIVATE = auto()
576
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
577
+
578
+ class kernel_arg_access_qualifier(IntEnum): # noqa: N801
579
+ READ_ONLY = auto()
580
+ WRITE_ONLY = auto()
581
+ READ_WRITE = auto()
582
+ NONE = auto()
583
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
584
+
585
+ class kernel_arg_type_qualifier(IntEnum): # noqa: N801
586
+ NONE = auto()
587
+ CONST = auto()
588
+ RESTRICT = auto()
589
+ VOLATILE = auto()
590
+ PIPE = auto()
591
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
592
+
593
+ class kernel_work_group_info(IntEnum): # noqa: N801
594
+ WORK_GROUP_SIZE = auto()
595
+ COMPILE_WORK_GROUP_SIZE = auto()
596
+ LOCAL_MEM_SIZE = auto()
597
+ PREFERRED_WORK_GROUP_SIZE_MULTIPLE = auto()
598
+ PRIVATE_MEM_SIZE = auto()
599
+ GLOBAL_WORK_SIZE = auto()
600
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
601
+
602
+ class kernel_sub_group_info(IntEnum): # noqa: N801
603
+ MAX_SUB_GROUP_SIZE_FOR_NDRANGE = auto()
604
+ SUB_GROUP_COUNT_FOR_NDRANGE = auto()
605
+ LOCAL_SIZE_FOR_SUB_GROUP_COUNT = auto()
606
+ MAX_NUM_SUB_GROUPS = auto()
607
+ COMPILE_NUM_SUB_GROUPS = auto()
608
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
609
+
610
+ class event_info(IntEnum): # noqa: N801
611
+ COMMAND_QUEUE = auto()
612
+ COMMAND_TYPE = auto()
613
+ REFERENCE_COUNT = auto()
614
+ COMMAND_EXECUTION_STATUS = auto()
615
+ CONTEXT = auto()
616
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
617
+
618
+ class command_type(IntEnum): # noqa: N801
619
+ NDRANGE_KERNEL = auto()
620
+ TASK = auto()
621
+ NATIVE_KERNEL = auto()
622
+ READ_BUFFER = auto()
623
+ WRITE_BUFFER = auto()
624
+ COPY_BUFFER = auto()
625
+ READ_IMAGE = auto()
626
+ WRITE_IMAGE = auto()
627
+ COPY_IMAGE = auto()
628
+ COPY_IMAGE_TO_BUFFER = auto()
629
+ COPY_BUFFER_TO_IMAGE = auto()
630
+ MAP_BUFFER = auto()
631
+ MAP_IMAGE = auto()
632
+ UNMAP_MEM_OBJECT = auto()
633
+ MARKER = auto()
634
+ ACQUIRE_GL_OBJECTS = auto()
635
+ RELEASE_GL_OBJECTS = auto()
636
+ READ_BUFFER_RECT = auto()
637
+ WRITE_BUFFER_RECT = auto()
638
+ COPY_BUFFER_RECT = auto()
639
+ USER = auto()
640
+ BARRIER = auto()
641
+ MIGRATE_MEM_OBJECTS = auto()
642
+ FILL_BUFFER = auto()
643
+ FILL_IMAGE = auto()
644
+ SVM_FREE = auto()
645
+ SVM_MEMCPY = auto()
646
+ SVM_MEMFILL = auto()
647
+ SVM_MAP = auto()
648
+ SVM_UNMAP = auto()
649
+ SVM_MIGRATE_MEM = auto()
650
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
651
+
652
+ class command_execution_status(IntEnum): # noqa: N801
653
+ COMPLETE = auto()
654
+ RUNNING = auto()
655
+ SUBMITTED = auto()
656
+ QUEUED = auto()
657
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
658
+
659
+ class profiling_info(IntEnum): # noqa: N801
660
+ QUEUED = auto()
661
+ SUBMIT = auto()
662
+ START = auto()
663
+ END = auto()
664
+ COMPLETE = auto()
665
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
666
+
667
+ class mem_migration_flags(IntEnum): # noqa: N801
668
+ HOST = auto()
669
+ CONTENT_UNDEFINED = auto()
670
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
671
+
672
+ class device_partition_property(IntEnum): # noqa: N801
673
+ EQUALLY = auto()
674
+ BY_COUNTS = auto()
675
+ BY_COUNTS_LIST_END = auto()
676
+ BY_AFFINITY_DOMAIN = auto()
677
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
678
+
679
+ class device_affinity_domain(IntEnum): # noqa: N801
680
+ NUMA = auto()
681
+ L4_CACHE = auto()
682
+ L3_CACHE = auto()
683
+ L2_CACHE = auto()
684
+ L1_CACHE = auto()
685
+ NEXT_PARTITIONABLE = auto()
686
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
687
+
688
+ class device_atomic_capabilities(IntEnum): # noqa: N801
689
+ ORDER_RELAXED = auto()
690
+ ORDER_ACQ_REL = auto()
691
+ ORDER_SEQ_CST = auto()
692
+ SCOPE_WORK_ITEM = auto()
693
+ SCOPE_WORK_GROUP = auto()
694
+ SCOPE_DEVICE = auto()
695
+ SCOPE_ALL_DEVICES = auto()
696
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
697
+
698
+ class device_device_enqueue_capabilities(IntEnum): # noqa: N801
699
+ SUPPORTED = auto()
700
+ REPLACEABLE_DEFAULT = auto()
701
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
702
+
703
+ class version_bits(IntEnum): # noqa: N801
704
+ MAJOR_BITS = auto()
705
+ MINOR_BITS = auto()
706
+ PATCH_BITS = auto()
707
+ MAJOR_MASK = auto()
708
+ MINOR_MASK = auto()
709
+ PATCH_MASK = auto()
710
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
711
+
712
+ class khronos_vendor_id(IntEnum): # noqa: N801
713
+ CODEPLAY = auto()
714
+
715
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
716
+
717
+ class gl_object_type(IntEnum): # noqa: N801
718
+ BUFFER = auto()
719
+ TEXTURE2D = auto()
720
+ TEXTURE3D = auto()
721
+ RENDERBUFFER = auto()
722
+
723
+ to_string = pyopencl._monkeypatch.to_string
724
+
725
+ class gl_texture_info(IntEnum): # noqa: N801
726
+ TEXTURE_TARGET = auto()
727
+ MIPMAP_LEVEL = auto()
728
+
729
+ to_string = pyopencl._monkeypatch.to_string
730
+
731
+ class NameVersion:
732
+ def __init__(self, version: int = 0, name: str = "") -> None: ...
733
+
734
+ @property
735
+ def version(self) -> int: ...
736
+
737
+ @version.setter
738
+ def version(self, arg: int, /) -> None: ...
739
+
740
+ @property
741
+ def name(self) -> str: ...
742
+
743
+ @name.setter
744
+ def name(self, arg: str, /) -> None: ...
745
+
746
+ class DeviceTopologyAmd:
747
+ def __init__(self, bus: int = 0, device: int = 0, function: int = 0) -> None: ...
748
+
749
+ @property
750
+ def type(self) -> int: ...
751
+
752
+ @type.setter
753
+ def type(self, arg: int, /) -> None: ...
754
+
755
+ @property
756
+ def bus(self) -> int: ...
757
+
758
+ @bus.setter
759
+ def bus(self, arg: int, /) -> None: ...
760
+
761
+ @property
762
+ def device(self) -> int: ...
763
+
764
+ @device.setter
765
+ def device(self, arg: int, /) -> None: ...
766
+
767
+ @property
768
+ def function(self) -> int: ...
769
+
770
+ @function.setter
771
+ def function(self, arg: int, /) -> None: ...
772
+
773
+ def get_cl_header_version() -> tuple[int, int]: ...
774
+
775
+ def get_platforms() -> list[Platform]: ...
776
+
777
+ class Platform:
778
+ def get_info(self, arg: platform_info, /) -> object: ...
779
+
780
+ def get_devices(self, device_type: int = 4294967295) -> list[Device]: ...
781
+
782
+ @override
783
+ def __hash__(self) -> int: ...
784
+
785
+ @overload
786
+ def __eq__(self, arg: Platform, /) -> bool: ...
787
+
788
+ @overload
789
+ def __eq__(self, obj: object | None) -> bool: ...
790
+
791
+ @staticmethod
792
+ def from_int_ptr(int_ptr_value: int, retain: bool = True) -> Platform: ...
793
+
794
+ @property
795
+ def int_ptr(self) -> int: ...
796
+
797
+ __repr__ = pyopencl._monkeypatch.platform_repr
798
+
799
+ _get_cl_version = pyopencl._monkeypatch.generic_get_cl_version
800
+
801
+ profile: str
802
+ version: str
803
+ name: str
804
+ vendor: str
805
+ extensions: str
806
+ host_timer_resolution: int
807
+ numeric_version: int
808
+ extensions_with_version: Sequence[NameVersion]
809
+
810
+ class Device:
811
+ def get_info(self, arg: device_info, /) -> object: ...
812
+
813
+ @overload
814
+ def __eq__(self, arg: Device, /) -> bool: ...
815
+
816
+ @overload
817
+ def __eq__(self, obj: object | None) -> bool: ...
818
+
819
+ @override
820
+ def __hash__(self) -> int: ...
821
+
822
+ def create_sub_devices(self,
823
+ arg: Sequence[device_partition_property],
824
+ /) -> list[Device]: ...
825
+
826
+ @staticmethod
827
+ def from_int_ptr(int_ptr_value: int, retain: bool = True) -> Device: ...
828
+
829
+ @property
830
+ def int_ptr(self) -> int: ...
831
+
832
+ def device_and_host_timer(self) -> tuple[int, int]: ...
833
+
834
+ def host_timer(self) -> int: ...
835
+
836
+ _get_cl_version = pyopencl._monkeypatch.generic_get_cl_version
837
+
838
+ __repr__ = pyopencl._monkeypatch.device_repr
839
+
840
+ type: device_type
841
+ vendor_id: int
842
+ max_compute_units: int
843
+ max_work_item_dimensions: int
844
+ max_work_group_size: int
845
+ max_work_item_sizes: Sequence[int]
846
+ preferred_vector_width_char: int
847
+ preferred_vector_width_short: int
848
+ preferred_vector_width_int: int
849
+ preferred_vector_width_long: int
850
+ preferred_vector_width_float: int
851
+ preferred_vector_width_double: int
852
+ max_clock_frequency: int
853
+ address_bits: int
854
+ max_read_image_args: int
855
+ max_write_image_args: int
856
+ max_mem_alloc_size: int
857
+ image2d_max_width: int
858
+ image2d_max_height: int
859
+ image3d_max_width: int
860
+ image3d_max_height: int
861
+ image3d_max_depth: int
862
+ image_support: bool
863
+ max_parameter_size: int
864
+ max_samplers: int
865
+ mem_base_addr_align: int
866
+ min_data_type_align_size: int
867
+ single_fp_config: int
868
+ double_fp_config: int
869
+ half_fp_config: int
870
+ global_mem_cache_type: device_mem_cache_type
871
+ global_mem_cacheline_size: int
872
+ global_mem_cache_size: int
873
+ global_mem_size: int
874
+ max_constant_buffer_size: int
875
+ max_constant_args: int
876
+ local_mem_type: device_local_mem_type
877
+ local_mem_size: int
878
+ error_correction_support: bool
879
+ profiling_timer_resolution: int
880
+ endian_little: bool
881
+ available: bool
882
+ compiler_available: bool
883
+ execution_capabilities: int
884
+ queue_properties: int
885
+ queue_on_host_properties: int
886
+ name: str
887
+ vendor: str
888
+ driver_version: str
889
+ version: str
890
+ profile: str
891
+ extensions: str
892
+ platform: Platform
893
+ preferred_vector_width_half: int
894
+ host_unified_memory: bool
895
+ native_vector_width_char: int
896
+ native_vector_width_short: int
897
+ native_vector_width_int: int
898
+ native_vector_width_long: int
899
+ native_vector_width_float: int
900
+ native_vector_width_double: int
901
+ native_vector_width_half: int
902
+ opencl_c_version: str
903
+ compute_capability_major_nv: int
904
+ compute_capability_minor_nv: int
905
+ registers_per_block_nv: int
906
+ warp_size_nv: int
907
+ gpu_overlap_nv: bool
908
+ kernel_exec_timeout_nv: bool
909
+ integrated_memory_nv: bool
910
+ attribute_async_engine_count_nv: int
911
+ pci_bus_id_nv: int
912
+ pci_slot_id_nv: int
913
+ pci_domain_id_nv: int
914
+ profiling_timer_offset_amd: int
915
+ topology_amd: DeviceTopologyAmd
916
+ board_name_amd: str
917
+ global_free_memory_amd: int
918
+ simd_per_compute_unit_amd: int
919
+ simd_width_amd: int
920
+ simd_instruction_width_amd: int
921
+ wavefront_width_amd: int
922
+ global_mem_channels_amd: int
923
+ global_mem_channel_banks_amd: int
924
+ global_mem_channel_bank_width_amd: int
925
+ local_mem_size_per_compute_unit_amd: int
926
+ local_mem_banks_amd: int
927
+ thread_trace_supported_amd: int
928
+ gfxip_major_amd: int
929
+ gfxip_minor_amd: int
930
+ available_async_queues_amd: int
931
+ # preferred_work_group_size_amd
932
+ # max_work_group_size_amd
933
+ # preferred_constant_buffer_size_amd
934
+ # pcie_id_amd
935
+ max_atomic_counters_ext: int
936
+ linker_available: bool
937
+ built_in_kernels: str
938
+ image_max_buffer_size: int
939
+ image_max_array_size: int
940
+ parent_device: Device
941
+ partition_max_sub_devices: int
942
+ partition_properties: int
943
+ partition_affinity_domain: device_affinity_domain
944
+ partition_type: device_partition_property
945
+ reference_count: int
946
+ preferred_interop_user_sync: bool
947
+ printf_buffer_size: int
948
+ # image_pitch_alignment
949
+ # image_base_address_alignment
950
+ max_read_write_image_args: int
951
+ max_global_variable_size: int
952
+ queue_on_device_properties: command_queue_properties
953
+ queue_on_device_preferred_size: int
954
+ queue_on_device_max_size: int
955
+ max_on_device_queues: int
956
+ max_on_device_events: int
957
+ svm_capabilities: device_svm_capabilities
958
+ global_variable_preferred_total_size: int
959
+ max_pipe_args: int
960
+ pipe_max_active_reservations: int
961
+ pipe_max_packet_size: int
962
+ preferred_platform_atomic_alignment: int
963
+ preferred_global_atomic_alignment: int
964
+ preferred_local_atomic_alignment: int
965
+ il_version: int
966
+ max_num_sub_groups: int
967
+ sub_group_independent_forward_progress: bool
968
+ numeric_version: int
969
+ extensions_with_version: Sequence[NameVersion]
970
+ ils_with_version: Sequence[NameVersion]
971
+ built_in_kernels_with_version: Sequence[NameVersion]
972
+ atomic_memory_capabilities: device_atomic_capabilities
973
+ atomic_fence_capabilities: device_atomic_capabilities
974
+ non_uniform_work_group_support: bool
975
+ opencl_c_all_versions: Sequence[NameVersion]
976
+ preferred_work_group_size_multiple: int
977
+ work_group_collective_functions_support: bool
978
+ generic_address_space_support: bool
979
+ opencl_c_features: Sequence[NameVersion]
980
+ device_enqueue_capabilities: device_device_enqueue_capabilities
981
+ pipe_support: bool
982
+ me_version_intel: int
983
+ ext_mem_padding_in_bytes_qcom: int
984
+ page_size_qcom: int
985
+ spir_versions: str
986
+ simultaneous_interops_intel: Sequence[Device]
987
+ num_simultaneous_interops_intel: int
988
+
989
+ class Context:
990
+ def __init__(self,
991
+ devices: Sequence[Device] | None = None,
992
+ properties: Sequence[context_properties] | None = None,
993
+ dev_type: device_type | None = None
994
+ ) -> None: ...
995
+
996
+ def get_info(self, arg: context_info, /) -> object: ...
997
+
998
+ @overload
999
+ def __eq__(self, arg: Context, /) -> bool: ...
1000
+
1001
+ @overload
1002
+ def __eq__(self, obj: object | None) -> bool: ...
1003
+
1004
+ @override
1005
+ def __hash__(self) -> int: ...
1006
+
1007
+ @staticmethod
1008
+ def from_int_ptr(int_ptr_value: int, retain: bool = True) -> Context: ...
1009
+
1010
+ @property
1011
+ def int_ptr(self) -> int: ...
1012
+
1013
+ def set_default_device_command_queue(self,
1014
+ device: Device,
1015
+ queue: CommandQueue,
1016
+ /) -> None: ...
1017
+
1018
+ _get_cl_version = pyopencl._monkeypatch.context_get_cl_version
1019
+
1020
+ __repr__ = pyopencl._monkeypatch.context_repr
1021
+
1022
+ reference_count: int
1023
+ devices: Sequence[Device]
1024
+ properties: Sequence[int]
1025
+ num_devices: int
1026
+ # interop_user_sync:
1027
+
1028
+ class CommandQueue:
1029
+ def __init__(self,
1030
+ context: Context,
1031
+ device: Device | None = None,
1032
+ properties: command_queue_properties = command_queue_properties._zero
1033
+ ) -> None: ...
1034
+
1035
+ def _finalize(self) -> None: ...
1036
+
1037
+ def get_info(self, arg: command_queue_info, /) -> object: ...
1038
+
1039
+ def flush(self) -> None: ...
1040
+
1041
+ def finish(self) -> None: ...
1042
+
1043
+ @overload
1044
+ def __eq__(self, arg: CommandQueue, /) -> bool: ...
1045
+
1046
+ @overload
1047
+ def __eq__(self, obj: object | None) -> bool: ...
1048
+
1049
+ @override
1050
+ def __hash__(self) -> int: ...
1051
+
1052
+ @staticmethod
1053
+ def from_int_ptr(int_ptr_value: int, retain: bool = True) -> CommandQueue: ...
1054
+
1055
+ @property
1056
+ def int_ptr(self) -> int: ...
1057
+
1058
+ _get_cl_version = pyopencl._monkeypatch.command_queue_get_cl_version
1059
+
1060
+ __enter__ = pyopencl._monkeypatch.command_queue_enter
1061
+
1062
+ __exit__ = pyopencl._monkeypatch.command_queue_exit
1063
+
1064
+ context: Context
1065
+ device: Device
1066
+
1067
+ reference_count: int
1068
+ properties: command_queue_properties
1069
+ properties_array: Sequence[command_queue_properties]
1070
+
1071
+ class Event:
1072
+ def get_info(self, arg: event_info, /) -> object: ...
1073
+
1074
+ def get_profiling_info(self, arg: int, /) -> object: ...
1075
+
1076
+ def wait(self) -> None: ...
1077
+
1078
+ @overload
1079
+ def __eq__(self, arg: Event, /) -> bool: ...
1080
+
1081
+ @overload
1082
+ def __eq__(self, obj: object | None) -> bool: ...
1083
+
1084
+ @override
1085
+ def __hash__(self) -> int: ...
1086
+
1087
+ @staticmethod
1088
+ def from_int_ptr(int_ptr_value: int, retain: bool = True) -> Event: ...
1089
+
1090
+ @property
1091
+ def int_ptr(self) -> int: ...
1092
+
1093
+ def set_callback(self,
1094
+ arg0: int,
1095
+ arg1: Callable[[command_execution_status], None],
1096
+ /) -> None: ...
1097
+
1098
+ command_queue: CommandQueue
1099
+ command_type: command_type
1100
+ reference_count: int
1101
+ command_execution_status: command_execution_status
1102
+ profile: pyopencl._monkeypatch.ProfilingInfoGetter
1103
+
1104
+ class NannyEvent(Event):
1105
+ def get_ward(self) -> object: ...
1106
+
1107
+ def wait_for_events(arg: Sequence[Event], /) -> None: ...
1108
+
1109
+ def _enqueue_marker_with_wait_list(
1110
+ queue: CommandQueue,
1111
+ wait_for: WaitList = None) -> Event: ...
1112
+
1113
+ def _enqueue_marker(queue: CommandQueue) -> Event: ...
1114
+
1115
+ def _enqueue_wait_for_events(
1116
+ queue: CommandQueue,
1117
+ wait_for: WaitList = None) -> None: ...
1118
+
1119
+ def _enqueue_barrier_with_wait_list(
1120
+ queue: CommandQueue,
1121
+ wait_for: WaitList = None) -> Event: ...
1122
+
1123
+ def _enqueue_barrier(queue: CommandQueue) -> None: ...
1124
+
1125
+ class UserEvent(Event):
1126
+ def __init__(self, context: Context) -> None: ...
1127
+
1128
+ def set_status(self, arg: int, /) -> None: ...
1129
+
1130
+ class MemoryObjectHolder:
1131
+ def get_info(self, arg: mem_info, /) -> object: ...
1132
+
1133
+ def get_host_array(self,
1134
+ shape: tuple[int, ...],
1135
+ dtype: DTypeT,
1136
+ order: Literal["C"] | Literal["F"] = "C"
1137
+ ) -> np.ndarray[tuple[int, ...], DTypeT]: ...
1138
+
1139
+ @overload
1140
+ def __eq__(self, arg: MemoryObjectHolder, /) -> bool: ...
1141
+
1142
+ @overload
1143
+ def __eq__(self, obj: object | None) -> bool: ...
1144
+
1145
+ @override
1146
+ def __hash__(self) -> int: ...
1147
+
1148
+ @property
1149
+ def int_ptr(self) -> int: ...
1150
+
1151
+ type: int
1152
+ flags: int
1153
+ size: int
1154
+ # FIXME
1155
+ # host_ptr
1156
+ map_count: int
1157
+ reference_count: int
1158
+ context: Context
1159
+ # associated_memobject
1160
+ offset: int
1161
+ uses_svm_pointer: bool
1162
+ properties: int
1163
+
1164
+ class MemoryObject(MemoryObjectHolder):
1165
+ def release(self) -> None: ...
1166
+
1167
+ @property
1168
+ def hostbuf(self) -> object: ...
1169
+
1170
+ @staticmethod
1171
+ def from_int_ptr(int_ptr_value: int, retain: bool = True) -> object: ...
1172
+
1173
+ def enqueue_migrate_mem_objects(
1174
+ queue: CommandQueue,
1175
+ mem_objects: Sequence[MemoryObjectHolder],
1176
+ flags: int = 0,
1177
+ wait_for: WaitList = None
1178
+ ) -> Event: ...
1179
+
1180
+ class Buffer(MemoryObject):
1181
+ def __init__(
1182
+ self,
1183
+ context: Context,
1184
+ flags: int,
1185
+ size: int = 0,
1186
+ hostbuf: HasBufferInterface | None = None
1187
+ ) -> None: ...
1188
+
1189
+ def get_sub_region(self, origin: int, size: int, flags: int = 0) -> Buffer: ...
1190
+
1191
+ def __getitem__(self, arg: slice, /) -> Buffer: ...
1192
+
1193
+ def _enqueue_read_buffer(
1194
+ queue: CommandQueue,
1195
+ mem: MemoryObjectHolder,
1196
+ hostbuf: HasBufferInterface,
1197
+ src_offset: int = 0,
1198
+ wait_for: WaitList = None,
1199
+ is_blocking: bool = True
1200
+ ) -> Event: ...
1201
+
1202
+ def _enqueue_write_buffer(
1203
+ queue: CommandQueue,
1204
+ mem: MemoryObjectHolder,
1205
+ hostbuf: HasBufferInterface,
1206
+ dst_offset: int = 0,
1207
+ wait_for: WaitList = None,
1208
+ is_blocking: bool = True
1209
+ ) -> Event: ...
1210
+
1211
+ def _enqueue_copy_buffer(
1212
+ queue: CommandQueue,
1213
+ src: MemoryObjectHolder,
1214
+ dst: MemoryObjectHolder,
1215
+ byte_count: int = -1,
1216
+ src_offset: int = 0,
1217
+ dst_offset: int = 0,
1218
+ wait_for: WaitList = None
1219
+ ) -> Event: ...
1220
+
1221
+ def _enqueue_read_buffer_rect(
1222
+ queue: CommandQueue,
1223
+ mem: MemoryObjectHolder,
1224
+ hostbuf: HasBufferInterface,
1225
+ buffer_origin: tuple[int, ...],
1226
+ host_origin: tuple[int, ...],
1227
+ region: tuple[int, ...],
1228
+ buffer_pitches: tuple[int, ...] | None = None,
1229
+ host_pitches: tuple[int, ...] | None = None,
1230
+ wait_for: WaitList = None,
1231
+ is_blocking: bool = True
1232
+ ) -> Event: ...
1233
+
1234
+ def _enqueue_write_buffer_rect(
1235
+ queue: CommandQueue,
1236
+ mem: MemoryObjectHolder,
1237
+ hostbuf: HasBufferInterface,
1238
+ buffer_origin: tuple[int, ...],
1239
+ host_origin: tuple[int, ...],
1240
+ region: object,
1241
+ buffer_pitches: tuple[int, ...] | None = None,
1242
+ host_pitches: tuple[int, ...] | None = None,
1243
+ wait_for: WaitList = None,
1244
+ is_blocking: bool = True
1245
+ ) -> Event: ...
1246
+
1247
+ def _enqueue_copy_buffer_rect(
1248
+ queue: CommandQueue,
1249
+ src: MemoryObjectHolder,
1250
+ dst: MemoryObjectHolder,
1251
+ src_origin: tuple[int, ...],
1252
+ dst_origin: tuple[int, ...],
1253
+ region: object,
1254
+ src_pitches: tuple[int, ...] | None = None,
1255
+ dst_pitches: tuple[int, ...] | None = None,
1256
+ wait_for: WaitList = None
1257
+ ) -> Event: ...
1258
+
1259
+ def _enqueue_fill_buffer(
1260
+ queue: CommandQueue,
1261
+ mem: MemoryObjectHolder,
1262
+ pattern: object,
1263
+ offset: int,
1264
+ size: int,
1265
+ wait_for: WaitList = None
1266
+ ) -> Event: ...
1267
+
1268
+ def enqueue_copy_buffer_p2p_amd(
1269
+ platform: Platform,
1270
+ queue: CommandQueue,
1271
+ src: MemoryObjectHolder,
1272
+ dst: MemoryObjectHolder,
1273
+ byte_count: int | None = None,
1274
+ wait_for: WaitList = None
1275
+ ) -> Event: ...
1276
+
1277
+ class ImageDescriptor:
1278
+ def __init__(self) -> None: ...
1279
+
1280
+ @property
1281
+ def image_type(self) -> mem_object_type: ...
1282
+
1283
+ @image_type.setter
1284
+ def image_type(self, arg: mem_object_type, /) -> None: ...
1285
+
1286
+ @property
1287
+ def shape(self) -> tuple[int, int, int]: ...
1288
+
1289
+ @shape.setter
1290
+ def shape(self, arg: tuple[int, int, int], /) -> None: ...
1291
+
1292
+ @property
1293
+ def array_size(self) -> int: ...
1294
+
1295
+ @array_size.setter
1296
+ def array_size(self, arg: int, /) -> None: ...
1297
+
1298
+ @property
1299
+ def pitches(self) -> object: ...
1300
+
1301
+ @pitches.setter
1302
+ def pitches(self, arg: tuple[int, int], /) -> None: ...
1303
+
1304
+ @property
1305
+ def num_mip_levels(self) -> int: ...
1306
+
1307
+ @num_mip_levels.setter
1308
+ def num_mip_levels(self, arg: int, /) -> None: ...
1309
+
1310
+ @property
1311
+ def num_samples(self) -> int: ...
1312
+
1313
+ @num_samples.setter
1314
+ def num_samples(self, arg: int, /) -> None: ...
1315
+
1316
+ @property
1317
+ def buffer(self) -> object: ...
1318
+
1319
+ @buffer.setter
1320
+ def buffer(self, buffer: MemoryObject | None) -> None: ...
1321
+
1322
+ class Image(MemoryObject):
1323
+ # monkeypatched, but apparently pyright doesn't like monkeypatched __init__
1324
+ def __init__(self,
1325
+ context: Context,
1326
+ flags: mem_flags,
1327
+ format: ImageFormat,
1328
+ shape: tuple[int, ...] | None = None,
1329
+ pitches: tuple[int, ...] | None = None,
1330
+
1331
+ hostbuf: HasBufferInterface | None = None,
1332
+ is_array: bool = False,
1333
+ buffer: Buffer | None = None,
1334
+ *,
1335
+ desc: ImageDescriptor | None = None,
1336
+ _through_create_image: bool = False,
1337
+ ) -> None: ...
1338
+
1339
+ @overload
1340
+ @staticmethod
1341
+ def _custom_init(
1342
+ h: Image,
1343
+ context: Context,
1344
+ flags: int,
1345
+ format: ImageFormat,
1346
+ shape: tuple[int, ...] | None = None,
1347
+ pitches: tuple[int, ...] | None = None,
1348
+ hostbuf: object | None = None
1349
+ ) -> None: ...
1350
+
1351
+ @overload
1352
+ @staticmethod
1353
+ def _custom_init(
1354
+ h: Image,
1355
+ context: Context,
1356
+ flags: int,
1357
+ format: ImageFormat,
1358
+ desc: ImageDescriptor,
1359
+ hostbuf: object | None = None
1360
+ ) -> None: ...
1361
+
1362
+ def get_image_info(self, arg: image_info, /) -> object: ...
1363
+
1364
+ format: ImageFormat
1365
+ element_size: int
1366
+ row_pitch: int
1367
+ slice_pitch: int
1368
+ width: int
1369
+ height: int
1370
+ depth: int
1371
+ array_size: int
1372
+ buffer: Buffer
1373
+ num_mip_levels: int
1374
+ num_samples: int
1375
+
1376
+ class ImageFormat:
1377
+ def __init__(self, arg0: int, arg1: int, /) -> None: ...
1378
+
1379
+ @property
1380
+ def channel_order(self) -> int: ...
1381
+
1382
+ @channel_order.setter
1383
+ def channel_order(self, arg: int, /) -> None: ...
1384
+
1385
+ @property
1386
+ def channel_data_type(self) -> int: ...
1387
+
1388
+ @channel_data_type.setter
1389
+ def channel_data_type(self, arg: int, /) -> None: ...
1390
+
1391
+ @property
1392
+ def channel_count(self) -> int: ...
1393
+
1394
+ @property
1395
+ def dtype_size(self) -> int: ...
1396
+
1397
+ @property
1398
+ def itemsize(self) -> int: ...
1399
+
1400
+ __repr__ = pyopencl._monkeypatch.image_format_repr
1401
+
1402
+ __eq__ = pyopencl._monkeypatch.image_format_eq
1403
+
1404
+ __ne__ = pyopencl._monkeypatch.image_format_ne
1405
+
1406
+ __hash__ = pyopencl._monkeypatch.image_format_hash
1407
+
1408
+ def get_supported_image_formats(
1409
+ context: Context,
1410
+ arg1: mem_flags,
1411
+ arg2: mem_object_type,
1412
+ /) -> Sequence[ImageFormat]: ...
1413
+
1414
+ def _enqueue_read_image(
1415
+ queue: CommandQueue,
1416
+ mem: Image,
1417
+ origin: tuple[int, ...],
1418
+ region: tuple[int, ...],
1419
+ hostbuf: HasBufferInterface,
1420
+ row_pitch: int = 0,
1421
+ slice_pitch: int = 0,
1422
+ wait_for: WaitList = None,
1423
+ is_blocking: bool = True
1424
+ ) -> Event: ...
1425
+
1426
+ def _enqueue_write_image(
1427
+ queue: CommandQueue,
1428
+ mem: Image,
1429
+ origin: tuple[int, ...],
1430
+ region: tuple[int, ...],
1431
+ hostbuf: HasBufferInterface,
1432
+ row_pitch: int = 0,
1433
+ slice_pitch: int = 0,
1434
+ wait_for: WaitList = None,
1435
+ is_blocking: bool = True
1436
+ ) -> Event: ...
1437
+
1438
+ def _enqueue_copy_image(
1439
+ queue: CommandQueue,
1440
+ src: MemoryObjectHolder,
1441
+ dest: MemoryObjectHolder,
1442
+ src_origin: tuple[int, ...],
1443
+ dest_origin: tuple[int, ...],
1444
+ region: tuple[int, ...],
1445
+ wait_for: WaitList = None
1446
+ ) -> Event: ...
1447
+
1448
+ def _enqueue_copy_image_to_buffer(
1449
+ queue: CommandQueue,
1450
+ src: MemoryObjectHolder,
1451
+ dest: MemoryObjectHolder,
1452
+ origin: tuple[int, ...],
1453
+ region: tuple[int, ...],
1454
+ offset: int,
1455
+ wait_for: WaitList = None
1456
+ ) -> Event: ...
1457
+
1458
+ def _enqueue_copy_buffer_to_image(
1459
+ queue: CommandQueue,
1460
+ src: MemoryObjectHolder,
1461
+ dest: MemoryObjectHolder,
1462
+ offset: int,
1463
+ origin: tuple[int, ...],
1464
+ region: tuple[int, ...],
1465
+ wait_for: WaitList = None
1466
+ ) -> Event: ...
1467
+
1468
+ def enqueue_fill_image(
1469
+ queue: CommandQueue,
1470
+ mem: MemoryObjectHolder,
1471
+ color: HasBufferInterface,
1472
+ origin: tuple[int, ...],
1473
+ region: tuple[int, ...],
1474
+ wait_for: WaitList = None
1475
+ ) -> Event: ...
1476
+
1477
+ class Pipe(MemoryObject):
1478
+ def __init__(self,
1479
+ context: Context,
1480
+ flags: int,
1481
+ packet_size: int,
1482
+ max_packets: int,
1483
+ properties: Sequence[pipe_properties] = ()
1484
+ ) -> None: ...
1485
+
1486
+ def get_pipe_info(self, arg: pipe_info, /) -> object: ...
1487
+
1488
+ packet_size: int
1489
+ max_packets: int
1490
+ # FIXME
1491
+ # properties:
1492
+
1493
+ class MemoryMap:
1494
+ def release(self,
1495
+ queue: CommandQueue | None = None,
1496
+ wait_for: WaitList = None
1497
+ ) -> Event: ...
1498
+
1499
+ __enter__ = pyopencl._monkeypatch.memory_map_enter
1500
+
1501
+ __exit__ = pyopencl._monkeypatch.memory_map_exit
1502
+
1503
+ def enqueue_map_buffer(
1504
+ queue: CommandQueue,
1505
+ buf: MemoryObjectHolder,
1506
+ flags: map_flags,
1507
+ offset: int,
1508
+ shape: tuple[int, ...],
1509
+ dtype: DTypeT,
1510
+ order: Literal["C"] | Literal["F"] = "C",
1511
+ strides: tuple[int, ...] | None = None,
1512
+ wait_for: WaitList = None,
1513
+ is_blocking: bool = True
1514
+ ) -> np.ndarray[tuple[int, ...], DTypeT]: ...
1515
+
1516
+ def enqueue_map_image(
1517
+ queue: CommandQueue,
1518
+ img: MemoryObjectHolder,
1519
+ flags: int,
1520
+ origin: tuple[int, ...],
1521
+ region: tuple[int, ...],
1522
+ shape: tuple[int, ...],
1523
+ dtype: DTypeT,
1524
+ order: Literal["C"] | Literal["F"] = "C",
1525
+ strides: tuple[int, ...] | None = None,
1526
+ wait_for: WaitList = None,
1527
+ is_blocking: bool = True
1528
+ ) -> np.ndarray[tuple[int, ...], DTypeT]: ...
1529
+
1530
+ class SVMPointer:
1531
+ @property
1532
+ def svm_ptr(self) -> int: ...
1533
+
1534
+ @property
1535
+ def size(self) -> int | None: ...
1536
+
1537
+ @property
1538
+ def buf(self) -> NDArray[np.uint8]: ...
1539
+
1540
+ map = pyopencl._monkeypatch.svmptr_map
1541
+
1542
+ map_ro = pyopencl._monkeypatch.svmptr_map_ro
1543
+
1544
+ map_rw = pyopencl._monkeypatch.svmptr_map_rw
1545
+
1546
+ _enqueue_unmap = pyopencl._monkeypatch.svmptr__enqueue_unmap
1547
+
1548
+ as_buffer = pyopencl._monkeypatch.svmptr_as_buffer
1549
+
1550
+ class SVM(SVMPointer, Generic[SVMInnerT]):
1551
+ def __init__(self, arg: SVMInnerT, /) -> None: ...
1552
+
1553
+ @property
1554
+ def mem(self) -> SVMInnerT: ...
1555
+
1556
+ map = pyopencl._monkeypatch.svm_map
1557
+
1558
+ map_ro = pyopencl._monkeypatch.svm_map_ro
1559
+
1560
+ map_rw = pyopencl._monkeypatch.svm_map_rw
1561
+
1562
+ _enqueue_unmap = pyopencl._monkeypatch.svm__enqueue_unmap
1563
+
1564
+ class SVMAllocation(SVMPointer):
1565
+ def __init__(self,
1566
+ context: Context,
1567
+ size: int,
1568
+ alignment: int,
1569
+ flags: int,
1570
+ queue: CommandQueue | None = None
1571
+ ) -> None: ...
1572
+
1573
+ def release(self) -> None: ...
1574
+
1575
+ def enqueue_release(self,
1576
+ queue: CommandQueue | None = None,
1577
+ wait_for: WaitList = None
1578
+ ) -> Event: ...
1579
+
1580
+ @overload
1581
+ def __eq__(self, arg: SVMAllocation, /) -> bool: ...
1582
+
1583
+ @overload
1584
+ def __eq__(self, obj: object | None) -> bool: ...
1585
+
1586
+ @override
1587
+ def __hash__(self) -> int: ...
1588
+
1589
+ def bind_to_queue(self, queue: CommandQueue) -> None: ...
1590
+
1591
+ def unbind_from_queue(self) -> None: ...
1592
+
1593
+ @property
1594
+ def _queue(self) -> object: ...
1595
+
1596
+ def _enqueue_svm_memcpy(
1597
+ queue: CommandQueue,
1598
+ is_blocking: int,
1599
+ dst: SVMPointer,
1600
+ src: SVMPointer,
1601
+ wait_for: WaitList = None,
1602
+ byte_count: object | None = None
1603
+ ) -> Event: ...
1604
+
1605
+ def _enqueue_svm_memfill(
1606
+ queue: CommandQueue,
1607
+ dst: SVMPointer,
1608
+ pattern: object,
1609
+ byte_count: object | None = None,
1610
+ wait_for: WaitList = None
1611
+ ) -> Event: ...
1612
+
1613
+ def _enqueue_svm_map(
1614
+ queue: CommandQueue,
1615
+ is_blocking: int,
1616
+ flags: int,
1617
+ svm: SVMPointer,
1618
+ wait_for: WaitList = None,
1619
+ size: object | None = None
1620
+ ) -> Event: ...
1621
+
1622
+ def _enqueue_svm_unmap(
1623
+ queue: CommandQueue,
1624
+ svm: SVMPointer,
1625
+ wait_for: WaitList = None
1626
+ ) -> Event: ...
1627
+
1628
+ def _enqueue_svm_migrate_mem(
1629
+ queue: CommandQueue,
1630
+ svms: Sequence[SVMPointer],
1631
+ flags: int | None = None,
1632
+ wait_for: WaitList = None
1633
+ ) -> Event: ...
1634
+
1635
+ class Sampler:
1636
+ @overload
1637
+ def __init__(self, arg0: Context, arg1: Sequence[int], /) -> None: ...
1638
+
1639
+ @overload
1640
+ def __init__(self, arg0: Context, arg1: bool, arg2: int, arg3: int, /) -> None: ...
1641
+
1642
+ def get_info(self, arg: sampler_info, /) -> object: ...
1643
+
1644
+ @overload
1645
+ def __eq__(self, arg: Sampler, /) -> bool: ...
1646
+
1647
+ @overload
1648
+ def __eq__(self, obj: object | None) -> bool: ...
1649
+
1650
+ @override
1651
+ def __hash__(self) -> int: ...
1652
+
1653
+ @staticmethod
1654
+ def from_int_ptr(int_ptr_value: int, retain: bool = True) -> Sampler: ...
1655
+
1656
+ @property
1657
+ def int_ptr(self) -> int: ...
1658
+
1659
+ reference_count: int
1660
+ context: Context
1661
+ normalized_coords: bool
1662
+ addressing_mode: addressing_mode
1663
+ filter_mode: filter_mode
1664
+ mip_filter_mode: filter_mode
1665
+ lod_min: float
1666
+ lod_max: float
1667
+ properties: Sequence[sampler_properties]
1668
+ mip_filter_mode_khr: filter_mode
1669
+ lod_min_khr: float
1670
+ lod_max_khr: float
1671
+
1672
+ class program_kind(IntEnum): # noqa: N801
1673
+ UNKNOWN = auto()
1674
+ SOURCE = auto()
1675
+ BINARY = auto()
1676
+ IL = auto()
1677
+
1678
+ to_string = classmethod(pyopencl._monkeypatch.to_string)
1679
+
1680
+ def unload_platform_compiler(arg: Platform, /) -> None: ...
1681
+
1682
+ class Kernel:
1683
+ def __init__(self, arg0: _Program | Program, arg1: str, /) -> None: ...
1684
+
1685
+ get_info = pyopencl._monkeypatch.kernel_get_info
1686
+
1687
+ get_work_group_info = pyopencl._monkeypatch.kernel_get_work_group_info
1688
+
1689
+ def clone(self) -> Kernel: ...
1690
+
1691
+ def set_arg(self, arg0: int, arg1: KernelArg, /) -> None: ...
1692
+
1693
+ def get_arg_info(self, index: int, param_name: kernel_arg_info, /) -> object: ...
1694
+
1695
+ @overload
1696
+ def __eq__(self, arg: Kernel, /) -> bool: ...
1697
+
1698
+ @overload
1699
+ def __eq__(self, obj: object | None) -> bool: ...
1700
+
1701
+ @override
1702
+ def __hash__(self) -> int: ...
1703
+
1704
+ @staticmethod
1705
+ def from_int_ptr(int_ptr_value: int, retain: bool = True) -> Kernel: ...
1706
+
1707
+ @property
1708
+ def int_ptr(self) -> int: ...
1709
+
1710
+ def get_sub_group_info(self,
1711
+ device: Device,
1712
+ param: int,
1713
+ input_value: Sequence[int] | int | None = None
1714
+ ) -> object: ...
1715
+
1716
+ def __call__(self,
1717
+ queue: CommandQueue,
1718
+ global_work_size: tuple[int, ...],
1719
+ local_work_size: tuple[int, ...] | None,
1720
+ *args: KernelArg,
1721
+ wait_for: WaitList = None,
1722
+ g_times_l: bool = False,
1723
+ allow_empty_ndrange: bool = False,
1724
+ global_offset: tuple[int, ...] | None = None,
1725
+ ) -> Event: ...
1726
+
1727
+ def set_args(self, *args: KernelArg) -> None: ...
1728
+
1729
+ set_scalar_arg_dtypes = pyopencl._monkeypatch.kernel_set_arg_types
1730
+
1731
+ set_arg_types = pyopencl._monkeypatch.kernel_set_arg_types
1732
+
1733
+ capture_call = pyopencl._monkeypatch.kernel_capture_call
1734
+
1735
+ function_name: str
1736
+ num_args: int
1737
+ reference_count: int
1738
+ context: Context
1739
+ program: _Program
1740
+ attributes: str
1741
+
1742
+ class LocalMemory:
1743
+ def __init__(self, size: int) -> None: ...
1744
+
1745
+ @property
1746
+ def size(self) -> int: ...
1747
+
1748
+ def enqueue_nd_range_kernel(
1749
+ queue: CommandQueue,
1750
+ kernel: Kernel,
1751
+ global_work_size: tuple[int, ...],
1752
+ local_work_size: tuple[int, ...] | None,
1753
+ global_offset: tuple[int, ...] | None = None,
1754
+ wait_for: WaitList = None,
1755
+ *,
1756
+ g_times_l: bool = False,
1757
+ allow_empty_ndrange: bool = False
1758
+ ) -> Event: ...
1759
+
1760
+ def have_gl() -> bool: ...
1761
+
1762
+ class GLBuffer(MemoryObject):
1763
+ def __init__(self, context: Context, flags: int, bufobj: int) -> None: ...
1764
+
1765
+ def get_gl_object_info(self) -> tuple[gl_object_type, int]: ...
1766
+
1767
+ class GLRenderBuffer(MemoryObject):
1768
+ def __init__(self, context: Context, flags: int, bufobj: int) -> None: ...
1769
+
1770
+ def get_gl_object_info(self) -> tuple[gl_object_type, int]: ...
1771
+
1772
+ class GLTexture(Image):
1773
+ def __init__(
1774
+ self,
1775
+ context: Context,
1776
+ flags: int,
1777
+ texture_target: int,
1778
+ miplevel: int,
1779
+ texture: int,
1780
+ dims: int
1781
+ ) -> None: ...
1782
+
1783
+ def get_gl_object_info(self) -> tuple[gl_object_type, int]: ...
1784
+
1785
+ def get_gl_texture_info(self, arg: gl_texture_info, /) -> int: ...
1786
+
1787
+ def enqueue_acquire_gl_objects(
1788
+ queue: CommandQueue,
1789
+ mem_objects: object,
1790
+ wait_for: WaitList = None) -> Event: ...
1791
+
1792
+ def enqueue_release_gl_objects(
1793
+ queue: CommandQueue,
1794
+ mem_objects: object,
1795
+ wait_for: WaitList = None) -> Event: ...
1796
+
1797
+ def get_gl_context_info_khr(
1798
+ properties: object,
1799
+ param_name: int,
1800
+ platform: object | None = None) -> object: ...
1801
+
1802
+ def bitlog2(arg: int, /) -> int: ...
1803
+
1804
+ class AllocatorBase:
1805
+ def __call__(self, size: int) -> Buffer: ...
1806
+
1807
+ class DeferredAllocator(AllocatorBase):
1808
+ @overload
1809
+ def __init__(self, arg: Context, /) -> None: ...
1810
+
1811
+ @overload
1812
+ def __init__(self, queue: Context, mem_flags: int) -> None: ...
1813
+
1814
+ class ImmediateAllocator(AllocatorBase):
1815
+ @overload
1816
+ def __init__(self, arg: CommandQueue, /) -> None: ...
1817
+
1818
+ @overload
1819
+ def __init__(self, queue: CommandQueue, mem_flags: int) -> None: ...
1820
+
1821
+ class PooledBuffer(MemoryObjectHolder):
1822
+ def release(self) -> None: ...
1823
+
1824
+ def bind_to_queue(self, arg: CommandQueue, /) -> None: ...
1825
+
1826
+ def unbind_from_queue(self) -> None: ...
1827
+
1828
+ class MemoryPool:
1829
+ def __init__(self,
1830
+ allocator: AllocatorBase,
1831
+ leading_bits_in_bin_id: int = 4
1832
+ ) -> None: ...
1833
+
1834
+ def allocate(self, size: int) -> PooledBuffer: ...
1835
+
1836
+ def __call__(self, size: int) -> PooledBuffer: ...
1837
+
1838
+ @property
1839
+ def held_blocks(self) -> int: ...
1840
+
1841
+ @property
1842
+ def active_blocks(self) -> int: ...
1843
+
1844
+ @property
1845
+ def managed_bytes(self) -> int: ...
1846
+
1847
+ @property
1848
+ def active_bytes(self) -> int: ...
1849
+
1850
+ def bin_number(self, arg: int, /) -> int: ...
1851
+
1852
+ def alloc_size(self, arg: int, /) -> int: ...
1853
+
1854
+ def free_held(self) -> None: ...
1855
+
1856
+ def stop_holding(self) -> None: ...
1857
+
1858
+ class SVMAllocator:
1859
+ def __init__(self,
1860
+ context: Context,
1861
+ alignment: int = 0,
1862
+ flags: int = 1,
1863
+ queue: CommandQueue | None = None
1864
+ ) -> None: ...
1865
+
1866
+ def __call__(self, size: int) -> SVMAllocation: ...
1867
+
1868
+ class PooledSVM(SVMPointer):
1869
+ def release(self) -> None: ...
1870
+
1871
+ def enqueue_release(self) -> None: ...
1872
+
1873
+ @override
1874
+ def __eq__(self, arg: PooledSVM, /) -> bool: ...
1875
+
1876
+ @override
1877
+ def __hash__(self) -> int: ...
1878
+
1879
+ def bind_to_queue(self, arg: CommandQueue, /) -> None: ...
1880
+
1881
+ def unbind_from_queue(self) -> None: ...
1882
+
1883
+ class SVMPool:
1884
+ def __init__(self,
1885
+ allocator: SVMAllocator,
1886
+ leading_bits_in_bin_id: int = 4
1887
+ ) -> None: ...
1888
+
1889
+ def __call__(self, size: int) -> PooledSVM: ...
1890
+
1891
+ @property
1892
+ def held_blocks(self) -> int: ...
1893
+
1894
+ @property
1895
+ def active_blocks(self) -> int: ...
1896
+
1897
+ @property
1898
+ def managed_bytes(self) -> int: ...
1899
+
1900
+ @property
1901
+ def active_bytes(self) -> int: ...
1902
+
1903
+ def bin_number(self, arg: int, /) -> int: ...
1904
+
1905
+ def alloc_size(self, arg: int, /) -> int: ...
1906
+
1907
+ def free_held(self) -> None: ...
1908
+
1909
+ def stop_holding(self) -> None: ...
1910
+
1911
+ class _Program:
1912
+ @overload
1913
+ def __init__(self, arg1: Context, arg2: str | bytes) -> None: ...
1914
+
1915
+ @overload
1916
+ def __init__(
1917
+ self,
1918
+ arg1: Context,
1919
+ arg2: Sequence[Device],
1920
+ arg3: Sequence[bytes]
1921
+ ) -> None: ...
1922
+
1923
+ @staticmethod
1924
+ def create_with_built_in_kernels(
1925
+ context: Context,
1926
+ devices: Sequence[Device],
1927
+ kernel_names: str) -> _Program: ...
1928
+
1929
+ def kind(self) -> program_kind: ...
1930
+
1931
+ def get_info(self, arg: program_info, /) -> object: ...
1932
+
1933
+ def get_build_info(self, arg0: Device, arg1: int, /) -> object: ...
1934
+
1935
+ def _build(self,
1936
+ options: bytes = b"",
1937
+ devices: Sequence[Device] | None = None
1938
+ ) -> None: ...
1939
+
1940
+ def compile(self,
1941
+ options: bytes = b"",
1942
+ devices: Sequence[Device] | None = None,
1943
+ headers: object = []
1944
+ ) -> None: ...
1945
+
1946
+ @staticmethod
1947
+ def link(
1948
+ context: Context,
1949
+ programs: object,
1950
+ options: bytes = b"",
1951
+ devices: Sequence[Device] | None = None
1952
+ ) -> _Program: ...
1953
+
1954
+ def set_specialization_constant(self, spec_id: int, buffer: object) -> None: ...
1955
+
1956
+ @overload
1957
+ def __eq__(self, arg: _Program, /) -> bool: ...
1958
+
1959
+ @overload
1960
+ def __eq__(self, obj: object | None) -> bool: ...
1961
+
1962
+ @override
1963
+ def __hash__(self) -> int: ...
1964
+
1965
+ def all_kernels(self) -> Sequence[Kernel]: ...
1966
+
1967
+ @staticmethod
1968
+ def from_int_ptr(int_ptr_value: int, retain: bool = True) -> _Program: ...
1969
+
1970
+ @property
1971
+ def int_ptr(self) -> int: ...
1972
+
1973
+ _get_build_logs = pyopencl._monkeypatch.program_get_build_logs
1974
+
1975
+ build = pyopencl._monkeypatch.program_build
1976
+
1977
+ def _create_program_with_il(arg0: Context, arg1: bytes, /) -> _Program: ...
1978
+
1979
+ class _TestMemoryPool:
1980
+ def __init__(self, leading_bits_in_bin_id: int = 4) -> None: ...
1981
+
1982
+ def allocate(self, arg: int, /) -> object: ...
1983
+
1984
+ @property
1985
+ def held_blocks(self) -> int: ...
1986
+
1987
+ @property
1988
+ def active_blocks(self) -> int: ...
1989
+
1990
+ @property
1991
+ def managed_bytes(self) -> int: ...
1992
+
1993
+ @property
1994
+ def active_bytes(self) -> int: ...
1995
+
1996
+ def bin_number(self, arg: int, /) -> int: ...
1997
+
1998
+ def alloc_size(self, arg: int, /) -> int: ...
1999
+
2000
+ def free_held(self) -> None: ...
2001
+
2002
+ def stop_holding(self) -> None: ...
2003
+
2004
+ def _set_trace(self, arg: bool, /) -> None: ...
2005
+
2006
+ def get_apple_cgl_share_group() -> context_properties: ...