pyopencl 2024.2.7__cp311-cp311-win_amd64.whl → 2025.1__cp311-cp311-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.
- pyopencl/__init__.py +127 -122
- pyopencl/_cl.cp311-win_amd64.pyd +0 -0
- pyopencl/_mymako.py +3 -3
- pyopencl/algorithm.py +10 -7
- pyopencl/array.py +58 -123
- pyopencl/bitonic_sort.py +3 -1
- pyopencl/bitonic_sort_templates.py +1 -1
- pyopencl/cache.py +23 -22
- pyopencl/capture_call.py +5 -4
- pyopencl/clrandom.py +1 -0
- pyopencl/cltypes.py +2 -2
- pyopencl/compyte/dtypes.py +4 -4
- pyopencl/compyte/pyproject.toml +54 -0
- pyopencl/elementwise.py +9 -2
- pyopencl/invoker.py +11 -9
- pyopencl/ipython_ext.py +1 -1
- pyopencl/reduction.py +16 -10
- pyopencl/scan.py +38 -22
- pyopencl/tools.py +23 -13
- pyopencl/version.py +1 -1
- {pyopencl-2024.2.7.dist-info → pyopencl-2025.1.dist-info}/METADATA +11 -8
- pyopencl-2025.1.dist-info/RECORD +42 -0
- {pyopencl-2024.2.7.dist-info → pyopencl-2025.1.dist-info}/WHEEL +1 -1
- pyopencl/compyte/.git +0 -1
- pyopencl/compyte/ndarray/Makefile +0 -31
- pyopencl/compyte/ndarray/__init__.py +0 -0
- pyopencl/compyte/ndarray/gen_elemwise.py +0 -1907
- pyopencl/compyte/ndarray/gen_reduction.py +0 -1511
- pyopencl/compyte/ndarray/gpu_ndarray.h +0 -35
- pyopencl/compyte/ndarray/pygpu_language.h +0 -207
- pyopencl/compyte/ndarray/pygpu_language_cuda.cu +0 -622
- pyopencl/compyte/ndarray/pygpu_language_opencl.cpp +0 -317
- pyopencl/compyte/ndarray/pygpu_ndarray.cpp +0 -1546
- pyopencl/compyte/ndarray/pygpu_ndarray.h +0 -71
- pyopencl/compyte/ndarray/pygpu_ndarray_object.h +0 -232
- pyopencl/compyte/ndarray/setup_opencl.py +0 -101
- pyopencl/compyte/ndarray/test_gpu_elemwise.py +0 -411
- pyopencl/compyte/ndarray/test_gpu_ndarray.py +0 -487
- pyopencl-2024.2.7.dist-info/RECORD +0 -56
- {pyopencl-2024.2.7.dist-info → pyopencl-2025.1.dist-info}/licenses/LICENSE +0 -0
pyopencl/invoker.py
CHANGED
|
@@ -26,6 +26,7 @@ from typing import Any, Tuple
|
|
|
26
26
|
from warnings import warn
|
|
27
27
|
|
|
28
28
|
import numpy as np
|
|
29
|
+
|
|
29
30
|
from pytools.persistent_dict import WriteOncePersistentDict
|
|
30
31
|
from pytools.py_codegen import Indentation, PythonCodeGenerator
|
|
31
32
|
|
|
@@ -258,16 +259,17 @@ def _generate_enqueue_and_set_args_module(function_name,
|
|
|
258
259
|
|
|
259
260
|
# {{{ generate _enqueue
|
|
260
261
|
|
|
261
|
-
|
|
262
|
+
from pytools import to_identifier
|
|
263
|
+
enqueue_name = f"enqueue_knl_{to_identifier(function_name)}"
|
|
262
264
|
gen("def %s(%s):"
|
|
263
265
|
% (enqueue_name,
|
|
264
|
-
", ".join(
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
266
|
+
", ".join([
|
|
267
|
+
"self", "queue", "global_size", "local_size",
|
|
268
|
+
*arg_names,
|
|
269
|
+
"global_offset=None",
|
|
270
|
+
"g_times_l=False",
|
|
271
|
+
"allow_empty_ndrange=False",
|
|
272
|
+
"wait_for=None"])))
|
|
271
273
|
|
|
272
274
|
with Indentation(gen):
|
|
273
275
|
subgen, wait_for_parts = gen_arg_setting(in_enqueue=True)
|
|
@@ -295,7 +297,7 @@ def _generate_enqueue_and_set_args_module(function_name,
|
|
|
295
297
|
|
|
296
298
|
gen("")
|
|
297
299
|
gen("def set_args(%s):"
|
|
298
|
-
% (", ".join(["self"
|
|
300
|
+
% (", ".join(["self", *arg_names])))
|
|
299
301
|
|
|
300
302
|
with Indentation(gen):
|
|
301
303
|
gen.extend(gen_arg_setting(in_enqueue=False))
|
pyopencl/ipython_ext.py
CHANGED
|
@@ -33,7 +33,7 @@ class PyOpenCLMagics(Magics):
|
|
|
33
33
|
def cl_kernel(self, line, cell):
|
|
34
34
|
kernel = cell
|
|
35
35
|
|
|
36
|
-
opts,
|
|
36
|
+
opts, _args = self.parse_options(line, "o:")
|
|
37
37
|
build_options = opts.get("o", "")
|
|
38
38
|
|
|
39
39
|
self._run_kernel(kernel, build_options)
|
pyopencl/reduction.py
CHANGED
|
@@ -35,8 +35,12 @@ import numpy as np
|
|
|
35
35
|
|
|
36
36
|
import pyopencl as cl
|
|
37
37
|
from pyopencl.tools import (
|
|
38
|
-
DtypedArgument,
|
|
39
|
-
|
|
38
|
+
DtypedArgument,
|
|
39
|
+
KernelTemplateBase,
|
|
40
|
+
_process_code_for_macro,
|
|
41
|
+
context_dependent_memoize,
|
|
42
|
+
dtype_to_ctype,
|
|
43
|
+
)
|
|
40
44
|
|
|
41
45
|
|
|
42
46
|
# {{{ kernel source
|
|
@@ -219,8 +223,11 @@ def get_reduction_kernel(
|
|
|
219
223
|
map_expr = "pyopencl_reduction_inp[i]" if stage == 2 else "in[i]"
|
|
220
224
|
|
|
221
225
|
from pyopencl.tools import (
|
|
222
|
-
VectorArg,
|
|
223
|
-
|
|
226
|
+
VectorArg,
|
|
227
|
+
get_arg_list_scalar_arg_dtypes,
|
|
228
|
+
get_arg_offset_adjuster_code,
|
|
229
|
+
parse_arg_list,
|
|
230
|
+
)
|
|
224
231
|
|
|
225
232
|
if arguments is None:
|
|
226
233
|
raise ValueError("arguments must not be None")
|
|
@@ -229,9 +236,9 @@ def get_reduction_kernel(
|
|
|
229
236
|
arg_prep = get_arg_offset_adjuster_code(arguments)
|
|
230
237
|
|
|
231
238
|
if stage == 2 and arguments is not None:
|
|
232
|
-
arguments =
|
|
233
|
-
|
|
234
|
-
|
|
239
|
+
arguments = [
|
|
240
|
+
VectorArg(dtype_out, "pyopencl_reduction_inp"),
|
|
241
|
+
*arguments]
|
|
235
242
|
|
|
236
243
|
source, group_size = _get_reduction_source(
|
|
237
244
|
ctx, dtype_to_ctype(dtype_out), dtype_out.itemsize,
|
|
@@ -512,8 +519,7 @@ class ReductionKernel:
|
|
|
512
519
|
use_queue,
|
|
513
520
|
(group_count*stage_inf.group_size,),
|
|
514
521
|
(stage_inf.group_size,),
|
|
515
|
-
*([result.base_data, result.offset]
|
|
516
|
-
+ invocation_args + size_args),
|
|
522
|
+
*([result.base_data, result.offset, *invocation_args, *size_args]),
|
|
517
523
|
wait_for=wait_for)
|
|
518
524
|
wait_for = [last_evt]
|
|
519
525
|
|
|
@@ -526,7 +532,7 @@ class ReductionKernel:
|
|
|
526
532
|
return result
|
|
527
533
|
else:
|
|
528
534
|
stage_inf = self.stage_2_inf
|
|
529
|
-
args = (result,
|
|
535
|
+
args = (result, *stage1_args)
|
|
530
536
|
|
|
531
537
|
range_ = slice_ = None
|
|
532
538
|
|
pyopencl/scan.py
CHANGED
|
@@ -28,6 +28,7 @@ from dataclasses import dataclass
|
|
|
28
28
|
from typing import Any, Dict, List, Optional, Set, Tuple, Union
|
|
29
29
|
|
|
30
30
|
import numpy as np
|
|
31
|
+
|
|
31
32
|
from pytools.persistent_dict import WriteOncePersistentDict
|
|
32
33
|
|
|
33
34
|
import pyopencl as cl
|
|
@@ -35,9 +36,16 @@ import pyopencl._mymako as mako
|
|
|
35
36
|
import pyopencl.array
|
|
36
37
|
from pyopencl._cluda import CLUDA_PREAMBLE
|
|
37
38
|
from pyopencl.tools import (
|
|
38
|
-
DtypedArgument,
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
DtypedArgument,
|
|
40
|
+
KernelTemplateBase,
|
|
41
|
+
_NumpyTypesKeyBuilder,
|
|
42
|
+
_process_code_for_macro,
|
|
43
|
+
bitlog2,
|
|
44
|
+
context_dependent_memoize,
|
|
45
|
+
dtype_to_ctype,
|
|
46
|
+
get_arg_list_scalar_arg_dtypes,
|
|
47
|
+
get_arg_offset_adjuster_code,
|
|
48
|
+
)
|
|
41
49
|
|
|
42
50
|
|
|
43
51
|
logger = logging.getLogger(__name__)
|
|
@@ -1047,9 +1055,9 @@ class GenericScanKernelBase(ABC):
|
|
|
1047
1055
|
from pyopencl.tools import parse_arg_list
|
|
1048
1056
|
self.parsed_args = parse_arg_list(arguments)
|
|
1049
1057
|
from pyopencl.tools import VectorArg
|
|
1050
|
-
self.first_array_idx =
|
|
1058
|
+
self.first_array_idx = next(
|
|
1051
1059
|
i for i, arg in enumerate(self.parsed_args)
|
|
1052
|
-
if isinstance(arg, VectorArg)
|
|
1060
|
+
if isinstance(arg, VectorArg))
|
|
1053
1061
|
|
|
1054
1062
|
self.input_expr = input_expr
|
|
1055
1063
|
|
|
@@ -1178,7 +1186,7 @@ class GenericScanKernel(GenericScanKernelBase):
|
|
|
1178
1186
|
result = generic_scan_kernel_cache[cache_key]
|
|
1179
1187
|
from_cache = True
|
|
1180
1188
|
logger.debug(
|
|
1181
|
-
"cache hit for generated scan kernel '%s'"
|
|
1189
|
+
"cache hit for generated scan kernel '%s'", self.name_prefix)
|
|
1182
1190
|
(
|
|
1183
1191
|
self.first_level_scan_gen_info,
|
|
1184
1192
|
self.second_level_scan_gen_info,
|
|
@@ -1188,7 +1196,7 @@ class GenericScanKernel(GenericScanKernelBase):
|
|
|
1188
1196
|
|
|
1189
1197
|
if not from_cache:
|
|
1190
1198
|
logger.debug(
|
|
1191
|
-
"cache miss for generated scan kernel '%s'"
|
|
1199
|
+
"cache miss for generated scan kernel '%s'", self.name_prefix)
|
|
1192
1200
|
self._finish_setup_impl()
|
|
1193
1201
|
|
|
1194
1202
|
result = (self.first_level_scan_gen_info,
|
|
@@ -1316,8 +1324,10 @@ class GenericScanKernel(GenericScanKernelBase):
|
|
|
1316
1324
|
# {{{ build second-level scan
|
|
1317
1325
|
|
|
1318
1326
|
from pyopencl.tools import VectorArg
|
|
1319
|
-
second_level_arguments =
|
|
1320
|
-
|
|
1327
|
+
second_level_arguments = [
|
|
1328
|
+
*self.parsed_args,
|
|
1329
|
+
VectorArg(self.dtype, "interval_sums"),
|
|
1330
|
+
]
|
|
1321
1331
|
|
|
1322
1332
|
second_level_build_kwargs: Dict[str, Optional[str]] = {}
|
|
1323
1333
|
if self.is_segmented:
|
|
@@ -1364,9 +1374,10 @@ class GenericScanKernel(GenericScanKernelBase):
|
|
|
1364
1374
|
use_lookbehind_update=self.use_lookbehind_update,
|
|
1365
1375
|
**self.code_variables))
|
|
1366
1376
|
|
|
1367
|
-
update_scalar_arg_dtypes =
|
|
1368
|
-
get_arg_list_scalar_arg_dtypes(self.parsed_args)
|
|
1369
|
-
|
|
1377
|
+
update_scalar_arg_dtypes = [
|
|
1378
|
+
*get_arg_list_scalar_arg_dtypes(self.parsed_args),
|
|
1379
|
+
self.index_dtype, self.index_dtype, None, None]
|
|
1380
|
+
|
|
1370
1381
|
if self.is_segmented:
|
|
1371
1382
|
# g_first_segment_start_in_interval
|
|
1372
1383
|
update_scalar_arg_dtypes.append(None)
|
|
@@ -1558,7 +1569,8 @@ class GenericScanKernel(GenericScanKernelBase):
|
|
|
1558
1569
|
|
|
1559
1570
|
# {{{ first level scan of interval (one interval per block)
|
|
1560
1571
|
|
|
1561
|
-
scan1_args =
|
|
1572
|
+
scan1_args = [
|
|
1573
|
+
*data_args,
|
|
1562
1574
|
partial_scan_buffer.data, n, interval_size, interval_results.data,
|
|
1563
1575
|
]
|
|
1564
1576
|
|
|
@@ -1582,12 +1594,15 @@ class GenericScanKernel(GenericScanKernelBase):
|
|
|
1582
1594
|
# can scan at most one interval
|
|
1583
1595
|
assert interval_size >= num_intervals
|
|
1584
1596
|
|
|
1585
|
-
scan2_args =
|
|
1597
|
+
scan2_args = [
|
|
1598
|
+
*data_args,
|
|
1586
1599
|
interval_results.data, # interval_sums
|
|
1587
1600
|
]
|
|
1601
|
+
|
|
1588
1602
|
if self.is_segmented:
|
|
1589
1603
|
scan2_args.append(first_segment_start_in_interval.data)
|
|
1590
|
-
scan2_args =
|
|
1604
|
+
scan2_args = [
|
|
1605
|
+
*scan2_args,
|
|
1591
1606
|
interval_results.data, # partial_scan_buffer
|
|
1592
1607
|
num_intervals, interval_size]
|
|
1593
1608
|
|
|
@@ -1599,7 +1614,8 @@ class GenericScanKernel(GenericScanKernelBase):
|
|
|
1599
1614
|
|
|
1600
1615
|
# {{{ update intervals with result of interval scan
|
|
1601
1616
|
|
|
1602
|
-
upd_args =
|
|
1617
|
+
upd_args = [
|
|
1618
|
+
*data_args,
|
|
1603
1619
|
n, interval_size, interval_results.data, partial_scan_buffer.data]
|
|
1604
1620
|
if self.is_segmented:
|
|
1605
1621
|
upd_args.append(first_segment_start_in_interval.data)
|
|
@@ -1705,10 +1721,11 @@ class GenericDebugScanKernel(GenericScanKernelBase):
|
|
|
1705
1721
|
|
|
1706
1722
|
scan_prg = cl.Program(self.context, scan_src).build(self.options)
|
|
1707
1723
|
self.kernel = getattr(scan_prg, f"{self.name_prefix}_debug_scan")
|
|
1708
|
-
scalar_arg_dtypes =
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1724
|
+
scalar_arg_dtypes = [
|
|
1725
|
+
None,
|
|
1726
|
+
*get_arg_list_scalar_arg_dtypes(self.parsed_args),
|
|
1727
|
+
self.index_dtype,
|
|
1728
|
+
]
|
|
1712
1729
|
self.kernel.set_scalar_arg_dtypes(scalar_arg_dtypes)
|
|
1713
1730
|
|
|
1714
1731
|
def __call__(self, *args: Any, **kwargs: Any) -> cl.Event:
|
|
@@ -1755,8 +1772,7 @@ class GenericDebugScanKernel(GenericScanKernelBase):
|
|
|
1755
1772
|
|
|
1756
1773
|
# }}}
|
|
1757
1774
|
|
|
1758
|
-
return self.kernel(queue, (1,), (1,),
|
|
1759
|
-
*(data_args + [n]), wait_for=wait_for)
|
|
1775
|
+
return self.kernel(queue, (1,), (1,), *([*data_args, n]), wait_for=wait_for)
|
|
1760
1776
|
|
|
1761
1777
|
# }}}
|
|
1762
1778
|
|
pyopencl/tools.py
CHANGED
|
@@ -132,21 +132,24 @@ from sys import intern
|
|
|
132
132
|
from typing import Any, List, Optional, Union
|
|
133
133
|
|
|
134
134
|
import numpy as np
|
|
135
|
+
|
|
135
136
|
from pytools import memoize, memoize_method
|
|
136
137
|
from pytools.persistent_dict import KeyBuilder as KeyBuilderBase
|
|
137
138
|
|
|
138
139
|
from pyopencl._cl import bitlog2, get_cl_header_version # noqa: F401
|
|
139
|
-
from pyopencl.compyte.dtypes import TypeNameNotKnown # noqa: F401
|
|
140
140
|
from pyopencl.compyte.dtypes import ( # noqa: F401
|
|
141
|
-
|
|
141
|
+
TypeNameNotKnown,
|
|
142
|
+
dtype_to_ctype,
|
|
143
|
+
get_or_register_dtype,
|
|
144
|
+
register_dtype,
|
|
145
|
+
)
|
|
142
146
|
|
|
143
147
|
|
|
144
148
|
# Do not add a pyopencl import here: This will add an import cycle.
|
|
145
149
|
|
|
146
150
|
|
|
147
151
|
def _register_types():
|
|
148
|
-
from pyopencl.compyte.dtypes import
|
|
149
|
-
TYPE_REGISTRY, fill_registry_with_opencl_c_types)
|
|
152
|
+
from pyopencl.compyte.dtypes import TYPE_REGISTRY, fill_registry_with_opencl_c_types
|
|
150
153
|
|
|
151
154
|
fill_registry_with_opencl_c_types(TYPE_REGISTRY)
|
|
152
155
|
|
|
@@ -159,12 +162,17 @@ _register_types()
|
|
|
159
162
|
|
|
160
163
|
# {{{ imported names
|
|
161
164
|
|
|
162
|
-
from pyopencl._cl import (
|
|
163
|
-
AllocatorBase,
|
|
165
|
+
from pyopencl._cl import (
|
|
166
|
+
AllocatorBase,
|
|
167
|
+
DeferredAllocator,
|
|
168
|
+
ImmediateAllocator,
|
|
169
|
+
MemoryPool,
|
|
170
|
+
PooledBuffer,
|
|
171
|
+
)
|
|
164
172
|
|
|
165
173
|
|
|
166
174
|
if get_cl_header_version() >= (2, 0):
|
|
167
|
-
from pyopencl._cl import PooledSVM, SVMAllocator, SVMPool
|
|
175
|
+
from pyopencl._cl import PooledSVM, SVMAllocator, SVMPool
|
|
168
176
|
|
|
169
177
|
# }}}
|
|
170
178
|
|
|
@@ -521,7 +529,7 @@ def first_arg_dependent_memoize_nested(nested_func):
|
|
|
521
529
|
cache_context = caller_frame.f_globals[
|
|
522
530
|
caller_frame.f_code.co_name]
|
|
523
531
|
finally:
|
|
524
|
-
#del caller_frame
|
|
532
|
+
# del caller_frame
|
|
525
533
|
pass
|
|
526
534
|
|
|
527
535
|
try:
|
|
@@ -653,7 +661,8 @@ def get_pyopencl_fixture_arg_names(metafunc, extra_arg_names=None):
|
|
|
653
661
|
supported_arg_names = [
|
|
654
662
|
"platform", "device",
|
|
655
663
|
"ctx_factory", "ctx_getter",
|
|
656
|
-
|
|
664
|
+
*extra_arg_names
|
|
665
|
+
]
|
|
657
666
|
|
|
658
667
|
arg_names = []
|
|
659
668
|
for arg in supported_arg_names:
|
|
@@ -978,7 +987,7 @@ class _CDeclList:
|
|
|
978
987
|
return
|
|
979
988
|
|
|
980
989
|
for _name, field_data in sorted(dtype.fields.items()):
|
|
981
|
-
field_dtype,
|
|
990
|
+
field_dtype, _offset = field_data[:2]
|
|
982
991
|
self.add_dtype(field_dtype)
|
|
983
992
|
|
|
984
993
|
_, cdecl = match_dtype_to_c_struct(
|
|
@@ -1062,7 +1071,7 @@ def match_dtype_to_c_struct(device, name, dtype, context=None):
|
|
|
1062
1071
|
|
|
1063
1072
|
c_fields = []
|
|
1064
1073
|
for field_name, dtype_and_offset in fields:
|
|
1065
|
-
field_dtype,
|
|
1074
|
+
field_dtype, _offset = dtype_and_offset[:2]
|
|
1066
1075
|
if hasattr(field_dtype, "subdtype") and field_dtype.subdtype is not None:
|
|
1067
1076
|
array_dtype = field_dtype.subdtype[0]
|
|
1068
1077
|
if hasattr(array_dtype, "subdtype") and array_dtype.subdtype is not None:
|
|
@@ -1087,7 +1096,7 @@ def match_dtype_to_c_struct(device, name, dtype, context=None):
|
|
|
1087
1096
|
|
|
1088
1097
|
cdl = _CDeclList(device)
|
|
1089
1098
|
for _field_name, dtype_and_offset in fields:
|
|
1090
|
-
field_dtype,
|
|
1099
|
+
field_dtype, _offset = dtype_and_offset[:2]
|
|
1091
1100
|
cdl.add_dtype(field_dtype)
|
|
1092
1101
|
|
|
1093
1102
|
pre_decls = cdl.get_declarations()
|
|
@@ -1121,7 +1130,8 @@ def match_dtype_to_c_struct(device, name, dtype, context=None):
|
|
|
1121
1130
|
prg = cl.Program(context, src)
|
|
1122
1131
|
knl = prg.build(devices=[device]).get_size_and_offsets
|
|
1123
1132
|
|
|
1124
|
-
import pyopencl.array
|
|
1133
|
+
import pyopencl.array
|
|
1134
|
+
|
|
1125
1135
|
result_buf = cl.array.empty(queue, 1+len(fields), np.uint32)
|
|
1126
1136
|
knl(queue, (1,), (1,), result_buf.data)
|
|
1127
1137
|
queue.finish()
|
pyopencl/version.py
CHANGED
|
@@ -3,7 +3,7 @@ from importlib import metadata
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
VERSION_TEXT = metadata.version("pyopencl")
|
|
6
|
-
_match = re.match("^([0-9.]+)([a-z0-9]*?)$", VERSION_TEXT)
|
|
6
|
+
_match = re.match(r"^([0-9.]+)([a-z0-9]*?)$", VERSION_TEXT)
|
|
7
7
|
assert _match is not None
|
|
8
8
|
VERSION_STATUS = _match.group(2)
|
|
9
9
|
VERSION = tuple(int(nr) for nr in _match.group(1).split("."))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyopencl
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2025.1
|
|
4
4
|
Summary: Python wrapper for OpenCL
|
|
5
5
|
Author-Email: Andreas Kloeckner <inform@tiker.net>
|
|
6
6
|
Classifier: Development Status :: 5 - Production/Stable
|
|
@@ -12,22 +12,25 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
12
12
|
Classifier: Natural Language :: English
|
|
13
13
|
Classifier: Programming Language :: C++
|
|
14
14
|
Classifier: Programming Language :: Python
|
|
15
|
-
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
16
16
|
Classifier: Topic :: Scientific/Engineering
|
|
17
17
|
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
18
18
|
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
19
|
-
Project-URL: Homepage, https://mathema.tician.de/software/pyopencl
|
|
20
19
|
Project-URL: Documentation, https://documen.tician.de/pyopencl
|
|
20
|
+
Project-URL: Homepage, https://mathema.tician.de/software/pyopencl
|
|
21
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: platformdirs>=2.2
|
|
25
|
+
Requires-Dist: platformdirs>=2.2
|
|
26
26
|
Requires-Dist: pytools>=2024.1.5
|
|
27
|
-
Requires-Dist:
|
|
28
|
-
Requires-Dist:
|
|
29
|
-
Requires-Dist:
|
|
30
|
-
Requires-Dist:
|
|
27
|
+
Requires-Dist: oclgrind-binary-distribution>=18.3; extra == "oclgrind"
|
|
28
|
+
Requires-Dist: pocl-binary-distribution>=1.2; extra == "pocl"
|
|
29
|
+
Requires-Dist: ruff; extra == "test"
|
|
30
|
+
Requires-Dist: mako; extra == "test"
|
|
31
|
+
Requires-Dist: mypy; extra == "test"
|
|
32
|
+
Requires-Dist: pylint; extra == "test"
|
|
33
|
+
Requires-Dist: pytest>=7; extra == "test"
|
|
31
34
|
Provides-Extra: oclgrind
|
|
32
35
|
Provides-Extra: pocl
|
|
33
36
|
Provides-Extra: test
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
pyopencl/__init__.py,sha256=wCR09HsGaQ532Dc5vdU8WiyZGZ0qtHBbJQrPQMEGpYI,83853
|
|
2
|
+
pyopencl/_cl.cp311-win_amd64.pyd,sha256=ynRVZR_7vEW_SJPW2NRZDt8ULVsMCeWhv7q9PN9YgMc,633344
|
|
3
|
+
pyopencl/_cluda.py,sha256=5coLt4eR5BOLgfUesgnaTx_nUhZ6BBhYi9dodvl7cbc,2128
|
|
4
|
+
pyopencl/_mymako.py,sha256=55mRxOnOH9N7ltPWPND19GD4cszQrB2dhiMUlouoWKU,634
|
|
5
|
+
pyopencl/algorithm.py,sha256=7ilnIG3c4YMDUBP4w4e10UMDHj9nbFITg1oLnEEsej0,52742
|
|
6
|
+
pyopencl/array.py,sha256=WFKzJt9dAoOzu_iildla41PcWWiKxPmh5e8zYA2LxB8,112974
|
|
7
|
+
pyopencl/bitonic_sort.py,sha256=r5Jy-C7LE5ml-Qt0KwD4E0g-Cf4DwpmO_3d25KLNUwY,8263
|
|
8
|
+
pyopencl/bitonic_sort_templates.py,sha256=XQjUiHS9KjFIUYIil1Ls9293hy751AOsJmszlNS-IFk,16745
|
|
9
|
+
pyopencl/cache.py,sha256=HMS-dEURWulvFOzEY33LzNSw3notDY_Rsv_L16OiSuo,16535
|
|
10
|
+
pyopencl/capture_call.py,sha256=3zldPy-ssAchA9Q0ntDDcao2zMPWK9wDPdjdYj4CrIk,5871
|
|
11
|
+
pyopencl/characterize/__init__.py,sha256=rBhH9M6wkp2fYs51vx9BHgNVl-N1Vz_2ofV0uhPsGk0,14802
|
|
12
|
+
pyopencl/characterize/performance.py,sha256=xwyt4SsABo4LipXzjRF7TKz8LVBcLmZZ5os6f7hp3Go,7103
|
|
13
|
+
pyopencl/cl/pyopencl-airy.cl,sha256=HSUEWbUN2MNzuhvDP3LB9dVY_3dhjFSWXhvGQsrA8VA,8446
|
|
14
|
+
pyopencl/cl/pyopencl-bessel-j-complex.cl,sha256=XOUBUZFxgra9nUAymnbJugcOa1lQyj-fwiZA9ly3rdI,6264
|
|
15
|
+
pyopencl/cl/pyopencl-bessel-j.cl,sha256=V16uWa8t1b0oxNHRCLhCqxzR-28yr-5ZslqHkw2Ved0,24358
|
|
16
|
+
pyopencl/cl/pyopencl-bessel-y.cl,sha256=kD6u2qtgmrNNq75w5uaxHdrvb6oeeTPgrGpF29ERsuE,12732
|
|
17
|
+
pyopencl/cl/pyopencl-complex.h,sha256=DHFUM2sHCv50m4LJvvIpF8sMWc5yOO6kYu9nWlScl6A,8847
|
|
18
|
+
pyopencl/cl/pyopencl-eval-tbl.cl,sha256=SDYB_RkW7jtN_Y_xhCbwGjBSNmBpMg8T4ZXlrP_2q9U,2736
|
|
19
|
+
pyopencl/cl/pyopencl-hankel-complex.cl,sha256=yrxPF4wgr9bTzG4SyJsVbij5SODoJvWaDRDDuo4zrs4,32005
|
|
20
|
+
pyopencl/cl/pyopencl-random123/array.h,sha256=oTYPJfU7s4IXy8xRc3H0rqMq4mgyVxd7UuLSf3liUPY,17413
|
|
21
|
+
pyopencl/cl/pyopencl-random123/openclfeatures.h,sha256=jauJ1WEspr-YNefAuUwPhapl_JQDVa6my_h4fLl-p4o,2974
|
|
22
|
+
pyopencl/cl/pyopencl-random123/philox.cl,sha256=KqPbLt54UwrHPvBe7v4ZMzqI2oGrzp0c0QzqVhydNCY,22226
|
|
23
|
+
pyopencl/cl/pyopencl-random123/threefry.cl,sha256=bC78-HJVuc4AFiNppglDQiN8cZRD45hG1PPdi4Sdt-o,55563
|
|
24
|
+
pyopencl/clmath.py,sha256=GL9s0YwKpCgvsGl6ndoWXEngPFWAqRRR_HOoQm57OA8,8502
|
|
25
|
+
pyopencl/clrandom.py,sha256=baRE9GgAqGcp2xy9FgI0E4oEygLqyjZqwIs6YvB35ok,13453
|
|
26
|
+
pyopencl/cltypes.py,sha256=HL-df-L7ivztkHVXN8ef3TxhjfDVHxs-dXudvycd_P0,4953
|
|
27
|
+
pyopencl/compyte/.gitignore,sha256=PFMRSJycIqPtcpEn7VqbcenWJqHFDuYtwQm_tLbADt8,189
|
|
28
|
+
pyopencl/compyte/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
|
+
pyopencl/compyte/array.py,sha256=IJzw-dSS_injEiLVNHLlSRi0R2F1sO_8xeeK-XezsSo,7636
|
|
30
|
+
pyopencl/compyte/dtypes.py,sha256=wjJy3pXU6mdYmlFeX-8VM97gH37S5VmMVE1PBNo9om8,10133
|
|
31
|
+
pyopencl/compyte/pyproject.toml,sha256=pcYndN5KAcdZXgsBUiH3VyeMxrV-oesECjS7yGCaY4I,1272
|
|
32
|
+
pyopencl/elementwise.py,sha256=cqUtTgSCys1Z__gOCqyOXYnzPU-jdGz5NKZ9pkaF4oE,39796
|
|
33
|
+
pyopencl/invoker.py,sha256=gTnJQN4_fJ9-3_wKqXfWVpDKzstD2jgYu5qxzPKXdY4,14481
|
|
34
|
+
pyopencl/ipython_ext.py,sha256=e-K-Yjd6sTP9-9d69v0k_1_ifdK77JWMhbynn1FBDH4,1983
|
|
35
|
+
pyopencl/reduction.py,sha256=QoXRhi2_RjUpGDhcfWiMzHHXoBZJuRncnBTn5xwJgR4,26319
|
|
36
|
+
pyopencl/scan.py,sha256=5YoKCBdIHoPha9onGna_65ne2maU0RZ7nR7X2L47YrA,67553
|
|
37
|
+
pyopencl/tools.py,sha256=Pzjm7juH52NZ5fF7ppgCy-p9kR-Jhtw8xqnh-qCEjfs,47467
|
|
38
|
+
pyopencl/version.py,sha256=sFqCA3Ga7hdYRf_43asDOP4gFoFRrZxfkMoyN-HAgNo,277
|
|
39
|
+
pyopencl-2025.1.dist-info/METADATA,sha256=WUY6JEb89dxhMwOVvX9OJVBYPqzlqPNt1TypeIxsCkQ,4783
|
|
40
|
+
pyopencl-2025.1.dist-info/WHEEL,sha256=kXCl1J14PkmxQKXf5U_5vxmme_OmC3Ydcral7u0yA3M,106
|
|
41
|
+
pyopencl-2025.1.dist-info/licenses/LICENSE,sha256=jib9h6nV8oAvCkKPKDecpLakmQi1SktCn4YXmllgySY,15566
|
|
42
|
+
pyopencl-2025.1.dist-info/RECORD,,
|
pyopencl/compyte/.git
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
gitdir: ../../.git/modules/pyopencl/compyte
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
all: pygpu_ndarray.so
|
|
2
|
-
|
|
3
|
-
PYTHONVERSION ?= $(shell python -c "import sys; print '%d.%d'%(sys.version_info[0], sys.version_info[1]"))
|
|
4
|
-
CUDA_ROOT ?= /opt/lisa/os/cuda
|
|
5
|
-
THEANO_ROOT ?= /u/bastienf/repos/Theano
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
CFLAGS=-g -DDEBUG -DOFFSET
|
|
9
|
-
# By default enable the OFFSET usage. Otherwise some test fail.
|
|
10
|
-
CFLAGS=-g -DOFFSET
|
|
11
|
-
#BINDIR=--compiler-bindir ${HOME}/.theano.nvcc-bindir
|
|
12
|
-
|
|
13
|
-
#NPY_PATH!=python -c "import numpy;print numpy.__path__"
|
|
14
|
-
#NPY_INCLUDE=-I${NPY_PATH}/core/include
|
|
15
|
-
CUDA_INCLUDE=-I${CUDA_ROOT}/include
|
|
16
|
-
PYTHON_INCLUDE=-I$(shell python -c "import distutils.sysconfig;print distutils.sysconfig.get_python_inc()")
|
|
17
|
-
INCLUDES=${CUDA_INCLUDE} ${PYTHON_INCLUDE}
|
|
18
|
-
CUDA_FLAGS=-Xlinker -rpath,${CUDA_ROOT}/lib64 -Xlinker -rpath,${CUDA_ROOT}/lib
|
|
19
|
-
|
|
20
|
-
pygpu_language_cuda.o: pygpu_language_cuda.cu pygpu_language.h
|
|
21
|
-
nvcc -c ${CFLAGS} -m64 -Xcompiler -fPIC,-m64 ${CUDA_FLAGS} ${INCLUDES} ${BINDIR} -o $@ $<
|
|
22
|
-
|
|
23
|
-
pygpu_ndarray.so: pygpu_ndarray.cpp pygpu_ndarray.h pygpu_language_cuda.o pygpu_ndarray_object.h
|
|
24
|
-
nvcc -shared ${CFLAGS} -m64 -Xcompiler -fPIC,-m64 ${CUDA_FLAGS} ${INCLUDES} ${BINDIR} -o $@ pygpu_language_cuda.o $< -lpython${PYTHONVERSION} -lcublas -lcudart
|
|
25
|
-
|
|
26
|
-
clean:
|
|
27
|
-
rm -f pygpu_ndarray.so core.* *.o *~
|
|
28
|
-
rm -rf build
|
|
29
|
-
|
|
30
|
-
cleantmp:
|
|
31
|
-
rm -f core.* *.o *~
|
|
File without changes
|