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,85 @@
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 with version 0.8.0, generator version 0.3.1.dev1303+g031f1197f. Do not modify it directly.
6
+
7
+ from libc.stdint cimport intptr_t
8
+
9
+ from .cycublasMp cimport *
10
+
11
+
12
+ ###############################################################################
13
+ # Types
14
+ ###############################################################################
15
+
16
+ ctypedef ncclComm_t ncclComm
17
+ ctypedef cublasMpHandle_t Handle
18
+ ctypedef cublasMpGrid_t Grid
19
+ ctypedef cublasMpMatrixDescriptor_t MatrixDescriptor
20
+ ctypedef cublasMpMatmulDescriptor_t MatmulDescriptor
21
+ ctypedef cublasMpLoggerCallback_t LoggerCallback
22
+
23
+ ctypedef cudaStream_t Stream
24
+ ctypedef cudaDataType DataType
25
+ ctypedef libraryPropertyType_t LibraryPropertyType
26
+
27
+
28
+ ###############################################################################
29
+ # Enum
30
+ ###############################################################################
31
+
32
+ ctypedef cublasMpStatus_t _Status
33
+ ctypedef cublasMpGridLayout_t _GridLayout
34
+ ctypedef cublasMpMatmulDescriptorAttribute_t _MatmulDescriptorAttribute
35
+ ctypedef cublasMpMatmulAlgoType_t _MatmulAlgoType
36
+ ctypedef cublasMpMatmulEpilogue_t _MatmulEpilogue
37
+ ctypedef cublasMpMatmulMatrixScale_t _MatmulMatrixScale
38
+ ctypedef cublasMpEmulationStrategy_t _EmulationStrategy
39
+ ctypedef cublasMpResultScheme_t _ResultScheme
40
+
41
+
42
+ ###############################################################################
43
+ # Functions
44
+ ###############################################################################
45
+
46
+ cpdef intptr_t create(intptr_t stream) except? 0
47
+ cpdef destroy(intptr_t handle)
48
+ cpdef set_stream(intptr_t handle, intptr_t stream)
49
+ cpdef intptr_t get_stream(intptr_t handle) except? 0
50
+ cpdef set_emulation_strategy(intptr_t handle, int emulation_strategy)
51
+ cpdef int get_emulation_strategy(intptr_t handle) except? -1
52
+ cpdef int get_version() except? 0
53
+ cpdef intptr_t grid_create(int64_t nprow, int64_t npcol, int layout, intptr_t comm) except? 0
54
+ cpdef grid_destroy(intptr_t grid)
55
+ cpdef buffer_register(intptr_t grid, intptr_t ptr, size_t size)
56
+ cpdef buffer_deregister(intptr_t grid, intptr_t ptr)
57
+ cpdef intptr_t matrix_descriptor_create(int64_t m, int64_t n, int64_t mb, int64_t nb, int64_t rsrc, int64_t csrc, int64_t lld, int type, intptr_t grid) except? 0
58
+ cpdef matrix_descriptor_destroy(intptr_t desc)
59
+ cpdef matrix_descriptor_init(int64_t m, int64_t n, int64_t mb, int64_t nb, int64_t rsrc, int64_t csrc, int64_t lld, int type, intptr_t grid, intptr_t desc)
60
+ cpdef intptr_t matmul_descriptor_create(int compute_type) except? 0
61
+ cpdef matmul_descriptor_destroy(intptr_t matmul_desc)
62
+ cpdef matmul_descriptor_init(intptr_t matmul_desc, int compute_type)
63
+ cpdef get_matmul_descriptor_attribute_dtype(int attr)
64
+ cpdef matmul_descriptor_set_attribute(intptr_t matmul_desc, int attr, intptr_t buf, size_t size_in_bytes)
65
+ cpdef matmul_descriptor_get_attribute(intptr_t matmul_desc, int attr, intptr_t buf, size_t size_in_bytes, intptr_t size_written)
66
+ cpdef tuple trsm_buffer_size(intptr_t handle, int side, int uplo, int trans, int diag, int64_t m, int64_t n, intptr_t alpha, intptr_t a, int64_t ia, int64_t ja, intptr_t desc_a, intptr_t b, int64_t ib, int64_t jb, intptr_t desc_b, int compute_type)
67
+ cpdef trsm(intptr_t handle, int side, int uplo, int trans, int diag, int64_t m, int64_t n, intptr_t alpha, intptr_t a, int64_t ia, int64_t ja, intptr_t desc_a, intptr_t b, int64_t ib, int64_t jb, intptr_t desc_b, int compute_type, intptr_t d_work, size_t workspace_size_in_bytes_on_device, intptr_t h_work, size_t workspace_size_in_bytes_on_host)
68
+ cpdef tuple gemm_buffer_size(intptr_t handle, int trans_a, int trans_b, int64_t m, int64_t n, int64_t k, intptr_t alpha, intptr_t a, int64_t ia, int64_t ja, intptr_t desc_a, intptr_t b, int64_t ib, int64_t jb, intptr_t desc_b, intptr_t beta, intptr_t c, int64_t ic, int64_t jc, intptr_t desc_c, int compute_type)
69
+ cpdef gemm(intptr_t handle, int trans_a, int trans_b, int64_t m, int64_t n, int64_t k, intptr_t alpha, intptr_t a, int64_t ia, int64_t ja, intptr_t desc_a, intptr_t b, int64_t ib, int64_t jb, intptr_t desc_b, intptr_t beta, intptr_t c, int64_t ic, int64_t jc, intptr_t desc_c, int compute_type, intptr_t d_work, size_t workspace_size_in_bytes_on_device, intptr_t h_work, size_t workspace_size_in_bytes_on_host)
70
+ cpdef tuple matmul_buffer_size(intptr_t handle, intptr_t matmul_desc, int64_t m, int64_t n, int64_t k, intptr_t alpha, intptr_t a, int64_t ia, int64_t ja, intptr_t desc_a, intptr_t b, int64_t ib, int64_t jb, intptr_t desc_b, intptr_t beta, intptr_t c, int64_t ic, int64_t jc, intptr_t desc_c, intptr_t d, int64_t id, int64_t jd, intptr_t desc_d)
71
+ cpdef matmul(intptr_t handle, intptr_t matmul_desc, int64_t m, int64_t n, int64_t k, intptr_t alpha, intptr_t a, int64_t ia, int64_t ja, intptr_t desc_a, intptr_t b, int64_t ib, int64_t jb, intptr_t desc_b, intptr_t beta, intptr_t c, int64_t ic, int64_t jc, intptr_t desc_c, intptr_t d, int64_t id, int64_t jd, intptr_t desc_d, intptr_t d_work, size_t workspace_size_in_bytes_on_device, intptr_t h_work, size_t workspace_size_in_bytes_on_host)
72
+ cpdef tuple syrk_buffer_size(intptr_t handle, int uplo, int trans, int64_t n, int64_t k, intptr_t alpha, intptr_t a, int64_t ia, int64_t ja, intptr_t desc_a, intptr_t beta, intptr_t c, int64_t ic, int64_t jc, intptr_t desc_c, int compute_type)
73
+ cpdef syrk(intptr_t handle, int uplo, int trans, int64_t n, int64_t k, intptr_t alpha, intptr_t a, int64_t ia, int64_t ja, intptr_t desc_a, intptr_t beta, intptr_t c, int64_t ic, int64_t jc, intptr_t desc_c, int compute_type, intptr_t d_work, size_t workspace_size_in_bytes_on_device, intptr_t h_work, size_t workspace_size_in_bytes_on_host)
74
+ cpdef int64_t numroc(int64_t n, int64_t nb, uint32_t iproc, uint32_t isrcproc, uint32_t nprocs) except? -1
75
+ cpdef str get_status_string(int status)
76
+ cpdef tuple gemr2d_buffer_size(intptr_t handle, int64_t m, int64_t n, intptr_t a, int64_t ia, int64_t ja, intptr_t desc_a, intptr_t b, int64_t ib, int64_t jb, intptr_t desc_b, intptr_t global_comm)
77
+ cpdef gemr2d(intptr_t handle, int64_t m, int64_t n, intptr_t a, int64_t ia, int64_t ja, intptr_t desc_a, intptr_t b, int64_t ib, int64_t jb, intptr_t desc_b, intptr_t d_work, size_t workspace_size_in_bytes_on_device, intptr_t h_work, size_t workspace_size_in_bytes_on_host, intptr_t global_comm)
78
+ cpdef tuple trmr2d_buffer_size(intptr_t handle, int uplo, int diag, int64_t m, int64_t n, intptr_t a, int64_t ia, int64_t ja, intptr_t desc_a, intptr_t b, int64_t ib, int64_t jb, intptr_t desc_b, intptr_t global_comm)
79
+ cpdef trmr2d(intptr_t handle, int uplo, int diag, int64_t m, int64_t n, intptr_t a, int64_t ia, int64_t ja, intptr_t desc_a, intptr_t b, int64_t ib, int64_t jb, intptr_t desc_b, intptr_t d_work, size_t workspace_size_in_bytes_on_device, intptr_t h_work, size_t workspace_size_in_bytes_on_host, intptr_t global_comm)
80
+ cpdef tuple geadd_buffer_size(intptr_t handle, int trans, int64_t m, int64_t n, intptr_t alpha, intptr_t a, int64_t ia, int64_t ja, intptr_t desc_a, intptr_t beta, intptr_t c, int64_t ic, int64_t jc, intptr_t desc_c)
81
+ cpdef geadd(intptr_t handle, int trans, int64_t m, int64_t n, intptr_t alpha, intptr_t a, int64_t ia, int64_t ja, intptr_t desc_a, intptr_t beta, intptr_t c, int64_t ic, int64_t jc, intptr_t desc_c, intptr_t d_work, size_t workspace_size_in_bytes_on_device, intptr_t h_work, size_t workspace_size_in_bytes_on_host)
82
+ cpdef tuple tradd_buffer_size(intptr_t handle, int uplo, int trans, int64_t m, int64_t n, intptr_t alpha, intptr_t a, int64_t ia, int64_t ja, intptr_t desc_a, intptr_t beta, intptr_t c, int64_t ic, int64_t jc, intptr_t desc_c)
83
+ cpdef tradd(intptr_t handle, int uplo, int trans, int64_t m, int64_t n, intptr_t alpha, intptr_t a, int64_t ia, int64_t ja, intptr_t desc_a, intptr_t beta, intptr_t c, int64_t ic, int64_t jc, intptr_t desc_c, intptr_t d_work, size_t workspace_size_in_bytes_on_device, intptr_t h_work, size_t workspace_size_in_bytes_on_host)
84
+ cpdef intptr_t malloc(intptr_t grid, size_t size) except? 0
85
+ cpdef free(intptr_t grid, intptr_t ptr)
@@ -0,0 +1,267 @@
1
+ # Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED.
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ import _cython_3_2_5
6
+ import enum
7
+ from typing import Any, Callable, ClassVar
8
+
9
+ __pyx_capi__: dict
10
+ __test__: dict
11
+ buffer_deregister: _cython_3_2_5.cython_function_or_method
12
+ buffer_register: _cython_3_2_5.cython_function_or_method
13
+ check_status: _cython_3_2_5.cython_function_or_method
14
+ create: _cython_3_2_5.cython_function_or_method
15
+ destroy: _cython_3_2_5.cython_function_or_method
16
+ free: _cython_3_2_5.cython_function_or_method
17
+ geadd: _cython_3_2_5.cython_function_or_method
18
+ geadd_buffer_size: _cython_3_2_5.cython_function_or_method
19
+ gemm: _cython_3_2_5.cython_function_or_method
20
+ gemm_buffer_size: _cython_3_2_5.cython_function_or_method
21
+ gemr2d: _cython_3_2_5.cython_function_or_method
22
+ gemr2d_buffer_size: _cython_3_2_5.cython_function_or_method
23
+ get_emulation_strategy: _cython_3_2_5.cython_function_or_method
24
+ get_matmul_descriptor_attribute_dtype: _cython_3_2_5.cython_function_or_method
25
+ get_status_string: _cython_3_2_5.cython_function_or_method
26
+ get_stream: _cython_3_2_5.cython_function_or_method
27
+ get_version: _cython_3_2_5.cython_function_or_method
28
+ grid_create: _cython_3_2_5.cython_function_or_method
29
+ grid_destroy: _cython_3_2_5.cython_function_or_method
30
+ malloc: _cython_3_2_5.cython_function_or_method
31
+ matmul: _cython_3_2_5.cython_function_or_method
32
+ matmul_buffer_size: _cython_3_2_5.cython_function_or_method
33
+ matmul_descriptor_create: _cython_3_2_5.cython_function_or_method
34
+ matmul_descriptor_destroy: _cython_3_2_5.cython_function_or_method
35
+ matmul_descriptor_get_attribute: _cython_3_2_5.cython_function_or_method
36
+ matmul_descriptor_init: _cython_3_2_5.cython_function_or_method
37
+ matmul_descriptor_set_attribute: _cython_3_2_5.cython_function_or_method
38
+ matrix_descriptor_create: _cython_3_2_5.cython_function_or_method
39
+ matrix_descriptor_destroy: _cython_3_2_5.cython_function_or_method
40
+ matrix_descriptor_init: _cython_3_2_5.cython_function_or_method
41
+ numroc: _cython_3_2_5.cython_function_or_method
42
+ set_emulation_strategy: _cython_3_2_5.cython_function_or_method
43
+ set_stream: _cython_3_2_5.cython_function_or_method
44
+ syrk: _cython_3_2_5.cython_function_or_method
45
+ syrk_buffer_size: _cython_3_2_5.cython_function_or_method
46
+ tradd: _cython_3_2_5.cython_function_or_method
47
+ tradd_buffer_size: _cython_3_2_5.cython_function_or_method
48
+ trmr2d: _cython_3_2_5.cython_function_or_method
49
+ trmr2d_buffer_size: _cython_3_2_5.cython_function_or_method
50
+ trsm: _cython_3_2_5.cython_function_or_method
51
+ trsm_buffer_size: _cython_3_2_5.cython_function_or_method
52
+
53
+ class EmulationStrategy(enum.IntEnum):
54
+ """
55
+ See `cublasMpEmulationStrategy_t`.
56
+ """
57
+ __new__: ClassVar[Callable] = ...
58
+ DEFAULT: ClassVar[EmulationStrategy] = ...
59
+ EAGER: ClassVar[EmulationStrategy] = ...
60
+ PERFORMANT: ClassVar[EmulationStrategy] = ...
61
+ _generate_next_value_: ClassVar[Callable] = ...
62
+ _hashable_values_: ClassVar[list] = ...
63
+ _member_map_: ClassVar[dict] = ...
64
+ _member_names_: ClassVar[list] = ...
65
+ _member_type_: ClassVar[type[int]] = ...
66
+ _unhashable_values_: ClassVar[list] = ...
67
+ _unhashable_values_map_: ClassVar[dict] = ...
68
+ _use_args_: ClassVar[bool] = ...
69
+ _value2member_map_: ClassVar[dict] = ...
70
+ def __format__(self, *args, **kwargs) -> str:
71
+ """Convert to a string according to format_spec."""
72
+
73
+ class GridLayout(enum.IntEnum):
74
+ """
75
+ See `cublasMpGridLayout_t`.
76
+ """
77
+ __new__: ClassVar[Callable] = ...
78
+ COL_MAJOR: ClassVar[GridLayout] = ...
79
+ ROW_MAJOR: ClassVar[GridLayout] = ...
80
+ _generate_next_value_: ClassVar[Callable] = ...
81
+ _hashable_values_: ClassVar[list] = ...
82
+ _member_map_: ClassVar[dict] = ...
83
+ _member_names_: ClassVar[list] = ...
84
+ _member_type_: ClassVar[type[int]] = ...
85
+ _unhashable_values_: ClassVar[list] = ...
86
+ _unhashable_values_map_: ClassVar[dict] = ...
87
+ _use_args_: ClassVar[bool] = ...
88
+ _value2member_map_: ClassVar[dict] = ...
89
+ def __format__(self, *args, **kwargs) -> str:
90
+ """Convert to a string according to format_spec."""
91
+
92
+ class MatmulAlgoType(enum.IntEnum):
93
+ """
94
+ See `cublasMpMatmulAlgoType_t`.
95
+ """
96
+ __new__: ClassVar[Callable] = ...
97
+ ATOMIC_MULTICAST: ClassVar[MatmulAlgoType] = ...
98
+ ATOMIC_P2P: ClassVar[MatmulAlgoType] = ...
99
+ DEFAULT: ClassVar[MatmulAlgoType] = ...
100
+ NO_OVERLAP: ClassVar[MatmulAlgoType] = ...
101
+ SPLIT_MULTICAST: ClassVar[MatmulAlgoType] = ...
102
+ SPLIT_P2P: ClassVar[MatmulAlgoType] = ...
103
+ _generate_next_value_: ClassVar[Callable] = ...
104
+ _hashable_values_: ClassVar[list] = ...
105
+ _member_map_: ClassVar[dict] = ...
106
+ _member_names_: ClassVar[list] = ...
107
+ _member_type_: ClassVar[type[int]] = ...
108
+ _unhashable_values_: ClassVar[list] = ...
109
+ _unhashable_values_map_: ClassVar[dict] = ...
110
+ _use_args_: ClassVar[bool] = ...
111
+ _value2member_map_: ClassVar[dict] = ...
112
+ def __format__(self, *args, **kwargs) -> str:
113
+ """Convert to a string according to format_spec."""
114
+
115
+ class MatmulDescriptorAttribute(enum.IntEnum):
116
+ """
117
+ See `cublasMpMatmulDescriptorAttribute_t`.
118
+ """
119
+ __new__: ClassVar[Callable] = ...
120
+ ALGO_TYPE: ClassVar[MatmulDescriptorAttribute] = ...
121
+ AMAX_D_POINTER: ClassVar[MatmulDescriptorAttribute] = ...
122
+ A_SCALE_MODE: ClassVar[MatmulDescriptorAttribute] = ...
123
+ A_SCALE_POINTER: ClassVar[MatmulDescriptorAttribute] = ...
124
+ BIAS_BATCH_STRIDE: ClassVar[MatmulDescriptorAttribute] = ...
125
+ BIAS_DATA_TYPE: ClassVar[MatmulDescriptorAttribute] = ...
126
+ BIAS_POINTER: ClassVar[MatmulDescriptorAttribute] = ...
127
+ BIAS_RESULT_SCHEME: ClassVar[MatmulDescriptorAttribute] = ...
128
+ B_SCALE_MODE: ClassVar[MatmulDescriptorAttribute] = ...
129
+ B_SCALE_POINTER: ClassVar[MatmulDescriptorAttribute] = ...
130
+ COMMUNICATION_SM_COUNT: ClassVar[MatmulDescriptorAttribute] = ...
131
+ COMMUNICATION_TYPE: ClassVar[MatmulDescriptorAttribute] = ...
132
+ COMPUTE_TYPE: ClassVar[MatmulDescriptorAttribute] = ...
133
+ C_SCALE_MODE: ClassVar[MatmulDescriptorAttribute] = ...
134
+ C_SCALE_POINTER: ClassVar[MatmulDescriptorAttribute] = ...
135
+ D_OUT_SCALE_MODE: ClassVar[MatmulDescriptorAttribute] = ...
136
+ D_OUT_SCALE_POINTER: ClassVar[MatmulDescriptorAttribute] = ...
137
+ D_SCALE_MODE: ClassVar[MatmulDescriptorAttribute] = ...
138
+ D_SCALE_POINTER: ClassVar[MatmulDescriptorAttribute] = ...
139
+ EPILOGUE: ClassVar[MatmulDescriptorAttribute] = ...
140
+ EPILOGUE_AUX_AMAX_POINTER: ClassVar[MatmulDescriptorAttribute] = ...
141
+ EPILOGUE_AUX_BATCH_STRIDE: ClassVar[MatmulDescriptorAttribute] = ...
142
+ EPILOGUE_AUX_DATA_TYPE: ClassVar[MatmulDescriptorAttribute] = ...
143
+ EPILOGUE_AUX_LD: ClassVar[MatmulDescriptorAttribute] = ...
144
+ EPILOGUE_AUX_POINTER: ClassVar[MatmulDescriptorAttribute] = ...
145
+ EPILOGUE_AUX_SCALE_MODE: ClassVar[MatmulDescriptorAttribute] = ...
146
+ EPILOGUE_AUX_SCALE_POINTER: ClassVar[MatmulDescriptorAttribute] = ...
147
+ TRANSA: ClassVar[MatmulDescriptorAttribute] = ...
148
+ TRANSB: ClassVar[MatmulDescriptorAttribute] = ...
149
+ _generate_next_value_: ClassVar[Callable] = ...
150
+ _hashable_values_: ClassVar[list] = ...
151
+ _member_map_: ClassVar[dict] = ...
152
+ _member_names_: ClassVar[list] = ...
153
+ _member_type_: ClassVar[type[int]] = ...
154
+ _unhashable_values_: ClassVar[list] = ...
155
+ _unhashable_values_map_: ClassVar[dict] = ...
156
+ _use_args_: ClassVar[bool] = ...
157
+ _value2member_map_: ClassVar[dict] = ...
158
+ def __format__(self, *args, **kwargs) -> str:
159
+ """Convert to a string according to format_spec."""
160
+
161
+ class MatmulEpilogue(enum.IntEnum):
162
+ """
163
+ See `cublasMpMatmulEpilogue_t`.
164
+ """
165
+ __new__: ClassVar[Callable] = ...
166
+ ALLREDUCE: ClassVar[MatmulEpilogue] = ...
167
+ BGRADA: ClassVar[MatmulEpilogue] = ...
168
+ BGRADB: ClassVar[MatmulEpilogue] = ...
169
+ BIAS: ClassVar[MatmulEpilogue] = ...
170
+ DEFAULT: ClassVar[MatmulEpilogue] = ...
171
+ DGELU: ClassVar[MatmulEpilogue] = ...
172
+ DGELU_BGRAD: ClassVar[MatmulEpilogue] = ...
173
+ DRELU: ClassVar[MatmulEpilogue] = ...
174
+ DRELU_BGRAD: ClassVar[MatmulEpilogue] = ...
175
+ GELU: ClassVar[MatmulEpilogue] = ...
176
+ GELU_AUX: ClassVar[MatmulEpilogue] = ...
177
+ GELU_AUX_BIAS: ClassVar[MatmulEpilogue] = ...
178
+ GELU_BIAS: ClassVar[MatmulEpilogue] = ...
179
+ RELU: ClassVar[MatmulEpilogue] = ...
180
+ RELU_AUX: ClassVar[MatmulEpilogue] = ...
181
+ RELU_AUX_BIAS: ClassVar[MatmulEpilogue] = ...
182
+ RELU_BIAS: ClassVar[MatmulEpilogue] = ...
183
+ _generate_next_value_: ClassVar[Callable] = ...
184
+ _hashable_values_: ClassVar[list] = ...
185
+ _member_map_: ClassVar[dict] = ...
186
+ _member_names_: ClassVar[list] = ...
187
+ _member_type_: ClassVar[type[int]] = ...
188
+ _unhashable_values_: ClassVar[list] = ...
189
+ _unhashable_values_map_: ClassVar[dict] = ...
190
+ _use_args_: ClassVar[bool] = ...
191
+ _value2member_map_: ClassVar[dict] = ...
192
+ def __format__(self, *args, **kwargs) -> str:
193
+ """Convert to a string according to format_spec."""
194
+
195
+ class MatmulMatrixScale(enum.IntEnum):
196
+ """
197
+ See `cublasMpMatmulMatrixScale_t`.
198
+ """
199
+ __new__: ClassVar[Callable] = ...
200
+ BLK128x128_FP32: ClassVar[MatmulMatrixScale] = ...
201
+ OUTER_VEC_FP32: ClassVar[MatmulMatrixScale] = ...
202
+ SCALAR_FP32: ClassVar[MatmulMatrixScale] = ...
203
+ VEC128_FP32: ClassVar[MatmulMatrixScale] = ...
204
+ VEC16_UE4M3: ClassVar[MatmulMatrixScale] = ...
205
+ VEC32_UE8M0: ClassVar[MatmulMatrixScale] = ...
206
+ _generate_next_value_: ClassVar[Callable] = ...
207
+ _hashable_values_: ClassVar[list] = ...
208
+ _member_map_: ClassVar[dict] = ...
209
+ _member_names_: ClassVar[list] = ...
210
+ _member_type_: ClassVar[type[int]] = ...
211
+ _unhashable_values_: ClassVar[list] = ...
212
+ _unhashable_values_map_: ClassVar[dict] = ...
213
+ _use_args_: ClassVar[bool] = ...
214
+ _value2member_map_: ClassVar[dict] = ...
215
+ def __format__(self, *args, **kwargs) -> str:
216
+ """Convert to a string according to format_spec."""
217
+
218
+ class ResultScheme(enum.IntEnum):
219
+ """
220
+ See `cublasMpResultScheme_t`.
221
+ """
222
+ __new__: ClassVar[Callable] = ...
223
+ DEFAULT: ClassVar[ResultScheme] = ...
224
+ FULL: ClassVar[ResultScheme] = ...
225
+ PARTIAL: ClassVar[ResultScheme] = ...
226
+ _generate_next_value_: ClassVar[Callable] = ...
227
+ _hashable_values_: ClassVar[list] = ...
228
+ _member_map_: ClassVar[dict] = ...
229
+ _member_names_: ClassVar[list] = ...
230
+ _member_type_: ClassVar[type[int]] = ...
231
+ _unhashable_values_: ClassVar[list] = ...
232
+ _unhashable_values_map_: ClassVar[dict] = ...
233
+ _use_args_: ClassVar[bool] = ...
234
+ _value2member_map_: ClassVar[dict] = ...
235
+ def __format__(self, *args, **kwargs) -> str:
236
+ """Convert to a string according to format_spec."""
237
+
238
+ class Status(enum.IntEnum):
239
+ """
240
+ See `cublasMpStatus_t`.
241
+ """
242
+ __new__: ClassVar[Callable] = ...
243
+ ALLOCATION_FAILED: ClassVar[Status] = ...
244
+ ARCHITECTURE_MISMATCH: ClassVar[Status] = ...
245
+ EXECUTION_FAILED: ClassVar[Status] = ...
246
+ INTERNAL_ERROR: ClassVar[Status] = ...
247
+ INVALID_VALUE: ClassVar[Status] = ...
248
+ NOT_INITIALIZED: ClassVar[Status] = ...
249
+ NOT_SUPPORTED: ClassVar[Status] = ...
250
+ SUCCESS: ClassVar[Status] = ...
251
+ _generate_next_value_: ClassVar[Callable] = ...
252
+ _hashable_values_: ClassVar[list] = ...
253
+ _member_map_: ClassVar[dict] = ...
254
+ _member_names_: ClassVar[list] = ...
255
+ _member_type_: ClassVar[type[int]] = ...
256
+ _unhashable_values_: ClassVar[list] = ...
257
+ _unhashable_values_map_: ClassVar[dict] = ...
258
+ _use_args_: ClassVar[bool] = ...
259
+ _value2member_map_: ClassVar[dict] = ...
260
+ def __format__(self, *args, **kwargs) -> str:
261
+ """Convert to a string according to format_spec."""
262
+
263
+ class cuBLASMpError(Exception):
264
+ def __init__(self, status) -> Any:
265
+ """cuBLASMpError.__init__(self, status)"""
266
+ def __reduce__(self) -> Any:
267
+ """cuBLASMpError.__reduce__(self)"""
@@ -0,0 +1,98 @@
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 with version 0.8.0, generator version 0.3.1.dev1725+g07a86fe3d.d20260603. Do not modify it directly.
6
+
7
+ from libc.stdint cimport intptr_t
8
+
9
+ from .cycudss cimport *
10
+
11
+
12
+ ###############################################################################
13
+ # Types
14
+ ###############################################################################
15
+
16
+ ctypedef cudssHandle_t Handle
17
+ ctypedef cudssMatrix_t Matrix
18
+ ctypedef cudssData_t Data
19
+ ctypedef cudssConfig_t Config
20
+ ctypedef cudssDeviceMemHandler_t DeviceMemHandler
21
+ ctypedef cudssDistributedInterface_t DistributedInterface
22
+ ctypedef cudssThreadingInterface_t ThreadingInterface
23
+ ctypedef cudssLoggerCallback_t LoggerCallback
24
+
25
+ ctypedef cudaStream_t Stream
26
+ ctypedef libraryPropertyType_t LibraryPropertyType
27
+
28
+
29
+ ###############################################################################
30
+ # Enum
31
+ ###############################################################################
32
+
33
+ ctypedef cudssDataType_t _DataType
34
+ ctypedef cudssConfigParam_t _ConfigParam
35
+ ctypedef cudssDataParam_t _DataParam
36
+ ctypedef cudssPhase_t _Phase
37
+ ctypedef cudssStatus_t _Status
38
+ ctypedef cudssMatrixType_t _MatrixType
39
+ ctypedef cudssMatrixViewType_t _MatrixViewType
40
+ ctypedef cudssIndexBase_t _IndexBase
41
+ ctypedef cudssLayout_t _Layout
42
+ ctypedef cudssReorderingAlg_t _ReorderingAlg
43
+ ctypedef cudssFactorizationAlg_t _FactorizationAlg
44
+ ctypedef cudssPivotEpsilonAlg_t _PivotEpsilonAlg
45
+ ctypedef cudssSolveAlg_t _SolveAlg
46
+ ctypedef cudssMatchingAlg_t _MatchingAlg
47
+ ctypedef cudssPivotType_t _PivotType
48
+ ctypedef cudssMatrixFormat_t _MatrixFormat
49
+ ctypedef cudssOpType_t _OpType
50
+
51
+
52
+ ###############################################################################
53
+ # Functions
54
+ ###############################################################################
55
+
56
+ cpdef get_config_param_dtype(int attr)
57
+ cpdef config_set(intptr_t config, int param, intptr_t value, size_t size_in_bytes)
58
+ cpdef config_get(intptr_t config, int param, intptr_t value, size_t size_in_bytes, intptr_t size_written)
59
+ cpdef get_data_param_dtype(int attr)
60
+ cpdef data_set(intptr_t handle, intptr_t data, int param, intptr_t value, size_t size_in_bytes)
61
+ cpdef data_get(intptr_t handle, intptr_t data, int param, intptr_t value, size_t size_in_bytes, intptr_t size_written)
62
+ cpdef execute(intptr_t handle, int phase, intptr_t solver_config, intptr_t solver_data, intptr_t input_matrix, intptr_t solution, intptr_t rhs)
63
+ cpdef set_stream(intptr_t handle, intptr_t stream)
64
+ cpdef set_mg_streams(intptr_t handle, streams, int stream_count)
65
+ cpdef set_comm_layer(intptr_t handle, comm_lib_file_name)
66
+ cpdef set_threading_layer(intptr_t handle, thr_lib_file_name)
67
+ cpdef intptr_t config_create() except? 0
68
+ cpdef config_destroy(intptr_t solver_config)
69
+ cpdef intptr_t data_create(intptr_t handle) except? 0
70
+ cpdef data_destroy(intptr_t handle, intptr_t solver_data)
71
+ cpdef intptr_t create() except? 0
72
+ cpdef intptr_t create_mg(int device_count, device_indices) except? 0
73
+ cpdef destroy(intptr_t handle)
74
+ cpdef int get_property(int property_type) except? -1
75
+ cpdef intptr_t matrix_create_dn(int64_t nrows, int64_t ncols, int64_t ld, intptr_t values, int value_type, int layout) except? 0
76
+ cpdef intptr_t matrix_create_csr(int64_t nrows, int64_t ncols, int64_t nnz, intptr_t row_start, intptr_t row_end, intptr_t col_indices, intptr_t values, int offset_type, int index_type, int value_type, int mtype, int mview, int index_base) except? 0
77
+ cpdef intptr_t matrix_create_batch_dn(int64_t batch_count, intptr_t nrows, intptr_t ncols, intptr_t ld, intptr_t values, int integer_type, int value_type, int layout) except? 0
78
+ cpdef intptr_t matrix_create_batch_csr(int64_t batch_count, intptr_t nrows, intptr_t ncols, intptr_t nnz, intptr_t row_start, intptr_t row_end, intptr_t col_indices, intptr_t values, int offset_type, int index_type, int value_type, int mtype, int mview, int index_base) except? 0
79
+ cpdef matrix_destroy(intptr_t matrix)
80
+ cpdef matrix_get_dn(intptr_t matrix, intptr_t nrows, intptr_t ncols, intptr_t ld, intptr_t values, intptr_t type, intptr_t layout)
81
+ cpdef matrix_get_csr(intptr_t matrix, intptr_t nrows, intptr_t ncols, intptr_t nnz, intptr_t row_start, intptr_t row_end, intptr_t col_indices, intptr_t values, intptr_t offset_type, intptr_t index_type, intptr_t value_type, intptr_t mtype, intptr_t mview, intptr_t index_base)
82
+ cpdef matrix_set_values(intptr_t matrix, intptr_t values)
83
+ cpdef matrix_set_csr_pointers(intptr_t matrix, intptr_t row_offsets, intptr_t row_end, intptr_t col_indices, intptr_t values)
84
+ cpdef matrix_get_batch_dn(intptr_t matrix, intptr_t batch_count, intptr_t nrows, intptr_t ncols, intptr_t ld, intptr_t values, intptr_t index_type, intptr_t value_type, intptr_t layout)
85
+ cpdef matrix_get_batch_csr(intptr_t matrix, intptr_t batch_count, intptr_t nrows, intptr_t ncols, intptr_t nnz, intptr_t row_start, intptr_t row_end, intptr_t col_indices, intptr_t values, intptr_t offset_type, intptr_t index_type, intptr_t value_type, intptr_t mtype, intptr_t mview, intptr_t index_base)
86
+ cpdef matrix_set_batch_values(intptr_t matrix, intptr_t values)
87
+ cpdef matrix_set_batch_csr_pointers(intptr_t matrix, intptr_t row_offsets, intptr_t row_end, intptr_t col_indices, intptr_t values)
88
+ cpdef int matrix_get_format(intptr_t matrix) except? -1
89
+ cpdef matrix_set_distribution_row1d(intptr_t matrix, int64_t first_row, int64_t last_row)
90
+ cpdef matrix_get_distribution_row1d(intptr_t matrix, intptr_t first_row, intptr_t last_row)
91
+ cpdef get_device_mem_handler(intptr_t handle, intptr_t handler)
92
+ cpdef set_device_mem_handler(intptr_t handle, intptr_t handler)
93
+ cpdef logger_open_file(log_file)
94
+ cpdef logger_set_level(int level)
95
+ cpdef logger_set_mask(int mask)
96
+ cpdef logger_force_disable()
97
+
98
+ cpdef bint set_async_workspace_allocator(intptr_t cudss_handle, intptr_t pool_handle) except? -1