pygpgpu 0.2.2__tar.gz → 0.2.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (968) hide show
  1. pygpgpu-0.2.4/MANIFEST.in +11 -0
  2. pygpgpu-0.2.4/PKG-INFO +465 -0
  3. pygpgpu-0.2.4/README.md +399 -0
  4. pygpgpu-0.2.4/README.zh-CN.md +399 -0
  5. pygpgpu-0.2.4/pygpgpu/__init__.py +223 -0
  6. pygpgpu-0.2.4/pygpgpu/constants.py +107 -0
  7. pygpgpu-0.2.4/pygpgpu/cparser/__init__.py +9 -0
  8. pygpgpu-0.2.4/pygpgpu/cparser/cpreprocessor.py +174 -0
  9. pygpgpu-0.2.4/pygpgpu/cparser/includes.py +88 -0
  10. pygpgpu-0.2.4/pygpgpu/cparser/related_files.py +143 -0
  11. pygpgpu-0.2.4/pygpgpu/cparser/struct_layout.py +143 -0
  12. pygpgpu-0.2.4/pygpgpu/cparser/ts_parser/__init__.py +219 -0
  13. pygpgpu-0.2.4/pygpgpu/cparser/ts_parser/node_kinds.py +18 -0
  14. pygpgpu-0.2.4/pygpgpu/cparser/ts_parser/ts_analysis.py +168 -0
  15. pygpgpu-0.2.4/pygpgpu/cparser/ts_parser/ts_body.py +147 -0
  16. pygpgpu-0.2.4/pygpgpu/cparser/ts_parser/ts_declarations.py +250 -0
  17. pygpgpu-0.2.4/pygpgpu/cparser/ts_parser/ts_expressions.py +242 -0
  18. pygpgpu-0.2.4/pygpgpu/cuda/driver/cuda.py +248 -0
  19. pygpgpu-0.2.4/pygpgpu/cuda/driver/cuinfo.py +42 -0
  20. pygpgpu-0.2.4/pygpgpu/cuda/driver/cuinfo_errors.py +171 -0
  21. pygpgpu-0.2.4/pygpgpu/cuda/driver/cuinfo_sig_array.py +70 -0
  22. pygpgpu-0.2.4/pygpgpu/cuda/driver/cuinfo_sig_device.py +204 -0
  23. pygpgpu-0.2.4/pygpgpu/cuda/driver/cuinfo_sig_launch.py +140 -0
  24. pygpgpu-0.2.4/pygpgpu/cuda/driver/cuinfo_sig_module.py +155 -0
  25. pygpgpu-0.2.4/pygpgpu/cuda/driver/cuinfo_types.py +152 -0
  26. pygpgpu-0.2.4/pygpgpu/cuda/driver/cutypes/__init__.py +75 -0
  27. pygpgpu-0.2.4/pygpgpu/cuda/driver/cutypes/array.py +57 -0
  28. pygpgpu-0.2.4/pygpgpu/cuda/driver/cutypes/core.py +49 -0
  29. pygpgpu-0.2.4/pygpgpu/cuda/driver/cutypes/device.py +225 -0
  30. pygpgpu-0.2.4/pygpgpu/cuda/driver/cutypes/errors.py +103 -0
  31. pygpgpu-0.2.4/pygpgpu/cuda/driver/cutypes/memory.py +83 -0
  32. pygpgpu-0.2.4/pygpgpu/cuda/driver/cutypes/texture.py +113 -0
  33. pygpgpu-0.2.4/pygpgpu/cuda/driver/nvrtc.py +279 -0
  34. pygpgpu-0.2.4/pygpgpu/cuda/driver/vec_types/char3.py +13 -0
  35. pygpgpu-0.2.4/pygpgpu/cuda/driver/vec_types/double3.py +13 -0
  36. pygpgpu-0.2.4/pygpgpu/cuda/driver/vec_types/float3.py +13 -0
  37. pygpgpu-0.2.4/pygpgpu/cuda/driver/vec_types/int3.py +13 -0
  38. pygpgpu-0.2.4/pygpgpu/cuda/driver/vec_types/long2.py +12 -0
  39. pygpgpu-0.2.4/pygpgpu/cuda/driver/vec_types/long3.py +13 -0
  40. pygpgpu-0.2.4/pygpgpu/cuda/driver/vec_types/long4.py +14 -0
  41. pygpgpu-0.2.4/pygpgpu/cuda/driver/vec_types/short3.py +13 -0
  42. pygpgpu-0.2.4/pygpgpu/cuda/driver/vec_types/uchar3.py +13 -0
  43. pygpgpu-0.2.4/pygpgpu/cuda/driver/vec_types/uint3.py +13 -0
  44. pygpgpu-0.2.4/pygpgpu/cuda/driver/vec_types/ulong2.py +12 -0
  45. pygpgpu-0.2.4/pygpgpu/cuda/driver/vec_types/ulong3.py +13 -0
  46. pygpgpu-0.2.4/pygpgpu/cuda/driver/vec_types/ulong4.py +14 -0
  47. pygpgpu-0.2.4/pygpgpu/cuda/driver/vec_types/ushort3.py +13 -0
  48. pygpgpu-0.2.4/pygpgpu/cuda/libraries/__init__.py +117 -0
  49. pygpgpu-0.2.4/pygpgpu/cuda/libraries/_base.py +26 -0
  50. pygpgpu-0.2.4/pygpgpu/cuda/libraries/cublas.py +425 -0
  51. pygpgpu-0.2.4/pygpgpu/cuda/libraries/cublaslt.py +356 -0
  52. pygpgpu-0.2.4/pygpgpu/cuda/libraries/cudart.py +403 -0
  53. pygpgpu-0.2.4/pygpgpu/cuda/libraries/cufft.py +219 -0
  54. pygpgpu-0.2.4/pygpgpu/cuda/libraries/cusolver.py +373 -0
  55. pygpgpu-0.2.4/pygpgpu/cuda/libraries/cusparse.py +343 -0
  56. pygpgpu-0.2.4/pygpgpu/cuda/libraries/wrappers/__init__.py +76 -0
  57. pygpgpu-0.2.4/pygpgpu/cuda/libraries/wrappers/_wrappers_blas.py +279 -0
  58. pygpgpu-0.2.4/pygpgpu/cuda/libraries/wrappers/_wrappers_common.py +185 -0
  59. pygpgpu-0.2.4/pygpgpu/cuda/libraries/wrappers/_wrappers_fft.py +84 -0
  60. pygpgpu-0.2.4/pygpgpu/cuda/libraries/wrappers/_wrappers_lt.py +167 -0
  61. pygpgpu-0.2.4/pygpgpu/cuda/libraries/wrappers/_wrappers_sparse.py +136 -0
  62. pygpgpu-0.2.4/pygpgpu/cuda/oop/array.py +279 -0
  63. pygpgpu-0.2.4/pygpgpu/cuda/oop/buffer.py +85 -0
  64. pygpgpu-0.2.4/pygpgpu/cuda/oop/context/__init__.py +331 -0
  65. pygpgpu-0.2.4/pygpgpu/cuda/oop/context/context_image.py +197 -0
  66. pygpgpu-0.2.4/pygpgpu/cuda/oop/context/context_stream.py +194 -0
  67. pygpgpu-0.2.4/pygpgpu/cuda/oop/cuobject.py +182 -0
  68. pygpgpu-0.2.4/pygpgpu/cuda/oop/device.py +88 -0
  69. pygpgpu-0.2.4/pygpgpu/cuda/oop/devices.py +101 -0
  70. pygpgpu-0.2.4/pygpgpu/cuda/oop/event.py +54 -0
  71. pygpgpu-0.2.4/pygpgpu/cuda/oop/kernel/__init__.py +255 -0
  72. pygpgpu-0.2.4/pygpgpu/cuda/oop/kernel/_kernel_args.py +199 -0
  73. pygpgpu-0.2.4/pygpgpu/cuda/oop/kernel/_kernel_async.py +95 -0
  74. pygpgpu-0.2.4/pygpgpu/cuda/oop/kernel/_kernel_launch.py +273 -0
  75. pygpgpu-0.2.4/pygpgpu/cuda/oop/kernel/_kernel_pack.py +116 -0
  76. pygpgpu-0.2.4/pygpgpu/cuda/oop/kernel/_kernel_support.py +117 -0
  77. pygpgpu-0.2.4/pygpgpu/cuda/oop/mem_object.py +184 -0
  78. pygpgpu-0.2.4/pygpgpu/cuda/oop/nvrtc_program.py +265 -0
  79. pygpgpu-0.2.4/pygpgpu/cuda/oop/program.py +143 -0
  80. pygpgpu-0.2.4/pygpgpu/cuda/oop/program_info.py +226 -0
  81. pygpgpu-0.2.4/pygpgpu/cuda/oop/program_parser/__init__.py +499 -0
  82. pygpgpu-0.2.4/pygpgpu/cuda/oop/program_parser/struct_builder.py +266 -0
  83. pygpgpu-0.2.4/pygpgpu/cuda/oop/stream.py +134 -0
  84. pygpgpu-0.2.4/pygpgpu/cuda/oop/surface.py +70 -0
  85. pygpgpu-0.2.4/pygpgpu/cuda/oop/texture.py +111 -0
  86. pygpgpu-0.2.4/pygpgpu/hip/driver/hip.py +266 -0
  87. pygpgpu-0.2.4/pygpgpu/hip/driver/hipinfo.py +194 -0
  88. pygpgpu-0.2.4/pygpgpu/hip/libraries/__init__.py +154 -0
  89. pygpgpu-0.2.4/pygpgpu/hip/libraries/_enums.py +248 -0
  90. pygpgpu-0.2.4/pygpgpu/hip/libraries/_symbols.py +77 -0
  91. pygpgpu-0.2.4/pygpgpu/hip/libraries/hipblas.py +177 -0
  92. pygpgpu-0.2.4/pygpgpu/hip/libraries/hipfft.py +157 -0
  93. pygpgpu-0.2.4/pygpgpu/hip/libraries/hipsolver.py +215 -0
  94. pygpgpu-0.2.4/pygpgpu/hip/libraries/hipsparse.py +207 -0
  95. pygpgpu-0.2.4/pygpgpu/hip/libraries/wrappers/__init__.py +74 -0
  96. pygpgpu-0.2.4/pygpgpu/hip/libraries/wrappers/_wrappers_blas.py +254 -0
  97. pygpgpu-0.2.4/pygpgpu/hip/libraries/wrappers/_wrappers_common.py +148 -0
  98. pygpgpu-0.2.4/pygpgpu/hip/libraries/wrappers/_wrappers_fft.py +92 -0
  99. pygpgpu-0.2.4/pygpgpu/hip/libraries/wrappers/_wrappers_lt.py +119 -0
  100. pygpgpu-0.2.4/pygpgpu/hip/oop/buffer.py +85 -0
  101. pygpgpu-0.2.4/pygpgpu/hip/oop/context.py +212 -0
  102. pygpgpu-0.2.4/pygpgpu/hip/oop/devices.py +99 -0
  103. pygpgpu-0.2.4/pygpgpu/hip/oop/hip_compiler.py +255 -0
  104. pygpgpu-0.2.4/pygpgpu/hip/oop/hipobject.py +165 -0
  105. pygpgpu-0.2.4/pygpgpu/hip/oop/kernel/__init__.py +254 -0
  106. pygpgpu-0.2.4/pygpgpu/hip/oop/kernel/_kernel_args.py +147 -0
  107. pygpgpu-0.2.4/pygpgpu/hip/oop/kernel/_kernel_async.py +91 -0
  108. pygpgpu-0.2.4/pygpgpu/hip/oop/kernel/_kernel_launch.py +268 -0
  109. pygpgpu-0.2.4/pygpgpu/hip/oop/kernel/_kernel_pack.py +67 -0
  110. pygpgpu-0.2.4/pygpgpu/hip/oop/kernel/_kernel_support.py +103 -0
  111. pygpgpu-0.2.4/pygpgpu/hip/oop/mem_object.py +180 -0
  112. pygpgpu-0.2.4/pygpgpu/hip/oop/program.py +149 -0
  113. pygpgpu-0.2.4/pygpgpu/hip/oop/program_info.py +203 -0
  114. pygpgpu-0.2.4/pygpgpu/hip/oop/program_parser/__init__.py +465 -0
  115. pygpgpu-0.2.4/pygpgpu/hip/oop/program_parser/struct_builder.py +267 -0
  116. pygpgpu-0.2.4/pygpgpu/hip/oop/stream.py +131 -0
  117. pygpgpu-0.2.4/pygpgpu/image/__init__.py +444 -0
  118. pygpgpu-0.2.4/pygpgpu/image/enums.py +81 -0
  119. pygpgpu-0.2.4/pygpgpu/image/shape.py +64 -0
  120. pygpgpu-0.2.4/pygpgpu/kernel/__init__.py +20 -0
  121. pygpgpu-0.2.4/pygpgpu/kernel/builtin_registry.py +42 -0
  122. pygpgpu-0.2.4/pygpgpu/kernel/builtins/__init__.py +323 -0
  123. pygpgpu-0.2.4/pygpgpu/kernel/builtins/atomic.py +71 -0
  124. pygpgpu-0.2.4/pygpgpu/kernel/builtins/block_memory.py +167 -0
  125. pygpgpu-0.2.4/pygpgpu/kernel/builtins/group_memory.py +152 -0
  126. pygpgpu-0.2.4/pygpgpu/kernel/builtins/work_item.py +39 -0
  127. pygpgpu-0.2.4/pygpgpu/kernel/complex.py +380 -0
  128. pygpgpu-0.2.4/pygpgpu/kernel/decorator/__init__.py +378 -0
  129. pygpgpu-0.2.4/pygpgpu/kernel/decorator/_build_phase_args.py +122 -0
  130. pygpgpu-0.2.4/pygpgpu/kernel/decorator/_compile_kernels.py +361 -0
  131. pygpgpu-0.2.4/pygpgpu/kernel/decorator/_compile_translate.py +112 -0
  132. pygpgpu-0.2.4/pygpgpu/kernel/decorator/_compile_write.py +413 -0
  133. pygpgpu-0.2.4/pygpgpu/kernel/decorator/_phase1.py +330 -0
  134. pygpgpu-0.2.4/pygpgpu/kernel/decorator/_phase2.py +222 -0
  135. pygpgpu-0.2.4/pygpgpu/kernel/decorator/_phase3.py +368 -0
  136. pygpgpu-0.2.4/pygpgpu/kernel/decorator/_phase_async.py +158 -0
  137. pygpgpu-0.2.4/pygpgpu/kernel/decorator/_phase_readback.py +84 -0
  138. pygpgpu-0.2.4/pygpgpu/kernel/decorator/_typing.py +73 -0
  139. pygpgpu-0.2.4/pygpgpu/kernel/decorator/binding.py +217 -0
  140. pygpgpu-0.2.4/pygpgpu/kernel/decorator/call_proxies.py +219 -0
  141. pygpgpu-0.2.4/pygpgpu/kernel/decorator/compile_plan.py +21 -0
  142. pygpgpu-0.2.4/pygpgpu/kernel/decorator/cuda_link.py +168 -0
  143. pygpgpu-0.2.4/pygpgpu/kernel/decorator/devices.py +460 -0
  144. pygpgpu-0.2.4/pygpgpu/kernel/decorator/factory.py +119 -0
  145. pygpgpu-0.2.4/pygpgpu/kernel/decorator/frames.py +261 -0
  146. pygpgpu-0.2.4/pygpgpu/kernel/decorator/helper_closure.py +137 -0
  147. pygpgpu-0.2.4/pygpgpu/kernel/decorator/host_regions.py +423 -0
  148. pygpgpu-0.2.4/pygpgpu/kernel/decorator/images.py +61 -0
  149. pygpgpu-0.2.4/pygpgpu/kernel/decorator/launch_plan.py +31 -0
  150. pygpgpu-0.2.4/pygpgpu/kernel/decorator/pykernel_cache.py +162 -0
  151. pygpgpu-0.2.4/pygpgpu/kernel/decorator/pykernel_call.py +335 -0
  152. pygpgpu-0.2.4/pygpgpu/kernel/decorator/pykernel_compile.py +40 -0
  153. pygpgpu-0.2.4/pygpgpu/kernel/decorator/pykernel_identity.py +131 -0
  154. pygpgpu-0.2.4/pygpgpu/kernel/decorator/pykernel_invoke.py +39 -0
  155. pygpgpu-0.2.4/pygpgpu/kernel/decorator/pykernel_outer.py +164 -0
  156. pygpgpu-0.2.4/pygpgpu/kernel/decorator/pykernel_returns.py +322 -0
  157. pygpgpu-0.2.4/pygpgpu/kernel/decorator/shape_check.py +164 -0
  158. pygpgpu-0.2.4/pygpgpu/kernel/decorator/slots.py +121 -0
  159. pygpgpu-0.2.4/pygpgpu/kernel/decorator/type_map.py +61 -0
  160. pygpgpu-0.2.4/pygpgpu/kernel/device_builtins/__init__.py +58 -0
  161. pygpgpu-0.2.4/pygpgpu/kernel/device_builtins/atomics.py +217 -0
  162. pygpgpu-0.2.4/pygpgpu/kernel/device_builtins/floor.py +217 -0
  163. pygpgpu-0.2.4/pygpgpu/kernel/device_builtins/index.py +104 -0
  164. pygpgpu-0.2.4/pygpgpu/kernel/device_builtins/math_tables.py +246 -0
  165. pygpgpu-0.2.4/pygpgpu/kernel/device_builtins/vector_helpers.py +252 -0
  166. pygpgpu-0.2.4/pygpgpu/kernel/device_library.py +216 -0
  167. pygpgpu-0.2.4/pygpgpu/kernel/host_runtime.py +130 -0
  168. pygpgpu-0.2.4/pygpgpu/kernel/include/complex.h +74 -0
  169. pygpgpu-0.2.4/pygpgpu/kernel/include/complex_double.h +419 -0
  170. pygpgpu-0.2.4/pygpgpu/kernel/include/complex_float.h +467 -0
  171. pygpgpu-0.2.4/pygpgpu/kernel/include/complex_mixed.h +123 -0
  172. pygpgpu-0.2.4/pygpgpu/kernel/include/quat.h +283 -0
  173. pygpgpu-0.2.4/pygpgpu/kernel/metal_codegen.py +121 -0
  174. pygpgpu-0.2.4/pygpgpu/kernel/objects/__init__.py +107 -0
  175. pygpgpu-0.2.4/pygpgpu/kernel/objects/binding.py +184 -0
  176. pygpgpu-0.2.4/pygpgpu/kernel/objects/build.py +79 -0
  177. pygpgpu-0.2.4/pygpgpu/kernel/objects/construction.py +387 -0
  178. pygpgpu-0.2.4/pygpgpu/kernel/objects/convert.py +489 -0
  179. pygpgpu-0.2.4/pygpgpu/kernel/objects/kinds.py +485 -0
  180. pygpgpu-0.2.4/pygpgpu/kernel/objects/scan.py +393 -0
  181. pygpgpu-0.2.4/pygpgpu/kernel/objects/scan_paths.py +289 -0
  182. pygpgpu-0.2.4/pygpgpu/kernel/objects/state.py +76 -0
  183. pygpgpu-0.2.4/pygpgpu/kernel/python_backend/__init__.py +71 -0
  184. pygpgpu-0.2.4/pygpgpu/kernel/python_backend/analysis.py +129 -0
  185. pygpgpu-0.2.4/pygpgpu/kernel/python_backend/frame.py +157 -0
  186. pygpgpu-0.2.4/pygpgpu/kernel/python_backend/kernel.py +271 -0
  187. pygpgpu-0.2.4/pygpgpu/kernel/python_backend/magic.py +133 -0
  188. pygpgpu-0.2.4/pygpgpu/kernel/quaternion.py +231 -0
  189. pygpgpu-0.2.4/pygpgpu/kernel/sci_math/__init__.py +138 -0
  190. pygpgpu-0.2.4/pygpgpu/kernel/sci_math/bessel.py +99 -0
  191. pygpgpu-0.2.4/pygpgpu/kernel/sci_math/conversion.py +65 -0
  192. pygpgpu-0.2.4/pygpgpu/kernel/sci_math/distribution.py +99 -0
  193. pygpgpu-0.2.4/pygpgpu/kernel/sci_math/exact.py +75 -0
  194. pygpgpu-0.2.4/pygpgpu/kernel/sci_math/fast.py +71 -0
  195. pygpgpu-0.2.4/pygpgpu/kernel/sci_math/guards.py +25 -0
  196. pygpgpu-0.2.4/pygpgpu/kernel/sci_math/minmax.py +80 -0
  197. pygpgpu-0.2.4/pygpgpu/kernel/sci_math/native.py +85 -0
  198. pygpgpu-0.2.4/pygpgpu/kernel/sci_math/special.py +51 -0
  199. pygpgpu-0.2.4/pygpgpu/kernel/source_paths/__init__.py +113 -0
  200. pygpgpu-0.2.4/pygpgpu/kernel/source_paths/digest.py +230 -0
  201. pygpgpu-0.2.4/pygpgpu/kernel/source_paths/guards.py +158 -0
  202. pygpgpu-0.2.4/pygpgpu/kernel/source_paths/layout.py +219 -0
  203. pygpgpu-0.2.4/pygpgpu/kernel/source_paths/locks.py +176 -0
  204. pygpgpu-0.2.4/pygpgpu/kernel/source_paths/merge.py +369 -0
  205. pygpgpu-0.2.4/pygpgpu/kernel/source_paths/prototypes.py +214 -0
  206. pygpgpu-0.2.4/pygpgpu/kernel/source_paths/source_store.py +253 -0
  207. pygpgpu-0.2.4/pygpgpu/kernel/source_paths/writing.py +375 -0
  208. pygpgpu-0.2.4/pygpgpu/kernel/structs/__init__.py +78 -0
  209. pygpgpu-0.2.4/pygpgpu/kernel/structs/layout.py +481 -0
  210. pygpgpu-0.2.4/pygpgpu/kernel/structs/registry.py +275 -0
  211. pygpgpu-0.2.4/pygpgpu/kernel/structs/state.py +47 -0
  212. pygpgpu-0.2.4/pygpgpu/kernel/structs/unions.py +162 -0
  213. pygpgpu-0.2.4/pygpgpu/kernel/translator/__init__.py +308 -0
  214. pygpgpu-0.2.4/pygpgpu/kernel/translator/_exports.py +264 -0
  215. pygpgpu-0.2.4/pygpgpu/kernel/translator/assign.py +455 -0
  216. pygpgpu-0.2.4/pygpgpu/kernel/translator/attributes.py +290 -0
  217. pygpgpu-0.2.4/pygpgpu/kernel/translator/augassign.py +336 -0
  218. pygpgpu-0.2.4/pygpgpu/kernel/translator/builtin_emit.py +490 -0
  219. pygpgpu-0.2.4/pygpgpu/kernel/translator/builtin_python.py +453 -0
  220. pygpgpu-0.2.4/pygpgpu/kernel/translator/builtins.py +264 -0
  221. pygpgpu-0.2.4/pygpgpu/kernel/translator/calls.py +491 -0
  222. pygpgpu-0.2.4/pygpgpu/kernel/translator/complex_values.py +373 -0
  223. pygpgpu-0.2.4/pygpgpu/kernel/translator/device_call.py +455 -0
  224. pygpgpu-0.2.4/pygpgpu/kernel/translator/emit.py +332 -0
  225. pygpgpu-0.2.4/pygpgpu/kernel/translator/errors.py +107 -0
  226. pygpgpu-0.2.4/pygpgpu/kernel/translator/expressions.py +331 -0
  227. pygpgpu-0.2.4/pygpgpu/kernel/translator/host_regions.py +353 -0
  228. pygpgpu-0.2.4/pygpgpu/kernel/translator/images.py +227 -0
  229. pygpgpu-0.2.4/pygpgpu/kernel/translator/init.py +500 -0
  230. pygpgpu-0.2.4/pygpgpu/kernel/translator/magic_loop.py +359 -0
  231. pygpgpu-0.2.4/pygpgpu/kernel/translator/magic_methods.py +402 -0
  232. pygpgpu-0.2.4/pygpgpu/kernel/translator/naming.py +388 -0
  233. pygpgpu-0.2.4/pygpgpu/kernel/translator/native_recursion.py +220 -0
  234. pygpgpu-0.2.4/pygpgpu/kernel/translator/nd_index.py +475 -0
  235. pygpgpu-0.2.4/pygpgpu/kernel/translator/nested_launch.py +121 -0
  236. pygpgpu-0.2.4/pygpgpu/kernel/translator/notation.py +176 -0
  237. pygpgpu-0.2.4/pygpgpu/kernel/translator/numpy_emit.py +463 -0
  238. pygpgpu-0.2.4/pygpgpu/kernel/translator/operators.py +332 -0
  239. pygpgpu-0.2.4/pygpgpu/kernel/translator/outer_store.py +91 -0
  240. pygpgpu-0.2.4/pygpgpu/kernel/translator/outer_vars.py +218 -0
  241. pygpgpu-0.2.4/pygpgpu/kernel/translator/phases.py +432 -0
  242. pygpgpu-0.2.4/pygpgpu/kernel/translator/predicates.py +249 -0
  243. pygpgpu-0.2.4/pygpgpu/kernel/translator/print_emit.py +473 -0
  244. pygpgpu-0.2.4/pygpgpu/kernel/translator/print_fstring.py +154 -0
  245. pygpgpu-0.2.4/pygpgpu/kernel/translator/private_array.py +238 -0
  246. pygpgpu-0.2.4/pygpgpu/kernel/translator/quaternions.py +185 -0
  247. pygpgpu-0.2.4/pygpgpu/kernel/translator/raise_emit.py +232 -0
  248. pygpgpu-0.2.4/pygpgpu/kernel/translator/receivers.py +433 -0
  249. pygpgpu-0.2.4/pygpgpu/kernel/translator/render.py +359 -0
  250. pygpgpu-0.2.4/pygpgpu/kernel/translator/return_type_scan.py +442 -0
  251. pygpgpu-0.2.4/pygpgpu/kernel/translator/returns.py +440 -0
  252. pygpgpu-0.2.4/pygpgpu/kernel/translator/scalar_recursion.py +208 -0
  253. pygpgpu-0.2.4/pygpgpu/kernel/translator/shared_shapes.py +82 -0
  254. pygpgpu-0.2.4/pygpgpu/kernel/translator/site_scan.py +358 -0
  255. pygpgpu-0.2.4/pygpgpu/kernel/translator/source_text.py +217 -0
  256. pygpgpu-0.2.4/pygpgpu/kernel/translator/statements.py +364 -0
  257. pygpgpu-0.2.4/pygpgpu/kernel/translator/structures.py +283 -0
  258. pygpgpu-0.2.4/pygpgpu/kernel/translator/subscripts.py +380 -0
  259. pygpgpu-0.2.4/pygpgpu/kernel/translator/suspended_recursion.py +244 -0
  260. pygpgpu-0.2.4/pygpgpu/kernel/translator/tail_recursion.py +197 -0
  261. pygpgpu-0.2.4/pygpgpu/kernel/translator/targets.py +393 -0
  262. pygpgpu-0.2.4/pygpgpu/kernel/translator/tuples.py +219 -0
  263. pygpgpu-0.2.4/pygpgpu/kernel/translator/type_map.py +261 -0
  264. pygpgpu-0.2.4/pygpgpu/kernel/translator/vector_floor.py +120 -0
  265. pygpgpu-0.2.4/pygpgpu/kernel/translator/vector_ops.py +445 -0
  266. pygpgpu-0.2.4/pygpgpu/kernel/translator/vectors.py +96 -0
  267. pygpgpu-0.2.4/pygpgpu/kernel/translator/walk.py +445 -0
  268. pygpgpu-0.2.4/pygpgpu/kernel/translator/work_group.py +140 -0
  269. pygpgpu-0.2.4/pygpgpu/kernel_import/__init__.py +59 -0
  270. pygpgpu-0.2.4/pygpgpu/kernel_import/hook.py +61 -0
  271. pygpgpu-0.2.4/pygpgpu/kernel_import/source.py +178 -0
  272. pygpgpu-0.2.4/pygpgpu/kernel_import/tables.py +142 -0
  273. pygpgpu-0.2.4/pygpgpu/kernel_import/wrapper.py +362 -0
  274. pygpgpu-0.2.4/pygpgpu/kernel_import_stub.py +172 -0
  275. pygpgpu-0.2.4/pygpgpu/libraries/__init__.py +30 -0
  276. pygpgpu-0.2.4/pygpgpu/libraries/_base.py +380 -0
  277. pygpgpu-0.2.4/pygpgpu/metal/__init__.py +8 -0
  278. pygpgpu-0.2.4/pygpgpu/metal/driver/__init__.py +2 -0
  279. pygpgpu-0.2.4/pygpgpu/metal/driver/metal.py +193 -0
  280. pygpgpu-0.2.4/pygpgpu/metal/driver/objc.py +177 -0
  281. pygpgpu-0.2.4/pygpgpu/metal/oop/__init__.py +3 -0
  282. pygpgpu-0.2.4/pygpgpu/metal/oop/buffer.py +236 -0
  283. pygpgpu-0.2.4/pygpgpu/metal/oop/compile_options.py +210 -0
  284. pygpgpu-0.2.4/pygpgpu/metal/oop/context.py +117 -0
  285. pygpgpu-0.2.4/pygpgpu/metal/oop/device.py +17 -0
  286. pygpgpu-0.2.4/pygpgpu/metal/oop/devices.py +182 -0
  287. pygpgpu-0.2.4/pygpgpu/metal/oop/event.py +64 -0
  288. pygpgpu-0.2.4/pygpgpu/metal/oop/kernel/__init__.py +451 -0
  289. pygpgpu-0.2.4/pygpgpu/metal/oop/kernel/scalars.py +156 -0
  290. pygpgpu-0.2.4/pygpgpu/metal/oop/metalobject.py +71 -0
  291. pygpgpu-0.2.4/pygpgpu/metal/oop/program.py +167 -0
  292. pygpgpu-0.2.4/pygpgpu/metal/oop/program_info.py +228 -0
  293. pygpgpu-0.2.4/pygpgpu/metal/oop/program_parser/__init__.py +227 -0
  294. pygpgpu-0.2.4/pygpgpu/metal/oop/program_parser/analysis.py +280 -0
  295. pygpgpu-0.2.4/pygpgpu/metal/oop/program_parser/declarations.py +260 -0
  296. pygpgpu-0.2.4/pygpgpu/metal/oop/program_parser/node_kinds.py +71 -0
  297. pygpgpu-0.2.4/pygpgpu/metal/oop/program_parser/struct_builder.py +226 -0
  298. pygpgpu-0.2.4/pygpgpu/numpy/__init__.py +113 -0
  299. pygpgpu-0.2.4/pygpgpu/numpy/_backends/__init__.py +72 -0
  300. pygpgpu-0.2.4/pygpgpu/numpy/_backends/_backends_alloc.py +182 -0
  301. pygpgpu-0.2.4/pygpgpu/numpy/_backends/_backends_copy.py +162 -0
  302. pygpgpu-0.2.4/pygpgpu/numpy/_backends/_backends_pinning.py +196 -0
  303. pygpgpu-0.2.4/pygpgpu/numpy/_backends/_backends_zerocopy.py +48 -0
  304. pygpgpu-0.2.4/pygpgpu/numpy/_devices.py +199 -0
  305. pygpgpu-0.2.4/pygpgpu/numpy/_torch.py +197 -0
  306. pygpgpu-0.2.4/pygpgpu/numpy/array_creation.py +102 -0
  307. pygpgpu-0.2.4/pygpgpu/numpy/ndarray/__init__.py +294 -0
  308. pygpgpu-0.2.4/pygpgpu/numpy/ndarray/_host_state.py +200 -0
  309. pygpgpu-0.2.4/pygpgpu/numpy/ndarray/_launch_binding.py +200 -0
  310. pygpgpu-0.2.4/pygpgpu/numpy/ndarray/_numpy_api.py +230 -0
  311. pygpgpu-0.2.4/pygpgpu/numpy/ndarray/_transfer.py +252 -0
  312. pygpgpu-0.2.4/pygpgpu/numpy/ndarray/binding.py +163 -0
  313. pygpgpu-0.2.4/pygpgpu/numpy/ndarray/plain.py +54 -0
  314. pygpgpu-0.2.4/pygpgpu/numpy/transfer.py +140 -0
  315. pygpgpu-0.2.4/pygpgpu/opencl/driver/cl.py +252 -0
  316. pygpgpu-0.2.4/pygpgpu/opencl/driver/clinfo.py +76 -0
  317. pygpgpu-0.2.4/pygpgpu/opencl/driver/clinfo_query_types.py +342 -0
  318. pygpgpu-0.2.4/pygpgpu/opencl/driver/clinfo_sig_context.py +164 -0
  319. pygpgpu-0.2.4/pygpgpu/opencl/driver/clinfo_sig_device.py +161 -0
  320. pygpgpu-0.2.4/pygpgpu/opencl/driver/clinfo_sig_enqueue.py +226 -0
  321. pygpgpu-0.2.4/pygpgpu/opencl/driver/clinfo_sig_event.py +92 -0
  322. pygpgpu-0.2.4/pygpgpu/opencl/driver/clinfo_sig_memobj.py +186 -0
  323. pygpgpu-0.2.4/pygpgpu/opencl/driver/clinfo_sig_misc.py +109 -0
  324. pygpgpu-0.2.4/pygpgpu/opencl/driver/clinfo_sig_platform.py +67 -0
  325. pygpgpu-0.2.4/pygpgpu/opencl/driver/clinfo_sig_program.py +235 -0
  326. pygpgpu-0.2.4/pygpgpu/opencl/driver/clinfo_types.py +221 -0
  327. pygpgpu-0.2.4/pygpgpu/opencl/driver/cltypes/__init__.py +118 -0
  328. pygpgpu-0.2.4/pygpgpu/opencl/driver/cltypes/context.py +136 -0
  329. pygpgpu-0.2.4/pygpgpu/opencl/driver/cltypes/core.py +42 -0
  330. pygpgpu-0.2.4/pygpgpu/opencl/driver/cltypes/device.py +353 -0
  331. pygpgpu-0.2.4/pygpgpu/opencl/driver/cltypes/errors.py +111 -0
  332. pygpgpu-0.2.4/pygpgpu/opencl/driver/cltypes/image.py +86 -0
  333. pygpgpu-0.2.4/pygpgpu/opencl/driver/cltypes/memory.py +152 -0
  334. pygpgpu-0.2.4/pygpgpu/opencl/driver/cltypes/structures.py +117 -0
  335. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/__init__.py +80 -0
  336. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/char16.py +26 -0
  337. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/char16.pyi +193 -0
  338. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/char3.py +14 -0
  339. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/char8.py +18 -0
  340. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/char8.pyi +109 -0
  341. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/double16.py +26 -0
  342. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/double16.pyi +193 -0
  343. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/double3.py +14 -0
  344. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/double8.py +18 -0
  345. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/double8.pyi +109 -0
  346. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/float16.py +26 -0
  347. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/float16.pyi +193 -0
  348. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/float3.py +14 -0
  349. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/float8.py +18 -0
  350. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/float8.pyi +109 -0
  351. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/genVec16.py +16 -0
  352. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/genVec8.py +14 -0
  353. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/helper.py +68 -0
  354. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/int16.py +26 -0
  355. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/int16.pyi +193 -0
  356. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/int3.py +14 -0
  357. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/int8.py +18 -0
  358. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/int8.pyi +109 -0
  359. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/long16.py +26 -0
  360. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/long16.pyi +193 -0
  361. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/long2.py +12 -0
  362. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/long3.py +14 -0
  363. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/long4.py +14 -0
  364. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/long8.py +18 -0
  365. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/long8.pyi +109 -0
  366. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/short16.py +26 -0
  367. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/short16.pyi +193 -0
  368. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/short3.py +14 -0
  369. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/short8.py +18 -0
  370. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/short8.pyi +109 -0
  371. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/uchar16.py +26 -0
  372. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/uchar16.pyi +193 -0
  373. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/uchar3.py +14 -0
  374. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/uchar8.py +18 -0
  375. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/uchar8.pyi +109 -0
  376. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/uint16.py +26 -0
  377. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/uint16.pyi +193 -0
  378. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/uint3.py +14 -0
  379. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/uint8.py +18 -0
  380. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/uint8.pyi +109 -0
  381. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/ulong16.py +26 -0
  382. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/ulong16.pyi +193 -0
  383. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/ulong2.py +12 -0
  384. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/ulong3.py +14 -0
  385. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/ulong4.py +14 -0
  386. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/ulong8.py +18 -0
  387. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/ulong8.pyi +109 -0
  388. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/ushort16.py +26 -0
  389. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/ushort16.pyi +193 -0
  390. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/ushort3.py +14 -0
  391. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/ushort8.py +18 -0
  392. pygpgpu-0.2.4/pygpgpu/opencl/driver/vec_types/ushort8.pyi +109 -0
  393. pygpgpu-0.2.4/pygpgpu/opencl/oop/buffer.py +148 -0
  394. pygpgpu-0.2.4/pygpgpu/opencl/oop/clobject.py +182 -0
  395. pygpgpu-0.2.4/pygpgpu/opencl/oop/command_queue.py +85 -0
  396. pygpgpu-0.2.4/pygpgpu/opencl/oop/context.py +489 -0
  397. pygpgpu-0.2.4/pygpgpu/opencl/oop/device.py +63 -0
  398. pygpgpu-0.2.4/pygpgpu/opencl/oop/event.py +220 -0
  399. pygpgpu-0.2.4/pygpgpu/opencl/oop/kernel/__init__.py +306 -0
  400. pygpgpu-0.2.4/pygpgpu/opencl/oop/kernel/_kernel_args.py +233 -0
  401. pygpgpu-0.2.4/pygpgpu/opencl/oop/kernel/_kernel_async.py +64 -0
  402. pygpgpu-0.2.4/pygpgpu/opencl/oop/kernel/_kernel_launch.py +283 -0
  403. pygpgpu-0.2.4/pygpgpu/opencl/oop/kernel/_kernel_support.py +158 -0
  404. pygpgpu-0.2.4/pygpgpu/opencl/oop/mem_object.py +190 -0
  405. pygpgpu-0.2.4/pygpgpu/opencl/oop/platform.py +169 -0
  406. pygpgpu-0.2.4/pygpgpu/opencl/oop/platforms.py +101 -0
  407. pygpgpu-0.2.4/pygpgpu/opencl/oop/program.py +420 -0
  408. pygpgpu-0.2.4/pygpgpu/opencl/oop/program_info.py +229 -0
  409. pygpgpu-0.2.4/pygpgpu/opencl/oop/program_parser/__init__.py +500 -0
  410. pygpgpu-0.2.4/pygpgpu/opencl/oop/program_parser/struct_builder.py +249 -0
  411. pygpgpu-0.2.4/pygpgpu/opencl/oop/sampler.py +83 -0
  412. pygpgpu-0.2.4/pygpgpu/settings.py +251 -0
  413. pygpgpu-0.2.4/pygpgpu/utils/__init__.py +48 -0
  414. pygpgpu-0.2.4/pygpgpu/utils/files.py +191 -0
  415. pygpgpu-0.2.4/pygpgpu/utils/futures.py +67 -0
  416. pygpgpu-0.2.4/pygpgpu/utils/print_info.py +131 -0
  417. pygpgpu-0.2.4/pygpgpu/utils/work_size.py +306 -0
  418. pygpgpu-0.2.4/pygpgpu/vec_types/__init__.py +72 -0
  419. pygpgpu-0.2.4/pygpgpu/vec_types/char2.py +12 -0
  420. pygpgpu-0.2.4/pygpgpu/vec_types/char2.pyi +248 -0
  421. pygpgpu-0.2.4/pygpgpu/vec_types/char4.py +14 -0
  422. pygpgpu-0.2.4/pygpgpu/vec_types/char4.pyi +2858 -0
  423. pygpgpu-0.2.4/pygpgpu/vec_types/funcs.py +263 -0
  424. pygpgpu-0.2.4/pygpgpu/vec_types/helper.py +137 -0
  425. pygpgpu-0.2.4/pygpgpu/vec_types/layout/__init__.py +55 -0
  426. pygpgpu-0.2.4/pygpgpu/vec_types/layout/_layout_classes.py +33 -0
  427. pygpgpu-0.2.4/pygpgpu/vec_types/layout/_layout_geometry.py +184 -0
  428. pygpgpu-0.2.4/pygpgpu/vec_types/layout/_layout_pack.py +352 -0
  429. pygpgpu-0.2.4/pygpgpu/vec_types/short2.py +12 -0
  430. pygpgpu-0.2.4/pygpgpu/vec_types/short2.pyi +248 -0
  431. pygpgpu-0.2.4/pygpgpu/vec_types/short4.py +14 -0
  432. pygpgpu-0.2.4/pygpgpu/vec_types/short4.pyi +2858 -0
  433. pygpgpu-0.2.4/pygpgpu/vec_types/uchar2.py +12 -0
  434. pygpgpu-0.2.4/pygpgpu/vec_types/uchar2.pyi +248 -0
  435. pygpgpu-0.2.4/pygpgpu/vec_types/uchar4.py +14 -0
  436. pygpgpu-0.2.4/pygpgpu/vec_types/uchar4.pyi +2858 -0
  437. pygpgpu-0.2.4/pygpgpu/vec_types/ushort2.py +12 -0
  438. pygpgpu-0.2.4/pygpgpu/vec_types/ushort2.pyi +248 -0
  439. pygpgpu-0.2.4/pygpgpu/vec_types/ushort4.py +14 -0
  440. pygpgpu-0.2.4/pygpgpu/vec_types/ushort4.pyi +2858 -0
  441. pygpgpu-0.2.4/pygpgpu.egg-info/PKG-INFO +465 -0
  442. pygpgpu-0.2.4/pygpgpu.egg-info/SOURCES.txt +663 -0
  443. pygpgpu-0.2.4/pygpgpu.egg-info/requires.txt +15 -0
  444. pygpgpu-0.2.4/pyproject.toml +255 -0
  445. pygpgpu-0.2.4/tests/test_async_phases.py +51 -0
  446. pygpgpu-0.2.4/tests/test_async_tail_return.py +36 -0
  447. pygpgpu-0.2.4/tests/test_blackbox_divergences.py +167 -0
  448. pygpgpu-0.2.4/tests/test_blackbox_usage.py +136 -0
  449. pygpgpu-0.2.4/tests/test_blackbox_usage_round2.py +157 -0
  450. pygpgpu-0.2.4/tests/test_builtins.py +334 -0
  451. pygpgpu-0.2.4/tests/test_config.py +268 -0
  452. pygpgpu-0.2.4/tests/test_decorator_contract.py +127 -0
  453. pygpgpu-0.2.4/tests/test_driver_background_init.py +134 -0
  454. pygpgpu-0.2.4/tests/test_float_literals.py +106 -0
  455. pygpgpu-0.2.4/tests/test_genvec_arithmetic.py +266 -0
  456. pygpgpu-0.2.4/tests/test_genvec_layout_and_construction.py +177 -0
  457. pygpgpu-0.2.4/tests/test_genvec_numpy_view.py +88 -0
  458. pygpgpu-0.2.4/tests/test_genvec_swizzles.py +235 -0
  459. pygpgpu-0.2.4/tests/test_gnp_torch.py +117 -0
  460. pygpgpu-0.2.4/tests/test_gnp_transfers.py +380 -0
  461. pygpgpu-0.2.4/tests/test_gnp_view_offsets.py +124 -0
  462. pygpgpu-0.2.4/tests/test_handle_identity.py +122 -0
  463. pygpgpu-0.2.4/tests/test_kernel_argument_errors.py +320 -0
  464. pygpgpu-0.2.4/tests/test_kernel_array_views.py +480 -0
  465. pygpgpu-0.2.4/tests/test_kernel_atomic_augassign.py +245 -0
  466. pygpgpu-0.2.4/tests/test_kernel_block_memory.py +244 -0
  467. pygpgpu-0.2.4/tests/test_kernel_block_scoping.py +140 -0
  468. pygpgpu-0.2.4/tests/test_kernel_branch_declaration.py +97 -0
  469. pygpgpu-0.2.4/tests/test_kernel_cache_helpers.py +350 -0
  470. pygpgpu-0.2.4/tests/test_kernel_classmethod_kernels.py +449 -0
  471. pygpgpu-0.2.4/tests/test_kernel_concurrent_compile.py +171 -0
  472. pygpgpu-0.2.4/tests/test_kernel_copy_policy.py +110 -0
  473. pygpgpu-0.2.4/tests/test_kernel_ctypes_structures.py +336 -0
  474. pygpgpu-0.2.4/tests/test_kernel_default_device.py +328 -0
  475. pygpgpu-0.2.4/tests/test_kernel_floor_division.py +192 -0
  476. pygpgpu-0.2.4/tests/test_kernel_frozen_cache.py +281 -0
  477. pygpgpu-0.2.4/tests/test_kernel_generated_source_cache.py +469 -0
  478. pygpgpu-0.2.4/tests/test_kernel_geometric_device_calls.py +145 -0
  479. pygpgpu-0.2.4/tests/test_kernel_helper_tuples.py +232 -0
  480. pygpgpu-0.2.4/tests/test_kernel_host_regions.py +299 -0
  481. pygpgpu-0.2.4/tests/test_kernel_indirect_loop_bound.py +36 -0
  482. pygpgpu-0.2.4/tests/test_kernel_local_memory.py +324 -0
  483. pygpgpu-0.2.4/tests/test_kernel_loop_exits.py +234 -0
  484. pygpgpu-0.2.4/tests/test_kernel_member_width.py +273 -0
  485. pygpgpu-0.2.4/tests/test_kernel_narrow_arguments.py +83 -0
  486. pygpgpu-0.2.4/tests/test_kernel_ndindex_forms.py +187 -0
  487. pygpgpu-0.2.4/tests/test_kernel_nested_launch.py +340 -0
  488. pygpgpu-0.2.4/tests/test_kernel_nested_members.py +227 -0
  489. pygpgpu-0.2.4/tests/test_kernel_outer_constants.py +225 -0
  490. pygpgpu-0.2.4/tests/test_kernel_outer_scope.py +435 -0
  491. pygpgpu-0.2.4/tests/test_kernel_print_fstrings.py +177 -0
  492. pygpgpu-0.2.4/tests/test_kernel_prototype_block_scope.py +148 -0
  493. pygpgpu-0.2.4/tests/test_kernel_raise_assert.py +154 -0
  494. pygpgpu-0.2.4/tests/test_kernel_rank_mismatch.py +183 -0
  495. pygpgpu-0.2.4/tests/test_kernel_regressions.py +323 -0
  496. pygpgpu-0.2.4/tests/test_kernel_regressions_objects.py +284 -0
  497. pygpgpu-0.2.4/tests/test_kernel_regressions_types.py +260 -0
  498. pygpgpu-0.2.4/tests/test_kernel_reserved_names.py +261 -0
  499. pygpgpu-0.2.4/tests/test_kernel_return_positions.py +75 -0
  500. pygpgpu-0.2.4/tests/test_kernel_returns.py +446 -0
  501. pygpgpu-0.2.4/tests/test_kernel_sequence_arguments.py +242 -0
  502. pygpgpu-0.2.4/tests/test_kernel_serial_loop_above_dispatch.py +68 -0
  503. pygpgpu-0.2.4/tests/test_kernel_shared_device_helpers.py +180 -0
  504. pygpgpu-0.2.4/tests/test_kernel_shared_shape_parameter.py +115 -0
  505. pygpgpu-0.2.4/tests/test_kernel_silent_wrong_answer.py +151 -0
  506. pygpgpu-0.2.4/tests/test_kernel_struct_types.py +331 -0
  507. pygpgpu-0.2.4/tests/test_kernel_subclass_override.py +73 -0
  508. pygpgpu-0.2.4/tests/test_kernel_threads.py +132 -0
  509. pygpgpu-0.2.4/tests/test_kernel_type_map.py +369 -0
  510. pygpgpu-0.2.4/tests/test_kernel_typing.py +207 -0
  511. pygpgpu-0.2.4/tests/test_kernel_vector_floor_ops.py +363 -0
  512. pygpgpu-0.2.4/tests/test_kernel_vector_layout.py +310 -0
  513. pygpgpu-0.2.4/tests/test_kernel_vector_widening_construction.py +286 -0
  514. pygpgpu-0.2.4/tests/test_kernel_wide_vector_refusal.py +99 -0
  515. pygpgpu-0.2.4/tests/test_narrow_integer_stores.py +102 -0
  516. pygpgpu-0.2.4/tests/test_native_recursion.py +490 -0
  517. pygpgpu-0.2.4/tests/test_native_recursion_shapes.py +187 -0
  518. pygpgpu-0.2.4/tests/test_nested_argument_positions.py +89 -0
  519. pygpgpu-0.2.4/tests/test_opencl_binary_cache.py +74 -0
  520. pygpgpu-0.2.4/tests/test_phase_complex.py +30 -0
  521. pygpgpu-0.2.4/tests/test_phase_readback.py +228 -0
  522. pygpgpu-0.2.4/tests/test_pooled_buffer_claims.py +99 -0
  523. pygpgpu-0.2.4/tests/test_print_format_spec.py +172 -0
  524. pygpgpu-0.2.4/tests/test_print_info_setting.py +161 -0
  525. pygpgpu-0.2.4/tests/test_probe_order.py +71 -0
  526. pygpgpu-0.2.4/tests/test_sci_math_hip.py +212 -0
  527. pygpgpu-0.2.4/tests/test_suspended_recursion.py +139 -0
  528. pygpgpu-0.2.4/tests/test_tail_recursion.py +355 -0
  529. pygpgpu-0.2.4/tests/test_tree_extraction.py +154 -0
  530. pygpgpu-0.2.4/tests/test_vector_aliases.py +48 -0
  531. pygpgpu-0.2.2/MANIFEST.in +0 -14
  532. pygpgpu-0.2.2/PKG-INFO +0 -1000
  533. pygpgpu-0.2.2/README.md +0 -937
  534. pygpgpu-0.2.2/README.zh-CN.md +0 -891
  535. pygpgpu-0.2.2/examples/01_basic_kernel.py +0 -61
  536. pygpgpu-0.2.2/examples/02_backend_device_selection.py +0 -64
  537. pygpgpu-0.2.2/examples/03_nd_loop_and_class_method.py +0 -140
  538. pygpgpu-0.2.2/examples/04_vector_types.py +0 -67
  539. pygpgpu-0.2.2/examples/05_gnp_zero_copy_and_atomics.py +0 -116
  540. pygpgpu-0.2.2/examples/06_handwritten_kernels.py +0 -76
  541. pygpgpu-0.2.2/examples/07_low_level_oop.py +0 -67
  542. pygpgpu-0.2.2/examples/08_compare_backends.py +0 -78
  543. pygpgpu-0.2.2/examples/09_reduction.py +0 -159
  544. pygpgpu-0.2.2/examples/10_async_launch.py +0 -72
  545. pygpgpu-0.2.2/examples/11_python_backend.py +0 -83
  546. pygpgpu-0.2.2/examples/11_returns_and_scope.py +0 -109
  547. pygpgpu-0.2.2/examples/12_print_in_kernel.py +0 -71
  548. pygpgpu-0.2.2/examples/13_image.py +0 -187
  549. pygpgpu-0.2.2/examples/14_heterogeneous_data.py +0 -341
  550. pygpgpu-0.2.2/examples/15_kernel_import.py +0 -129
  551. pygpgpu-0.2.2/examples/16_scientific_math.py +0 -63
  552. pygpgpu-0.2.2/examples/GPU-Puzzles/Puzzle1_Map.py +0 -35
  553. pygpgpu-0.2.2/examples/GPU-Puzzles/Puzzle2_Zip.py +0 -37
  554. pygpgpu-0.2.2/examples/GPU-Puzzles/Puzzle3_Guards.py +0 -37
  555. pygpgpu-0.2.2/examples/GPU-Puzzles/Puzzle4_Map2D.py +0 -37
  556. pygpgpu-0.2.2/examples/GPU-Puzzles/Puzzle5_Broadcast.py +0 -40
  557. pygpgpu-0.2.2/examples/GPU-Puzzles/Puzzle6_Blocks.py +0 -37
  558. pygpgpu-0.2.2/examples/GPU-Puzzles/Puzzle7_Blocks2D.py +0 -38
  559. pygpgpu-0.2.2/examples/GPU-Puzzles/Puzzle8_Shared.py +0 -48
  560. pygpgpu-0.2.2/examples/GPU-Puzzles/Puzzle9_Pooling.py +0 -0
  561. pygpgpu-0.2.2/examples/GPU-Puzzles/__cucache__/pykernels/Puzzle1_Map.cu +0 -21
  562. pygpgpu-0.2.2/examples/GPU-Puzzles/__cucache__/pykernels/Puzzle2_Zip.cu +0 -22
  563. pygpgpu-0.2.2/examples/GPU-Puzzles/__cucache__/pykernels/Puzzle3_Guards.cu +0 -26
  564. pygpgpu-0.2.2/examples/GPU-Puzzles/__cucache__/pykernels/Puzzle4_Map2D.cu +0 -29
  565. pygpgpu-0.2.2/examples/GPU-Puzzles/__cucache__/pykernels/Puzzle5_Broadcast.cu +0 -29
  566. pygpgpu-0.2.2/examples/GPU-Puzzles/__cucache__/pykernels/Puzzle6_Blocks.cu +0 -26
  567. pygpgpu-0.2.2/examples/GPU-Puzzles/__cucache__/pykernels/Puzzle7_Blocks2D.cu +0 -29
  568. pygpgpu-0.2.2/examples/GPU-Puzzles/__cucache__/pykernels/Puzzle8_Shared.cu +0 -34
  569. pygpgpu-0.2.2/examples/README.md +0 -82
  570. pygpgpu-0.2.2/examples/README.zh-CN.md +0 -66
  571. pygpgpu-0.2.2/examples/digital_image_processing/01_image_sampling.py +0 -12
  572. pygpgpu-0.2.2/examples/digital_image_processing/02_image_quantify.py +0 -11
  573. pygpgpu-0.2.2/examples/digital_image_processing/03_image_brightness_adjustment.py +0 -11
  574. pygpgpu-0.2.2/examples/digital_image_processing/04_image_contrast_adjustment.py +0 -11
  575. pygpgpu-0.2.2/examples/digital_image_processing/05_swap_channels.py +0 -10
  576. pygpgpu-0.2.2/examples/digital_image_processing/06_merge_images.py +0 -12
  577. pygpgpu-0.2.2/examples/digital_image_processing/07_gamma.py +0 -10
  578. pygpgpu-0.2.2/examples/digital_image_processing/__clcache__/pykernels/image_processing.cl +0 -45
  579. pygpgpu-0.2.2/examples/digital_image_processing/__cucache__/pykernels/image_processing.cu +0 -46
  580. pygpgpu-0.2.2/examples/digital_image_processing/__hipcache__/pykernels/__hipcache__/AMD Radeon(TM) 610M gfx1036/image_processing.hip_5f2fc99ee13d66d4837d4cafdf514803_clean.hip +0 -44
  581. pygpgpu-0.2.2/examples/digital_image_processing/__hipcache__/pykernels/image_processing.hip +0 -43
  582. pygpgpu-0.2.2/examples/digital_image_processing/image_processing.py +0 -154
  583. pygpgpu-0.2.2/examples/kernel_import/README.md +0 -45
  584. pygpgpu-0.2.2/examples/kernel_import/__hipcache__/AMD Radeon(TM) 610M gfx1036/vecops.hip_2cec05837e5f9def95fd37d804cdd3eb_clean.hip +0 -51
  585. pygpgpu-0.2.2/examples/kernel_import/__init__.py +0 -17
  586. pygpgpu-0.2.2/examples/kernel_import/vecops.cl +0 -58
  587. pygpgpu-0.2.2/examples/kernel_import/vecops.cu +0 -45
  588. pygpgpu-0.2.2/examples/kernel_import/vecops.hip +0 -47
  589. pygpgpu-0.2.2/examples/ray_tarcing_in_one_weekend/01_first_image.py +0 -26
  590. pygpgpu-0.2.2/examples/ray_tarcing_in_one_weekend/camera.py +0 -89
  591. pygpgpu-0.2.2/examples/ray_tarcing_in_one_weekend/hittable.py +0 -27
  592. pygpgpu-0.2.2/examples/ray_tarcing_in_one_weekend/interval.py +0 -31
  593. pygpgpu-0.2.2/examples/ray_tarcing_in_one_weekend/main.py +0 -16
  594. pygpgpu-0.2.2/examples/ray_tarcing_in_one_weekend/ray.py +0 -11
  595. pygpgpu-0.2.2/examples/ray_tarcing_in_one_weekend/scene.py +0 -41
  596. pygpgpu-0.2.2/examples/ray_tarcing_in_one_weekend/sphere.py +0 -44
  597. pygpgpu-0.2.2/examples/ray_tarcing_in_one_weekend/utils.py +0 -20
  598. pygpgpu-0.2.2/examples/vecadd.cl +0 -37
  599. pygpgpu-0.2.2/pygpgpu/__init__.py +0 -190
  600. pygpgpu-0.2.2/pygpgpu/constants.py +0 -107
  601. pygpgpu-0.2.2/pygpgpu/cparser/ShaderBuiltins.py +0 -16874
  602. pygpgpu-0.2.2/pygpgpu/cparser/__init__.py +0 -4
  603. pygpgpu-0.2.2/pygpgpu/cparser/cparser.py +0 -1200
  604. pygpgpu-0.2.2/pygpgpu/cparser/cpreprocessor.py +0 -135
  605. pygpgpu-0.2.2/pygpgpu/cparser/csyntaxtree.py +0 -88
  606. pygpgpu-0.2.2/pygpgpu/cparser/ctokens.py +0 -319
  607. pygpgpu-0.2.2/pygpgpu/cparser/minifyc.py +0 -311
  608. pygpgpu-0.2.2/pygpgpu/cparser/ts_parser.py +0 -813
  609. pygpgpu-0.2.2/pygpgpu/cuda/driver/cuda.py +0 -246
  610. pygpgpu-0.2.2/pygpgpu/cuda/driver/cuinfo.py +0 -892
  611. pygpgpu-0.2.2/pygpgpu/cuda/driver/cutypes.py +0 -611
  612. pygpgpu-0.2.2/pygpgpu/cuda/driver/nvrtc.py +0 -277
  613. pygpgpu-0.2.2/pygpgpu/cuda/driver/vec_types/char3.py +0 -15
  614. pygpgpu-0.2.2/pygpgpu/cuda/driver/vec_types/double3.py +0 -15
  615. pygpgpu-0.2.2/pygpgpu/cuda/driver/vec_types/float3.py +0 -15
  616. pygpgpu-0.2.2/pygpgpu/cuda/driver/vec_types/int3.py +0 -15
  617. pygpgpu-0.2.2/pygpgpu/cuda/driver/vec_types/long2.py +0 -14
  618. pygpgpu-0.2.2/pygpgpu/cuda/driver/vec_types/long3.py +0 -15
  619. pygpgpu-0.2.2/pygpgpu/cuda/driver/vec_types/long4.py +0 -16
  620. pygpgpu-0.2.2/pygpgpu/cuda/driver/vec_types/short3.py +0 -15
  621. pygpgpu-0.2.2/pygpgpu/cuda/driver/vec_types/uchar3.py +0 -15
  622. pygpgpu-0.2.2/pygpgpu/cuda/driver/vec_types/uint3.py +0 -15
  623. pygpgpu-0.2.2/pygpgpu/cuda/driver/vec_types/ulong2.py +0 -14
  624. pygpgpu-0.2.2/pygpgpu/cuda/driver/vec_types/ulong3.py +0 -15
  625. pygpgpu-0.2.2/pygpgpu/cuda/driver/vec_types/ulong4.py +0 -16
  626. pygpgpu-0.2.2/pygpgpu/cuda/driver/vec_types/ushort3.py +0 -15
  627. pygpgpu-0.2.2/pygpgpu/cuda/libraries/__init__.py +0 -117
  628. pygpgpu-0.2.2/pygpgpu/cuda/libraries/_base.py +0 -375
  629. pygpgpu-0.2.2/pygpgpu/cuda/libraries/cublas.py +0 -425
  630. pygpgpu-0.2.2/pygpgpu/cuda/libraries/cublaslt.py +0 -356
  631. pygpgpu-0.2.2/pygpgpu/cuda/libraries/cudart.py +0 -403
  632. pygpgpu-0.2.2/pygpgpu/cuda/libraries/cufft.py +0 -219
  633. pygpgpu-0.2.2/pygpgpu/cuda/libraries/cusolver.py +0 -373
  634. pygpgpu-0.2.2/pygpgpu/cuda/libraries/cusparse.py +0 -343
  635. pygpgpu-0.2.2/pygpgpu/cuda/libraries/wrappers.py +0 -818
  636. pygpgpu-0.2.2/pygpgpu/cuda/oop/array.py +0 -279
  637. pygpgpu-0.2.2/pygpgpu/cuda/oop/buffer.py +0 -85
  638. pygpgpu-0.2.2/pygpgpu/cuda/oop/context.py +0 -559
  639. pygpgpu-0.2.2/pygpgpu/cuda/oop/cuobject.py +0 -176
  640. pygpgpu-0.2.2/pygpgpu/cuda/oop/device.py +0 -88
  641. pygpgpu-0.2.2/pygpgpu/cuda/oop/devices.py +0 -92
  642. pygpgpu-0.2.2/pygpgpu/cuda/oop/event.py +0 -55
  643. pygpgpu-0.2.2/pygpgpu/cuda/oop/kernel.py +0 -774
  644. pygpgpu-0.2.2/pygpgpu/cuda/oop/mem_object.py +0 -151
  645. pygpgpu-0.2.2/pygpgpu/cuda/oop/nvrtc_program.py +0 -231
  646. pygpgpu-0.2.2/pygpgpu/cuda/oop/program.py +0 -135
  647. pygpgpu-0.2.2/pygpgpu/cuda/oop/program_info.py +0 -223
  648. pygpgpu-0.2.2/pygpgpu/cuda/oop/program_parser.py +0 -567
  649. pygpgpu-0.2.2/pygpgpu/cuda/oop/stream.py +0 -134
  650. pygpgpu-0.2.2/pygpgpu/cuda/oop/surface.py +0 -70
  651. pygpgpu-0.2.2/pygpgpu/cuda/oop/texture.py +0 -111
  652. pygpgpu-0.2.2/pygpgpu/hip/driver/hip.py +0 -264
  653. pygpgpu-0.2.2/pygpgpu/hip/driver/hipinfo.py +0 -185
  654. pygpgpu-0.2.2/pygpgpu/hip/oop/buffer.py +0 -85
  655. pygpgpu-0.2.2/pygpgpu/hip/oop/context.py +0 -212
  656. pygpgpu-0.2.2/pygpgpu/hip/oop/devices.py +0 -93
  657. pygpgpu-0.2.2/pygpgpu/hip/oop/hip_compiler.py +0 -238
  658. pygpgpu-0.2.2/pygpgpu/hip/oop/hipobject.py +0 -161
  659. pygpgpu-0.2.2/pygpgpu/hip/oop/kernel.py +0 -650
  660. pygpgpu-0.2.2/pygpgpu/hip/oop/mem_object.py +0 -148
  661. pygpgpu-0.2.2/pygpgpu/hip/oop/program.py +0 -142
  662. pygpgpu-0.2.2/pygpgpu/hip/oop/program_info.py +0 -200
  663. pygpgpu-0.2.2/pygpgpu/hip/oop/program_parser.py +0 -570
  664. pygpgpu-0.2.2/pygpgpu/hip/oop/stream.py +0 -131
  665. pygpgpu-0.2.2/pygpgpu/image.py +0 -562
  666. pygpgpu-0.2.2/pygpgpu/kernel/__init__.py +0 -23
  667. pygpgpu-0.2.2/pygpgpu/kernel/builtin_registry.py +0 -42
  668. pygpgpu-0.2.2/pygpgpu/kernel/builtins.py +0 -580
  669. pygpgpu-0.2.2/pygpgpu/kernel/decorator.py +0 -3263
  670. pygpgpu-0.2.2/pygpgpu/kernel/device_builtins.py +0 -547
  671. pygpgpu-0.2.2/pygpgpu/kernel/device_library.py +0 -216
  672. pygpgpu-0.2.2/pygpgpu/kernel/host_runtime.py +0 -130
  673. pygpgpu-0.2.2/pygpgpu/kernel/include/quat.h +0 -276
  674. pygpgpu-0.2.2/pygpgpu/kernel/metal_codegen.py +0 -113
  675. pygpgpu-0.2.2/pygpgpu/kernel/objects.py +0 -1576
  676. pygpgpu-0.2.2/pygpgpu/kernel/python_backend.py +0 -638
  677. pygpgpu-0.2.2/pygpgpu/kernel/quaternion.py +0 -210
  678. pygpgpu-0.2.2/pygpgpu/kernel/sci_math.py +0 -608
  679. pygpgpu-0.2.2/pygpgpu/kernel/source_paths.py +0 -640
  680. pygpgpu-0.2.2/pygpgpu/kernel/structs.py +0 -644
  681. pygpgpu-0.2.2/pygpgpu/kernel/translator.py +0 -8494
  682. pygpgpu-0.2.2/pygpgpu/kernel_import.py +0 -642
  683. pygpgpu-0.2.2/pygpgpu/kernel_import_stub.py +0 -172
  684. pygpgpu-0.2.2/pygpgpu/metal/__init__.py +0 -8
  685. pygpgpu-0.2.2/pygpgpu/metal/driver/__init__.py +0 -2
  686. pygpgpu-0.2.2/pygpgpu/metal/driver/metal.py +0 -193
  687. pygpgpu-0.2.2/pygpgpu/metal/driver/objc.py +0 -148
  688. pygpgpu-0.2.2/pygpgpu/metal/oop/__init__.py +0 -3
  689. pygpgpu-0.2.2/pygpgpu/metal/oop/buffer.py +0 -196
  690. pygpgpu-0.2.2/pygpgpu/metal/oop/context.py +0 -99
  691. pygpgpu-0.2.2/pygpgpu/metal/oop/devices.py +0 -145
  692. pygpgpu-0.2.2/pygpgpu/metal/oop/event.py +0 -44
  693. pygpgpu-0.2.2/pygpgpu/metal/oop/kernel.py +0 -308
  694. pygpgpu-0.2.2/pygpgpu/metal/oop/metalobject.py +0 -69
  695. pygpgpu-0.2.2/pygpgpu/metal/oop/program.py +0 -123
  696. pygpgpu-0.2.2/pygpgpu/metal/oop/program_info.py +0 -163
  697. pygpgpu-0.2.2/pygpgpu/metal/oop/program_parser.py +0 -199
  698. pygpgpu-0.2.2/pygpgpu/numpy/__init__.py +0 -9
  699. pygpgpu-0.2.2/pygpgpu/numpy/array_creation.py +0 -83
  700. pygpgpu-0.2.2/pygpgpu/numpy/ndarray.py +0 -282
  701. pygpgpu-0.2.2/pygpgpu/opencl/driver/cl.py +0 -250
  702. pygpgpu-0.2.2/pygpgpu/opencl/driver/clinfo.py +0 -1913
  703. pygpgpu-0.2.2/pygpgpu/opencl/driver/cltypes.py +0 -964
  704. pygpgpu-0.2.2/pygpgpu/opencl/driver/vec_types/__init__.py +0 -29
  705. pygpgpu-0.2.2/pygpgpu/opencl/driver/vec_types/char3.py +0 -16
  706. pygpgpu-0.2.2/pygpgpu/opencl/driver/vec_types/double3.py +0 -16
  707. pygpgpu-0.2.2/pygpgpu/opencl/driver/vec_types/float3.py +0 -16
  708. pygpgpu-0.2.2/pygpgpu/opencl/driver/vec_types/int3.py +0 -16
  709. pygpgpu-0.2.2/pygpgpu/opencl/driver/vec_types/long16.py +0 -28
  710. pygpgpu-0.2.2/pygpgpu/opencl/driver/vec_types/long16.pyi +0 -192
  711. pygpgpu-0.2.2/pygpgpu/opencl/driver/vec_types/long2.py +0 -14
  712. pygpgpu-0.2.2/pygpgpu/opencl/driver/vec_types/long3.py +0 -16
  713. pygpgpu-0.2.2/pygpgpu/opencl/driver/vec_types/long4.py +0 -16
  714. pygpgpu-0.2.2/pygpgpu/opencl/driver/vec_types/long8.py +0 -20
  715. pygpgpu-0.2.2/pygpgpu/opencl/driver/vec_types/long8.pyi +0 -108
  716. pygpgpu-0.2.2/pygpgpu/opencl/driver/vec_types/short3.py +0 -16
  717. pygpgpu-0.2.2/pygpgpu/opencl/driver/vec_types/uchar3.py +0 -16
  718. pygpgpu-0.2.2/pygpgpu/opencl/driver/vec_types/uint3.py +0 -16
  719. pygpgpu-0.2.2/pygpgpu/opencl/driver/vec_types/ulong16.py +0 -28
  720. pygpgpu-0.2.2/pygpgpu/opencl/driver/vec_types/ulong16.pyi +0 -192
  721. pygpgpu-0.2.2/pygpgpu/opencl/driver/vec_types/ulong2.py +0 -14
  722. pygpgpu-0.2.2/pygpgpu/opencl/driver/vec_types/ulong3.py +0 -16
  723. pygpgpu-0.2.2/pygpgpu/opencl/driver/vec_types/ulong4.py +0 -16
  724. pygpgpu-0.2.2/pygpgpu/opencl/driver/vec_types/ulong8.py +0 -20
  725. pygpgpu-0.2.2/pygpgpu/opencl/driver/vec_types/ulong8.pyi +0 -108
  726. pygpgpu-0.2.2/pygpgpu/opencl/driver/vec_types/ushort3.py +0 -16
  727. pygpgpu-0.2.2/pygpgpu/opencl/oop/buffer.py +0 -143
  728. pygpgpu-0.2.2/pygpgpu/opencl/oop/clobject.py +0 -176
  729. pygpgpu-0.2.2/pygpgpu/opencl/oop/command_queue.py +0 -85
  730. pygpgpu-0.2.2/pygpgpu/opencl/oop/context.py +0 -463
  731. pygpgpu-0.2.2/pygpgpu/opencl/oop/device.py +0 -63
  732. pygpgpu-0.2.2/pygpgpu/opencl/oop/event.py +0 -215
  733. pygpgpu-0.2.2/pygpgpu/opencl/oop/kernel.py +0 -759
  734. pygpgpu-0.2.2/pygpgpu/opencl/oop/mem_object.py +0 -147
  735. pygpgpu-0.2.2/pygpgpu/opencl/oop/platform.py +0 -157
  736. pygpgpu-0.2.2/pygpgpu/opencl/oop/platforms.py +0 -92
  737. pygpgpu-0.2.2/pygpgpu/opencl/oop/program.py +0 -369
  738. pygpgpu-0.2.2/pygpgpu/opencl/oop/program_info.py +0 -222
  739. pygpgpu-0.2.2/pygpgpu/opencl/oop/program_parser.py +0 -592
  740. pygpgpu-0.2.2/pygpgpu/opencl/oop/sampler.py +0 -83
  741. pygpgpu-0.2.2/pygpgpu/opencl/oop/struct_layout.py +0 -122
  742. pygpgpu-0.2.2/pygpgpu/utils.py +0 -538
  743. pygpgpu-0.2.2/pygpgpu/vec_types/__init__.py +0 -66
  744. pygpgpu-0.2.2/pygpgpu/vec_types/char16.py +0 -28
  745. pygpgpu-0.2.2/pygpgpu/vec_types/char16.pyi +0 -192
  746. pygpgpu-0.2.2/pygpgpu/vec_types/char2.py +0 -14
  747. pygpgpu-0.2.2/pygpgpu/vec_types/char2.pyi +0 -320
  748. pygpgpu-0.2.2/pygpgpu/vec_types/char4.py +0 -16
  749. pygpgpu-0.2.2/pygpgpu/vec_types/char4.pyi +0 -3652
  750. pygpgpu-0.2.2/pygpgpu/vec_types/char8.py +0 -20
  751. pygpgpu-0.2.2/pygpgpu/vec_types/char8.pyi +0 -108
  752. pygpgpu-0.2.2/pygpgpu/vec_types/double16.py +0 -28
  753. pygpgpu-0.2.2/pygpgpu/vec_types/double16.pyi +0 -192
  754. pygpgpu-0.2.2/pygpgpu/vec_types/double8.py +0 -20
  755. pygpgpu-0.2.2/pygpgpu/vec_types/double8.pyi +0 -108
  756. pygpgpu-0.2.2/pygpgpu/vec_types/float16.py +0 -28
  757. pygpgpu-0.2.2/pygpgpu/vec_types/float16.pyi +0 -192
  758. pygpgpu-0.2.2/pygpgpu/vec_types/float8.py +0 -20
  759. pygpgpu-0.2.2/pygpgpu/vec_types/float8.pyi +0 -108
  760. pygpgpu-0.2.2/pygpgpu/vec_types/funcs.py +0 -229
  761. pygpgpu-0.2.2/pygpgpu/vec_types/genVec.py +0 -387
  762. pygpgpu-0.2.2/pygpgpu/vec_types/genVec16.py +0 -18
  763. pygpgpu-0.2.2/pygpgpu/vec_types/genVec16.pyi.in +0 -13
  764. pygpgpu-0.2.2/pygpgpu/vec_types/genVec2.py +0 -13
  765. pygpgpu-0.2.2/pygpgpu/vec_types/genVec2.pyi.in +0 -15
  766. pygpgpu-0.2.2/pygpgpu/vec_types/genVec3.py +0 -13
  767. pygpgpu-0.2.2/pygpgpu/vec_types/genVec3.pyi.in +0 -16
  768. pygpgpu-0.2.2/pygpgpu/vec_types/genVec4.py +0 -13
  769. pygpgpu-0.2.2/pygpgpu/vec_types/genVec4.pyi.in +0 -17
  770. pygpgpu-0.2.2/pygpgpu/vec_types/genVec8.py +0 -14
  771. pygpgpu-0.2.2/pygpgpu/vec_types/genVec8.pyi.in +0 -13
  772. pygpgpu-0.2.2/pygpgpu/vec_types/helper.py +0 -167
  773. pygpgpu-0.2.2/pygpgpu/vec_types/int16.py +0 -28
  774. pygpgpu-0.2.2/pygpgpu/vec_types/int16.pyi +0 -192
  775. pygpgpu-0.2.2/pygpgpu/vec_types/int8.py +0 -20
  776. pygpgpu-0.2.2/pygpgpu/vec_types/int8.pyi +0 -108
  777. pygpgpu-0.2.2/pygpgpu/vec_types/layout.py +0 -481
  778. pygpgpu-0.2.2/pygpgpu/vec_types/short16.py +0 -28
  779. pygpgpu-0.2.2/pygpgpu/vec_types/short16.pyi +0 -192
  780. pygpgpu-0.2.2/pygpgpu/vec_types/short2.py +0 -14
  781. pygpgpu-0.2.2/pygpgpu/vec_types/short2.pyi +0 -320
  782. pygpgpu-0.2.2/pygpgpu/vec_types/short4.py +0 -16
  783. pygpgpu-0.2.2/pygpgpu/vec_types/short4.pyi +0 -3652
  784. pygpgpu-0.2.2/pygpgpu/vec_types/short8.py +0 -20
  785. pygpgpu-0.2.2/pygpgpu/vec_types/short8.pyi +0 -108
  786. pygpgpu-0.2.2/pygpgpu/vec_types/uchar16.py +0 -28
  787. pygpgpu-0.2.2/pygpgpu/vec_types/uchar16.pyi +0 -192
  788. pygpgpu-0.2.2/pygpgpu/vec_types/uchar2.py +0 -14
  789. pygpgpu-0.2.2/pygpgpu/vec_types/uchar2.pyi +0 -320
  790. pygpgpu-0.2.2/pygpgpu/vec_types/uchar4.py +0 -16
  791. pygpgpu-0.2.2/pygpgpu/vec_types/uchar4.pyi +0 -3652
  792. pygpgpu-0.2.2/pygpgpu/vec_types/uchar8.py +0 -20
  793. pygpgpu-0.2.2/pygpgpu/vec_types/uchar8.pyi +0 -108
  794. pygpgpu-0.2.2/pygpgpu/vec_types/uint16.py +0 -28
  795. pygpgpu-0.2.2/pygpgpu/vec_types/uint16.pyi +0 -192
  796. pygpgpu-0.2.2/pygpgpu/vec_types/uint8.py +0 -20
  797. pygpgpu-0.2.2/pygpgpu/vec_types/uint8.pyi +0 -108
  798. pygpgpu-0.2.2/pygpgpu/vec_types/ushort16.py +0 -28
  799. pygpgpu-0.2.2/pygpgpu/vec_types/ushort16.pyi +0 -192
  800. pygpgpu-0.2.2/pygpgpu/vec_types/ushort2.py +0 -14
  801. pygpgpu-0.2.2/pygpgpu/vec_types/ushort2.pyi +0 -320
  802. pygpgpu-0.2.2/pygpgpu/vec_types/ushort4.py +0 -16
  803. pygpgpu-0.2.2/pygpgpu/vec_types/ushort4.pyi +0 -3652
  804. pygpgpu-0.2.2/pygpgpu/vec_types/ushort8.py +0 -20
  805. pygpgpu-0.2.2/pygpgpu/vec_types/ushort8.pyi +0 -108
  806. pygpgpu-0.2.2/pygpgpu.egg-info/PKG-INFO +0 -1000
  807. pygpgpu-0.2.2/pygpgpu.egg-info/SOURCES.txt +0 -436
  808. pygpgpu-0.2.2/pygpgpu.egg-info/requires.txt +0 -12
  809. pygpgpu-0.2.2/pyproject.toml +0 -214
  810. pygpgpu-0.2.2/tests/test_builtins.py +0 -282
  811. pygpgpu-0.2.2/tests/test_cuda_libraries.py +0 -672
  812. pygpgpu-0.2.2/tests/test_driver_background_init.py +0 -127
  813. pygpgpu-0.2.2/tests/test_kernel_argument_errors.py +0 -338
  814. pygpgpu-0.2.2/tests/test_kernel_atomic_augassign.py +0 -242
  815. pygpgpu-0.2.2/tests/test_kernel_copy_policy.py +0 -81
  816. pygpgpu-0.2.2/tests/test_kernel_ctypes_structures.py +0 -332
  817. pygpgpu-0.2.2/tests/test_kernel_generated_source_cache.py +0 -165
  818. pygpgpu-0.2.2/tests/test_kernel_host_regions.py +0 -110
  819. pygpgpu-0.2.2/tests/test_kernel_local_memory.py +0 -306
  820. pygpgpu-0.2.2/tests/test_kernel_narrow_arguments.py +0 -78
  821. pygpgpu-0.2.2/tests/test_kernel_ndindex_forms.py +0 -141
  822. pygpgpu-0.2.2/tests/test_kernel_nested_launch.py +0 -275
  823. pygpgpu-0.2.2/tests/test_kernel_object_arguments.py +0 -529
  824. pygpgpu-0.2.2/tests/test_kernel_outer_scope.py +0 -366
  825. pygpgpu-0.2.2/tests/test_kernel_rank_mismatch.py +0 -125
  826. pygpgpu-0.2.2/tests/test_kernel_returns.py +0 -389
  827. pygpgpu-0.2.2/tests/test_kernel_serial_loop_above_dispatch.py +0 -68
  828. pygpgpu-0.2.2/tests/test_kernel_struct_types.py +0 -276
  829. pygpgpu-0.2.2/tests/test_kernel_typing.py +0 -204
  830. pygpgpu-0.2.2/tests/test_kernel_vector_layout.py +0 -307
  831. pygpgpu-0.2.2/tests/test_metal_codegen.py +0 -427
  832. pygpgpu-0.2.2/tests/test_metal_launch_path.py +0 -302
  833. pygpgpu-0.2.2/tests/test_sci_math_hip.py +0 -205
  834. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/LICENSE +0 -0
  835. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cparser/generate_code.py +0 -0
  836. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cparser/pcpp/__init__.py +0 -0
  837. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cparser/pcpp/evaluator.py +0 -0
  838. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cparser/pcpp/lextab.py +0 -0
  839. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cparser/pcpp/parser.py +0 -0
  840. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cparser/pcpp/parsetab.py +0 -0
  841. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cparser/pcpp/pcmd.py +0 -0
  842. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cparser/pcpp/ply/__init__.py +0 -0
  843. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cparser/pcpp/ply/cpp.py +0 -0
  844. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cparser/pcpp/ply/ctokens.py +0 -0
  845. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cparser/pcpp/ply/lex.py +0 -0
  846. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cparser/pcpp/ply/yacc.py +0 -0
  847. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cparser/pcpp/ply/ygen.py +0 -0
  848. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cparser/pcpp/preprocessor.py +0 -0
  849. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cuda/__init__.py +0 -0
  850. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cuda/driver/__init__.py +0 -0
  851. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cuda/driver/cuda.pyi +0 -0
  852. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cuda/driver/cudaSurfaceObject_t.py +0 -0
  853. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cuda/driver/cudaTextureObject_t.py +0 -0
  854. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cuda/driver/image_shape.py +0 -0
  855. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cuda/driver/nvrtc.pyi +0 -0
  856. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cuda/driver/nvrtcinfo.py +0 -0
  857. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cuda/driver/nvrtctypes.py +0 -0
  858. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cuda/driver/vec_types/__init__.py +0 -0
  859. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cuda/driver/vec_types/char3.pyi +0 -0
  860. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cuda/driver/vec_types/double3.pyi +0 -0
  861. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cuda/driver/vec_types/float3.pyi +0 -0
  862. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cuda/driver/vec_types/int3.pyi +0 -0
  863. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cuda/driver/vec_types/long2.pyi +0 -0
  864. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cuda/driver/vec_types/long3.pyi +0 -0
  865. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cuda/driver/vec_types/long4.pyi +0 -0
  866. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cuda/driver/vec_types/short3.pyi +0 -0
  867. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cuda/driver/vec_types/uchar3.pyi +0 -0
  868. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cuda/driver/vec_types/uint3.pyi +0 -0
  869. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cuda/driver/vec_types/ulong2.pyi +0 -0
  870. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cuda/driver/vec_types/ulong3.pyi +0 -0
  871. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cuda/driver/vec_types/ulong4.pyi +0 -0
  872. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cuda/driver/vec_types/ushort3.pyi +0 -0
  873. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cuda/oop/__init__.py +0 -0
  874. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cuda/oop/build_options.py +0 -0
  875. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/cuda/oop/device.pyi +0 -0
  876. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/exceptions.py +0 -0
  877. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/hip/__init__.py +0 -0
  878. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/hip/driver/__init__.py +0 -0
  879. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/hip/driver/hiptypes.py +0 -0
  880. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/hip/oop/__init__.py +0 -0
  881. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/hip/oop/build_options.py +0 -0
  882. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/hip/oop/device.py +0 -0
  883. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/hip/oop/event.py +0 -0
  884. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/__init__.py +0 -0
  885. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/driver/__init__.py +0 -0
  886. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/driver/cl.pyi +0 -0
  887. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/driver/image_types/__init__.py +0 -0
  888. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/driver/image_types/image1d_array_t.py +0 -0
  889. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/driver/image_types/image1d_t.py +0 -0
  890. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/driver/image_types/image2d_array_t.py +0 -0
  891. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/driver/image_types/image2d_t.py +0 -0
  892. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/driver/image_types/image3d_t.py +0 -0
  893. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/driver/image_types/imagend_t.py +0 -0
  894. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/driver/image_types/sampler_t.py +0 -0
  895. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/driver/vec_types/char3.pyi +0 -0
  896. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/driver/vec_types/double3.pyi +0 -0
  897. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/driver/vec_types/float3.pyi +0 -0
  898. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/driver/vec_types/int3.pyi +0 -0
  899. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/driver/vec_types/long2.pyi +0 -0
  900. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/driver/vec_types/long3.pyi +0 -0
  901. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/driver/vec_types/long4.pyi +0 -0
  902. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/driver/vec_types/short3.pyi +0 -0
  903. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/driver/vec_types/uchar3.pyi +0 -0
  904. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/driver/vec_types/uint3.pyi +0 -0
  905. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/driver/vec_types/ulong2.pyi +0 -0
  906. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/driver/vec_types/ulong3.pyi +0 -0
  907. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/driver/vec_types/ulong4.pyi +0 -0
  908. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/driver/vec_types/ushort3.pyi +0 -0
  909. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/oop/__init__.py +0 -0
  910. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/oop/build_options.py +0 -0
  911. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/oop/command_queue.pyi +0 -0
  912. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/oop/context.pyi +0 -0
  913. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/oop/device.pyi +0 -0
  914. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/oop/event.pyi +0 -0
  915. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/oop/image1d.py +0 -0
  916. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/oop/image1d_array.py +0 -0
  917. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/oop/image2d.py +0 -0
  918. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/oop/image2d_array.py +0 -0
  919. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/oop/image3d.py +0 -0
  920. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/oop/imagend.py +0 -0
  921. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/oop/kernel.pyi +0 -0
  922. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/oop/mem_object.pyi +0 -0
  923. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/oop/pipe.py +0 -0
  924. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/oop/platform.pyi +0 -0
  925. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/oop/program.pyi +0 -0
  926. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/oop/sampler.pyi +0 -0
  927. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/opencl/oop/svm_buffer.py +0 -0
  928. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu/py.typed +0 -0
  929. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu.egg-info/dependency_links.txt +0 -0
  930. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/pygpgpu.egg-info/top_level.txt +0 -0
  931. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/setup.cfg +0 -0
  932. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_device_library.py +0 -0
  933. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_aliases_and_ranks.py +0 -0
  934. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_atomics.py +0 -0
  935. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_body_arrays.py +0 -0
  936. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_boolean_ops.py +0 -0
  937. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_carried_scalar.py +0 -0
  938. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_clip_where.py +0 -0
  939. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_comparison_builtins.py +0 -0
  940. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_creation.py +0 -0
  941. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_creation_functions.py +0 -0
  942. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_ctypes_unions_and_enums.py +0 -0
  943. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_declared_domain.py +0 -0
  944. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_generated_layout.py +0 -0
  945. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_generated_spacing.py +0 -0
  946. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_global_array.py +0 -0
  947. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_histogram.py +0 -0
  948. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_host_region_names.py +0 -0
  949. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_host_write_roundtrip.py +0 -0
  950. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_import.py +0 -0
  951. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_inplace_and_containment.py +0 -0
  952. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_magic_methods.py +0 -0
  953. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_math_builtins.py +0 -0
  954. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_method_calls.py +0 -0
  955. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_narrow_types.py +0 -0
  956. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_partial_write.py +0 -0
  957. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_quaternion.py +0 -0
  958. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_scalar_calls.py +0 -0
  959. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_shared_scalar.py +0 -0
  960. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_struct_name_hints.py +0 -0
  961. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_structure_construction.py +0 -0
  962. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_tail_region.py +0 -0
  963. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_translation_switch.py +0 -0
  964. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_vector3.py +0 -0
  965. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_kernel_vector_arguments.py +0 -0
  966. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_sci_math.py +0 -0
  967. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_vector_array_construction.py +0 -0
  968. {pygpgpu-0.2.2 → pygpgpu-0.2.4}/tests/test_work_size_bracket.py +0 -0
@@ -0,0 +1,11 @@
1
+ # Source distribution contents beyond the package itself.
2
+ #
3
+ # examples/ is deliberately NOT included: the sdist ships the installable package
4
+ # only (the wheel installs just the pygpgpu package either way). The numbered
5
+ # scripts remain the project's end-to-end smoke tests and stay in the repository.
6
+ include README.md
7
+ include README.zh-CN.md
8
+ include LICENSE
9
+
10
+ # doc/ is deliberately not included: it holds vendor reference PDFs for the CUDA
11
+ # driver API and NVRTC guides, not project documentation.
pygpgpu-0.2.4/PKG-INFO ADDED
@@ -0,0 +1,465 @@
1
+ Metadata-Version: 2.4
2
+ Name: pygpgpu
3
+ Version: 0.2.4
4
+ Summary: Run Python functions as GPU kernels with the @kernel decorator (OpenCL / CUDA / HIP / Metal)
5
+ Author-email: "王炳辉 (Bing-Hui WANG)" <binghui.wang@foxmail.com>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2026 王炳辉 (Bing-Hui WANG)
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Homepage, https://github.com/Time-Coder/PyGPGPU
29
+ Keywords: gpu,opencl,cuda,hip,rocm,metal,kernel,jit
30
+ Classifier: Development Status :: 3 - Alpha
31
+ Classifier: Intended Audience :: Developers
32
+ Classifier: Intended Audience :: Science/Research
33
+ Classifier: License :: OSI Approved :: MIT License
34
+ Classifier: Operating System :: Microsoft :: Windows
35
+ Classifier: Operating System :: POSIX :: Linux
36
+ Classifier: Programming Language :: Python :: 3
37
+ Classifier: Programming Language :: Python :: 3.7
38
+ Classifier: Programming Language :: Python :: 3.8
39
+ Classifier: Programming Language :: Python :: 3.9
40
+ Classifier: Programming Language :: Python :: 3.10
41
+ Classifier: Programming Language :: Python :: 3.11
42
+ Classifier: Programming Language :: Python :: 3.12
43
+ Classifier: Programming Language :: Python :: 3.13
44
+ Classifier: Programming Language :: Python :: 3.14
45
+ Classifier: Topic :: Scientific/Engineering
46
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
47
+ Classifier: Typing :: Typed
48
+ Requires-Python: >=3.7
49
+ Description-Content-Type: text/markdown
50
+ License-File: LICENSE
51
+ Requires-Dist: numpy>=1.21
52
+ Requires-Dist: imageio>=2.30
53
+ Requires-Dist: tree-sitter>=0.20.0
54
+ Requires-Dist: tree-sitter-opencl>=0.0.4
55
+ Requires-Dist: tree-sitter-cuda37>=0.21.4
56
+ Requires-Dist: tree-sitter-metal>=0.1.1
57
+ Requires-Dist: pygf>=0.6.0
58
+ Requires-Dist: typing_extensions>=4.4.0
59
+ Provides-Extra: dev
60
+ Requires-Dist: pytest>=8; extra == "dev"
61
+ Requires-Dist: ruff>=0.9; extra == "dev"
62
+ Requires-Dist: ty>=0.0.60; extra == "dev"
63
+ Requires-Dist: PySide6; extra == "dev"
64
+ Requires-Dist: scikit-image; extra == "dev"
65
+ Dynamic: license-file
66
+
67
+ <div align="center">
68
+
69
+ <img src="https://raw.githubusercontent.com/Time-Coder/PyGPGPU/main/docs/logo/pygpgpu_256.png" alt="PyGPGPU logo" width="200"/>
70
+
71
+ # PyGPGPU
72
+
73
+ **English** | [Chinese](README.zh-CN.md)
74
+
75
+ </div>
76
+
77
+ Decorate a Python function with `@kernel` and it runs on the GPU — one codebase, four backends (**OpenCL / CUDA / HIP / Metal**), plus a serial interpreter backend for the CPU.
78
+
79
+ ```python
80
+ import numpy as np
81
+ from pygpgpu import kernel
82
+
83
+ @kernel
84
+ def saxpy(x: np.ndarray, y: np.ndarray, alpha: float) -> np.ndarray:
85
+ out = np.zeros_like(x)
86
+ for i in range(out.shape[0]):
87
+ out[i] = x[i] * alpha + y[i]
88
+
89
+ return out
90
+
91
+ x = np.arange(1_000_000, dtype=np.float32)
92
+
93
+ out = saxpy(x, x, 2.0) # no backend given: probe in DEFAULT_BACKEND_ORDER (Metal first on macOS)
94
+ out = saxpy["cuda:0"](x, x, 2.0) # the bracket switches backend per call
95
+ out = saxpy["hip:0"](x, x, 2.0) # backend:device
96
+ out = saxpy["opencl:0"](x, x, 2.0)
97
+ out = saxpy["python"](x, x, 2.0) # the same function, serially in the interpreter
98
+ ```
99
+
100
+ No GPU code to write, no memory copies to manage, no work sizes to compute — call it like an ordinary function and the top-level `for` loop is parallelized on the GPU. The first call translates, compiles and caches; every later call is free.
101
+
102
+ A whole Mandelbrot renderer in plain Python ([examples/fractal/Mandelbrot.py](examples/fractal/Mandelbrot.py)): the helpers are ordinary functions, the palette returns a `float3` vector, `@kernel(float=np.float64)` runs it in double precision, and the image is the return value:
103
+
104
+ ![Mandelbrot set rendered on the GPU by examples/fractal/Mandelbrot.py](https://raw.githubusercontent.com/Time-Coder/PyGPGPU/main/docs/Mandelbrot.jpg)
105
+
106
+ ```python
107
+ import numpy as np
108
+ from numpy.typing import NDArray
109
+ from pygpgpu import kernel, float3
110
+ import imageio.v3 as iio
111
+ import math
112
+
113
+
114
+ def escape_steps(c: complex, max_iter: int) -> int:
115
+ zn = 0j
116
+ abs_zn = abs(zn)
117
+ n: int = 0
118
+ while abs_zn <= 2 and n < max_iter:
119
+ zn = zn**2 + c
120
+ abs_zn = abs(zn)
121
+ n += 1
122
+
123
+ return n
124
+
125
+ def palette(x: float)->float3:
126
+ return float3(
127
+ math.exp( - 60 * abs(x-3/4)**3.2 ),
128
+ math.exp( - 60 * abs(x-2/4)**3.2 ),
129
+ math.exp( - 60 * abs(x-1/4)**3.2 )
130
+ )
131
+
132
+ image_width, image_height = 600, 400
133
+ default_pixels_per_value = 150
134
+ max_iter = 890
135
+
136
+ @kernel(float=np.float64)
137
+ def draw_MandelbrotSet(view_center: complex, scale: float) -> NDArray[np.uint8]:
138
+ image = np.zeros((image_height, image_width, 3), dtype=np.uint8)
139
+ value_per_pixel = 1 / (scale * default_pixels_per_value)
140
+ left_top_complex = complex(
141
+ view_center.real - 0.5*value_per_pixel*image.shape[1],
142
+ view_center.imag + 0.5*value_per_pixel*image.shape[0]
143
+ )
144
+ for i, j in np.ndindex(image.shape[0], image.shape[1]):
145
+ c = complex(
146
+ left_top_complex.real + j*value_per_pixel,
147
+ left_top_complex.imag - i*value_per_pixel
148
+ )
149
+ steps = escape_steps(c, max_iter)
150
+ color = palette(steps/max_iter)
151
+ image[i, j, 0] = 255 * color.r
152
+ image[i, j, 1] = 255 * color.g
153
+ image[i, j, 2] = 255 * color.b
154
+
155
+ return image
156
+
157
+ image = draw_MandelbrotSet(-0.74364 + 0.13183j, 8000)
158
+ iio.imwrite("Mandelbrot.jpg", image)
159
+ ```
160
+
161
+ Already have handwritten kernels? PyGPGPU can also `import` `.cl`/`.cu`/`.hip`/`.metal` files like Python modules, then call the kernels inside them like ordinary Python functions.
162
+
163
+ ## Installation
164
+
165
+ ```bash
166
+ pip install pygpgpu
167
+ ```
168
+
169
+ Python >= 3.7. Bring your own GPU runtime — any one of them is enough:
170
+
171
+ | Backend | What you need | Notes |
172
+ |---|---|---|
173
+ | OpenCL | GPU driver (usually already installed) | Nothing extra; works across NVIDIA/AMD/Intel |
174
+ | CUDA | NVIDIA driver (includes NVRTC) | The CUDA Toolkit is not required |
175
+ | HIP | AMD HIP SDK | Compiles through the SDK's clang; point `PYGPGPU_HIP_INCLUDES` at extra include dirs if needed |
176
+ | Metal | macOS on a real Apple GPU | Compiles through the framework's own runtime; a Mac VM has no Metal device |
177
+ | Python | nothing | Selected explicitly with `k["python"]`, never probed |
178
+
179
+ Without an explicit backend, `@kernel` probes **cuda -> hip -> metal -> opencl** and takes the first that enumerates a device — except on **macOS**, where **metal** leads (`metal -> cuda -> hip -> opencl`): Apple machines ship no CUDA or HIP runtime, and macOS's OpenCL is deprecated, so the native backend is what a Mac should find first.
180
+
181
+ Each backend reads its sources with a tree-sitter grammar, installed automatically as a dependency: `tree-sitter-opencl`, `tree-sitter-cuda37`, and [tree-sitter-metal](https://github.com/Time-Coder/tree-sitter-metal) (our own distribution — no MSL grammar was published on PyPI). All of them are built against the tree-sitter ABI that CPython 3.7 can load, so one install works from 3.7 through the current release.
182
+
183
+ ## Basic usage
184
+
185
+ **One decorator for every kind of function.** `@kernel` decorates plain functions, instance methods and static methods; `self.xxx` attributes the body reads become kernel arguments automatically:
186
+
187
+ ```python
188
+ class Layer:
189
+ def __init__(self, weights, bias):
190
+ self.weights = weights # arrays and scalars both work
191
+ self.bias = bias
192
+
193
+ @kernel
194
+ def apply(self, x: np.ndarray) -> np.ndarray:
195
+ out = np.zeros_like(x) # built on the host, above the loop
196
+ for i in range(out.shape[0]): # the loop bound IS the work size
197
+ out[i] = x[i] * self.weights[i] + self.bias
198
+ return out
199
+
200
+ @staticmethod
201
+ @kernel
202
+ def double(x: np.ndarray) -> np.ndarray:
203
+ out = np.zeros_like(x)
204
+ for i in range(out.shape[0]):
205
+ out[i] = x[i] * 2.0
206
+ return out
207
+
208
+ @classmethod
209
+ @kernel
210
+ def scaled(cls, x: np.ndarray) -> np.ndarray:
211
+ out = np.zeros_like(x)
212
+ for i in range(out.shape[0]): # a cls member can be the loop extent
213
+ out[i] = x[i] * cls.factor
214
+ return out
215
+
216
+ x = np.ones(4, dtype=np.float32)
217
+ layer = Layer(np.arange(4, dtype=np.float32), 0.5)
218
+
219
+ layer.apply(x) # -> array([0.5, 1.5, 2.5, 3.5])
220
+ layer.apply["cuda"](x) # brackets work on methods too
221
+ Layer.double(x) # -> array([2., 2., 2., 2.])
222
+ Layer.factor = 3.0
223
+ Layer.scaled(x) # cls IS the receiver: class members are the arguments
224
+ ```
225
+
226
+ Type annotations are optional (they serve editors and type checkers, not translation): the device types come from the actual arguments at call time, and the kernel is specialized per type signature.
227
+
228
+ **A classmethod kernel takes the class as the receiver.** `@kernel` decorates `@classmethod` too, in either order — `cls` is the receiver, so `cls.<attr>` reads (scalars, arrays, even a loop extent) and `cls.<helper>(...)` device calls work exactly as `self.<attr>` does on an instance method. Both `@kernel @classmethod` and `@classmethod @kernel` bind the same way: the call is `Layer.scaled(x)`, `cls.version = 9` rebinds the class attribute and reaches the caller after the launch (an alias holding the class sees it), and `submit()`/`async_call()` settle it the same way.
229
+
230
+ **Output arrays are return values.** A kernel creates its result with numpy and `return`s it — the shape and dtype come from numpy itself, and the caller receives an ordinary ndarray; there is no `out` parameter to pre-allocate. An object created above the magic loop is built once on the host and shared by every work item; one created inside the loop is device-private per work item. Either can be returned, every `return` statement may have its own shape, and the first work item to return wins.
231
+
232
+ **Kernel parameters accept plain Python objects.** An object's members become kernel arguments — scalars, arrays, even nested objects (each level is read at call time):
233
+
234
+ ```python
235
+ class Params:
236
+ def __init__(self, a, b):
237
+ self.a = a
238
+ self.b = b
239
+
240
+ @kernel
241
+ def scale(p, x: np.ndarray) -> np.ndarray:
242
+ out = np.zeros_like(x)
243
+ for i in range(out.shape[0]):
244
+ out[i] = x[i] * p.a + p.b
245
+ return out
246
+
247
+ scale(Params(2.0, 10.0), x) # -> x * 2.0 + 10.0
248
+ ```
249
+
250
+ **Kernels can call methods and helpers.** A helper is plain Python — no decorator, no annotations: it is translated into a device function and specialized at the call site, recursively for helpers that call helpers. Besides a module-level function called by its bare name, a kernel can call another method of its own class (`self.other_method`), a static method of any class, a method of an object passed as an argument, and a function reached through a module:
251
+
252
+ ```python
253
+ def clamp01(v): # module-level helper
254
+ return min(max(v, 0.0), 1.0)
255
+
256
+ class Scene:
257
+ def hit(self, v): # a method of an argument object
258
+ return v * v
259
+
260
+ @kernel
261
+ def shade(x: np.ndarray, scene: Scene) -> np.ndarray:
262
+ out = np.zeros_like(x)
263
+ for i in range(out.shape[0]):
264
+ out[i] = clamp01(scene.hit(x[i]))
265
+ return out
266
+ ```
267
+
268
+ **A kernel needs an iteration domain** for the work size to be derived from. Either use a magic loop (`for i in range(x.shape[0])`, whose bound is the domain; `np.ndindex`/`np.ndenumerate` for 2-D/3-D) or, when dispatching on `get_global_id`, name the array: `@kernel(domain="x")`. Without either the call raises instead of guessing.
269
+
270
+ **One bracket syntax** names the backend, the device and the work size — the same on every backend, in any order:
271
+
272
+ ```python
273
+ k(args) # fully automatic
274
+ k["cuda"](args) # backend (opencl/cuda/hip/metal/python; aliases ocl/cu/rocm/amd/mtl/py)
275
+ k["opencl:gfx1036"](args) # backend:device
276
+ k[(4, 256)](args) # work size: (blocks per grid, threads per block)
277
+ k["cuda"][(4, 256)](args) # combined; None means automatic
278
+ ```
279
+
280
+ The work size is CUDA's `(blocks_per_grid, threads_per_block)` everywhere — OpenCL and Metal included. A block count never has to divide anything: the total is blocks * threads by construction.
281
+
282
+ **Every backend in one process.** Each backend/device pair is specialized and cached separately, so alternating between them is an extra dictionary lookup, not a recompile — one process can mix vendors, and `k["python"]` is always available as the interpreter fallback.
283
+
284
+ **Process-wide settings** live on one object, `pygpgpu.config` — there is no `set_...()` to look up:
285
+
286
+ ```python
287
+ import pygpgpu
288
+
289
+ pygpgpu.config.print_info = False # progress logging
290
+ pygpgpu.config.type_map = {float: np.float64} # the width a python float travels as
291
+ pygpgpu.config.default_device = ["cuda:0", "hip:0"] # what a plain k(...) tries, in order
292
+ ```
293
+
294
+ Every commonly used name is importable from the top level — `kernel`, `funcs`, vector types (`float4`, ...), device builtins (`get_global_id`, `atomic_add`, `barrier`, ...), `list_devices`/`get_device`, `config`, `kernel_import` — so an editor completes `pygpgpu.` and finds them.
295
+
296
+ ## Importing handwritten kernels
297
+
298
+ `kernel_import` is the import hook that turns existing kernel files into Python modules: kernels and struct types become module attributes, and a `.pyi` stub is generated beside the source so IDE completion works. Write `vecadd.cl`:
299
+
300
+ ```c
301
+ __kernel void vecadd(__global const float* a, __global const float* b,
302
+ __global float* out, const int n)
303
+ {
304
+ int i = get_global_id(0);
305
+ if (i >= n) return; // the launch size may be rounded up, so clamp
306
+ out[i] = a[i] + b[i];
307
+ }
308
+ ```
309
+
310
+ ```python
311
+ from pygpgpu import kernel_import
312
+
313
+ kernel_import.install()
314
+ import vecadd # one .cl file = one module
315
+
316
+ out = np.empty_like(a)
317
+ vecadd.vecadd(a, a, out, np.int32(len(a))) # work size inferred
318
+ vecadd.vecadd["opencl"][(3907, 256)](a, a, out, np.int32(len(a))) # backend + work size
319
+ ```
320
+
321
+ A struct `typedef` in the source becomes a ctypes type (a `Pt` above would pass by value, or as an array of structures). Same-named `.cl`/`.cu`/`.hip` files in one package merge into a single module: the same parameter list is one kernel with one implementation per backend (the bracket picks it), different parameter lists become overloads chosen by the argument types, and a bracket naming a backend without an implementation raises `KeyError` at the bracket. ([06](examples/06_handwritten_kernels.py) imports one file; [15](examples/15_kernel_import.py) merges three.)
322
+
323
+ ## Features
324
+
325
+ - **One decorator for every function** — plain functions, instance methods, static methods and classmethods all take `@kernel`; the `self.xxx`/`cls.xxx` attributes the body reads become kernel arguments automatically, with the class as the receiver for a classmethod. ([01](examples/01_basic_kernel.py), [03](examples/03_nd_loop_and_class_method.py))
326
+ - **Return values** — the result array is created in the body with numpy and `return`ed; the caller receives an ordinary ndarray. Scalars, vectors, structures and arrays all return, every `return` may have its own shape, and the first work item to return wins. ([11_returns_and_scope.py](examples/11_returns_and_scope.py))
327
+ - **Python objects as arguments** — pass a plain object and its members (scalars, arrays, nested objects) become kernel arguments, read at call time. ([14](examples/14_heterogeneous_data.py))
328
+ - **Python objects inside the kernel** — read nested members and call methods of an argument object (`scene.hit(x)`); together with `self.method(...)`, static methods of any class and module-level functions, the call spellings are exactly ordinary Python's. ([03](examples/03_nd_loop_and_class_method.py), [14](examples/14_heterogeneous_data.py))
329
+ - **Objects created inside the kernel** — `np.zeros`/`np.zeros_like` written above the magic loop are built once on the host and shared by every work item; written below the loop they are device-private per work item. Both can be `return`ed. ([14](examples/14_heterogeneous_data.py))
330
+ - **Helpers** — a helper called from a kernel needs no decorator and no annotations; it is specialized at the call site, recursively for helpers that call helpers. ([03](examples/03_nd_loop_and_class_method.py))
331
+ - **Recursive device functions** — a helper or method that calls itself is compiled into a loop automatically, on every backend: the tail call, a result the caller consumes (`r = f(...)` with statements after it, or `return g(f(...))` with the recursive call at any argument position), and structure arguments the walk replaces per level (the bounce ray of a ray tracer). A shape the loop cannot order — a wrapper reading a value that differs per level, or two self-calls in one expression — is refused with its reason; CUDA and HIP answer those shapes through native recursion. ([ray tracing](examples/ray_tarcing_in_one_weekend/render.py))
332
+ - **Outer-scope variables** — variables the body reads from outside become kernel parameters, so a changed value is visible on the next call; a scalar declared `nonlocal`/`global` is written back to its scope after the call. ([11_returns_and_scope.py](examples/11_returns_and_scope.py))
333
+ - **Non-blocking launches** — `submit()` (a `concurrent.futures.Future`) and `await k.async_call(...)` (an `asyncio.Future`) on the same decorated function; the brackets apply here too. ([10](examples/10_async_launch.py))
334
+
335
+ ## How it compares
336
+
337
+ The same computation in this library and three other GPU-from-Python projects ([Taichi](https://www.taichi-lang.org/), [Numba](https://numba.pydata.org/), [NVIDIA Warp](https://github.com/NVIDIA/warp)). The API gap is widest around the ways you write things: helpers stay ordinary Python, arguments can be plain Python objects, instance/static methods decorate directly, and output arrays are return values.
338
+
339
+ **PyGPGPU** — arrays in, an array returned; no launch geometry, no buffer management, and helpers need no decorator at all:
340
+
341
+ ```python
342
+ from pygpgpu import kernel
343
+
344
+ def clamp01(v): # plain Python: no decorator, no annotations
345
+ return min(max(v, 0.0), 1.0)
346
+
347
+ def weight(v): # helpers may call other helpers
348
+ return clamp01(v * v) * 0.5 + 0.25
349
+
350
+ @kernel
351
+ def apply_all(x: np.ndarray) -> np.ndarray:
352
+ out = np.zeros_like(x) # output arrays are return values
353
+ for i in range(out.shape[0]): # loop bound = work size
354
+ out[i] = weight(x[i])
355
+ return out
356
+
357
+ out = apply_all(x) # numpy arrays as-is
358
+ out = apply_all["hip"](x) # the same function, another backend
359
+ ```
360
+
361
+ **Taichi** — declare fields first, then copy data in and out by hand; a helper needs `@ti.func` and every argument must be annotated:
362
+
363
+ ```python
364
+ import taichi as ti
365
+ ti.init(arch=ti.gpu)
366
+
367
+ x = ti.field(ti.f32, n)
368
+ y = ti.field(ti.f32, n)
369
+ out = ti.field(ti.f32, n)
370
+ x.from_numpy(nx)
371
+ y.from_numpy(ny)
372
+
373
+ @ti.func # helpers need their own decorator
374
+ def weight(v: ti.f32) -> ti.f32:
375
+ return ti.max(0.0, ti.min(1.0, v * v)) * 0.5 + 0.25
376
+
377
+ @ti.kernel
378
+ def saxpy(a: ti.f32):
379
+ for i in range(n):
380
+ out[i] = x[i] * a + y[i] + weight(x[i])
381
+
382
+ saxpy(2.0)
383
+ res = out.to_numpy()
384
+ ```
385
+
386
+ **Numba** — compute blocks/threads yourself, guard inside, manage device memory; callable helpers are compiled separately with `@cuda.jit(device=True)`:
387
+
388
+ ```python
389
+ from numba import cuda
390
+
391
+ @cuda.jit(device=True) # helpers need device=True
392
+ def weight(v):
393
+ return min(1.0, max(0.0, v * v)) * 0.5 + 0.25
394
+
395
+ @cuda.jit
396
+ def saxpy(x, y, out, a):
397
+ i = cuda.grid(1)
398
+ if i < out.size: # bounds guard is your job
399
+ out[i] = x[i] * a + y[i] + weight(x[i])
400
+
401
+ d_x = cuda.to_device(nx)
402
+ d_y = cuda.to_device(ny)
403
+ d_out = cuda.device_array_like(nx)
404
+ threads = 256
405
+ saxpy[(n + threads - 1) // threads, threads](d_x, d_y, d_out, 2.0)
406
+ res = d_out.copy_to_host()
407
+ ```
408
+
409
+ **Warp** — typed array parameters, the launch size is passed explicitly, and helpers need `@wp.func`:
410
+
411
+ ```python
412
+ import warp as wp
413
+ wp.init()
414
+
415
+ @wp.func # helpers need their own decorator
416
+ def weight(v: float) -> float:
417
+ return wp.min(1.0, wp.max(0.0, v * v)) * 0.5 + 0.25
418
+
419
+ @wp.kernel
420
+ def saxpy(x: wp.array(dtype=float), y: wp.array(dtype=float),
421
+ out: wp.array(dtype=float), a: float):
422
+ i = wp.tid()
423
+ out[i] = x[i] * a + y[i] + weight(x[i])
424
+
425
+ wp.launch(saxpy, dim=n, inputs=[x, y, out, 2.0])
426
+ ```
427
+
428
+ | | PyGPGPU | Taichi | Numba | Warp |
429
+ |---|---|---|---|---|
430
+ | Input data | numpy arrays directly | wrap in `ti.field`, explicit copies | `cuda.to_device` + `copy_to_host` | wrap in `wp.array` |
431
+ | Result | **the kernel returns an ndarray** | `out.to_numpy()` by hand | `copy_to_host()` by hand | written into a `wp.array` you manage |
432
+ | Helper functions | **plain Python — no decorator, annotations optional** | `@ti.func` + annotated args | `@cuda.jit(device=True)` | `@wp.func` + annotated args |
433
+ | Python objects as arguments | **yes — members become kernel arguments** | no (arrays must be wrapped in `ti.field`) | no (scalars and device arrays only) | no (needs `wp.array`) |
434
+ | Accessing Python objects in a kernel | **yes — read nested members, call their methods** | no | no | no |
435
+ | Instance methods | **yes — `self.xxx` becomes arguments automatically** | instance methods in a `@ti.data_oriented` class | no | no |
436
+ | Static methods | **yes** | no (only those instance methods) | no | no |
437
+ | Backends in one process | **all, mixed freely via brackets** | one, fixed by `ti.init` | CUDA only | CUDA only |
438
+ | Backends | OpenCL, CUDA, HIP, Metal | CPU, CUDA, Vulkan, ... | CPU, CUDA | CPU, CUDA |
439
+ | Copy optimization | **uploads/read-backs skipped per argument** | no | no | no |
440
+
441
+ Where the others are ahead, worth knowing before you pick: automatic differentiation (Taichi, Warp), sparse data structures (Taichi), and throughput-oriented CPU execution — the `python` backend here is serial and meant for testing. This table was written from each project's documentation; their APIs move fast, so confirm against current docs before relying on a cell.
442
+
443
+ ## More documentation
444
+
445
+ The numbered scripts in [examples/](examples/) are standalone end-to-end tours; [examples/README.md](examples/README.md) lists them all with each one's dependencies:
446
+
447
+ | Topic | Examples |
448
+ |---|---|
449
+ | `@kernel` basics, brackets, device selection | [01](examples/01_basic_kernel.py), [02](examples/02_backend_device_selection.py) |
450
+ | 2-D/3-D magic loops, class methods, helpers by name | [03](examples/03_nd_loop_and_class_method.py) |
451
+ | Every kind of kernel value: arguments, built objects, returns | [14](examples/14_heterogeneous_data.py) |
452
+ | Vector types and the dual-sided `funcs` | [04](examples/04_vector_types.py) |
453
+ | Device-resident `gnp` arrays, zero copy, atomics | [05](examples/05_gnp_zero_copy_and_atomics.py), [19](examples/19_device_resident_arrays.py) |
454
+ | Handwritten kernels: one file; a multi-backend module | [06](examples/06_handwritten_kernels.py), [15](examples/15_kernel_import.py) |
455
+ | Low-level OOP API | [07](examples/07_low_level_oop.py) |
456
+ | Comparing backends on one machine | [08](examples/08_compare_backends.py) |
457
+ | Atomics and shared-memory reduction | [09](examples/09_reduction.py) |
458
+ | Async launches; the pure-Python backend; returns and scope | [10](examples/10_async_launch.py), [11](examples/11_python_backend.py), [11_returns_and_scope.py](examples/11_returns_and_scope.py) |
459
+ | `print()` in a kernel; images | [12](examples/12_print_in_kernel.py), [13](examples/13_image.py) |
460
+ | Scientific math and `device_function` | [16](examples/16_scientific_math.py) |
461
+ | The Metal backend | [17](examples/17_metal_backend.py), [18](examples/18_metal_device_check.py) |
462
+
463
+ ## License
464
+
465
+ MIT