pyopencl 2024.2.2__cp312-cp312-win_amd64.whl → 2024.2.5__cp312-cp312-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.

Files changed (99) hide show
  1. pyopencl/__init__.py +16 -4
  2. pyopencl/_cl.cp312-win_amd64.pyd +0 -0
  3. pyopencl/algorithm.py +3 -1
  4. pyopencl/bitonic_sort.py +2 -0
  5. pyopencl/characterize/__init__.py +23 -0
  6. pyopencl/compyte/.git +1 -0
  7. pyopencl/compyte/.gitignore +21 -0
  8. pyopencl/compyte/ndarray/Makefile +31 -0
  9. pyopencl/compyte/ndarray/gpu_ndarray.h +35 -0
  10. pyopencl/compyte/ndarray/pygpu_language.h +207 -0
  11. pyopencl/compyte/ndarray/pygpu_language_cuda.cu +622 -0
  12. pyopencl/compyte/ndarray/pygpu_language_opencl.cpp +317 -0
  13. pyopencl/compyte/ndarray/pygpu_ndarray.cpp +1546 -0
  14. pyopencl/compyte/ndarray/pygpu_ndarray.h +71 -0
  15. pyopencl/compyte/ndarray/pygpu_ndarray_object.h +232 -0
  16. pyopencl/tools.py +60 -56
  17. pyopencl/version.py +9 -3
  18. {pyopencl-2024.2.2.dist-info → pyopencl-2024.2.5.dist-info}/METADATA +105 -105
  19. pyopencl-2024.2.5.dist-info/RECORD +56 -0
  20. {pyopencl-2024.2.2.dist-info → pyopencl-2024.2.5.dist-info}/WHEEL +1 -1
  21. pyopencl-2024.2.2.data/data/CITATION.cff +0 -74
  22. pyopencl-2024.2.2.data/data/CMakeLists.txt +0 -83
  23. pyopencl-2024.2.2.data/data/Makefile.in +0 -21
  24. pyopencl-2024.2.2.data/data/README.rst +0 -70
  25. pyopencl-2024.2.2.data/data/README_SETUP.txt +0 -34
  26. pyopencl-2024.2.2.data/data/aksetup_helper.py +0 -1013
  27. pyopencl-2024.2.2.data/data/configure.py +0 -6
  28. pyopencl-2024.2.2.data/data/contrib/cldis.py +0 -91
  29. pyopencl-2024.2.2.data/data/contrib/fortran-to-opencl/README +0 -29
  30. pyopencl-2024.2.2.data/data/contrib/fortran-to-opencl/translate.py +0 -1441
  31. pyopencl-2024.2.2.data/data/contrib/pyopencl.vim +0 -84
  32. pyopencl-2024.2.2.data/data/doc/Makefile +0 -23
  33. pyopencl-2024.2.2.data/data/doc/algorithm.rst +0 -214
  34. pyopencl-2024.2.2.data/data/doc/array.rst +0 -305
  35. pyopencl-2024.2.2.data/data/doc/conf.py +0 -26
  36. pyopencl-2024.2.2.data/data/doc/howto.rst +0 -105
  37. pyopencl-2024.2.2.data/data/doc/index.rst +0 -137
  38. pyopencl-2024.2.2.data/data/doc/make_constants.py +0 -561
  39. pyopencl-2024.2.2.data/data/doc/misc.rst +0 -885
  40. pyopencl-2024.2.2.data/data/doc/runtime.rst +0 -51
  41. pyopencl-2024.2.2.data/data/doc/runtime_const.rst +0 -30
  42. pyopencl-2024.2.2.data/data/doc/runtime_gl.rst +0 -78
  43. pyopencl-2024.2.2.data/data/doc/runtime_memory.rst +0 -527
  44. pyopencl-2024.2.2.data/data/doc/runtime_platform.rst +0 -184
  45. pyopencl-2024.2.2.data/data/doc/runtime_program.rst +0 -364
  46. pyopencl-2024.2.2.data/data/doc/runtime_queue.rst +0 -182
  47. pyopencl-2024.2.2.data/data/doc/subst.rst +0 -36
  48. pyopencl-2024.2.2.data/data/doc/tools.rst +0 -4
  49. pyopencl-2024.2.2.data/data/doc/types.rst +0 -42
  50. pyopencl-2024.2.2.data/data/examples/black-hole-accretion.py +0 -2227
  51. pyopencl-2024.2.2.data/data/examples/demo-struct-reduce.py +0 -75
  52. pyopencl-2024.2.2.data/data/examples/demo.py +0 -39
  53. pyopencl-2024.2.2.data/data/examples/demo_array.py +0 -32
  54. pyopencl-2024.2.2.data/data/examples/demo_array_svm.py +0 -37
  55. pyopencl-2024.2.2.data/data/examples/demo_elementwise.py +0 -34
  56. pyopencl-2024.2.2.data/data/examples/demo_elementwise_complex.py +0 -53
  57. pyopencl-2024.2.2.data/data/examples/demo_mandelbrot.py +0 -183
  58. pyopencl-2024.2.2.data/data/examples/demo_meta_codepy.py +0 -56
  59. pyopencl-2024.2.2.data/data/examples/demo_meta_template.py +0 -55
  60. pyopencl-2024.2.2.data/data/examples/dump-performance.py +0 -38
  61. pyopencl-2024.2.2.data/data/examples/dump-properties.py +0 -86
  62. pyopencl-2024.2.2.data/data/examples/gl_interop_demo.py +0 -84
  63. pyopencl-2024.2.2.data/data/examples/gl_particle_animation.py +0 -218
  64. pyopencl-2024.2.2.data/data/examples/ipython-demo.ipynb +0 -203
  65. pyopencl-2024.2.2.data/data/examples/median-filter.py +0 -99
  66. pyopencl-2024.2.2.data/data/examples/n-body.py +0 -1070
  67. pyopencl-2024.2.2.data/data/examples/narray.py +0 -37
  68. pyopencl-2024.2.2.data/data/examples/noisyImage.jpg +0 -0
  69. pyopencl-2024.2.2.data/data/examples/pi-monte-carlo.py +0 -1166
  70. pyopencl-2024.2.2.data/data/examples/svm.py +0 -82
  71. pyopencl-2024.2.2.data/data/examples/transpose.py +0 -229
  72. pyopencl-2024.2.2.data/data/pytest.ini +0 -3
  73. pyopencl-2024.2.2.data/data/src/bitlog.cpp +0 -51
  74. pyopencl-2024.2.2.data/data/src/bitlog.hpp +0 -83
  75. pyopencl-2024.2.2.data/data/src/clinfo_ext.h +0 -134
  76. pyopencl-2024.2.2.data/data/src/mempool.hpp +0 -444
  77. pyopencl-2024.2.2.data/data/src/pyopencl_ext.h +0 -77
  78. pyopencl-2024.2.2.data/data/src/tools.hpp +0 -90
  79. pyopencl-2024.2.2.data/data/src/wrap_cl.cpp +0 -61
  80. pyopencl-2024.2.2.data/data/src/wrap_cl.hpp +0 -5853
  81. pyopencl-2024.2.2.data/data/src/wrap_cl_part_1.cpp +0 -369
  82. pyopencl-2024.2.2.data/data/src/wrap_cl_part_2.cpp +0 -702
  83. pyopencl-2024.2.2.data/data/src/wrap_constants.cpp +0 -1274
  84. pyopencl-2024.2.2.data/data/src/wrap_helpers.hpp +0 -213
  85. pyopencl-2024.2.2.data/data/src/wrap_mempool.cpp +0 -738
  86. pyopencl-2024.2.2.data/data/test/add-vectors-32.spv +0 -0
  87. pyopencl-2024.2.2.data/data/test/add-vectors-64.spv +0 -0
  88. pyopencl-2024.2.2.data/data/test/empty-header.h +0 -1
  89. pyopencl-2024.2.2.data/data/test/test_algorithm.py +0 -1180
  90. pyopencl-2024.2.2.data/data/test/test_array.py +0 -2392
  91. pyopencl-2024.2.2.data/data/test/test_arrays_in_structs.py +0 -100
  92. pyopencl-2024.2.2.data/data/test/test_clmath.py +0 -529
  93. pyopencl-2024.2.2.data/data/test/test_clrandom.py +0 -75
  94. pyopencl-2024.2.2.data/data/test/test_enqueue_copy.py +0 -271
  95. pyopencl-2024.2.2.data/data/test/test_wrapper.py +0 -1565
  96. pyopencl-2024.2.2.dist-info/LICENSE +0 -282
  97. pyopencl-2024.2.2.dist-info/RECORD +0 -123
  98. pyopencl-2024.2.2.dist-info/top_level.txt +0 -1
  99. {pyopencl-2024.2.2.data/data → pyopencl-2024.2.5.dist-info/licenses}/LICENSE +0 -0
@@ -1,6 +0,0 @@
1
- #! /usr/bin/env python3
2
-
3
- from aksetup_helper import configure_frontend
4
-
5
-
6
- configure_frontend()
@@ -1,91 +0,0 @@
1
- __copyright__ = "Copyright (C) 2022 Isuru Fernando"
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
- """
24
- cldis.py
25
-
26
- A script to compile and print the native code for a OpenCL kernel.
27
-
28
- Usage: python cldis.py prog.cl <ptx/sass/asm> <build options>
29
- """
30
-
31
- import glob
32
- import os
33
- import re
34
- import subprocess
35
- import sys
36
- import tempfile
37
-
38
-
39
- def main(ctx, tmp_dir, cl_str, output=None, build_options=[]):
40
- device = ctx.devices[0]
41
- platform = device.platform
42
- if platform.name == "NVIDIA CUDA":
43
- supported_outputs = ["ptx", "sass"]
44
- elif platform.name == "Portable Computing Language":
45
- if device.name.startswith("NVIDIA"):
46
- supported_outputs = ["ptx", "sass"]
47
- elif device.name.startswith("pthread") or device.name.startswith("cpu"):
48
- supported_outputs = ["asm"]
49
- else:
50
- raise NotImplementedError(f"Unknown pocl device '{device.name}'")
51
- else:
52
- raise NotImplementedError(f"Unknown opencl device '{device}'")
53
- if output is None:
54
- output = supported_outputs[0]
55
- else:
56
- assert output in supported_outputs
57
-
58
- prg = cl.Program(ctx, cl_str).build(options=build_options,
59
- cache_dir=os.path.join(tmp_dir, "cache"))
60
-
61
- for binary in prg.binaries:
62
- if output in ["ptx", "sass"]:
63
- res = binary[binary.index(b"// Generated"):].decode("utf-8")
64
- if output == "sass":
65
- with open(os.path.join(tmp_dir, "cl.ptx"), "w") as f:
66
- f.write(res)
67
- tgt = re.findall(".target sm_[0-9]*", res, re.MULTILINE)[0]
68
- gpu_name = tgt[8:]
69
- subprocess.check_call(["ptxas", "cl.ptx", "--verbose",
70
- f"--gpu-name={gpu_name}", "--warn-on-spills"], cwd=tmp_dir)
71
- res = subprocess.check_output(["cuobjdump", "-sass", "elf.o"],
72
- cwd=tmp_dir).decode("utf-8")
73
-
74
- elif output == "asm" and platform.name == "Portable Computing Language":
75
- so = glob.glob(f"{tmp_dir}/**/*.so", recursive=True)[0]
76
- res = subprocess.check_output(["objdump", "-d", so]).decode("utf-8")
77
-
78
- print(res)
79
-
80
-
81
- if __name__ == "__main__":
82
- with tempfile.TemporaryDirectory() as tmp_dir:
83
- os.environ["POCL_CACHE_DIR"] = os.path.join(tmp_dir, "pocl_cache")
84
- import pyopencl as cl
85
- ctx = cl.create_some_context()
86
- cl_file = sys.argv[1]
87
- with open(cl_file, "r") as f:
88
- cl_str = f.read()
89
- output = sys.argv[2] if len(sys.argv) >=3 else None
90
- build_options = sys.argv[3:] if len(sys.argv) >=4 else []
91
- main(ctx, tmp_dir, cl_str, output, build_options)
@@ -1,29 +0,0 @@
1
- Experimental Fortran-to-OpenCL translator
2
- -----------------------------------------
3
-
4
- This is a highly experimental Fortran-to-OpenCL translator. Its purpose is to
5
- translate computational kernels into OpenCL-like C. It doesn't
6
- auto-parallelize. My purpose in writing this was to convert a few
7
- special-function evaluators.
8
-
9
- The best it can hope for at the moment is to automate most of the process so
10
- that you'll only have to fix up a few things manually afterwards. It further
11
- only deals with the subset of Fortran 77 that I needed. Quite a number of
12
- things are unimplemented. Patches are welcome.
13
-
14
- Andreas Kloeckner <inform@tiker.net>
15
-
16
- Dependencies:
17
-
18
- - cnd
19
- http://github.com/inducer/cnd
20
-
21
- - cgen
22
- http://github.com/inducer/cgen
23
-
24
- - pymbolic
25
- http://github.com/inducer/pymbolic
26
-
27
- - fparser
28
- http://code.google.com/p/f2py
29
- with fix from http://code.google.com/p/f2py/issues/detail?id=32