nvmath-python 1.0.0__cp314-cp314t-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.
Files changed (332) hide show
  1. nvmath/__init__.pxd +0 -0
  2. nvmath/__init__.py +45 -0
  3. nvmath/_internal/__init__.py +0 -0
  4. nvmath/_internal/attribute_ifc_factory.py +330 -0
  5. nvmath/_internal/layout.py +70 -0
  6. nvmath/_internal/templates.py +130 -0
  7. nvmath/_internal/threadsafe.py +106 -0
  8. nvmath/_internal/utils.py +43 -0
  9. nvmath/_internal/workspace.py +490 -0
  10. nvmath/_utils.py +147 -0
  11. nvmath/bindings/__init__.py +60 -0
  12. nvmath/bindings/_internal/__init__.pxd +0 -0
  13. nvmath/bindings/_internal/__init__.py +0 -0
  14. nvmath/bindings/_internal/common_types.pxd +31 -0
  15. nvmath/bindings/_internal/cublas.cp314t-win_amd64.pyd +0 -0
  16. nvmath/bindings/_internal/cublas.pxd +530 -0
  17. nvmath/bindings/_internal/cublasLt.cp314t-win_amd64.pyd +0 -0
  18. nvmath/bindings/_internal/cublasLt.pxd +59 -0
  19. nvmath/bindings/_internal/cublasMp.pxd +52 -0
  20. nvmath/bindings/_internal/cudss.cp314t-win_amd64.pyd +0 -0
  21. nvmath/bindings/_internal/cudss.pxd +54 -0
  22. nvmath/bindings/_internal/cufft.cp314t-win_amd64.pyd +0 -0
  23. nvmath/bindings/_internal/cufft.pxd +70 -0
  24. nvmath/bindings/_internal/cufftMp.pxd +77 -0
  25. nvmath/bindings/_internal/curand.cp314t-win_amd64.pyd +0 -0
  26. nvmath/bindings/_internal/curand.pxd +42 -0
  27. nvmath/bindings/_internal/cusolver.cp314t-win_amd64.pyd +0 -0
  28. nvmath/bindings/_internal/cusolver.pxd +15 -0
  29. nvmath/bindings/_internal/cusolverDn.cp314t-win_amd64.pyd +0 -0
  30. nvmath/bindings/_internal/cusolverDn.pxd +406 -0
  31. nvmath/bindings/_internal/cusolverMp.pxd +71 -0
  32. nvmath/bindings/_internal/cusolverSp.cp314t-win_amd64.pyd +0 -0
  33. nvmath/bindings/_internal/cusolverSp.pxd +75 -0
  34. nvmath/bindings/_internal/cusparse.cp314t-win_amd64.pyd +0 -0
  35. nvmath/bindings/_internal/cusparse.pxd +471 -0
  36. nvmath/bindings/_internal/cusparseLt.cp314t-win_amd64.pyd +0 -0
  37. nvmath/bindings/_internal/cusparseLt.pxd +48 -0
  38. nvmath/bindings/_internal/cutensor.cp314t-win_amd64.pyd +0 -0
  39. nvmath/bindings/_internal/cutensor.pxd +58 -0
  40. nvmath/bindings/_internal/mathdx.cp314t-win_amd64.pyd +0 -0
  41. nvmath/bindings/_internal/mathdx.pxd +116 -0
  42. nvmath/bindings/_internal/nvshmem.pxd +29 -0
  43. nvmath/bindings/_internal/utils.cp314t-win_amd64.pyd +0 -0
  44. nvmath/bindings/_internal/utils.pxd +174 -0
  45. nvmath/bindings/_internal/utils.pyi +10 -0
  46. nvmath/bindings/cublas.cp314t-win_amd64.pyd +0 -0
  47. nvmath/bindings/cublas.pxd +558 -0
  48. nvmath/bindings/cublas.pyi +812 -0
  49. nvmath/bindings/cublasLt.cp314t-win_amd64.pyd +0 -0
  50. nvmath/bindings/cublasLt.pxd +109 -0
  51. nvmath/bindings/cublasLt.pyi +1461 -0
  52. nvmath/bindings/cublasMp.pxd +85 -0
  53. nvmath/bindings/cublasMp.pyi +267 -0
  54. nvmath/bindings/cudss.cp314t-win_amd64.pyd +0 -0
  55. nvmath/bindings/cudss.pxd +98 -0
  56. nvmath/bindings/cudss.pyi +443 -0
  57. nvmath/bindings/cufft.cp314t-win_amd64.pyd +0 -0
  58. nvmath/bindings/cufft.pxd +118 -0
  59. nvmath/bindings/cufft.pyi +301 -0
  60. nvmath/bindings/cufftMp.pxd +124 -0
  61. nvmath/bindings/cufftMp.pyi +326 -0
  62. nvmath/bindings/curand.cp314t-win_amd64.pyd +0 -0
  63. nvmath/bindings/curand.pxd +71 -0
  64. nvmath/bindings/curand.pyi +189 -0
  65. nvmath/bindings/cusolver.cp314t-win_amd64.pyd +0 -0
  66. nvmath/bindings/cusolver.pxd +62 -0
  67. nvmath/bindings/cusolver.pyi +320 -0
  68. nvmath/bindings/cusolverDn.cp314t-win_amd64.pyd +0 -0
  69. nvmath/bindings/cusolverDn.pxd +430 -0
  70. nvmath/bindings/cusolverDn.pyi +422 -0
  71. nvmath/bindings/cusolverMp.pxd +98 -0
  72. nvmath/bindings/cusolverMp.pyi +114 -0
  73. nvmath/bindings/cusolverSp.cp314t-win_amd64.pyd +0 -0
  74. nvmath/bindings/cusolverSp.pxd +95 -0
  75. nvmath/bindings/cusolverSp.pyi +70 -0
  76. nvmath/bindings/cusparse.cp314t-win_amd64.pyd +0 -0
  77. nvmath/bindings/cusparse.pxd +546 -0
  78. nvmath/bindings/cusparse.pyi +1017 -0
  79. nvmath/bindings/cusparseLt.cp314t-win_amd64.pyd +0 -0
  80. nvmath/bindings/cusparseLt.pxd +99 -0
  81. nvmath/bindings/cusparseLt.pyi +252 -0
  82. nvmath/bindings/cutensor.cp314t-win_amd64.pyd +0 -0
  83. nvmath/bindings/cutensor.pxd +98 -0
  84. nvmath/bindings/cutensor.pyi +324 -0
  85. nvmath/bindings/cycublas.cp314t-win_amd64.pyd +0 -0
  86. nvmath/bindings/cycublas.pxd +664 -0
  87. nvmath/bindings/cycublasLt.cp314t-win_amd64.pyd +0 -0
  88. nvmath/bindings/cycublasLt.pxd +1045 -0
  89. nvmath/bindings/cycublasMp.pxd +171 -0
  90. nvmath/bindings/cycudss.cp314t-win_amd64.pyd +0 -0
  91. nvmath/bindings/cycudss.pxd +277 -0
  92. nvmath/bindings/cycufft.cp314t-win_amd64.pyd +0 -0
  93. nvmath/bindings/cycufft.pxd +333 -0
  94. nvmath/bindings/cycufftMp.pxd +342 -0
  95. nvmath/bindings/cycurand.cp314t-win_amd64.pyd +0 -0
  96. nvmath/bindings/cycurand.pxd +141 -0
  97. nvmath/bindings/cycusolver.cp314t-win_amd64.pyd +0 -0
  98. nvmath/bindings/cycusolver.pxd +137 -0
  99. nvmath/bindings/cycusolverDn.cp314t-win_amd64.pyd +0 -0
  100. nvmath/bindings/cycusolverDn.pxd +443 -0
  101. nvmath/bindings/cycusolverMp.pxd +107 -0
  102. nvmath/bindings/cycusolverSp.cp314t-win_amd64.pyd +0 -0
  103. nvmath/bindings/cycusolverSp.pxd +93 -0
  104. nvmath/bindings/cycusparse.cp314t-win_amd64.pyd +0 -0
  105. nvmath/bindings/cycusparse.pxd +679 -0
  106. nvmath/bindings/cycusparseLt.cp314t-win_amd64.pyd +0 -0
  107. nvmath/bindings/cycusparseLt.pxd +135 -0
  108. nvmath/bindings/cycutensor.cp314t-win_amd64.pyd +0 -0
  109. nvmath/bindings/cycutensor.pxd +189 -0
  110. nvmath/bindings/cymathdx.cp314t-win_amd64.pyd +0 -0
  111. nvmath/bindings/cymathdx.pxd +552 -0
  112. nvmath/bindings/cynvshmem.pxd +118 -0
  113. nvmath/bindings/mathdx.cp314t-win_amd64.pyd +0 -0
  114. nvmath/bindings/mathdx.pxd +182 -0
  115. nvmath/bindings/mathdx.pyi +1562 -0
  116. nvmath/bindings/nvpl/__init__.pxd +0 -0
  117. nvmath/bindings/nvpl/__init__.py +13 -0
  118. nvmath/bindings/nvpl/_internal/__init__.pxd +0 -0
  119. nvmath/bindings/nvpl/_internal/__init__.py +0 -0
  120. nvmath/bindings/nvpl/_internal/blas.cp314t-win_amd64.pyd +0 -0
  121. nvmath/bindings/nvpl/_internal/blas.pxd +237 -0
  122. nvmath/bindings/nvpl/_internal/fft.cp314t-win_amd64.pyd +0 -0
  123. nvmath/bindings/nvpl/_internal/fft.pxd +36 -0
  124. nvmath/bindings/nvpl/blas.cp314t-win_amd64.pyd +0 -0
  125. nvmath/bindings/nvpl/blas.pxd +131 -0
  126. nvmath/bindings/nvpl/blas.pyi +168 -0
  127. nvmath/bindings/nvpl/cyblas.cp314t-win_amd64.pyd +0 -0
  128. nvmath/bindings/nvpl/cyblas.pxd +280 -0
  129. nvmath/bindings/nvpl/cyfft.cp314t-win_amd64.pyd +0 -0
  130. nvmath/bindings/nvpl/cyfft.pxd +93 -0
  131. nvmath/bindings/nvpl/fft.cp314t-win_amd64.pyd +0 -0
  132. nvmath/bindings/nvpl/fft.pxd +100 -0
  133. nvmath/bindings/nvpl/fft.pyi +168 -0
  134. nvmath/bindings/nvshmem.pxd +54 -0
  135. nvmath/bindings/nvshmem.pyi +191 -0
  136. nvmath/device/__init__.py +38 -0
  137. nvmath/device/_deprecated.py +33 -0
  138. nvmath/device/common.py +315 -0
  139. nvmath/device/common_backend.py +131 -0
  140. nvmath/device/common_cuda.py +201 -0
  141. nvmath/device/common_numba.py +300 -0
  142. nvmath/device/common_numba_cuda_mlir.py +202 -0
  143. nvmath/device/common_opaque_tensor.py +201 -0
  144. nvmath/device/cublasdx.py +1606 -0
  145. nvmath/device/cublasdx_backend.py +860 -0
  146. nvmath/device/cublasdx_numba.py +1534 -0
  147. nvmath/device/cublasdx_numba_cuda_mlir.py +208 -0
  148. nvmath/device/cufftdx.py +373 -0
  149. nvmath/device/cufftdx_backend.py +220 -0
  150. nvmath/device/cufftdx_numba.py +140 -0
  151. nvmath/device/cufftdx_numba_cuda_mlir.py +79 -0
  152. nvmath/device/curand_kernel.py +9147 -0
  153. nvmath/device/cusolverdx.py +2708 -0
  154. nvmath/device/cusolverdx_backend.py +440 -0
  155. nvmath/device/cusolverdx_numba.py +567 -0
  156. nvmath/device/cusolverdx_numba_cuda_mlir.py +604 -0
  157. nvmath/device/cusolverdx_overload_backend.py +1029 -0
  158. nvmath/device/llvm_array.py +29 -0
  159. nvmath/device/random.py +441 -0
  160. nvmath/device/random_helpers.py +23 -0
  161. nvmath/device/random_states.py +187 -0
  162. nvmath/device/types.py +138 -0
  163. nvmath/device/vector_types_numba.py +259 -0
  164. nvmath/distributed/__init__.py +200 -0
  165. nvmath/distributed/_internal/__init__.py +0 -0
  166. nvmath/distributed/_internal/nccl.py +86 -0
  167. nvmath/distributed/_internal/nvshmem.py +307 -0
  168. nvmath/distributed/_internal/symmetric_memory.py +35 -0
  169. nvmath/distributed/_internal/tensor_ifc.py +70 -0
  170. nvmath/distributed/_internal/tensor_ifc_cupy.py +68 -0
  171. nvmath/distributed/_internal/tensor_ifc_host_device.py +172 -0
  172. nvmath/distributed/_internal/tensor_ifc_numpy.py +46 -0
  173. nvmath/distributed/_internal/tensor_ifc_torch.py +162 -0
  174. nvmath/distributed/_internal/tensor_wrapper.py +81 -0
  175. nvmath/distributed/_utils.py +167 -0
  176. nvmath/distributed/distribution/__init__.py +30 -0
  177. nvmath/distributed/distribution/_configuration.py +39 -0
  178. nvmath/distributed/distribution/distributions.py +1024 -0
  179. nvmath/distributed/distribution/redistribute.py +1284 -0
  180. nvmath/distributed/fft/__init__.py +7 -0
  181. nvmath/distributed/fft/_configuration.py +82 -0
  182. nvmath/distributed/fft/fft.py +2742 -0
  183. nvmath/distributed/linalg/__init__.py +22 -0
  184. nvmath/distributed/linalg/_internal/__init__.py +3 -0
  185. nvmath/distributed/linalg/_internal/epilog_protocol.py +586 -0
  186. nvmath/distributed/linalg/_internal/matmul_desc_ifc.py +28 -0
  187. nvmath/distributed/linalg/advanced/__init__.py +8 -0
  188. nvmath/distributed/linalg/advanced/_configuration.py +171 -0
  189. nvmath/distributed/linalg/advanced/matmulmod.py +3573 -0
  190. nvmath/distributed/linalg/generic/__init__.py +8 -0
  191. nvmath/distributed/linalg/generic/_caching.py +66 -0
  192. nvmath/distributed/linalg/generic/_configuration.py +61 -0
  193. nvmath/distributed/linalg/generic/_factorization.py +172 -0
  194. nvmath/distributed/linalg/generic/_initialization.py +966 -0
  195. nvmath/distributed/linalg/generic/_problem_spec.py +511 -0
  196. nvmath/distributed/linalg/generic/solvermod.py +1368 -0
  197. nvmath/distributed/process_group.py +408 -0
  198. nvmath/fft/__init__.py +7 -0
  199. nvmath/fft/_configuration.py +189 -0
  200. nvmath/fft/_exec_utils.py +82 -0
  201. nvmath/fft/_helpers.py +237 -0
  202. nvmath/fft/fft.py +3122 -0
  203. nvmath/internal/__init__.pxd +3 -0
  204. nvmath/internal/__init__.py +10 -0
  205. nvmath/internal/_bindings.cp314t-win_amd64.pyd +0 -0
  206. nvmath/internal/_bindings.pxd +18 -0
  207. nvmath/internal/_device_utils.py +45 -0
  208. nvmath/internal/_layout/__init__.pxd +3 -0
  209. nvmath/internal/_layout/__init__.py +7 -0
  210. nvmath/internal/_layout/_layout.cp314t-win_amd64.pyd +0 -0
  211. nvmath/internal/_layout/_layout.pxd +1303 -0
  212. nvmath/internal/_layout/_layout.pyi +1145 -0
  213. nvmath/internal/enum_utils.py +142 -0
  214. nvmath/internal/formatters.py +87 -0
  215. nvmath/internal/mem_limit.py +51 -0
  216. nvmath/internal/memory.cp314t-win_amd64.pyd +0 -0
  217. nvmath/internal/memory.pxd +13 -0
  218. nvmath/internal/memory.pyi +50 -0
  219. nvmath/internal/ndbuffer/__init__.pxd +3 -0
  220. nvmath/internal/ndbuffer/__init__.py +9 -0
  221. nvmath/internal/ndbuffer/_copy_kernel.cp314t-win_amd64.pyd +0 -0
  222. nvmath/internal/ndbuffer/_copy_kernel.pxd +10 -0
  223. nvmath/internal/ndbuffer/_jit.cp314t-win_amd64.pyd +0 -0
  224. nvmath/internal/ndbuffer/_jit.pxd +7 -0
  225. nvmath/internal/ndbuffer/_ndbuffer.cp314t-win_amd64.pyd +0 -0
  226. nvmath/internal/ndbuffer/_ndbuffer.pxd +40 -0
  227. nvmath/internal/ndbuffer/_ndbuffer.pyi +463 -0
  228. nvmath/internal/ndbuffer/copy_kernel/args.h +34 -0
  229. nvmath/internal/ndbuffer/copy_kernel/copy_kernel_impl/array_view.h +52 -0
  230. nvmath/internal/ndbuffer/copy_kernel/copy_kernel_impl/elementwise.h +68 -0
  231. nvmath/internal/ndbuffer/copy_kernel/copy_kernel_impl/grid_indexer.h +69 -0
  232. nvmath/internal/ndbuffer/copy_kernel/copy_kernel_impl/transposed.h +242 -0
  233. nvmath/internal/ndbuffer/copy_kernel/copy_kernel_impl/type_utils.h +39 -0
  234. nvmath/internal/ndbuffer/copy_kernel/copy_kernel_impl/utils.h +132 -0
  235. nvmath/internal/ndbuffer/copy_kernel/copy_kernel_impl/vec.h +159 -0
  236. nvmath/internal/ndbuffer/copy_kernel/elementwise.h +53 -0
  237. nvmath/internal/ndbuffer/copy_kernel/transposed.h +58 -0
  238. nvmath/internal/package_ifc.py +168 -0
  239. nvmath/internal/package_ifc_cuda.py +57 -0
  240. nvmath/internal/package_ifc_cupy.py +67 -0
  241. nvmath/internal/package_ifc_torch.py +69 -0
  242. nvmath/internal/package_wrapper.py +14 -0
  243. nvmath/internal/tensor_ifc.py +179 -0
  244. nvmath/internal/tensor_ifc_cupy.py +234 -0
  245. nvmath/internal/tensor_ifc_ndbuffer.py +147 -0
  246. nvmath/internal/tensor_ifc_numpy.py +184 -0
  247. nvmath/internal/tensor_ifc_torch.py +178 -0
  248. nvmath/internal/tensor_wrapper.py +160 -0
  249. nvmath/internal/typemaps.py +113 -0
  250. nvmath/internal/utils.py +805 -0
  251. nvmath/linalg/__init__.py +56 -0
  252. nvmath/linalg/_internal/__init__.py +3 -0
  253. nvmath/linalg/_internal/algo_cap_ifc.py +82 -0
  254. nvmath/linalg/_internal/algo_config_ifc.py +43 -0
  255. nvmath/linalg/_internal/batch.py +234 -0
  256. nvmath/linalg/_internal/enum_to_tuples.py +64 -0
  257. nvmath/linalg/_internal/epilog_protocol.py +766 -0
  258. nvmath/linalg/_internal/layout.py +624 -0
  259. nvmath/linalg/_internal/matmul_desc_ifc.py +28 -0
  260. nvmath/linalg/_internal/matmul_pref_ifc.py +27 -0
  261. nvmath/linalg/_internal/matrix_layout_ifc.py +26 -0
  262. nvmath/linalg/_internal/solver_utils.py +432 -0
  263. nvmath/linalg/_internal/typemaps.py +144 -0
  264. nvmath/linalg/_internal/utils.py +157 -0
  265. nvmath/linalg/advanced/__init__.py +8 -0
  266. nvmath/linalg/advanced/_algorithmmod.py +170 -0
  267. nvmath/linalg/advanced/_configuration.py +351 -0
  268. nvmath/linalg/advanced/helpers/__init__.py +5 -0
  269. nvmath/linalg/advanced/helpers/matmul.py +1316 -0
  270. nvmath/linalg/advanced/matmulmod.py +3734 -0
  271. nvmath/linalg/generic/__init__.py +53 -0
  272. nvmath/linalg/generic/_configuration/__init__.py +39 -0
  273. nvmath/linalg/generic/_configuration/layout.py +263 -0
  274. nvmath/linalg/generic/_configuration/match.py +734 -0
  275. nvmath/linalg/generic/_configuration/qualifiers.py +493 -0
  276. nvmath/linalg/generic/_configuration/solver_configuration.py +59 -0
  277. nvmath/linalg/generic/_configuration/wrap.py +217 -0
  278. nvmath/linalg/generic/_dtype.py +15 -0
  279. nvmath/linalg/generic/matmulmod.py +2094 -0
  280. nvmath/linalg/generic/solvermod.py +1301 -0
  281. nvmath/memory.py +279 -0
  282. nvmath/sparse/__init__.py +38 -0
  283. nvmath/sparse/_internal/__init__.py +21 -0
  284. nvmath/sparse/_internal/common_utils.py +147 -0
  285. nvmath/sparse/_internal/cudss_config_ifc.py +702 -0
  286. nvmath/sparse/_internal/cudss_data_ifc.py +399 -0
  287. nvmath/sparse/_internal/cudss_utils.py +506 -0
  288. nvmath/sparse/_internal/cusparse_utils.py +382 -0
  289. nvmath/sparse/_internal/sparse_bsc_ifc.py +303 -0
  290. nvmath/sparse/_internal/sparse_bsr_ifc.py +305 -0
  291. nvmath/sparse/_internal/sparse_coo_ifc.py +256 -0
  292. nvmath/sparse/_internal/sparse_csc_ifc.py +268 -0
  293. nvmath/sparse/_internal/sparse_csr_ifc.py +288 -0
  294. nvmath/sparse/_internal/sparse_dia_ifc.py +242 -0
  295. nvmath/sparse/_internal/sparse_format_helpers.py +601 -0
  296. nvmath/sparse/_internal/sparse_tensor_ifc.py +133 -0
  297. nvmath/sparse/_internal/sparse_ust_ifc.py +141 -0
  298. nvmath/sparse/_internal/utils.py +56 -0
  299. nvmath/sparse/advanced/__init__.py +7 -0
  300. nvmath/sparse/advanced/_configuration.py +227 -0
  301. nvmath/sparse/advanced/direct_solver.py +2069 -0
  302. nvmath/sparse/generic/__init__.py +7 -0
  303. nvmath/sparse/generic/_configuration.py +129 -0
  304. nvmath/sparse/generic/_helpers.py +137 -0
  305. nvmath/sparse/generic/_thunks.py +21 -0
  306. nvmath/sparse/generic/matmulmod.py +2353 -0
  307. nvmath/sparse/ust/__init__.py +7 -0
  308. nvmath/sparse/ust/_converters.py +422 -0
  309. nvmath/sparse/ust/_cpp.py +28 -0
  310. nvmath/sparse/ust/_drawer.py +565 -0
  311. nvmath/sparse/ust/_emitter.py +1033 -0
  312. nvmath/sparse/ust/_jit.py +188 -0
  313. nvmath/sparse/ust/_kernel.py +282 -0
  314. nvmath/sparse/ust/_utils.py +149 -0
  315. nvmath/sparse/ust/interfaces/__init__.py +0 -0
  316. nvmath/sparse/ust/interfaces/torch_interface.py +476 -0
  317. nvmath/sparse/ust/tensor.py +1016 -0
  318. nvmath/sparse/ust/tensor_format.py +957 -0
  319. nvmath/tensor/__init__.py +6 -0
  320. nvmath/tensor/_configuration.py +120 -0
  321. nvmath/tensor/_internal/__init__.py +3 -0
  322. nvmath/tensor/_internal/cutensor_config_ifc.py +279 -0
  323. nvmath/tensor/_internal/cutensor_utils.py +230 -0
  324. nvmath/tensor/_internal/data.py +43 -0
  325. nvmath/tensor/_internal/einsum_parser.py +444 -0
  326. nvmath/tensor/_internal/typemaps.py +96 -0
  327. nvmath/tensor/contract.py +1900 -0
  328. nvmath_python-1.0.0.dist-info/METADATA +134 -0
  329. nvmath_python-1.0.0.dist-info/RECORD +332 -0
  330. nvmath_python-1.0.0.dist-info/WHEEL +5 -0
  331. nvmath_python-1.0.0.dist-info/licenses/LICENSE +177 -0
  332. nvmath_python-1.0.0.dist-info/top_level.txt +2 -0
@@ -0,0 +1,135 @@
1
+ # Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED.
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+ #
5
+ # This code was automatically generated across versions from 0.7.1 to 0.8.1, generator version 0.3.1.dev1471+g7122059e9. Do not modify it directly.
6
+ # This layer exposes the C header to Cython as-is.
7
+
8
+ from libc.stdint cimport int64_t, uint8_t, uint32_t, int32_t
9
+ from libc.stdio cimport FILE
10
+ from .cycusparse cimport cusparseStatus_t, _CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR, cusparseOrder_t, cusparseOperation_t
11
+ from ._internal.common_types cimport cudaDataType, cudaDataType_t, cudaStream_t, libraryPropertyType, libraryPropertyType_t, cuComplex, cuDoubleComplex
12
+
13
+
14
+ ###############################################################################
15
+ # Types (structs, enums, ...)
16
+ ###############################################################################
17
+
18
+ # enums
19
+ ctypedef enum cusparseLtSparsity_t "cusparseLtSparsity_t":
20
+ CUSPARSELT_SPARSITY_50_PERCENT "CUSPARSELT_SPARSITY_50_PERCENT"
21
+
22
+ ctypedef enum cusparseLtMatDescAttribute_t "cusparseLtMatDescAttribute_t":
23
+ CUSPARSELT_MAT_NUM_BATCHES "CUSPARSELT_MAT_NUM_BATCHES"
24
+ CUSPARSELT_MAT_BATCH_STRIDE "CUSPARSELT_MAT_BATCH_STRIDE"
25
+
26
+ ctypedef enum cusparseComputeType "cusparseComputeType":
27
+ CUSPARSE_COMPUTE_32I "CUSPARSE_COMPUTE_32I"
28
+ CUSPARSE_COMPUTE_16F "CUSPARSE_COMPUTE_16F"
29
+ CUSPARSE_COMPUTE_32F "CUSPARSE_COMPUTE_32F"
30
+
31
+ ctypedef enum cusparseLtMatmulDescAttribute_t "cusparseLtMatmulDescAttribute_t":
32
+ CUSPARSELT_MATMUL_ACTIVATION_RELU "CUSPARSELT_MATMUL_ACTIVATION_RELU"
33
+ CUSPARSELT_MATMUL_ACTIVATION_RELU_UPPERBOUND "CUSPARSELT_MATMUL_ACTIVATION_RELU_UPPERBOUND"
34
+ CUSPARSELT_MATMUL_ACTIVATION_RELU_THRESHOLD "CUSPARSELT_MATMUL_ACTIVATION_RELU_THRESHOLD"
35
+ CUSPARSELT_MATMUL_ACTIVATION_GELU "CUSPARSELT_MATMUL_ACTIVATION_GELU"
36
+ CUSPARSELT_MATMUL_ACTIVATION_GELU_SCALING "CUSPARSELT_MATMUL_ACTIVATION_GELU_SCALING"
37
+ CUSPARSELT_MATMUL_ALPHA_VECTOR_SCALING "CUSPARSELT_MATMUL_ALPHA_VECTOR_SCALING"
38
+ CUSPARSELT_MATMUL_BETA_VECTOR_SCALING "CUSPARSELT_MATMUL_BETA_VECTOR_SCALING"
39
+ CUSPARSELT_MATMUL_BIAS_STRIDE "CUSPARSELT_MATMUL_BIAS_STRIDE"
40
+ CUSPARSELT_MATMUL_BIAS_POINTER "CUSPARSELT_MATMUL_BIAS_POINTER"
41
+ CUSPARSELT_MATMUL_SPARSE_MAT_POINTER "CUSPARSELT_MATMUL_SPARSE_MAT_POINTER"
42
+ CUSPARSELT_MATMUL_A_SCALE_MODE "CUSPARSELT_MATMUL_A_SCALE_MODE"
43
+ CUSPARSELT_MATMUL_B_SCALE_MODE "CUSPARSELT_MATMUL_B_SCALE_MODE"
44
+ CUSPARSELT_MATMUL_C_SCALE_MODE "CUSPARSELT_MATMUL_C_SCALE_MODE"
45
+ CUSPARSELT_MATMUL_D_SCALE_MODE "CUSPARSELT_MATMUL_D_SCALE_MODE"
46
+ CUSPARSELT_MATMUL_D_OUT_SCALE_MODE "CUSPARSELT_MATMUL_D_OUT_SCALE_MODE"
47
+ CUSPARSELT_MATMUL_A_SCALE_POINTER "CUSPARSELT_MATMUL_A_SCALE_POINTER"
48
+ CUSPARSELT_MATMUL_B_SCALE_POINTER "CUSPARSELT_MATMUL_B_SCALE_POINTER"
49
+ CUSPARSELT_MATMUL_C_SCALE_POINTER "CUSPARSELT_MATMUL_C_SCALE_POINTER"
50
+ CUSPARSELT_MATMUL_D_SCALE_POINTER "CUSPARSELT_MATMUL_D_SCALE_POINTER"
51
+ CUSPARSELT_MATMUL_D_OUT_SCALE_POINTER "CUSPARSELT_MATMUL_D_OUT_SCALE_POINTER"
52
+
53
+ ctypedef enum cusparseLtMatmulMatrixScale_t "cusparseLtMatmulMatrixScale_t":
54
+ CUSPARSELT_MATMUL_SCALE_NONE "CUSPARSELT_MATMUL_SCALE_NONE"
55
+ CUSPARSELT_MATMUL_MATRIX_SCALE_SCALAR_32F "CUSPARSELT_MATMUL_MATRIX_SCALE_SCALAR_32F"
56
+ CUSPARSELT_MATMUL_MATRIX_SCALE_VEC32_UE4M3 "CUSPARSELT_MATMUL_MATRIX_SCALE_VEC32_UE4M3"
57
+ CUSPARSELT_MATMUL_MATRIX_SCALE_VEC64_UE8M0 "CUSPARSELT_MATMUL_MATRIX_SCALE_VEC64_UE8M0"
58
+
59
+ ctypedef enum cusparseLtMatmulAlg_t "cusparseLtMatmulAlg_t":
60
+ CUSPARSELT_MATMUL_ALG_DEFAULT "CUSPARSELT_MATMUL_ALG_DEFAULT"
61
+
62
+ ctypedef enum cusparseLtMatmulAlgAttribute_t "cusparseLtMatmulAlgAttribute_t":
63
+ CUSPARSELT_MATMUL_ALG_CONFIG_ID "CUSPARSELT_MATMUL_ALG_CONFIG_ID"
64
+ CUSPARSELT_MATMUL_ALG_CONFIG_MAX_ID "CUSPARSELT_MATMUL_ALG_CONFIG_MAX_ID"
65
+ CUSPARSELT_MATMUL_SEARCH_ITERATIONS "CUSPARSELT_MATMUL_SEARCH_ITERATIONS"
66
+ CUSPARSELT_MATMUL_SPLIT_K "CUSPARSELT_MATMUL_SPLIT_K"
67
+ CUSPARSELT_MATMUL_SPLIT_K_MODE "CUSPARSELT_MATMUL_SPLIT_K_MODE"
68
+ CUSPARSELT_MATMUL_SPLIT_K_BUFFERS "CUSPARSELT_MATMUL_SPLIT_K_BUFFERS"
69
+
70
+ ctypedef enum cusparseLtSplitKMode_t "cusparseLtSplitKMode_t":
71
+ CUSPARSELT_INVALID_MODE "CUSPARSELT_INVALID_MODE" = 0
72
+ CUSPARSELT_SPLIT_K_MODE_ONE_KERNEL "CUSPARSELT_SPLIT_K_MODE_ONE_KERNEL" = 1
73
+ CUSPARSELT_SPLIT_K_MODE_TWO_KERNELS "CUSPARSELT_SPLIT_K_MODE_TWO_KERNELS" = 2
74
+ CUSPARSELT_HEURISTIC "CUSPARSELT_HEURISTIC"
75
+ CUSPARSELT_DATAPARALLEL "CUSPARSELT_DATAPARALLEL"
76
+ CUSPARSELT_SPLITK "CUSPARSELT_SPLITK"
77
+ CUSPARSELT_STREAMK "CUSPARSELT_STREAMK"
78
+
79
+ ctypedef enum cusparseLtPruneAlg_t "cusparseLtPruneAlg_t":
80
+ CUSPARSELT_PRUNE_SPMMA_TILE "CUSPARSELT_PRUNE_SPMMA_TILE" = 0
81
+ CUSPARSELT_PRUNE_SPMMA_STRIP "CUSPARSELT_PRUNE_SPMMA_STRIP" = 1
82
+
83
+
84
+ # types
85
+ ctypedef struct cusparseLtHandle_t 'cusparseLtHandle_t':
86
+ uint8_t data[512]
87
+
88
+ ctypedef struct cusparseLtMatDescriptor_t 'cusparseLtMatDescriptor_t':
89
+ uint8_t data[512]
90
+
91
+ ctypedef struct cusparseLtMatmulDescriptor_t 'cusparseLtMatmulDescriptor_t':
92
+ uint8_t data[512]
93
+
94
+ ctypedef struct cusparseLtMatmulAlgSelection_t 'cusparseLtMatmulAlgSelection_t':
95
+ uint8_t data[512]
96
+
97
+ ctypedef struct cusparseLtMatmulPlan_t 'cusparseLtMatmulPlan_t':
98
+ uint8_t data[512]
99
+
100
+
101
+ ###############################################################################
102
+ # Functions
103
+ ###############################################################################
104
+
105
+ cdef const char* cusparseLtGetErrorName(cusparseStatus_t status) except?NULL nogil
106
+ cdef const char* cusparseLtGetErrorString(cusparseStatus_t status) except?NULL nogil
107
+ cdef cusparseStatus_t cusparseLtInit(cusparseLtHandle_t* handle) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
108
+ cdef cusparseStatus_t cusparseLtDestroy(const cusparseLtHandle_t* handle) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
109
+ cdef cusparseStatus_t cusparseLtGetVersion(const cusparseLtHandle_t* handle, int* version) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
110
+ cdef cusparseStatus_t cusparseLtGetProperty(libraryPropertyType propertyType, int* value) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
111
+ cdef cusparseStatus_t cusparseLtDenseDescriptorInit(const cusparseLtHandle_t* handle, cusparseLtMatDescriptor_t* matDescr, int64_t rows, int64_t cols, int64_t ld, uint32_t alignment, cudaDataType valueType, cusparseOrder_t order) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
112
+ cdef cusparseStatus_t cusparseLtStructuredDescriptorInit(const cusparseLtHandle_t* handle, cusparseLtMatDescriptor_t* matDescr, int64_t rows, int64_t cols, int64_t ld, uint32_t alignment, cudaDataType valueType, cusparseOrder_t order, cusparseLtSparsity_t sparsity) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
113
+ cdef cusparseStatus_t cusparseLtMatDescriptorDestroy(const cusparseLtMatDescriptor_t* matDescr) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
114
+ cdef cusparseStatus_t cusparseLtMatDescSetAttribute(const cusparseLtHandle_t* handle, cusparseLtMatDescriptor_t* matmulDescr, cusparseLtMatDescAttribute_t matAttribute, const void* data, size_t dataSize) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
115
+ cdef cusparseStatus_t cusparseLtMatDescGetAttribute(const cusparseLtHandle_t* handle, const cusparseLtMatDescriptor_t* matmulDescr, cusparseLtMatDescAttribute_t matAttribute, void* data, size_t dataSize) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
116
+ cdef cusparseStatus_t cusparseLtMatmulDescriptorInit(const cusparseLtHandle_t* handle, cusparseLtMatmulDescriptor_t* matmulDescr, cusparseOperation_t opA, cusparseOperation_t opB, const cusparseLtMatDescriptor_t* matA, const cusparseLtMatDescriptor_t* matB, const cusparseLtMatDescriptor_t* matC, const cusparseLtMatDescriptor_t* matD, cusparseComputeType computeType) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
117
+ cdef cusparseStatus_t cusparseLtMatmulDescSetAttribute(const cusparseLtHandle_t* handle, cusparseLtMatmulDescriptor_t* matmulDescr, cusparseLtMatmulDescAttribute_t matmulAttribute, const void* data, size_t dataSize) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
118
+ cdef cusparseStatus_t cusparseLtMatmulDescGetAttribute(const cusparseLtHandle_t* handle, const cusparseLtMatmulDescriptor_t* matmulDescr, cusparseLtMatmulDescAttribute_t matmulAttribute, void* data, size_t dataSize) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
119
+ cdef cusparseStatus_t cusparseLtMatmulAlgSelectionInit(const cusparseLtHandle_t* handle, cusparseLtMatmulAlgSelection_t* algSelection, const cusparseLtMatmulDescriptor_t* matmulDescr, cusparseLtMatmulAlg_t alg) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
120
+ cdef cusparseStatus_t cusparseLtMatmulAlgSetAttribute(const cusparseLtHandle_t* handle, cusparseLtMatmulAlgSelection_t* algSelection, cusparseLtMatmulAlgAttribute_t attribute, const void* data, size_t dataSize) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
121
+ cdef cusparseStatus_t cusparseLtMatmulAlgGetAttribute(const cusparseLtHandle_t* handle, const cusparseLtMatmulAlgSelection_t* algSelection, cusparseLtMatmulAlgAttribute_t attribute, void* data, size_t dataSize) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
122
+ cdef cusparseStatus_t cusparseLtMatmulGetWorkspace(const cusparseLtHandle_t* handle, const cusparseLtMatmulPlan_t* plan, size_t* workspaceSize) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
123
+ cdef cusparseStatus_t cusparseLtMatmulPlanInit(const cusparseLtHandle_t* handle, cusparseLtMatmulPlan_t* plan, const cusparseLtMatmulDescriptor_t* matmulDescr, const cusparseLtMatmulAlgSelection_t* algSelection) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
124
+ cdef cusparseStatus_t cusparseLtMatmulPlanDestroy(const cusparseLtMatmulPlan_t* plan) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
125
+ cdef cusparseStatus_t cusparseLtMatmul(const cusparseLtHandle_t* handle, const cusparseLtMatmulPlan_t* plan, const void* alpha, const void* d_A, const void* d_B, const void* beta, const void* d_C, void* d_D, void* workspace, cudaStream_t* streams, int32_t numStreams) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
126
+ cdef cusparseStatus_t cusparseLtMatmulSearch(const cusparseLtHandle_t* handle, cusparseLtMatmulPlan_t* plan, const void* alpha, const void* d_A, const void* d_B, const void* beta, const void* d_C, void* d_D, void* workspace, cudaStream_t* streams, int32_t numStreams) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
127
+ cdef cusparseStatus_t cusparseLtSpMMAPrune(const cusparseLtHandle_t* handle, const cusparseLtMatmulDescriptor_t* matmulDescr, const void* d_in, void* d_out, cusparseLtPruneAlg_t pruneAlg, cudaStream_t stream) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
128
+ cdef cusparseStatus_t cusparseLtSpMMAPruneCheck(const cusparseLtHandle_t* handle, const cusparseLtMatmulDescriptor_t* matmulDescr, const void* d_in, int* valid, cudaStream_t stream) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
129
+ cdef cusparseStatus_t cusparseLtSpMMAPrune2(const cusparseLtHandle_t* handle, const cusparseLtMatDescriptor_t* sparseMatDescr, int isSparseA, cusparseOperation_t op, const void* d_in, void* d_out, cusparseLtPruneAlg_t pruneAlg, cudaStream_t stream) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
130
+ cdef cusparseStatus_t cusparseLtSpMMAPruneCheck2(const cusparseLtHandle_t* handle, const cusparseLtMatDescriptor_t* sparseMatDescr, int isSparseA, cusparseOperation_t op, const void* d_in, int* d_valid, cudaStream_t stream) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
131
+ cdef cusparseStatus_t cusparseLtSpMMACompressedSize(const cusparseLtHandle_t* handle, const cusparseLtMatmulPlan_t* plan, size_t* compressedSize, size_t* compressedBufferSize) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
132
+ cdef cusparseStatus_t cusparseLtSpMMACompress(const cusparseLtHandle_t* handle, const cusparseLtMatmulPlan_t* plan, const void* d_dense, void* d_compressed, void* d_compressed_buffer, cudaStream_t stream) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
133
+ cdef cusparseStatus_t cusparseLtSpMMACompressedSize2(const cusparseLtHandle_t* handle, const cusparseLtMatDescriptor_t* sparseMatDescr, size_t* compressedSize, size_t* compressedBufferSize) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
134
+ cdef cusparseStatus_t cusparseLtSpMMACompress2(const cusparseLtHandle_t* handle, const cusparseLtMatDescriptor_t* sparseMatDescr, int isSparseA, cusparseOperation_t op, const void* d_dense, void* d_compressed, void* d_compressed_buffer, cudaStream_t stream) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
135
+ cdef cusparseStatus_t cusparseLtMatmulAlgSelectionDestroy(const cusparseLtMatmulAlgSelection_t* algSelection) except?_CUSPARSESTATUS_T_INTERNAL_LOADING_ERROR nogil
@@ -0,0 +1,189 @@
1
+ # Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED.
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+ #
5
+ # This code was automatically generated across versions from 2.5.0 to 2.6.0, generator version 0.3.1.dev1471+g7122059e9. Do not modify it directly.
6
+ # This layer exposes the C header to Cython as-is.
7
+
8
+ from libc.stdint cimport int32_t, int64_t, uint32_t, uint64_t
9
+ from libc.stdio cimport FILE
10
+ from ._internal.common_types cimport cudaDataType, cudaDataType_t, cudaStream_t, libraryPropertyType, libraryPropertyType_t
11
+
12
+
13
+ ###############################################################################
14
+ # Types (structs, enums, ...)
15
+ ###############################################################################
16
+
17
+ # enums
18
+ ctypedef enum cutensorOperator_t "cutensorOperator_t":
19
+ CUTENSOR_OP_IDENTITY "CUTENSOR_OP_IDENTITY" = 1
20
+ CUTENSOR_OP_SQRT "CUTENSOR_OP_SQRT" = 2
21
+ CUTENSOR_OP_RELU "CUTENSOR_OP_RELU" = 8
22
+ CUTENSOR_OP_CONJ "CUTENSOR_OP_CONJ" = 9
23
+ CUTENSOR_OP_RCP "CUTENSOR_OP_RCP" = 10
24
+ CUTENSOR_OP_SIGMOID "CUTENSOR_OP_SIGMOID" = 11
25
+ CUTENSOR_OP_TANH "CUTENSOR_OP_TANH" = 12
26
+ CUTENSOR_OP_EXP "CUTENSOR_OP_EXP" = 22
27
+ CUTENSOR_OP_LOG "CUTENSOR_OP_LOG" = 23
28
+ CUTENSOR_OP_ABS "CUTENSOR_OP_ABS" = 24
29
+ CUTENSOR_OP_NEG "CUTENSOR_OP_NEG" = 25
30
+ CUTENSOR_OP_SIN "CUTENSOR_OP_SIN" = 26
31
+ CUTENSOR_OP_COS "CUTENSOR_OP_COS" = 27
32
+ CUTENSOR_OP_TAN "CUTENSOR_OP_TAN" = 28
33
+ CUTENSOR_OP_SINH "CUTENSOR_OP_SINH" = 29
34
+ CUTENSOR_OP_COSH "CUTENSOR_OP_COSH" = 30
35
+ CUTENSOR_OP_ASIN "CUTENSOR_OP_ASIN" = 31
36
+ CUTENSOR_OP_ACOS "CUTENSOR_OP_ACOS" = 32
37
+ CUTENSOR_OP_ATAN "CUTENSOR_OP_ATAN" = 33
38
+ CUTENSOR_OP_ASINH "CUTENSOR_OP_ASINH" = 34
39
+ CUTENSOR_OP_ACOSH "CUTENSOR_OP_ACOSH" = 35
40
+ CUTENSOR_OP_ATANH "CUTENSOR_OP_ATANH" = 36
41
+ CUTENSOR_OP_CEIL "CUTENSOR_OP_CEIL" = 37
42
+ CUTENSOR_OP_FLOOR "CUTENSOR_OP_FLOOR" = 38
43
+ CUTENSOR_OP_MISH "CUTENSOR_OP_MISH" = 39
44
+ CUTENSOR_OP_SWISH "CUTENSOR_OP_SWISH" = 40
45
+ CUTENSOR_OP_SOFT_PLUS "CUTENSOR_OP_SOFT_PLUS" = 41
46
+ CUTENSOR_OP_SOFT_SIGN "CUTENSOR_OP_SOFT_SIGN" = 42
47
+ CUTENSOR_OP_ADD "CUTENSOR_OP_ADD" = 3
48
+ CUTENSOR_OP_MUL "CUTENSOR_OP_MUL" = 5
49
+ CUTENSOR_OP_MAX "CUTENSOR_OP_MAX" = 6
50
+ CUTENSOR_OP_MIN "CUTENSOR_OP_MIN" = 7
51
+ CUTENSOR_OP_UNKNOWN "CUTENSOR_OP_UNKNOWN" = 126
52
+
53
+ ctypedef enum cutensorStatus_t "cutensorStatus_t":
54
+ CUTENSOR_STATUS_SUCCESS "CUTENSOR_STATUS_SUCCESS" = 0
55
+ CUTENSOR_STATUS_NOT_INITIALIZED "CUTENSOR_STATUS_NOT_INITIALIZED" = 1
56
+ CUTENSOR_STATUS_ALLOC_FAILED "CUTENSOR_STATUS_ALLOC_FAILED" = 3
57
+ CUTENSOR_STATUS_INVALID_VALUE "CUTENSOR_STATUS_INVALID_VALUE" = 7
58
+ CUTENSOR_STATUS_ARCH_MISMATCH "CUTENSOR_STATUS_ARCH_MISMATCH" = 8
59
+ CUTENSOR_STATUS_MAPPING_ERROR "CUTENSOR_STATUS_MAPPING_ERROR" = 11
60
+ CUTENSOR_STATUS_EXECUTION_FAILED "CUTENSOR_STATUS_EXECUTION_FAILED" = 13
61
+ CUTENSOR_STATUS_INTERNAL_ERROR "CUTENSOR_STATUS_INTERNAL_ERROR" = 14
62
+ CUTENSOR_STATUS_NOT_SUPPORTED "CUTENSOR_STATUS_NOT_SUPPORTED" = 15
63
+ CUTENSOR_STATUS_LICENSE_ERROR "CUTENSOR_STATUS_LICENSE_ERROR" = 16
64
+ CUTENSOR_STATUS_CUBLAS_ERROR "CUTENSOR_STATUS_CUBLAS_ERROR" = 17
65
+ CUTENSOR_STATUS_CUDA_ERROR "CUTENSOR_STATUS_CUDA_ERROR" = 18
66
+ CUTENSOR_STATUS_INSUFFICIENT_WORKSPACE "CUTENSOR_STATUS_INSUFFICIENT_WORKSPACE" = 19
67
+ CUTENSOR_STATUS_INSUFFICIENT_DRIVER "CUTENSOR_STATUS_INSUFFICIENT_DRIVER" = 20
68
+ CUTENSOR_STATUS_IO_ERROR "CUTENSOR_STATUS_IO_ERROR" = 21
69
+ _CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR "_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR" = -42
70
+
71
+ ctypedef enum cutensorAlgo_t "cutensorAlgo_t":
72
+ CUTENSOR_ALGO_DEFAULT_PATIENT "CUTENSOR_ALGO_DEFAULT_PATIENT" = -(6)
73
+ CUTENSOR_ALGO_GETT "CUTENSOR_ALGO_GETT" = -(4)
74
+ CUTENSOR_ALGO_TGETT "CUTENSOR_ALGO_TGETT" = -(3)
75
+ CUTENSOR_ALGO_TTGT "CUTENSOR_ALGO_TTGT" = -(2)
76
+ CUTENSOR_ALGO_DEFAULT "CUTENSOR_ALGO_DEFAULT" = -(1)
77
+
78
+ ctypedef enum cutensorWorksizePreference_t "cutensorWorksizePreference_t":
79
+ CUTENSOR_WORKSPACE_MIN "CUTENSOR_WORKSPACE_MIN" = 1
80
+ CUTENSOR_WORKSPACE_DEFAULT "CUTENSOR_WORKSPACE_DEFAULT" = 2
81
+ CUTENSOR_WORKSPACE_MAX "CUTENSOR_WORKSPACE_MAX" = 3
82
+
83
+ ctypedef enum cutensorOperationDescriptorAttribute_t "cutensorOperationDescriptorAttribute_t":
84
+ CUTENSOR_OPERATION_DESCRIPTOR_TAG "CUTENSOR_OPERATION_DESCRIPTOR_TAG" = 0
85
+ CUTENSOR_OPERATION_DESCRIPTOR_SCALAR_TYPE "CUTENSOR_OPERATION_DESCRIPTOR_SCALAR_TYPE" = 1
86
+ CUTENSOR_OPERATION_DESCRIPTOR_FLOPS "CUTENSOR_OPERATION_DESCRIPTOR_FLOPS" = 2
87
+ CUTENSOR_OPERATION_DESCRIPTOR_MOVED_BYTES "CUTENSOR_OPERATION_DESCRIPTOR_MOVED_BYTES" = 3
88
+ CUTENSOR_OPERATION_DESCRIPTOR_PADDING_LEFT "CUTENSOR_OPERATION_DESCRIPTOR_PADDING_LEFT" = 4
89
+ CUTENSOR_OPERATION_DESCRIPTOR_PADDING_RIGHT "CUTENSOR_OPERATION_DESCRIPTOR_PADDING_RIGHT" = 5
90
+ CUTENSOR_OPERATION_DESCRIPTOR_PADDING_VALUE "CUTENSOR_OPERATION_DESCRIPTOR_PADDING_VALUE" = 6
91
+
92
+ ctypedef enum cutensorPlanPreferenceAttribute_t "cutensorPlanPreferenceAttribute_t":
93
+ CUTENSOR_PLAN_PREFERENCE_AUTOTUNE_MODE "CUTENSOR_PLAN_PREFERENCE_AUTOTUNE_MODE" = 0
94
+ CUTENSOR_PLAN_PREFERENCE_CACHE_MODE "CUTENSOR_PLAN_PREFERENCE_CACHE_MODE" = 1
95
+ CUTENSOR_PLAN_PREFERENCE_INCREMENTAL_COUNT "CUTENSOR_PLAN_PREFERENCE_INCREMENTAL_COUNT" = 2
96
+ CUTENSOR_PLAN_PREFERENCE_ALGO "CUTENSOR_PLAN_PREFERENCE_ALGO" = 3
97
+ CUTENSOR_PLAN_PREFERENCE_KERNEL_RANK "CUTENSOR_PLAN_PREFERENCE_KERNEL_RANK" = 4
98
+ CUTENSOR_PLAN_PREFERENCE_JIT "CUTENSOR_PLAN_PREFERENCE_JIT" = 5
99
+ CUTENSOR_PLAN_PREFERENCE_GPU_ARCH "CUTENSOR_PLAN_PREFERENCE_GPU_ARCH" = 6
100
+
101
+ ctypedef enum cutensorAutotuneMode_t "cutensorAutotuneMode_t":
102
+ CUTENSOR_AUTOTUNE_MODE_NONE "CUTENSOR_AUTOTUNE_MODE_NONE" = 0
103
+ CUTENSOR_AUTOTUNE_MODE_INCREMENTAL "CUTENSOR_AUTOTUNE_MODE_INCREMENTAL" = 1
104
+
105
+ ctypedef enum cutensorJitMode_t "cutensorJitMode_t":
106
+ CUTENSOR_JIT_MODE_NONE "CUTENSOR_JIT_MODE_NONE" = 0
107
+ CUTENSOR_JIT_MODE_DEFAULT "CUTENSOR_JIT_MODE_DEFAULT" = 1
108
+
109
+ ctypedef enum cutensorCacheMode_t "cutensorCacheMode_t":
110
+ CUTENSOR_CACHE_MODE_NONE "CUTENSOR_CACHE_MODE_NONE" = 0
111
+ CUTENSOR_CACHE_MODE_PEDANTIC "CUTENSOR_CACHE_MODE_PEDANTIC" = 1
112
+
113
+ ctypedef enum cutensorPlanAttribute_t "cutensorPlanAttribute_t":
114
+ CUTENSOR_PLAN_REQUIRED_WORKSPACE "CUTENSOR_PLAN_REQUIRED_WORKSPACE" = 0
115
+
116
+
117
+ # types
118
+ ctypedef cudaDataType_t cutensorDataType_t 'cutensorDataType_t'
119
+
120
+ ctypedef void* cutensorComputeDescriptor_t 'cutensorComputeDescriptor_t'
121
+
122
+ ctypedef void* cutensorOperationDescriptor_t 'cutensorOperationDescriptor_t'
123
+
124
+ ctypedef void* cutensorPlan_t 'cutensorPlan_t'
125
+
126
+ ctypedef void* cutensorPlanPreference_t 'cutensorPlanPreference_t'
127
+
128
+ ctypedef void* cutensorHandle_t 'cutensorHandle_t'
129
+
130
+ ctypedef void* cutensorTensorDescriptor_t 'cutensorTensorDescriptor_t'
131
+
132
+ ctypedef void* cutensorBlockSparseTensorDescriptor_t 'cutensorBlockSparseTensorDescriptor_t'
133
+
134
+ ctypedef void (*cutensorLoggerCallback_t 'cutensorLoggerCallback_t')(
135
+ int32_t logLevel,
136
+ const char* functionName,
137
+ const char* message
138
+ )
139
+
140
+
141
+ ###############################################################################
142
+ # Functions
143
+ ###############################################################################
144
+
145
+ cdef cutensorStatus_t cutensorCreate(cutensorHandle_t* handle) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
146
+ cdef cutensorStatus_t cutensorDestroy(cutensorHandle_t handle) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
147
+ cdef cutensorStatus_t cutensorHandleResizePlanCache(cutensorHandle_t handle, const uint32_t numEntries) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
148
+ cdef cutensorStatus_t cutensorHandleWritePlanCacheToFile(const cutensorHandle_t handle, const char filename[]) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
149
+ cdef cutensorStatus_t cutensorHandleReadPlanCacheFromFile(cutensorHandle_t handle, const char filename[], uint32_t* numCachelinesRead) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
150
+ cdef cutensorStatus_t cutensorWriteKernelCacheToFile(const cutensorHandle_t handle, const char filename[]) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
151
+ cdef cutensorStatus_t cutensorReadKernelCacheFromFile(cutensorHandle_t handle, const char filename[]) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
152
+ cdef cutensorStatus_t cutensorCreateTensorDescriptor(const cutensorHandle_t handle, cutensorTensorDescriptor_t* desc, const uint32_t numModes, const int64_t extent[], const int64_t stride[], cudaDataType_t dataType, uint32_t alignmentRequirement) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
153
+ cdef cutensorStatus_t cutensorDestroyTensorDescriptor(cutensorTensorDescriptor_t desc) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
154
+ cdef cutensorStatus_t cutensorCreateElementwiseTrinary(const cutensorHandle_t handle, cutensorOperationDescriptor_t* desc, const cutensorTensorDescriptor_t descA, const int32_t modeA[], cutensorOperator_t opA, const cutensorTensorDescriptor_t descB, const int32_t modeB[], cutensorOperator_t opB, const cutensorTensorDescriptor_t descC, const int32_t modeC[], cutensorOperator_t opC, const cutensorTensorDescriptor_t descD, const int32_t modeD[], cutensorOperator_t opAB, cutensorOperator_t opABC, const cutensorComputeDescriptor_t descCompute) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
155
+ cdef cutensorStatus_t cutensorElementwiseTrinaryExecute(const cutensorHandle_t handle, const cutensorPlan_t plan, const void* alpha, const void* A, const void* beta, const void* B, const void* gamma, const void* C, void* D, cudaStream_t stream) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
156
+ cdef cutensorStatus_t cutensorCreateElementwiseBinary(const cutensorHandle_t handle, cutensorOperationDescriptor_t* desc, const cutensorTensorDescriptor_t descA, const int32_t modeA[], cutensorOperator_t opA, const cutensorTensorDescriptor_t descC, const int32_t modeC[], cutensorOperator_t opC, const cutensorTensorDescriptor_t descD, const int32_t modeD[], cutensorOperator_t opAC, const cutensorComputeDescriptor_t descCompute) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
157
+ cdef cutensorStatus_t cutensorElementwiseBinaryExecute(const cutensorHandle_t handle, const cutensorPlan_t plan, const void* alpha, const void* A, const void* gamma, const void* C, void* D, cudaStream_t stream) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
158
+ cdef cutensorStatus_t cutensorCreatePermutation(const cutensorHandle_t handle, cutensorOperationDescriptor_t* desc, const cutensorTensorDescriptor_t descA, const int32_t modeA[], cutensorOperator_t opA, const cutensorTensorDescriptor_t descB, const int32_t modeB[], const cutensorComputeDescriptor_t descCompute) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
159
+ cdef cutensorStatus_t cutensorPermute(const cutensorHandle_t handle, const cutensorPlan_t plan, const void* alpha, const void* A, void* B, const cudaStream_t stream) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
160
+ cdef cutensorStatus_t cutensorCreateContraction(const cutensorHandle_t handle, cutensorOperationDescriptor_t* desc, const cutensorTensorDescriptor_t descA, const int32_t modeA[], cutensorOperator_t opA, const cutensorTensorDescriptor_t descB, const int32_t modeB[], cutensorOperator_t opB, const cutensorTensorDescriptor_t descC, const int32_t modeC[], cutensorOperator_t opC, const cutensorTensorDescriptor_t descD, const int32_t modeD[], const cutensorComputeDescriptor_t descCompute) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
161
+ cdef cutensorStatus_t cutensorDestroyOperationDescriptor(cutensorOperationDescriptor_t desc) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
162
+ cdef cutensorStatus_t cutensorOperationDescriptorSetAttribute(const cutensorHandle_t handle, cutensorOperationDescriptor_t desc, cutensorOperationDescriptorAttribute_t attr, const void* buf, size_t sizeInBytes) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
163
+ cdef cutensorStatus_t cutensorOperationDescriptorGetAttribute(const cutensorHandle_t handle, cutensorOperationDescriptor_t desc, cutensorOperationDescriptorAttribute_t attr, void* buf, size_t sizeInBytes) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
164
+ cdef cutensorStatus_t cutensorCreatePlanPreference(const cutensorHandle_t handle, cutensorPlanPreference_t* pref, cutensorAlgo_t algo, cutensorJitMode_t jitMode) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
165
+ cdef cutensorStatus_t cutensorDestroyPlanPreference(cutensorPlanPreference_t pref) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
166
+ cdef cutensorStatus_t cutensorPlanPreferenceGetAttribute(const cutensorHandle_t handle, cutensorPlanPreference_t pref, cutensorPlanPreferenceAttribute_t attr, void* buf, size_t sizeInBytes) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
167
+ cdef cutensorStatus_t cutensorPlanPreferenceSetAttribute(const cutensorHandle_t handle, cutensorPlanPreference_t pref, cutensorPlanPreferenceAttribute_t attr, const void* buf, size_t sizeInBytes) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
168
+ cdef cutensorStatus_t cutensorPlanGetAttribute(const cutensorHandle_t handle, const cutensorPlan_t plan, cutensorPlanAttribute_t attr, void* buf, size_t sizeInBytes) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
169
+ cdef cutensorStatus_t cutensorEstimateWorkspaceSize(const cutensorHandle_t handle, const cutensorOperationDescriptor_t desc, const cutensorPlanPreference_t planPref, const cutensorWorksizePreference_t workspacePref, uint64_t* workspaceSizeEstimate) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
170
+ cdef cutensorStatus_t cutensorCreatePlan(const cutensorHandle_t handle, cutensorPlan_t* plan, const cutensorOperationDescriptor_t desc, const cutensorPlanPreference_t pref, uint64_t workspaceSizeLimit) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
171
+ cdef cutensorStatus_t cutensorDestroyPlan(cutensorPlan_t plan) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
172
+ cdef cutensorStatus_t cutensorContract(const cutensorHandle_t handle, const cutensorPlan_t plan, const void* alpha, const void* A, const void* B, const void* beta, const void* C, void* D, void* workspace, uint64_t workspaceSize, cudaStream_t stream) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
173
+ cdef cutensorStatus_t cutensorCreateReduction(const cutensorHandle_t handle, cutensorOperationDescriptor_t* desc, const cutensorTensorDescriptor_t descA, const int32_t modeA[], cutensorOperator_t opA, const cutensorTensorDescriptor_t descC, const int32_t modeC[], cutensorOperator_t opC, const cutensorTensorDescriptor_t descD, const int32_t modeD[], cutensorOperator_t opReduce, const cutensorComputeDescriptor_t descCompute) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
174
+ cdef cutensorStatus_t cutensorReduce(const cutensorHandle_t handle, const cutensorPlan_t plan, const void* alpha, const void* A, const void* beta, const void* C, void* D, void* workspace, uint64_t workspaceSize, cudaStream_t stream) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
175
+ cdef cutensorStatus_t cutensorCreateContractionTrinary(const cutensorHandle_t handle, cutensorOperationDescriptor_t* desc, const cutensorTensorDescriptor_t descA, const int32_t modeA[], cutensorOperator_t opA, const cutensorTensorDescriptor_t descB, const int32_t modeB[], cutensorOperator_t opB, const cutensorTensorDescriptor_t descC, const int32_t modeC[], cutensorOperator_t opC, const cutensorTensorDescriptor_t descD, const int32_t modeD[], cutensorOperator_t opD, const cutensorTensorDescriptor_t descE, const int32_t modeE[], const cutensorComputeDescriptor_t descCompute) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
176
+ cdef cutensorStatus_t cutensorContractTrinary(const cutensorHandle_t handle, const cutensorPlan_t plan, const void* alpha, const void* A, const void* B, const void* C, const void* beta, const void* D, void* E, void* workspace, uint64_t workspaceSize, cudaStream_t stream) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
177
+ cdef cutensorStatus_t cutensorCreateBlockSparseTensorDescriptor(cutensorHandle_t handle, cutensorBlockSparseTensorDescriptor_t* desc, const uint32_t numModes, const uint64_t numNonZeroBlocks, const uint32_t numSectionsPerMode[], const int64_t extent[], const int32_t nonZeroCoordinates[], const int64_t stride[], cudaDataType_t dataType) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
178
+ cdef cutensorStatus_t cutensorDestroyBlockSparseTensorDescriptor(cutensorBlockSparseTensorDescriptor_t desc) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
179
+ cdef cutensorStatus_t cutensorCreateBlockSparseContraction(const cutensorHandle_t handle, cutensorOperationDescriptor_t* desc, const cutensorBlockSparseTensorDescriptor_t descA, const int32_t modeA[], cutensorOperator_t opA, const cutensorBlockSparseTensorDescriptor_t descB, const int32_t modeB[], cutensorOperator_t opB, const cutensorBlockSparseTensorDescriptor_t descC, const int32_t modeC[], cutensorOperator_t opC, const cutensorBlockSparseTensorDescriptor_t descD, const int32_t modeD[], const cutensorComputeDescriptor_t descCompute) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
180
+ cdef cutensorStatus_t cutensorBlockSparseContract(const cutensorHandle_t handle, const cutensorPlan_t plan, const void* alpha, const void* const A[], const void* const B[], const void* beta, const void* const C[], void* const D[], void* workspace, uint64_t workspaceSize, cudaStream_t stream) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
181
+ cdef const char* cutensorGetErrorString(const cutensorStatus_t error) except?NULL nogil
182
+ cdef size_t cutensorGetVersion() except?0 nogil
183
+ cdef size_t cutensorGetCudartVersion() except?0 nogil
184
+ cdef cutensorStatus_t cutensorLoggerSetCallback(cutensorLoggerCallback_t callback) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
185
+ cdef cutensorStatus_t cutensorLoggerSetFile(FILE* file) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
186
+ cdef cutensorStatus_t cutensorLoggerOpenFile(const char* logFile) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
187
+ cdef cutensorStatus_t cutensorLoggerSetLevel(int32_t level) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
188
+ cdef cutensorStatus_t cutensorLoggerSetMask(int32_t mask) except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil
189
+ cdef cutensorStatus_t cutensorLoggerForceDisable() except?_CUTENSORSTATUS_T_INTERNAL_LOADING_ERROR nogil