BryanW commited on
Commit
0d74e3f
·
verified ·
1 Parent(s): a3c558e

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/__init__.pxd +0 -0
  2. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/__init__.py +5 -0
  3. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/_version.py +4 -0
  4. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cufile.cpp +0 -0
  5. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cufile.pxd +73 -0
  6. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cufile.pyx +1296 -0
  7. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cycufile.cpp +0 -0
  8. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cycufile.pxd +258 -0
  9. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cycufile.pyx +138 -0
  10. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cydriver.cpp +0 -0
  11. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cydriver.pxd +0 -0
  12. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cydriver.pyx +0 -0
  13. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cynvjitlink.cpp +0 -0
  14. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cynvjitlink.cpython-312-x86_64-linux-gnu.so +0 -0
  15. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cynvjitlink.pyx +67 -0
  16. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cynvrtc.cpp +0 -0
  17. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cynvrtc.cpython-312-x86_64-linux-gnu.so +0 -0
  18. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cynvrtc.pxd +83 -0
  19. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cynvrtc.pyx +83 -0
  20. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cynvvm.cpp +0 -0
  21. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cynvvm.pxd +48 -0
  22. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cyruntime.cpp +0 -0
  23. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cyruntime.pxd +1015 -0
  24. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cyruntime.pyx +974 -0
  25. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cyruntime_functions.pxi +897 -0
  26. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cyruntime_types.pxi +1559 -0
  27. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/driver.pxd +0 -0
  28. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/driver.pyx +0 -0
  29. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/nvjitlink.cpp +0 -0
  30. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/nvjitlink.pxd +43 -0
  31. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/nvrtc.cpp +0 -0
  32. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/nvrtc.pxd +21 -0
  33. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/nvrtc.pyx +1021 -0
  34. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/nvvm.cpp +0 -0
  35. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/nvvm.pxd +41 -0
  36. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/nvvm.pyx +297 -0
  37. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/runtime.pxd +0 -0
  38. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/runtime.pyx +0 -0
  39. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/pathfinder/README.md +3 -0
  40. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/pathfinder/__init__.py +66 -0
  41. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/pathfinder/_version.py +34 -0
  42. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/pip/__pycache__/__init__.cpython-312.pyc +0 -0
  43. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/pip/__pycache__/__main__.cpython-312.pyc +0 -0
  44. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/pip/__pycache__/__pip-runner__.cpython-312.pyc +0 -0
  45. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/pip/_internal/__init__.py +18 -0
  46. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/pip/_internal/__pycache__/__init__.cpython-312.pyc +0 -0
  47. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/pip/_internal/__pycache__/build_env.cpython-312.pyc +0 -0
  48. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/pip/_internal/__pycache__/cache.cpython-312.pyc +0 -0
  49. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/pip/_internal/__pycache__/configuration.cpython-312.pyc +0 -0
  50. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/pip/_internal/__pycache__/exceptions.cpython-312.pyc +0 -0
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/__init__.pxd ADDED
File without changes
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/__init__.py ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ # SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
3
+
4
+ from cuda.bindings import utils
5
+ from cuda.bindings._version import __version__
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/_version.py ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ # SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
3
+
4
+ __version__ = "12.9.4"
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cufile.cpp ADDED
The diff for this file is too large to render. See raw diff
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cufile.pxd ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ #
3
+ # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
4
+ #
5
+ # This code was automatically generated across versions from 12.9.0 to 12.9.1. Do not modify it directly.
6
+
7
+ from libc.stdint cimport intptr_t
8
+
9
+ from .cycufile cimport *
10
+
11
+
12
+ ###############################################################################
13
+ # Types
14
+ ###############################################################################
15
+
16
+ ctypedef CUfileHandle_t Handle
17
+ ctypedef CUfileBatchHandle_t BatchHandle
18
+ ctypedef CUfileError_t Error
19
+ ctypedef cufileRDMAInfo_t RDMAInfo
20
+ ctypedef CUfileFSOps_t FSOps
21
+ ctypedef CUfileDrvProps_t DrvProps
22
+
23
+
24
+ ###############################################################################
25
+ # Enum
26
+ ###############################################################################
27
+
28
+ ctypedef CUfileOpError _OpError
29
+ ctypedef CUfileDriverStatusFlags_t _DriverStatusFlags
30
+ ctypedef CUfileDriverControlFlags_t _DriverControlFlags
31
+ ctypedef CUfileFeatureFlags_t _FeatureFlags
32
+ ctypedef CUfileFileHandleType _FileHandleType
33
+ ctypedef CUfileOpcode_t _Opcode
34
+ ctypedef CUfileStatus_t _Status
35
+ ctypedef CUfileBatchMode_t _BatchMode
36
+ ctypedef CUFileSizeTConfigParameter_t _SizeTConfigParameter
37
+ ctypedef CUFileBoolConfigParameter_t _BoolConfigParameter
38
+ ctypedef CUFileStringConfigParameter_t _StringConfigParameter
39
+
40
+
41
+ ###############################################################################
42
+ # Functions
43
+ ###############################################################################
44
+
45
+ cpdef intptr_t handle_register(intptr_t descr) except? 0
46
+ cpdef void handle_deregister(intptr_t fh) except*
47
+ cpdef buf_register(intptr_t buf_ptr_base, size_t length, int flags)
48
+ cpdef buf_deregister(intptr_t buf_ptr_base)
49
+ cpdef read(intptr_t fh, intptr_t buf_ptr_base, size_t size, off_t file_offset, off_t buf_ptr_offset)
50
+ cpdef write(intptr_t fh, intptr_t buf_ptr_base, size_t size, off_t file_offset, off_t buf_ptr_offset)
51
+ cpdef driver_open()
52
+ cpdef use_count()
53
+ cpdef driver_get_properties(intptr_t props)
54
+ cpdef driver_set_poll_mode(bint poll, size_t poll_threshold_size)
55
+ cpdef driver_set_max_direct_io_size(size_t max_direct_io_size)
56
+ cpdef driver_set_max_cache_size(size_t max_cache_size)
57
+ cpdef driver_set_max_pinned_mem_size(size_t max_pinned_size)
58
+ cpdef intptr_t batch_io_set_up(unsigned nr) except? 0
59
+ cpdef batch_io_submit(intptr_t batch_idp, unsigned nr, intptr_t iocbp, unsigned int flags)
60
+ cpdef batch_io_get_status(intptr_t batch_idp, unsigned min_nr, intptr_t nr, intptr_t iocbp, intptr_t timeout)
61
+ cpdef batch_io_cancel(intptr_t batch_idp)
62
+ cpdef void batch_io_destroy(intptr_t batch_idp) except*
63
+ cpdef read_async(intptr_t fh, intptr_t buf_ptr_base, intptr_t size_p, intptr_t file_offset_p, intptr_t buf_ptr_offset_p, intptr_t bytes_read_p, intptr_t stream)
64
+ cpdef write_async(intptr_t fh, intptr_t buf_ptr_base, intptr_t size_p, intptr_t file_offset_p, intptr_t buf_ptr_offset_p, intptr_t bytes_written_p, intptr_t stream)
65
+ cpdef stream_register(intptr_t stream, unsigned flags)
66
+ cpdef stream_deregister(intptr_t stream)
67
+ cpdef int get_version() except? 0
68
+ cpdef size_t get_parameter_size_t(int param) except? 0
69
+ cpdef bint get_parameter_bool(int param) except? 0
70
+ cpdef str get_parameter_string(int param, int len)
71
+ cpdef set_parameter_size_t(int param, size_t value)
72
+ cpdef set_parameter_bool(int param, bint value)
73
+ cpdef set_parameter_string(int param, intptr_t desc_str)
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cufile.pyx ADDED
@@ -0,0 +1,1296 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ #
3
+ # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
4
+ #
5
+ # This code was automatically generated across versions from 12.9.0 to 12.9.1. Do not modify it directly.
6
+
7
+ cimport cython # NOQA
8
+ from libc cimport errno
9
+ from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr,
10
+ nested_resource)
11
+ import numpy as _numpy
12
+ from cpython cimport buffer as _buffer
13
+ from cpython.memoryview cimport PyMemoryView_FromMemory
14
+ from enum import IntEnum as _IntEnum
15
+
16
+ import cython
17
+
18
+ from cuda.bindings.driver import CUresult as pyCUresult
19
+
20
+
21
+ ###############################################################################
22
+ # POD
23
+ ###############################################################################
24
+
25
+ _py_anon_pod1_dtype = _numpy.dtype((
26
+ _numpy.dtype((_numpy.void, sizeof((<CUfileDescr_t*>NULL).handle))),
27
+ {
28
+ "fd": (_numpy.int32, 0),
29
+ "handle": (_numpy.intp, 0),
30
+ }
31
+ ))
32
+
33
+
34
+ cdef class _py_anon_pod1:
35
+ """Empty-initialize an instance of `_anon_pod1`.
36
+
37
+
38
+ .. seealso:: `_anon_pod1`
39
+ """
40
+ cdef:
41
+ readonly object _data
42
+
43
+ def __init__(self):
44
+ arr = _numpy.empty(1, dtype=_py_anon_pod1_dtype)
45
+ self._data = arr.view(_numpy.recarray)
46
+ assert self._data.itemsize == sizeof((<CUfileDescr_t*>NULL).handle), \
47
+ f"itemsize {self._data.itemsize} mismatches union size {sizeof((<CUfileDescr_t*>NULL).handle)}"
48
+
49
+ def __repr__(self):
50
+ return f"<{__name__}._py_anon_pod1 object at {hex(id(self))}>"
51
+
52
+ @property
53
+ def ptr(self):
54
+ """Get the pointer address to the data as Python :class:`int`."""
55
+ return self._data.ctypes.data
56
+
57
+ def __int__(self):
58
+ return self._data.ctypes.data
59
+
60
+ def __eq__(self, other):
61
+ if not isinstance(other, _py_anon_pod1):
62
+ return False
63
+ if self._data.size != other._data.size:
64
+ return False
65
+ if self._data.dtype != other._data.dtype:
66
+ return False
67
+ return bool((self._data == other._data).all())
68
+
69
+ @property
70
+ def fd(self):
71
+ """int: """
72
+ return int(self._data.fd[0])
73
+
74
+ @fd.setter
75
+ def fd(self, val):
76
+ self._data.fd = val
77
+
78
+ @property
79
+ def handle(self):
80
+ """int: """
81
+ return int(self._data.handle[0])
82
+
83
+ @handle.setter
84
+ def handle(self, val):
85
+ self._data.handle = val
86
+
87
+ def __setitem__(self, key, val):
88
+ self._data[key] = val
89
+
90
+ @staticmethod
91
+ def from_data(data):
92
+ """Create an _py_anon_pod1 instance wrapping the given NumPy array.
93
+
94
+ Args:
95
+ data (_numpy.ndarray): a 1D array of dtype `_py_anon_pod1_dtype` holding the data.
96
+ """
97
+ cdef _py_anon_pod1 obj = _py_anon_pod1.__new__(_py_anon_pod1)
98
+ if not isinstance(data, (_numpy.ndarray, _numpy.recarray)):
99
+ raise TypeError("data argument must be a NumPy ndarray")
100
+ if data.ndim != 1:
101
+ raise ValueError("data array must be 1D")
102
+ if data.dtype != _py_anon_pod1_dtype:
103
+ raise ValueError("data array must be of dtype _py_anon_pod1_dtype")
104
+ obj._data = data.view(_numpy.recarray)
105
+
106
+ return obj
107
+
108
+ @staticmethod
109
+ def from_ptr(intptr_t ptr, bint readonly=False):
110
+ """Create an _py_anon_pod1 instance wrapping the given pointer.
111
+
112
+ Args:
113
+ ptr (intptr_t): pointer address as Python :class:`int` to the data.
114
+ readonly (bool): whether the data is read-only (to the user). default is `False`.
115
+ """
116
+ if ptr == 0:
117
+ raise ValueError("ptr must not be null (0)")
118
+ cdef _py_anon_pod1 obj = _py_anon_pod1.__new__(_py_anon_pod1)
119
+ cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE
120
+ cdef object buf = PyMemoryView_FromMemory(
121
+ <char*>ptr, sizeof((<CUfileDescr_t*>NULL).handle), flag)
122
+ data = _numpy.ndarray((1,), buffer=buf,
123
+ dtype=_py_anon_pod1_dtype)
124
+ obj._data = data.view(_numpy.recarray)
125
+
126
+ return obj
127
+
128
+
129
+ _py_anon_pod3_dtype = _numpy.dtype([
130
+ ("dev_ptr_base", _numpy.intp, ),
131
+ ("file_offset", _numpy.int64, ),
132
+ ("dev_ptr_offset", _numpy.int64, ),
133
+ ("size_", _numpy.uint64, ),
134
+ ], align=True)
135
+
136
+
137
+ cdef class _py_anon_pod3:
138
+ """Empty-initialize an instance of `_anon_pod3`.
139
+
140
+
141
+ .. seealso:: `_anon_pod3`
142
+ """
143
+ cdef:
144
+ readonly object _data
145
+
146
+ def __init__(self):
147
+ arr = _numpy.empty(1, dtype=_py_anon_pod3_dtype)
148
+ self._data = arr.view(_numpy.recarray)
149
+ assert self._data.itemsize == sizeof((<CUfileIOParams_t*>NULL).u.batch), \
150
+ f"itemsize {self._data.itemsize} mismatches struct size {sizeof((<CUfileIOParams_t*>NULL).u.batch)}"
151
+
152
+ def __repr__(self):
153
+ return f"<{__name__}._py_anon_pod3 object at {hex(id(self))}>"
154
+
155
+ @property
156
+ def ptr(self):
157
+ """Get the pointer address to the data as Python :class:`int`."""
158
+ return self._data.ctypes.data
159
+
160
+ def __int__(self):
161
+ return self._data.ctypes.data
162
+
163
+ def __eq__(self, other):
164
+ if not isinstance(other, _py_anon_pod3):
165
+ return False
166
+ if self._data.size != other._data.size:
167
+ return False
168
+ if self._data.dtype != other._data.dtype:
169
+ return False
170
+ return bool((self._data == other._data).all())
171
+
172
+ @property
173
+ def dev_ptr_base(self):
174
+ """int: """
175
+ return int(self._data.dev_ptr_base[0])
176
+
177
+ @dev_ptr_base.setter
178
+ def dev_ptr_base(self, val):
179
+ self._data.dev_ptr_base = val
180
+
181
+ @property
182
+ def file_offset(self):
183
+ """int: """
184
+ return int(self._data.file_offset[0])
185
+
186
+ @file_offset.setter
187
+ def file_offset(self, val):
188
+ self._data.file_offset = val
189
+
190
+ @property
191
+ def dev_ptr_offset(self):
192
+ """int: """
193
+ return int(self._data.dev_ptr_offset[0])
194
+
195
+ @dev_ptr_offset.setter
196
+ def dev_ptr_offset(self, val):
197
+ self._data.dev_ptr_offset = val
198
+
199
+ @property
200
+ def size_(self):
201
+ """int: """
202
+ return int(self._data.size_[0])
203
+
204
+ @size_.setter
205
+ def size_(self, val):
206
+ self._data.size_ = val
207
+
208
+ def __setitem__(self, key, val):
209
+ self._data[key] = val
210
+
211
+ @staticmethod
212
+ def from_data(data):
213
+ """Create an _py_anon_pod3 instance wrapping the given NumPy array.
214
+
215
+ Args:
216
+ data (_numpy.ndarray): a 1D array of dtype `_py_anon_pod3_dtype` holding the data.
217
+ """
218
+ cdef _py_anon_pod3 obj = _py_anon_pod3.__new__(_py_anon_pod3)
219
+ if not isinstance(data, (_numpy.ndarray, _numpy.recarray)):
220
+ raise TypeError("data argument must be a NumPy ndarray")
221
+ if data.ndim != 1:
222
+ raise ValueError("data array must be 1D")
223
+ if data.dtype != _py_anon_pod3_dtype:
224
+ raise ValueError("data array must be of dtype _py_anon_pod3_dtype")
225
+ obj._data = data.view(_numpy.recarray)
226
+
227
+ return obj
228
+
229
+ @staticmethod
230
+ def from_ptr(intptr_t ptr, bint readonly=False):
231
+ """Create an _py_anon_pod3 instance wrapping the given pointer.
232
+
233
+ Args:
234
+ ptr (intptr_t): pointer address as Python :class:`int` to the data.
235
+ readonly (bool): whether the data is read-only (to the user). default is `False`.
236
+ """
237
+ if ptr == 0:
238
+ raise ValueError("ptr must not be null (0)")
239
+ cdef _py_anon_pod3 obj = _py_anon_pod3.__new__(_py_anon_pod3)
240
+ cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE
241
+ cdef object buf = PyMemoryView_FromMemory(
242
+ <char*>ptr, sizeof((<CUfileIOParams_t*>NULL).u.batch), flag)
243
+ data = _numpy.ndarray((1,), buffer=buf,
244
+ dtype=_py_anon_pod3_dtype)
245
+ obj._data = data.view(_numpy.recarray)
246
+
247
+ return obj
248
+
249
+
250
+ io_events_dtype = _numpy.dtype([
251
+ ("cookie", _numpy.intp, ),
252
+ ("status", _numpy.int32, ),
253
+ ("ret", _numpy.uint64, ),
254
+ ], align=True)
255
+
256
+
257
+ cdef class IOEvents:
258
+ """Empty-initialize an array of `CUfileIOEvents_t`.
259
+
260
+ The resulting object is of length `size` and of dtype `io_events_dtype`.
261
+ If default-constructed, the instance represents a single struct.
262
+
263
+ Args:
264
+ size (int): number of structs, default=1.
265
+
266
+
267
+ .. seealso:: `CUfileIOEvents_t`
268
+ """
269
+ cdef:
270
+ readonly object _data
271
+
272
+ def __init__(self, size=1):
273
+ arr = _numpy.empty(size, dtype=io_events_dtype)
274
+ self._data = arr.view(_numpy.recarray)
275
+ assert self._data.itemsize == sizeof(CUfileIOEvents_t), \
276
+ f"itemsize {self._data.itemsize} mismatches struct size {sizeof(CUfileIOEvents_t)}"
277
+
278
+ def __repr__(self):
279
+ if self._data.size > 1:
280
+ return f"<{__name__}.IOEvents_Array_{self._data.size} object at {hex(id(self))}>"
281
+ else:
282
+ return f"<{__name__}.IOEvents object at {hex(id(self))}>"
283
+
284
+ @property
285
+ def ptr(self):
286
+ """Get the pointer address to the data as Python :class:`int`."""
287
+ return self._data.ctypes.data
288
+
289
+ def __int__(self):
290
+ if self._data.size > 1:
291
+ raise TypeError("int() argument must be a bytes-like object of size 1. "
292
+ "To get the pointer address of an array, use .ptr")
293
+ return self._data.ctypes.data
294
+
295
+ def __len__(self):
296
+ return self._data.size
297
+
298
+ def __eq__(self, other):
299
+ if not isinstance(other, IOEvents):
300
+ return False
301
+ if self._data.size != other._data.size:
302
+ return False
303
+ if self._data.dtype != other._data.dtype:
304
+ return False
305
+ return bool((self._data == other._data).all())
306
+
307
+ @property
308
+ def cookie(self):
309
+ """Union[~_numpy.intp, int]: """
310
+ if self._data.size == 1:
311
+ return int(self._data.cookie[0])
312
+ return self._data.cookie
313
+
314
+ @cookie.setter
315
+ def cookie(self, val):
316
+ self._data.cookie = val
317
+
318
+ @property
319
+ def status(self):
320
+ """Union[~_numpy.int32, int]: """
321
+ if self._data.size == 1:
322
+ return int(self._data.status[0])
323
+ return self._data.status
324
+
325
+ @status.setter
326
+ def status(self, val):
327
+ self._data.status = val
328
+
329
+ @property
330
+ def ret(self):
331
+ """Union[~_numpy.uint64, int]: """
332
+ if self._data.size == 1:
333
+ return int(self._data.ret[0])
334
+ return self._data.ret
335
+
336
+ @ret.setter
337
+ def ret(self, val):
338
+ self._data.ret = val
339
+
340
+ def __getitem__(self, key):
341
+ if isinstance(key, int):
342
+ size = self._data.size
343
+ if key >= size or key <= -(size+1):
344
+ raise IndexError("index is out of bounds")
345
+ if key < 0:
346
+ key += size
347
+ return IOEvents.from_data(self._data[key:key+1])
348
+ out = self._data[key]
349
+ if isinstance(out, _numpy.recarray) and out.dtype == io_events_dtype:
350
+ return IOEvents.from_data(out)
351
+ return out
352
+
353
+ def __setitem__(self, key, val):
354
+ self._data[key] = val
355
+
356
+ @staticmethod
357
+ def from_data(data):
358
+ """Create an IOEvents instance wrapping the given NumPy array.
359
+
360
+ Args:
361
+ data (_numpy.ndarray): a 1D array of dtype `io_events_dtype` holding the data.
362
+ """
363
+ cdef IOEvents obj = IOEvents.__new__(IOEvents)
364
+ if not isinstance(data, (_numpy.ndarray, _numpy.recarray)):
365
+ raise TypeError("data argument must be a NumPy ndarray")
366
+ if data.ndim != 1:
367
+ raise ValueError("data array must be 1D")
368
+ if data.dtype != io_events_dtype:
369
+ raise ValueError("data array must be of dtype io_events_dtype")
370
+ obj._data = data.view(_numpy.recarray)
371
+
372
+ return obj
373
+
374
+ @staticmethod
375
+ def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False):
376
+ """Create an IOEvents instance wrapping the given pointer.
377
+
378
+ Args:
379
+ ptr (intptr_t): pointer address as Python :class:`int` to the data.
380
+ size (int): number of structs, default=1.
381
+ readonly (bool): whether the data is read-only (to the user). default is `False`.
382
+ """
383
+ if ptr == 0:
384
+ raise ValueError("ptr must not be null (0)")
385
+ cdef IOEvents obj = IOEvents.__new__(IOEvents)
386
+ cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE
387
+ cdef object buf = PyMemoryView_FromMemory(
388
+ <char*>ptr, sizeof(CUfileIOEvents_t) * size, flag)
389
+ data = _numpy.ndarray((size,), buffer=buf,
390
+ dtype=io_events_dtype)
391
+ obj._data = data.view(_numpy.recarray)
392
+
393
+ return obj
394
+
395
+
396
+ descr_dtype = _numpy.dtype([
397
+ ("type", _numpy.int32, ),
398
+ ("handle", _py_anon_pod1_dtype, ),
399
+ ("fs_ops", _numpy.intp, ),
400
+ ], align=True)
401
+
402
+
403
+ cdef class Descr:
404
+ """Empty-initialize an array of `CUfileDescr_t`.
405
+
406
+ The resulting object is of length `size` and of dtype `descr_dtype`.
407
+ If default-constructed, the instance represents a single struct.
408
+
409
+ Args:
410
+ size (int): number of structs, default=1.
411
+
412
+
413
+ .. seealso:: `CUfileDescr_t`
414
+ """
415
+ cdef:
416
+ readonly object _data
417
+
418
+ def __init__(self, size=1):
419
+ arr = _numpy.empty(size, dtype=descr_dtype)
420
+ self._data = arr.view(_numpy.recarray)
421
+ assert self._data.itemsize == sizeof(CUfileDescr_t), \
422
+ f"itemsize {self._data.itemsize} mismatches struct size {sizeof(CUfileDescr_t)}"
423
+
424
+ def __repr__(self):
425
+ if self._data.size > 1:
426
+ return f"<{__name__}.Descr_Array_{self._data.size} object at {hex(id(self))}>"
427
+ else:
428
+ return f"<{__name__}.Descr object at {hex(id(self))}>"
429
+
430
+ @property
431
+ def ptr(self):
432
+ """Get the pointer address to the data as Python :class:`int`."""
433
+ return self._data.ctypes.data
434
+
435
+ def __int__(self):
436
+ if self._data.size > 1:
437
+ raise TypeError("int() argument must be a bytes-like object of size 1. "
438
+ "To get the pointer address of an array, use .ptr")
439
+ return self._data.ctypes.data
440
+
441
+ def __len__(self):
442
+ return self._data.size
443
+
444
+ def __eq__(self, other):
445
+ if not isinstance(other, Descr):
446
+ return False
447
+ if self._data.size != other._data.size:
448
+ return False
449
+ if self._data.dtype != other._data.dtype:
450
+ return False
451
+ return bool((self._data == other._data).all())
452
+
453
+ @property
454
+ def type(self):
455
+ """Union[~_numpy.int32, int]: """
456
+ if self._data.size == 1:
457
+ return int(self._data.type[0])
458
+ return self._data.type
459
+
460
+ @type.setter
461
+ def type(self, val):
462
+ self._data.type = val
463
+
464
+ @property
465
+ def handle(self):
466
+ """_py_anon_pod1_dtype: """
467
+ return self._data.handle
468
+
469
+ @handle.setter
470
+ def handle(self, val):
471
+ self._data.handle = val
472
+
473
+ @property
474
+ def fs_ops(self):
475
+ """Union[~_numpy.intp, int]: """
476
+ if self._data.size == 1:
477
+ return int(self._data.fs_ops[0])
478
+ return self._data.fs_ops
479
+
480
+ @fs_ops.setter
481
+ def fs_ops(self, val):
482
+ self._data.fs_ops = val
483
+
484
+ def __getitem__(self, key):
485
+ if isinstance(key, int):
486
+ size = self._data.size
487
+ if key >= size or key <= -(size+1):
488
+ raise IndexError("index is out of bounds")
489
+ if key < 0:
490
+ key += size
491
+ return Descr.from_data(self._data[key:key+1])
492
+ out = self._data[key]
493
+ if isinstance(out, _numpy.recarray) and out.dtype == descr_dtype:
494
+ return Descr.from_data(out)
495
+ return out
496
+
497
+ def __setitem__(self, key, val):
498
+ self._data[key] = val
499
+
500
+ @staticmethod
501
+ def from_data(data):
502
+ """Create an Descr instance wrapping the given NumPy array.
503
+
504
+ Args:
505
+ data (_numpy.ndarray): a 1D array of dtype `descr_dtype` holding the data.
506
+ """
507
+ cdef Descr obj = Descr.__new__(Descr)
508
+ if not isinstance(data, (_numpy.ndarray, _numpy.recarray)):
509
+ raise TypeError("data argument must be a NumPy ndarray")
510
+ if data.ndim != 1:
511
+ raise ValueError("data array must be 1D")
512
+ if data.dtype != descr_dtype:
513
+ raise ValueError("data array must be of dtype descr_dtype")
514
+ obj._data = data.view(_numpy.recarray)
515
+
516
+ return obj
517
+
518
+ @staticmethod
519
+ def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False):
520
+ """Create an Descr instance wrapping the given pointer.
521
+
522
+ Args:
523
+ ptr (intptr_t): pointer address as Python :class:`int` to the data.
524
+ size (int): number of structs, default=1.
525
+ readonly (bool): whether the data is read-only (to the user). default is `False`.
526
+ """
527
+ if ptr == 0:
528
+ raise ValueError("ptr must not be null (0)")
529
+ cdef Descr obj = Descr.__new__(Descr)
530
+ cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE
531
+ cdef object buf = PyMemoryView_FromMemory(
532
+ <char*>ptr, sizeof(CUfileDescr_t) * size, flag)
533
+ data = _numpy.ndarray((size,), buffer=buf,
534
+ dtype=descr_dtype)
535
+ obj._data = data.view(_numpy.recarray)
536
+
537
+ return obj
538
+
539
+
540
+ _py_anon_pod2_dtype = _numpy.dtype((
541
+ _numpy.dtype((_numpy.void, sizeof((<CUfileIOParams_t*>NULL).u))),
542
+ {
543
+ "batch": (_py_anon_pod3_dtype, 0),
544
+ }
545
+ ))
546
+
547
+
548
+ cdef class _py_anon_pod2:
549
+ """Empty-initialize an instance of `_anon_pod2`.
550
+
551
+
552
+ .. seealso:: `_anon_pod2`
553
+ """
554
+ cdef:
555
+ readonly object _data
556
+
557
+ readonly object _batch
558
+
559
+ def __init__(self):
560
+ arr = _numpy.empty(1, dtype=_py_anon_pod2_dtype)
561
+ self._data = arr.view(_numpy.recarray)
562
+ assert self._data.itemsize == sizeof((<CUfileIOParams_t*>NULL).u), \
563
+ f"itemsize {self._data.itemsize} mismatches union size {sizeof((<CUfileIOParams_t*>NULL).u)}"
564
+
565
+ def __repr__(self):
566
+ return f"<{__name__}._py_anon_pod2 object at {hex(id(self))}>"
567
+
568
+ @property
569
+ def ptr(self):
570
+ """Get the pointer address to the data as Python :class:`int`."""
571
+ return self._data.ctypes.data
572
+
573
+ def __int__(self):
574
+ return self._data.ctypes.data
575
+
576
+ def __eq__(self, other):
577
+ if not isinstance(other, _py_anon_pod2):
578
+ return False
579
+ if self._data.size != other._data.size:
580
+ return False
581
+ if self._data.dtype != other._data.dtype:
582
+ return False
583
+ return bool((self._data == other._data).all())
584
+
585
+ @property
586
+ def batch(self):
587
+ """_py_anon_pod3: """
588
+ return self._batch
589
+
590
+ def __setitem__(self, key, val):
591
+ self._data[key] = val
592
+
593
+ @staticmethod
594
+ def from_data(data):
595
+ """Create an _py_anon_pod2 instance wrapping the given NumPy array.
596
+
597
+ Args:
598
+ data (_numpy.ndarray): a 1D array of dtype `_py_anon_pod2_dtype` holding the data.
599
+ """
600
+ cdef _py_anon_pod2 obj = _py_anon_pod2.__new__(_py_anon_pod2)
601
+ if not isinstance(data, (_numpy.ndarray, _numpy.recarray)):
602
+ raise TypeError("data argument must be a NumPy ndarray")
603
+ if data.ndim != 1:
604
+ raise ValueError("data array must be 1D")
605
+ if data.dtype != _py_anon_pod2_dtype:
606
+ raise ValueError("data array must be of dtype _py_anon_pod2_dtype")
607
+ obj._data = data.view(_numpy.recarray)
608
+
609
+ batch_addr = obj._data.batch[0].__array_interface__['data'][0]
610
+ obj._batch = _py_anon_pod3.from_ptr(batch_addr)
611
+ return obj
612
+
613
+ @staticmethod
614
+ def from_ptr(intptr_t ptr, bint readonly=False):
615
+ """Create an _py_anon_pod2 instance wrapping the given pointer.
616
+
617
+ Args:
618
+ ptr (intptr_t): pointer address as Python :class:`int` to the data.
619
+ readonly (bool): whether the data is read-only (to the user). default is `False`.
620
+ """
621
+ if ptr == 0:
622
+ raise ValueError("ptr must not be null (0)")
623
+ cdef _py_anon_pod2 obj = _py_anon_pod2.__new__(_py_anon_pod2)
624
+ cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE
625
+ cdef object buf = PyMemoryView_FromMemory(
626
+ <char*>ptr, sizeof((<CUfileIOParams_t*>NULL).u), flag)
627
+ data = _numpy.ndarray((1,), buffer=buf,
628
+ dtype=_py_anon_pod2_dtype)
629
+ obj._data = data.view(_numpy.recarray)
630
+
631
+ batch_addr = obj._data.batch[0].__array_interface__['data'][0]
632
+ obj._batch = _py_anon_pod3.from_ptr(batch_addr)
633
+ return obj
634
+
635
+
636
+ io_params_dtype = _numpy.dtype([
637
+ ("mode", _numpy.int32, ),
638
+ ("u", _py_anon_pod2_dtype, ),
639
+ ("fh", _numpy.intp, ),
640
+ ("opcode", _numpy.int32, ),
641
+ ("cookie", _numpy.intp, ),
642
+ ], align=True)
643
+
644
+
645
+ cdef class IOParams:
646
+ """Empty-initialize an array of `CUfileIOParams_t`.
647
+
648
+ The resulting object is of length `size` and of dtype `io_params_dtype`.
649
+ If default-constructed, the instance represents a single struct.
650
+
651
+ Args:
652
+ size (int): number of structs, default=1.
653
+
654
+
655
+ .. seealso:: `CUfileIOParams_t`
656
+ """
657
+ cdef:
658
+ readonly object _data
659
+
660
+ def __init__(self, size=1):
661
+ arr = _numpy.empty(size, dtype=io_params_dtype)
662
+ self._data = arr.view(_numpy.recarray)
663
+ assert self._data.itemsize == sizeof(CUfileIOParams_t), \
664
+ f"itemsize {self._data.itemsize} mismatches struct size {sizeof(CUfileIOParams_t)}"
665
+
666
+ def __repr__(self):
667
+ if self._data.size > 1:
668
+ return f"<{__name__}.IOParams_Array_{self._data.size} object at {hex(id(self))}>"
669
+ else:
670
+ return f"<{__name__}.IOParams object at {hex(id(self))}>"
671
+
672
+ @property
673
+ def ptr(self):
674
+ """Get the pointer address to the data as Python :class:`int`."""
675
+ return self._data.ctypes.data
676
+
677
+ def __int__(self):
678
+ if self._data.size > 1:
679
+ raise TypeError("int() argument must be a bytes-like object of size 1. "
680
+ "To get the pointer address of an array, use .ptr")
681
+ return self._data.ctypes.data
682
+
683
+ def __len__(self):
684
+ return self._data.size
685
+
686
+ def __eq__(self, other):
687
+ if not isinstance(other, IOParams):
688
+ return False
689
+ if self._data.size != other._data.size:
690
+ return False
691
+ if self._data.dtype != other._data.dtype:
692
+ return False
693
+ return bool((self._data == other._data).all())
694
+
695
+ @property
696
+ def mode(self):
697
+ """Union[~_numpy.int32, int]: """
698
+ if self._data.size == 1:
699
+ return int(self._data.mode[0])
700
+ return self._data.mode
701
+
702
+ @mode.setter
703
+ def mode(self, val):
704
+ self._data.mode = val
705
+
706
+ @property
707
+ def u(self):
708
+ """_py_anon_pod2_dtype: """
709
+ return self._data.u
710
+
711
+ @u.setter
712
+ def u(self, val):
713
+ self._data.u = val
714
+
715
+ @property
716
+ def fh(self):
717
+ """Union[~_numpy.intp, int]: """
718
+ if self._data.size == 1:
719
+ return int(self._data.fh[0])
720
+ return self._data.fh
721
+
722
+ @fh.setter
723
+ def fh(self, val):
724
+ self._data.fh = val
725
+
726
+ @property
727
+ def opcode(self):
728
+ """Union[~_numpy.int32, int]: """
729
+ if self._data.size == 1:
730
+ return int(self._data.opcode[0])
731
+ return self._data.opcode
732
+
733
+ @opcode.setter
734
+ def opcode(self, val):
735
+ self._data.opcode = val
736
+
737
+ @property
738
+ def cookie(self):
739
+ """Union[~_numpy.intp, int]: """
740
+ if self._data.size == 1:
741
+ return int(self._data.cookie[0])
742
+ return self._data.cookie
743
+
744
+ @cookie.setter
745
+ def cookie(self, val):
746
+ self._data.cookie = val
747
+
748
+ def __getitem__(self, key):
749
+ if isinstance(key, int):
750
+ size = self._data.size
751
+ if key >= size or key <= -(size+1):
752
+ raise IndexError("index is out of bounds")
753
+ if key < 0:
754
+ key += size
755
+ return IOParams.from_data(self._data[key:key+1])
756
+ out = self._data[key]
757
+ if isinstance(out, _numpy.recarray) and out.dtype == io_params_dtype:
758
+ return IOParams.from_data(out)
759
+ return out
760
+
761
+ def __setitem__(self, key, val):
762
+ self._data[key] = val
763
+
764
+ @staticmethod
765
+ def from_data(data):
766
+ """Create an IOParams instance wrapping the given NumPy array.
767
+
768
+ Args:
769
+ data (_numpy.ndarray): a 1D array of dtype `io_params_dtype` holding the data.
770
+ """
771
+ cdef IOParams obj = IOParams.__new__(IOParams)
772
+ if not isinstance(data, (_numpy.ndarray, _numpy.recarray)):
773
+ raise TypeError("data argument must be a NumPy ndarray")
774
+ if data.ndim != 1:
775
+ raise ValueError("data array must be 1D")
776
+ if data.dtype != io_params_dtype:
777
+ raise ValueError("data array must be of dtype io_params_dtype")
778
+ obj._data = data.view(_numpy.recarray)
779
+
780
+ return obj
781
+
782
+ @staticmethod
783
+ def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False):
784
+ """Create an IOParams instance wrapping the given pointer.
785
+
786
+ Args:
787
+ ptr (intptr_t): pointer address as Python :class:`int` to the data.
788
+ size (int): number of structs, default=1.
789
+ readonly (bool): whether the data is read-only (to the user). default is `False`.
790
+ """
791
+ if ptr == 0:
792
+ raise ValueError("ptr must not be null (0)")
793
+ cdef IOParams obj = IOParams.__new__(IOParams)
794
+ cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE
795
+ cdef object buf = PyMemoryView_FromMemory(
796
+ <char*>ptr, sizeof(CUfileIOParams_t) * size, flag)
797
+ data = _numpy.ndarray((size,), buffer=buf,
798
+ dtype=io_params_dtype)
799
+ obj._data = data.view(_numpy.recarray)
800
+
801
+ return obj
802
+
803
+
804
+ # Hack: Overwrite the generated descr_dtype, which NumPy deduced the offset wrong.
805
+ descr_dtype = _numpy.dtype({
806
+ "names": ['type', 'handle', 'fs_ops'],
807
+ "formats": [_numpy.int32, _py_anon_pod1_dtype, _numpy.intp],
808
+ "offsets": [0, 8, 16],
809
+ }, align=True)
810
+
811
+ # Hack: Overwrite the generated io_params_dtype, which NumPy deduced the offset wrong.
812
+ io_params_dtype = _numpy.dtype({
813
+ "names": ['mode', 'u', 'fh', 'opcode', 'cookie'],
814
+ "formats": [_numpy.int32, _py_anon_pod2_dtype, _numpy.intp, _numpy.int32, _numpy.intp],
815
+ "offsets": [0, 8, 40, 48, 56],
816
+ }, align=True)
817
+
818
+
819
+ ###############################################################################
820
+ # Enum
821
+ ###############################################################################
822
+
823
+ class OpError(_IntEnum):
824
+ """See `CUfileOpError`."""
825
+ SUCCESS = CU_FILE_SUCCESS
826
+ DRIVER_NOT_INITIALIZED = CU_FILE_DRIVER_NOT_INITIALIZED
827
+ DRIVER_INVALID_PROPS = CU_FILE_DRIVER_INVALID_PROPS
828
+ DRIVER_UNSUPPORTED_LIMIT = CU_FILE_DRIVER_UNSUPPORTED_LIMIT
829
+ DRIVER_VERSION_MISMATCH = CU_FILE_DRIVER_VERSION_MISMATCH
830
+ DRIVER_VERSION_READ_ERROR = CU_FILE_DRIVER_VERSION_READ_ERROR
831
+ DRIVER_CLOSING = CU_FILE_DRIVER_CLOSING
832
+ PLATFORM_NOT_SUPPORTED = CU_FILE_PLATFORM_NOT_SUPPORTED
833
+ IO_NOT_SUPPORTED = CU_FILE_IO_NOT_SUPPORTED
834
+ DEVICE_NOT_SUPPORTED = CU_FILE_DEVICE_NOT_SUPPORTED
835
+ NVFS_DRIVER_ERROR = CU_FILE_NVFS_DRIVER_ERROR
836
+ CUDA_DRIVER_ERROR = CU_FILE_CUDA_DRIVER_ERROR
837
+ CUDA_POINTER_INVALID = CU_FILE_CUDA_POINTER_INVALID
838
+ CUDA_MEMORY_TYPE_INVALID = CU_FILE_CUDA_MEMORY_TYPE_INVALID
839
+ CUDA_POINTER_RANGE_ERROR = CU_FILE_CUDA_POINTER_RANGE_ERROR
840
+ CUDA_CONTEXT_MISMATCH = CU_FILE_CUDA_CONTEXT_MISMATCH
841
+ INVALID_MAPPING_SIZE = CU_FILE_INVALID_MAPPING_SIZE
842
+ INVALID_MAPPING_RANGE = CU_FILE_INVALID_MAPPING_RANGE
843
+ INVALID_FILE_TYPE = CU_FILE_INVALID_FILE_TYPE
844
+ INVALID_FILE_OPEN_FLAG = CU_FILE_INVALID_FILE_OPEN_FLAG
845
+ DIO_NOT_SET = CU_FILE_DIO_NOT_SET
846
+ INVALID_VALUE = CU_FILE_INVALID_VALUE
847
+ MEMORY_ALREADY_REGISTERED = CU_FILE_MEMORY_ALREADY_REGISTERED
848
+ MEMORY_NOT_REGISTERED = CU_FILE_MEMORY_NOT_REGISTERED
849
+ PERMISSION_DENIED = CU_FILE_PERMISSION_DENIED
850
+ DRIVER_ALREADY_OPEN = CU_FILE_DRIVER_ALREADY_OPEN
851
+ HANDLE_NOT_REGISTERED = CU_FILE_HANDLE_NOT_REGISTERED
852
+ HANDLE_ALREADY_REGISTERED = CU_FILE_HANDLE_ALREADY_REGISTERED
853
+ DEVICE_NOT_FOUND = CU_FILE_DEVICE_NOT_FOUND
854
+ INTERNAL_ERROR = CU_FILE_INTERNAL_ERROR
855
+ GETNEWFD_FAILED = CU_FILE_GETNEWFD_FAILED
856
+ NVFS_SETUP_ERROR = CU_FILE_NVFS_SETUP_ERROR
857
+ IO_DISABLED = CU_FILE_IO_DISABLED
858
+ BATCH_SUBMIT_FAILED = CU_FILE_BATCH_SUBMIT_FAILED
859
+ GPU_MEMORY_PINNING_FAILED = CU_FILE_GPU_MEMORY_PINNING_FAILED
860
+ BATCH_FULL = CU_FILE_BATCH_FULL
861
+ ASYNC_NOT_SUPPORTED = CU_FILE_ASYNC_NOT_SUPPORTED
862
+ IO_MAX_ERROR = CU_FILE_IO_MAX_ERROR
863
+
864
+ class DriverStatusFlags(_IntEnum):
865
+ """See `CUfileDriverStatusFlags_t`."""
866
+ LUSTRE_SUPPORTED = CU_FILE_LUSTRE_SUPPORTED
867
+ WEKAFS_SUPPORTED = CU_FILE_WEKAFS_SUPPORTED
868
+ NFS_SUPPORTED = CU_FILE_NFS_SUPPORTED
869
+ GPFS_SUPPORTED = CU_FILE_GPFS_SUPPORTED
870
+ NVME_SUPPORTED = CU_FILE_NVME_SUPPORTED
871
+ NVMEOF_SUPPORTED = CU_FILE_NVMEOF_SUPPORTED
872
+ SCSI_SUPPORTED = CU_FILE_SCSI_SUPPORTED
873
+ SCALEFLUX_CSD_SUPPORTED = CU_FILE_SCALEFLUX_CSD_SUPPORTED
874
+ NVMESH_SUPPORTED = CU_FILE_NVMESH_SUPPORTED
875
+ BEEGFS_SUPPORTED = CU_FILE_BEEGFS_SUPPORTED
876
+ NVME_P2P_SUPPORTED = CU_FILE_NVME_P2P_SUPPORTED
877
+ SCATEFS_SUPPORTED = CU_FILE_SCATEFS_SUPPORTED
878
+
879
+ class DriverControlFlags(_IntEnum):
880
+ """See `CUfileDriverControlFlags_t`."""
881
+ USE_POLL_MODE = CU_FILE_USE_POLL_MODE
882
+ ALLOW_COMPAT_MODE = CU_FILE_ALLOW_COMPAT_MODE
883
+
884
+ class FeatureFlags(_IntEnum):
885
+ """See `CUfileFeatureFlags_t`."""
886
+ DYN_ROUTING_SUPPORTED = CU_FILE_DYN_ROUTING_SUPPORTED
887
+ BATCH_IO_SUPPORTED = CU_FILE_BATCH_IO_SUPPORTED
888
+ STREAMS_SUPPORTED = CU_FILE_STREAMS_SUPPORTED
889
+ PARALLEL_IO_SUPPORTED = CU_FILE_PARALLEL_IO_SUPPORTED
890
+
891
+ class FileHandleType(_IntEnum):
892
+ """See `CUfileFileHandleType`."""
893
+ OPAQUE_FD = CU_FILE_HANDLE_TYPE_OPAQUE_FD
894
+ OPAQUE_WIN32 = CU_FILE_HANDLE_TYPE_OPAQUE_WIN32
895
+ USERSPACE_FS = CU_FILE_HANDLE_TYPE_USERSPACE_FS
896
+
897
+ class Opcode(_IntEnum):
898
+ """See `CUfileOpcode_t`."""
899
+ READ = CUFILE_READ
900
+ WRITE = CUFILE_WRITE
901
+
902
+ class Status(_IntEnum):
903
+ """See `CUfileStatus_t`."""
904
+ WAITING = CUFILE_WAITING
905
+ PENDING = CUFILE_PENDING
906
+ INVALID = CUFILE_INVALID
907
+ CANCELED = CUFILE_CANCELED
908
+ COMPLETE = CUFILE_COMPLETE
909
+ TIMEOUT = CUFILE_TIMEOUT
910
+ FAILED = CUFILE_FAILED
911
+
912
+ class BatchMode(_IntEnum):
913
+ """See `CUfileBatchMode_t`."""
914
+ BATCH = CUFILE_BATCH
915
+
916
+ class SizeTConfigParameter(_IntEnum):
917
+ """See `CUFileSizeTConfigParameter_t`."""
918
+ PROFILE_STATS = CUFILE_PARAM_PROFILE_STATS
919
+ EXECUTION_MAX_IO_QUEUE_DEPTH = CUFILE_PARAM_EXECUTION_MAX_IO_QUEUE_DEPTH
920
+ EXECUTION_MAX_IO_THREADS = CUFILE_PARAM_EXECUTION_MAX_IO_THREADS
921
+ EXECUTION_MIN_IO_THRESHOLD_SIZE_KB = CUFILE_PARAM_EXECUTION_MIN_IO_THRESHOLD_SIZE_KB
922
+ EXECUTION_MAX_REQUEST_PARALLELISM = CUFILE_PARAM_EXECUTION_MAX_REQUEST_PARALLELISM
923
+ PROPERTIES_MAX_DIRECT_IO_SIZE_KB = CUFILE_PARAM_PROPERTIES_MAX_DIRECT_IO_SIZE_KB
924
+ PROPERTIES_MAX_DEVICE_CACHE_SIZE_KB = CUFILE_PARAM_PROPERTIES_MAX_DEVICE_CACHE_SIZE_KB
925
+ PROPERTIES_PER_BUFFER_CACHE_SIZE_KB = CUFILE_PARAM_PROPERTIES_PER_BUFFER_CACHE_SIZE_KB
926
+ PROPERTIES_MAX_DEVICE_PINNED_MEM_SIZE_KB = CUFILE_PARAM_PROPERTIES_MAX_DEVICE_PINNED_MEM_SIZE_KB
927
+ PROPERTIES_IO_BATCHSIZE = CUFILE_PARAM_PROPERTIES_IO_BATCHSIZE
928
+ POLLTHRESHOLD_SIZE_KB = CUFILE_PARAM_POLLTHRESHOLD_SIZE_KB
929
+ PROPERTIES_BATCH_IO_TIMEOUT_MS = CUFILE_PARAM_PROPERTIES_BATCH_IO_TIMEOUT_MS
930
+
931
+ class BoolConfigParameter(_IntEnum):
932
+ """See `CUFileBoolConfigParameter_t`."""
933
+ PROPERTIES_USE_POLL_MODE = CUFILE_PARAM_PROPERTIES_USE_POLL_MODE
934
+ PROPERTIES_ALLOW_COMPAT_MODE = CUFILE_PARAM_PROPERTIES_ALLOW_COMPAT_MODE
935
+ FORCE_COMPAT_MODE = CUFILE_PARAM_FORCE_COMPAT_MODE
936
+ FS_MISC_API_CHECK_AGGRESSIVE = CUFILE_PARAM_FS_MISC_API_CHECK_AGGRESSIVE
937
+ EXECUTION_PARALLEL_IO = CUFILE_PARAM_EXECUTION_PARALLEL_IO
938
+ PROFILE_NVTX = CUFILE_PARAM_PROFILE_NVTX
939
+ PROPERTIES_ALLOW_SYSTEM_MEMORY = CUFILE_PARAM_PROPERTIES_ALLOW_SYSTEM_MEMORY
940
+ USE_PCIP2PDMA = CUFILE_PARAM_USE_PCIP2PDMA
941
+ PREFER_IO_URING = CUFILE_PARAM_PREFER_IO_URING
942
+ FORCE_ODIRECT_MODE = CUFILE_PARAM_FORCE_ODIRECT_MODE
943
+ SKIP_TOPOLOGY_DETECTION = CUFILE_PARAM_SKIP_TOPOLOGY_DETECTION
944
+ STREAM_MEMOPS_BYPASS = CUFILE_PARAM_STREAM_MEMOPS_BYPASS
945
+
946
+ class StringConfigParameter(_IntEnum):
947
+ """See `CUFileStringConfigParameter_t`."""
948
+ LOGGING_LEVEL = CUFILE_PARAM_LOGGING_LEVEL
949
+ ENV_LOGFILE_PATH = CUFILE_PARAM_ENV_LOGFILE_PATH
950
+ LOG_DIR = CUFILE_PARAM_LOG_DIR
951
+
952
+
953
+ ###############################################################################
954
+ # Error handling
955
+ ###############################################################################
956
+
957
+ ctypedef fused ReturnT:
958
+ CUfileError_t
959
+ ssize_t
960
+
961
+
962
+ class cuFileError(Exception):
963
+
964
+ def __init__(self, status, cu_err=None):
965
+ self.status = status
966
+ self.cuda_error = cu_err
967
+ s = OpError(status)
968
+ cdef str err = f"{s.name} ({s.value}): {op_status_error(status)}"
969
+ if cu_err is not None:
970
+ e = pyCUresult(cu_err)
971
+ err += f"; CUDA status: {e.name} ({e.value})"
972
+ super(cuFileError, self).__init__(err)
973
+
974
+ def __reduce__(self):
975
+ return (type(self), (self.status, self.cuda_error))
976
+
977
+
978
+ @cython.profile(False)
979
+ cdef int check_status(ReturnT status) except 1 nogil:
980
+ if ReturnT is CUfileError_t:
981
+ if status.err != 0 or status.cu_err != 0:
982
+ with gil:
983
+ raise cuFileError(status.err, status.cu_err)
984
+ elif ReturnT is ssize_t:
985
+ if status == -1:
986
+ # note: this assumes cuFile already properly resets errno in each API
987
+ with gil:
988
+ raise cuFileError(errno.errno)
989
+ return 0
990
+
991
+
992
+ ###############################################################################
993
+ # Wrapper functions
994
+ ###############################################################################
995
+
996
+ cpdef intptr_t handle_register(intptr_t descr) except? 0:
997
+ """cuFileHandleRegister is required, and performs extra checking that is memoized to provide increased performance on later cuFile operations.
998
+
999
+ Args:
1000
+ descr (intptr_t): ``CUfileDescr_t`` file descriptor (OS agnostic).
1001
+
1002
+ Returns:
1003
+ intptr_t: ``CUfileHandle_t`` opaque file handle for IO operations.
1004
+
1005
+ .. seealso:: `cuFileHandleRegister`
1006
+ """
1007
+ cdef Handle fh
1008
+ with nogil:
1009
+ status = cuFileHandleRegister(&fh, <CUfileDescr_t*>descr)
1010
+ check_status(status)
1011
+ return <intptr_t>fh
1012
+
1013
+
1014
+ cpdef void handle_deregister(intptr_t fh) except*:
1015
+ """releases a registered filehandle from cuFile.
1016
+
1017
+ Args:
1018
+ fh (intptr_t): ``CUfileHandle_t`` file handle.
1019
+
1020
+ .. seealso:: `cuFileHandleDeregister`
1021
+ """
1022
+ cuFileHandleDeregister(<Handle>fh)
1023
+
1024
+
1025
+ cpdef buf_register(intptr_t buf_ptr_base, size_t length, int flags):
1026
+ """register an existing cudaMalloced memory with cuFile to pin for GPUDirect Storage access or register host allocated memory with cuFile.
1027
+
1028
+ Args:
1029
+ buf_ptr_base (intptr_t): buffer pointer allocated.
1030
+ length (size_t): size of memory region from the above specified bufPtr.
1031
+ flags (int): CU_FILE_RDMA_REGISTER.
1032
+
1033
+ .. seealso:: `cuFileBufRegister`
1034
+ """
1035
+ with nogil:
1036
+ status = cuFileBufRegister(<const void*>buf_ptr_base, length, flags)
1037
+ check_status(status)
1038
+
1039
+
1040
+ cpdef buf_deregister(intptr_t buf_ptr_base):
1041
+ """deregister an already registered device or host memory from cuFile.
1042
+
1043
+ Args:
1044
+ buf_ptr_base (intptr_t): buffer pointer to deregister.
1045
+
1046
+ .. seealso:: `cuFileBufDeregister`
1047
+ """
1048
+ with nogil:
1049
+ status = cuFileBufDeregister(<const void*>buf_ptr_base)
1050
+ check_status(status)
1051
+
1052
+
1053
+ cpdef read(intptr_t fh, intptr_t buf_ptr_base, size_t size, off_t file_offset, off_t buf_ptr_offset):
1054
+ """read data from a registered file handle to a specified device or host memory.
1055
+
1056
+ Args:
1057
+ fh (intptr_t): ``CUfileHandle_t`` opaque file handle.
1058
+ buf_ptr_base (intptr_t): base address of buffer in device or host memory.
1059
+ size (size_t): size bytes to read.
1060
+ file_offset (off_t): file-offset from begining of the file.
1061
+ buf_ptr_offset (off_t): offset relative to the buf_ptr_base pointer to read into.
1062
+
1063
+ .. seealso:: `cuFileRead`
1064
+ """
1065
+ with nogil:
1066
+ status = cuFileRead(<Handle>fh, <void*>buf_ptr_base, size, file_offset, buf_ptr_offset)
1067
+ check_status(status)
1068
+
1069
+
1070
+ cpdef write(intptr_t fh, intptr_t buf_ptr_base, size_t size, off_t file_offset, off_t buf_ptr_offset):
1071
+ """write data from a specified device or host memory to a registered file handle.
1072
+
1073
+ Args:
1074
+ fh (intptr_t): ``CUfileHandle_t`` opaque file handle.
1075
+ buf_ptr_base (intptr_t): base address of buffer in device or host memory.
1076
+ size (size_t): size bytes to write.
1077
+ file_offset (off_t): file-offset from begining of the file.
1078
+ buf_ptr_offset (off_t): offset relative to the buf_ptr_base pointer to write from.
1079
+
1080
+ .. seealso:: `cuFileWrite`
1081
+ """
1082
+ with nogil:
1083
+ status = cuFileWrite(<Handle>fh, <const void*>buf_ptr_base, size, file_offset, buf_ptr_offset)
1084
+ check_status(status)
1085
+
1086
+
1087
+ cpdef driver_open():
1088
+ """Initialize the cuFile library and open the nvidia-fs driver.
1089
+
1090
+ .. seealso:: `cuFileDriverOpen`
1091
+ """
1092
+ with nogil:
1093
+ status = cuFileDriverOpen()
1094
+ check_status(status)
1095
+
1096
+
1097
+ cpdef use_count():
1098
+ """returns use count of cufile drivers at that moment by the process.
1099
+
1100
+ .. seealso:: `cuFileUseCount`
1101
+ """
1102
+ with nogil:
1103
+ status = cuFileUseCount()
1104
+ check_status(status)
1105
+
1106
+
1107
+ cpdef driver_get_properties(intptr_t props):
1108
+ """Gets the Driver session properties.
1109
+
1110
+ Args:
1111
+ props (intptr_t): to set.
1112
+
1113
+ .. seealso:: `cuFileDriverGetProperties`
1114
+ """
1115
+ with nogil:
1116
+ status = cuFileDriverGetProperties(<CUfileDrvProps_t*>props)
1117
+ check_status(status)
1118
+
1119
+
1120
+ cpdef driver_set_poll_mode(bint poll, size_t poll_threshold_size):
1121
+ """Sets whether the Read/Write APIs use polling to do IO operations.
1122
+
1123
+ Args:
1124
+ poll (bint): boolean to indicate whether to use poll mode or not.
1125
+ poll_threshold_size (size_t): max IO size to use for POLLING mode in KB.
1126
+
1127
+ .. seealso:: `cuFileDriverSetPollMode`
1128
+ """
1129
+ with nogil:
1130
+ status = cuFileDriverSetPollMode(<cpp_bool>poll, poll_threshold_size)
1131
+ check_status(status)
1132
+
1133
+
1134
+ cpdef driver_set_max_direct_io_size(size_t max_direct_io_size):
1135
+ """Control parameter to set max IO size(KB) used by the library to talk to nvidia-fs driver.
1136
+
1137
+ Args:
1138
+ max_direct_io_size (size_t): maximum allowed direct io size in KB.
1139
+
1140
+ .. seealso:: `cuFileDriverSetMaxDirectIOSize`
1141
+ """
1142
+ with nogil:
1143
+ status = cuFileDriverSetMaxDirectIOSize(max_direct_io_size)
1144
+ check_status(status)
1145
+
1146
+
1147
+ cpdef driver_set_max_cache_size(size_t max_cache_size):
1148
+ """Control parameter to set maximum GPU memory reserved per device by the library for internal buffering.
1149
+
1150
+ Args:
1151
+ max_cache_size (size_t): The maximum GPU buffer space per device used for internal use in KB.
1152
+
1153
+ .. seealso:: `cuFileDriverSetMaxCacheSize`
1154
+ """
1155
+ with nogil:
1156
+ status = cuFileDriverSetMaxCacheSize(max_cache_size)
1157
+ check_status(status)
1158
+
1159
+
1160
+ cpdef driver_set_max_pinned_mem_size(size_t max_pinned_size):
1161
+ """Sets maximum buffer space that is pinned in KB for use by ``cuFileBufRegister``.
1162
+
1163
+ Args:
1164
+ max_pinned_size (size_t): maximum buffer space that is pinned in KB.
1165
+
1166
+ .. seealso:: `cuFileDriverSetMaxPinnedMemSize`
1167
+ """
1168
+ with nogil:
1169
+ status = cuFileDriverSetMaxPinnedMemSize(max_pinned_size)
1170
+ check_status(status)
1171
+
1172
+
1173
+ cpdef intptr_t batch_io_set_up(unsigned nr) except? 0:
1174
+ cdef BatchHandle batch_idp
1175
+ with nogil:
1176
+ status = cuFileBatchIOSetUp(&batch_idp, nr)
1177
+ check_status(status)
1178
+ return <intptr_t>batch_idp
1179
+
1180
+
1181
+ cpdef batch_io_submit(intptr_t batch_idp, unsigned nr, intptr_t iocbp, unsigned int flags):
1182
+ with nogil:
1183
+ status = cuFileBatchIOSubmit(<BatchHandle>batch_idp, nr, <CUfileIOParams_t*>iocbp, flags)
1184
+ check_status(status)
1185
+
1186
+
1187
+ cpdef batch_io_get_status(intptr_t batch_idp, unsigned min_nr, intptr_t nr, intptr_t iocbp, intptr_t timeout):
1188
+ with nogil:
1189
+ status = cuFileBatchIOGetStatus(<BatchHandle>batch_idp, min_nr, <unsigned*>nr, <CUfileIOEvents_t*>iocbp, <timespec*>timeout)
1190
+ check_status(status)
1191
+
1192
+
1193
+ cpdef batch_io_cancel(intptr_t batch_idp):
1194
+ with nogil:
1195
+ status = cuFileBatchIOCancel(<BatchHandle>batch_idp)
1196
+ check_status(status)
1197
+
1198
+
1199
+ cpdef void batch_io_destroy(intptr_t batch_idp) except*:
1200
+ cuFileBatchIODestroy(<BatchHandle>batch_idp)
1201
+
1202
+
1203
+ cpdef read_async(intptr_t fh, intptr_t buf_ptr_base, intptr_t size_p, intptr_t file_offset_p, intptr_t buf_ptr_offset_p, intptr_t bytes_read_p, intptr_t stream):
1204
+ with nogil:
1205
+ status = cuFileReadAsync(<Handle>fh, <void*>buf_ptr_base, <size_t*>size_p, <off_t*>file_offset_p, <off_t*>buf_ptr_offset_p, <ssize_t*>bytes_read_p, <void*>stream)
1206
+ check_status(status)
1207
+
1208
+
1209
+ cpdef write_async(intptr_t fh, intptr_t buf_ptr_base, intptr_t size_p, intptr_t file_offset_p, intptr_t buf_ptr_offset_p, intptr_t bytes_written_p, intptr_t stream):
1210
+ with nogil:
1211
+ status = cuFileWriteAsync(<Handle>fh, <void*>buf_ptr_base, <size_t*>size_p, <off_t*>file_offset_p, <off_t*>buf_ptr_offset_p, <ssize_t*>bytes_written_p, <void*>stream)
1212
+ check_status(status)
1213
+
1214
+
1215
+ cpdef stream_register(intptr_t stream, unsigned flags):
1216
+ with nogil:
1217
+ status = cuFileStreamRegister(<void*>stream, flags)
1218
+ check_status(status)
1219
+
1220
+
1221
+ cpdef stream_deregister(intptr_t stream):
1222
+ with nogil:
1223
+ status = cuFileStreamDeregister(<void*>stream)
1224
+ check_status(status)
1225
+
1226
+
1227
+ cpdef int get_version() except? 0:
1228
+ cdef int version
1229
+ with nogil:
1230
+ status = cuFileGetVersion(&version)
1231
+ check_status(status)
1232
+ return version
1233
+
1234
+
1235
+ cpdef size_t get_parameter_size_t(int param) except? 0:
1236
+ cdef size_t value
1237
+ with nogil:
1238
+ status = cuFileGetParameterSizeT(<_SizeTConfigParameter>param, &value)
1239
+ check_status(status)
1240
+ return value
1241
+
1242
+
1243
+ cpdef bint get_parameter_bool(int param) except? 0:
1244
+ cdef cpp_bool value
1245
+ with nogil:
1246
+ status = cuFileGetParameterBool(<_BoolConfigParameter>param, &value)
1247
+ check_status(status)
1248
+ return <bint>value
1249
+
1250
+
1251
+ cpdef str get_parameter_string(int param, int len):
1252
+ cdef bytes _desc_str_ = bytes(len)
1253
+ cdef char* desc_str = _desc_str_
1254
+ with nogil:
1255
+ status = cuFileGetParameterString(<_StringConfigParameter>param, desc_str, len)
1256
+ check_status(status)
1257
+ return _desc_str_.decode()
1258
+
1259
+
1260
+ cpdef set_parameter_size_t(int param, size_t value):
1261
+ with nogil:
1262
+ status = cuFileSetParameterSizeT(<_SizeTConfigParameter>param, value)
1263
+ check_status(status)
1264
+
1265
+
1266
+ cpdef set_parameter_bool(int param, bint value):
1267
+ with nogil:
1268
+ status = cuFileSetParameterBool(<_BoolConfigParameter>param, <cpp_bool>value)
1269
+ check_status(status)
1270
+
1271
+
1272
+ cpdef set_parameter_string(int param, intptr_t desc_str):
1273
+ with nogil:
1274
+ status = cuFileSetParameterString(<_StringConfigParameter>param, <const char*>desc_str)
1275
+ check_status(status)
1276
+
1277
+
1278
+ cpdef str op_status_error(int status):
1279
+ """cufileop status string.
1280
+
1281
+ Args:
1282
+ status (OpError): the error status to query.
1283
+
1284
+ .. seealso:: `cufileop_status_error`
1285
+ """
1286
+ cdef bytes _output_
1287
+ _output_ = cufileop_status_error(<_OpError>status)
1288
+ return _output_.decode()
1289
+
1290
+
1291
+ cpdef driver_close():
1292
+ """reset the cuFile library and release the nvidia-fs driver
1293
+ """
1294
+ with nogil:
1295
+ status = cuFileDriverClose_v2()
1296
+ check_status(status)
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cycufile.cpp ADDED
The diff for this file is too large to render. See raw diff
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cycufile.pxd ADDED
@@ -0,0 +1,258 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ #
3
+ # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
4
+ #
5
+ # This code was automatically generated across versions from 12.9.0 to 12.9.1. Do not modify it directly.
6
+
7
+ from libc.stdint cimport uint32_t, uint64_t
8
+ from libc.time cimport time_t
9
+ from libcpp cimport bool as cpp_bool
10
+ from posix.types cimport off_t
11
+
12
+ cimport cuda.bindings.cydriver
13
+ from cuda.bindings.cydriver cimport CUresult
14
+
15
+
16
+ ###############################################################################
17
+ # Types (structs, enums, ...)
18
+ ###############################################################################
19
+
20
+ # TODO: switch to "from libc.time cimport timespec" once we can use recent
21
+ # Cython to build
22
+ cdef extern from "<time.h>":
23
+ cdef struct timespec:
24
+ time_t tv_sec
25
+ long tv_nsec
26
+ cdef extern from "<sys/socket.h>":
27
+ cdef struct sockaddr:
28
+ unsigned short sa_family
29
+ char sa_data[14]
30
+ ctypedef sockaddr sockaddr_t
31
+
32
+
33
+ cdef extern from '<cufile.h>':
34
+ # enums
35
+ ctypedef enum CUfileOpError:
36
+ CU_FILE_SUCCESS
37
+ CU_FILE_DRIVER_NOT_INITIALIZED
38
+ CU_FILE_DRIVER_INVALID_PROPS
39
+ CU_FILE_DRIVER_UNSUPPORTED_LIMIT
40
+ CU_FILE_DRIVER_VERSION_MISMATCH
41
+ CU_FILE_DRIVER_VERSION_READ_ERROR
42
+ CU_FILE_DRIVER_CLOSING
43
+ CU_FILE_PLATFORM_NOT_SUPPORTED
44
+ CU_FILE_IO_NOT_SUPPORTED
45
+ CU_FILE_DEVICE_NOT_SUPPORTED
46
+ CU_FILE_NVFS_DRIVER_ERROR
47
+ CU_FILE_CUDA_DRIVER_ERROR
48
+ CU_FILE_CUDA_POINTER_INVALID
49
+ CU_FILE_CUDA_MEMORY_TYPE_INVALID
50
+ CU_FILE_CUDA_POINTER_RANGE_ERROR
51
+ CU_FILE_CUDA_CONTEXT_MISMATCH
52
+ CU_FILE_INVALID_MAPPING_SIZE
53
+ CU_FILE_INVALID_MAPPING_RANGE
54
+ CU_FILE_INVALID_FILE_TYPE
55
+ CU_FILE_INVALID_FILE_OPEN_FLAG
56
+ CU_FILE_DIO_NOT_SET
57
+ CU_FILE_INVALID_VALUE
58
+ CU_FILE_MEMORY_ALREADY_REGISTERED
59
+ CU_FILE_MEMORY_NOT_REGISTERED
60
+ CU_FILE_PERMISSION_DENIED
61
+ CU_FILE_DRIVER_ALREADY_OPEN
62
+ CU_FILE_HANDLE_NOT_REGISTERED
63
+ CU_FILE_HANDLE_ALREADY_REGISTERED
64
+ CU_FILE_DEVICE_NOT_FOUND
65
+ CU_FILE_INTERNAL_ERROR
66
+ CU_FILE_GETNEWFD_FAILED
67
+ CU_FILE_NVFS_SETUP_ERROR
68
+ CU_FILE_IO_DISABLED
69
+ CU_FILE_BATCH_SUBMIT_FAILED
70
+ CU_FILE_GPU_MEMORY_PINNING_FAILED
71
+ CU_FILE_BATCH_FULL
72
+ CU_FILE_ASYNC_NOT_SUPPORTED
73
+ CU_FILE_IO_MAX_ERROR
74
+
75
+ ctypedef enum CUfileDriverStatusFlags_t:
76
+ CU_FILE_LUSTRE_SUPPORTED
77
+ CU_FILE_WEKAFS_SUPPORTED
78
+ CU_FILE_NFS_SUPPORTED
79
+ CU_FILE_GPFS_SUPPORTED
80
+ CU_FILE_NVME_SUPPORTED
81
+ CU_FILE_NVMEOF_SUPPORTED
82
+ CU_FILE_SCSI_SUPPORTED
83
+ CU_FILE_SCALEFLUX_CSD_SUPPORTED
84
+ CU_FILE_NVMESH_SUPPORTED
85
+ CU_FILE_BEEGFS_SUPPORTED
86
+ CU_FILE_NVME_P2P_SUPPORTED
87
+ CU_FILE_SCATEFS_SUPPORTED
88
+
89
+ ctypedef enum CUfileDriverControlFlags_t:
90
+ CU_FILE_USE_POLL_MODE
91
+ CU_FILE_ALLOW_COMPAT_MODE
92
+
93
+ ctypedef enum CUfileFeatureFlags_t:
94
+ CU_FILE_DYN_ROUTING_SUPPORTED
95
+ CU_FILE_BATCH_IO_SUPPORTED
96
+ CU_FILE_STREAMS_SUPPORTED
97
+ CU_FILE_PARALLEL_IO_SUPPORTED
98
+
99
+ ctypedef enum CUfileFileHandleType:
100
+ CU_FILE_HANDLE_TYPE_OPAQUE_FD
101
+ CU_FILE_HANDLE_TYPE_OPAQUE_WIN32
102
+ CU_FILE_HANDLE_TYPE_USERSPACE_FS
103
+
104
+ ctypedef enum CUfileOpcode_t:
105
+ CUFILE_READ
106
+ CUFILE_WRITE
107
+
108
+ ctypedef enum CUfileStatus_t:
109
+ CUFILE_WAITING
110
+ CUFILE_PENDING
111
+ CUFILE_INVALID
112
+ CUFILE_CANCELED
113
+ CUFILE_COMPLETE
114
+ CUFILE_TIMEOUT
115
+ CUFILE_FAILED
116
+
117
+ ctypedef enum CUfileBatchMode_t:
118
+ CUFILE_BATCH
119
+
120
+ ctypedef enum CUFileSizeTConfigParameter_t:
121
+ CUFILE_PARAM_PROFILE_STATS
122
+ CUFILE_PARAM_EXECUTION_MAX_IO_QUEUE_DEPTH
123
+ CUFILE_PARAM_EXECUTION_MAX_IO_THREADS
124
+ CUFILE_PARAM_EXECUTION_MIN_IO_THRESHOLD_SIZE_KB
125
+ CUFILE_PARAM_EXECUTION_MAX_REQUEST_PARALLELISM
126
+ CUFILE_PARAM_PROPERTIES_MAX_DIRECT_IO_SIZE_KB
127
+ CUFILE_PARAM_PROPERTIES_MAX_DEVICE_CACHE_SIZE_KB
128
+ CUFILE_PARAM_PROPERTIES_PER_BUFFER_CACHE_SIZE_KB
129
+ CUFILE_PARAM_PROPERTIES_MAX_DEVICE_PINNED_MEM_SIZE_KB
130
+ CUFILE_PARAM_PROPERTIES_IO_BATCHSIZE
131
+ CUFILE_PARAM_POLLTHRESHOLD_SIZE_KB
132
+ CUFILE_PARAM_PROPERTIES_BATCH_IO_TIMEOUT_MS
133
+
134
+ ctypedef enum CUFileBoolConfigParameter_t:
135
+ CUFILE_PARAM_PROPERTIES_USE_POLL_MODE
136
+ CUFILE_PARAM_PROPERTIES_ALLOW_COMPAT_MODE
137
+ CUFILE_PARAM_FORCE_COMPAT_MODE
138
+ CUFILE_PARAM_FS_MISC_API_CHECK_AGGRESSIVE
139
+ CUFILE_PARAM_EXECUTION_PARALLEL_IO
140
+ CUFILE_PARAM_PROFILE_NVTX
141
+ CUFILE_PARAM_PROPERTIES_ALLOW_SYSTEM_MEMORY
142
+ CUFILE_PARAM_USE_PCIP2PDMA
143
+ CUFILE_PARAM_PREFER_IO_URING
144
+ CUFILE_PARAM_FORCE_ODIRECT_MODE
145
+ CUFILE_PARAM_SKIP_TOPOLOGY_DETECTION
146
+ CUFILE_PARAM_STREAM_MEMOPS_BYPASS
147
+
148
+ ctypedef enum CUFileStringConfigParameter_t:
149
+ CUFILE_PARAM_LOGGING_LEVEL
150
+ CUFILE_PARAM_ENV_LOGFILE_PATH
151
+ CUFILE_PARAM_LOG_DIR
152
+
153
+ # types
154
+ ctypedef void* CUfileHandle_t 'CUfileHandle_t'
155
+ ctypedef void* CUfileBatchHandle_t 'CUfileBatchHandle_t'
156
+ ctypedef struct CUfileError_t 'CUfileError_t':
157
+ CUfileOpError err
158
+ CUresult cu_err
159
+ cdef struct _anon_pod0 '_anon_pod0':
160
+ unsigned int major_version
161
+ unsigned int minor_version
162
+ size_t poll_thresh_size
163
+ size_t max_direct_io_size
164
+ unsigned int dstatusflags
165
+ unsigned int dcontrolflags
166
+ ctypedef struct cufileRDMAInfo_t 'cufileRDMAInfo_t':
167
+ int version
168
+ int desc_len
169
+ char* desc_str
170
+ ctypedef struct CUfileFSOps_t 'CUfileFSOps_t':
171
+ char* (*fs_type)(void*)
172
+ int (*getRDMADeviceList)(void*, sockaddr_t**)
173
+ int (*getRDMADevicePriority)(void*, char*, size_t, loff_t, sockaddr_t*)
174
+ ssize_t (*read)(void*, char*, size_t, loff_t, cufileRDMAInfo_t*)
175
+ ssize_t (*write)(void*, const char*, size_t, loff_t, cufileRDMAInfo_t*)
176
+ cdef union _anon_pod1 '_anon_pod1':
177
+ int fd
178
+ void* handle
179
+ cdef struct _anon_pod3 '_anon_pod3':
180
+ void* devPtr_base
181
+ off_t file_offset
182
+ off_t devPtr_offset
183
+ size_t size
184
+ ctypedef struct CUfileIOEvents_t 'CUfileIOEvents_t':
185
+ void* cookie
186
+ CUfileStatus_t status
187
+ size_t ret
188
+ ctypedef struct CUfileDrvProps_t 'CUfileDrvProps_t':
189
+ _anon_pod0 nvfs
190
+ unsigned int fflags
191
+ unsigned int max_device_cache_size
192
+ unsigned int per_buffer_cache_size
193
+ unsigned int max_device_pinned_mem_size
194
+ unsigned int max_batch_io_size
195
+ unsigned int max_batch_io_timeout_msecs
196
+ ctypedef struct CUfileDescr_t 'CUfileDescr_t':
197
+ CUfileFileHandleType type
198
+ _anon_pod1 handle
199
+ CUfileFSOps_t* fs_ops
200
+ cdef union _anon_pod2 '_anon_pod2':
201
+ _anon_pod3 batch
202
+ ctypedef struct CUfileIOParams_t 'CUfileIOParams_t':
203
+ CUfileBatchMode_t mode
204
+ _anon_pod2 u
205
+ CUfileHandle_t fh
206
+ CUfileOpcode_t opcode
207
+ void* cookie
208
+
209
+
210
+ cdef extern from *:
211
+ """
212
+ // This is the missing piece we need to supply to help Cython & C++ compilers.
213
+ inline bool operator==(const CUfileError_t& lhs, const CUfileError_t& rhs) {
214
+ return (lhs.err == rhs.err) && (lhs.cu_err == rhs.cu_err);
215
+ }
216
+ static CUfileError_t CUFILE_LOADING_ERROR{(CUfileOpError)-1, (CUresult)-1};
217
+ """
218
+ const CUfileError_t CUFILE_LOADING_ERROR
219
+ ctypedef void* CUstream "CUstream"
220
+
221
+ const char* cufileop_status_error(CUfileOpError)
222
+
223
+
224
+ ###############################################################################
225
+ # Functions
226
+ ###############################################################################
227
+
228
+ cdef CUfileError_t cuFileHandleRegister(CUfileHandle_t* fh, CUfileDescr_t* descr) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
229
+ cdef void cuFileHandleDeregister(CUfileHandle_t fh) except* nogil
230
+ cdef CUfileError_t cuFileBufRegister(const void* bufPtr_base, size_t length, int flags) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
231
+ cdef CUfileError_t cuFileBufDeregister(const void* bufPtr_base) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
232
+ cdef ssize_t cuFileRead(CUfileHandle_t fh, void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil
233
+ cdef ssize_t cuFileWrite(CUfileHandle_t fh, const void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil
234
+ cdef CUfileError_t cuFileDriverOpen() except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
235
+ cdef CUfileError_t cuFileDriverClose_v2() except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
236
+ cdef long cuFileUseCount() except* nogil
237
+ cdef CUfileError_t cuFileDriverGetProperties(CUfileDrvProps_t* props) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
238
+ cdef CUfileError_t cuFileDriverSetPollMode(cpp_bool poll, size_t poll_threshold_size) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
239
+ cdef CUfileError_t cuFileDriverSetMaxDirectIOSize(size_t max_direct_io_size) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
240
+ cdef CUfileError_t cuFileDriverSetMaxCacheSize(size_t max_cache_size) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
241
+ cdef CUfileError_t cuFileDriverSetMaxPinnedMemSize(size_t max_pinned_size) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
242
+ cdef CUfileError_t cuFileBatchIOSetUp(CUfileBatchHandle_t* batch_idp, unsigned nr) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
243
+ cdef CUfileError_t cuFileBatchIOSubmit(CUfileBatchHandle_t batch_idp, unsigned nr, CUfileIOParams_t* iocbp, unsigned int flags) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
244
+ cdef CUfileError_t cuFileBatchIOGetStatus(CUfileBatchHandle_t batch_idp, unsigned min_nr, unsigned* nr, CUfileIOEvents_t* iocbp, timespec* timeout) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
245
+ cdef CUfileError_t cuFileBatchIOCancel(CUfileBatchHandle_t batch_idp) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
246
+ cdef void cuFileBatchIODestroy(CUfileBatchHandle_t batch_idp) except* nogil
247
+ cdef CUfileError_t cuFileReadAsync(CUfileHandle_t fh, void* bufPtr_base, size_t* size_p, off_t* file_offset_p, off_t* bufPtr_offset_p, ssize_t* bytes_read_p, CUstream stream) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
248
+ cdef CUfileError_t cuFileWriteAsync(CUfileHandle_t fh, void* bufPtr_base, size_t* size_p, off_t* file_offset_p, off_t* bufPtr_offset_p, ssize_t* bytes_written_p, CUstream stream) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
249
+ cdef CUfileError_t cuFileStreamRegister(CUstream stream, unsigned flags) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
250
+ cdef CUfileError_t cuFileStreamDeregister(CUstream stream) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
251
+ cdef CUfileError_t cuFileGetVersion(int* version) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
252
+ cdef CUfileError_t cuFileGetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t* value) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
253
+ cdef CUfileError_t cuFileGetParameterBool(CUFileBoolConfigParameter_t param, cpp_bool* value) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
254
+ cdef CUfileError_t cuFileGetParameterString(CUFileStringConfigParameter_t param, char* desc_str, int len) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
255
+ cdef CUfileError_t cuFileSetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t value) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
256
+ cdef CUfileError_t cuFileSetParameterBool(CUFileBoolConfigParameter_t param, cpp_bool value) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
257
+ cdef CUfileError_t cuFileSetParameterString(CUFileStringConfigParameter_t param, const char* desc_str) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
258
+ cdef CUfileError_t cuFileDriverClose() except?<CUfileError_t>CUFILE_LOADING_ERROR nogil
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cycufile.pyx ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ #
3
+ # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
4
+ #
5
+ # This code was automatically generated across versions from 12.9.0 to 12.9.1. Do not modify it directly.
6
+
7
+ from ._internal cimport cufile as _cufile
8
+
9
+ import cython
10
+
11
+ ###############################################################################
12
+ # Wrapper functions
13
+ ###############################################################################
14
+
15
+ cdef CUfileError_t cuFileHandleRegister(CUfileHandle_t* fh, CUfileDescr_t* descr) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
16
+ return _cufile._cuFileHandleRegister(fh, descr)
17
+
18
+
19
+ @cython.show_performance_hints(False)
20
+ cdef void cuFileHandleDeregister(CUfileHandle_t fh) except* nogil:
21
+ _cufile._cuFileHandleDeregister(fh)
22
+
23
+
24
+ cdef CUfileError_t cuFileBufRegister(const void* bufPtr_base, size_t length, int flags) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
25
+ return _cufile._cuFileBufRegister(bufPtr_base, length, flags)
26
+
27
+
28
+ cdef CUfileError_t cuFileBufDeregister(const void* bufPtr_base) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
29
+ return _cufile._cuFileBufDeregister(bufPtr_base)
30
+
31
+
32
+ cdef ssize_t cuFileRead(CUfileHandle_t fh, void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil:
33
+ return _cufile._cuFileRead(fh, bufPtr_base, size, file_offset, bufPtr_offset)
34
+
35
+
36
+ cdef ssize_t cuFileWrite(CUfileHandle_t fh, const void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil:
37
+ return _cufile._cuFileWrite(fh, bufPtr_base, size, file_offset, bufPtr_offset)
38
+
39
+
40
+ cdef CUfileError_t cuFileDriverOpen() except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
41
+ return _cufile._cuFileDriverOpen()
42
+
43
+
44
+ cdef CUfileError_t cuFileDriverClose_v2() except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
45
+ return _cufile._cuFileDriverClose_v2()
46
+
47
+
48
+ cdef long cuFileUseCount() except* nogil:
49
+ return _cufile._cuFileUseCount()
50
+
51
+
52
+ cdef CUfileError_t cuFileDriverGetProperties(CUfileDrvProps_t* props) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
53
+ return _cufile._cuFileDriverGetProperties(props)
54
+
55
+
56
+ cdef CUfileError_t cuFileDriverSetPollMode(cpp_bool poll, size_t poll_threshold_size) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
57
+ return _cufile._cuFileDriverSetPollMode(poll, poll_threshold_size)
58
+
59
+
60
+ cdef CUfileError_t cuFileDriverSetMaxDirectIOSize(size_t max_direct_io_size) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
61
+ return _cufile._cuFileDriverSetMaxDirectIOSize(max_direct_io_size)
62
+
63
+
64
+ cdef CUfileError_t cuFileDriverSetMaxCacheSize(size_t max_cache_size) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
65
+ return _cufile._cuFileDriverSetMaxCacheSize(max_cache_size)
66
+
67
+
68
+ cdef CUfileError_t cuFileDriverSetMaxPinnedMemSize(size_t max_pinned_size) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
69
+ return _cufile._cuFileDriverSetMaxPinnedMemSize(max_pinned_size)
70
+
71
+
72
+ cdef CUfileError_t cuFileBatchIOSetUp(CUfileBatchHandle_t* batch_idp, unsigned nr) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
73
+ return _cufile._cuFileBatchIOSetUp(batch_idp, nr)
74
+
75
+
76
+ cdef CUfileError_t cuFileBatchIOSubmit(CUfileBatchHandle_t batch_idp, unsigned nr, CUfileIOParams_t* iocbp, unsigned int flags) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
77
+ return _cufile._cuFileBatchIOSubmit(batch_idp, nr, iocbp, flags)
78
+
79
+
80
+ cdef CUfileError_t cuFileBatchIOGetStatus(CUfileBatchHandle_t batch_idp, unsigned min_nr, unsigned* nr, CUfileIOEvents_t* iocbp, timespec* timeout) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
81
+ return _cufile._cuFileBatchIOGetStatus(batch_idp, min_nr, nr, iocbp, timeout)
82
+
83
+
84
+ cdef CUfileError_t cuFileBatchIOCancel(CUfileBatchHandle_t batch_idp) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
85
+ return _cufile._cuFileBatchIOCancel(batch_idp)
86
+
87
+
88
+ @cython.show_performance_hints(False)
89
+ cdef void cuFileBatchIODestroy(CUfileBatchHandle_t batch_idp) except* nogil:
90
+ _cufile._cuFileBatchIODestroy(batch_idp)
91
+
92
+
93
+ cdef CUfileError_t cuFileReadAsync(CUfileHandle_t fh, void* bufPtr_base, size_t* size_p, off_t* file_offset_p, off_t* bufPtr_offset_p, ssize_t* bytes_read_p, CUstream stream) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
94
+ return _cufile._cuFileReadAsync(fh, bufPtr_base, size_p, file_offset_p, bufPtr_offset_p, bytes_read_p, stream)
95
+
96
+
97
+ cdef CUfileError_t cuFileWriteAsync(CUfileHandle_t fh, void* bufPtr_base, size_t* size_p, off_t* file_offset_p, off_t* bufPtr_offset_p, ssize_t* bytes_written_p, CUstream stream) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
98
+ return _cufile._cuFileWriteAsync(fh, bufPtr_base, size_p, file_offset_p, bufPtr_offset_p, bytes_written_p, stream)
99
+
100
+
101
+ cdef CUfileError_t cuFileStreamRegister(CUstream stream, unsigned flags) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
102
+ return _cufile._cuFileStreamRegister(stream, flags)
103
+
104
+
105
+ cdef CUfileError_t cuFileStreamDeregister(CUstream stream) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
106
+ return _cufile._cuFileStreamDeregister(stream)
107
+
108
+
109
+ cdef CUfileError_t cuFileGetVersion(int* version) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
110
+ return _cufile._cuFileGetVersion(version)
111
+
112
+
113
+ cdef CUfileError_t cuFileGetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t* value) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
114
+ return _cufile._cuFileGetParameterSizeT(param, value)
115
+
116
+
117
+ cdef CUfileError_t cuFileGetParameterBool(CUFileBoolConfigParameter_t param, cpp_bool* value) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
118
+ return _cufile._cuFileGetParameterBool(param, value)
119
+
120
+
121
+ cdef CUfileError_t cuFileGetParameterString(CUFileStringConfigParameter_t param, char* desc_str, int len) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
122
+ return _cufile._cuFileGetParameterString(param, desc_str, len)
123
+
124
+
125
+ cdef CUfileError_t cuFileSetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t value) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
126
+ return _cufile._cuFileSetParameterSizeT(param, value)
127
+
128
+
129
+ cdef CUfileError_t cuFileSetParameterBool(CUFileBoolConfigParameter_t param, cpp_bool value) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
130
+ return _cufile._cuFileSetParameterBool(param, value)
131
+
132
+
133
+ cdef CUfileError_t cuFileSetParameterString(CUFileStringConfigParameter_t param, const char* desc_str) except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
134
+ return _cufile._cuFileSetParameterString(param, desc_str)
135
+
136
+
137
+ cdef CUfileError_t cuFileDriverClose() except?<CUfileError_t>CUFILE_LOADING_ERROR nogil:
138
+ return _cufile._cuFileDriverClose()
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cydriver.cpp ADDED
The diff for this file is too large to render. See raw diff
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cydriver.pxd ADDED
The diff for this file is too large to render. See raw diff
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cydriver.pyx ADDED
The diff for this file is too large to render. See raw diff
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cynvjitlink.cpp ADDED
The diff for this file is too large to render. See raw diff
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cynvjitlink.cpython-312-x86_64-linux-gnu.so ADDED
Binary file (27.5 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cynvjitlink.pyx ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ #
3
+ # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
4
+ #
5
+ # This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly.
6
+
7
+ from ._internal cimport nvjitlink as _nvjitlink
8
+
9
+
10
+ ###############################################################################
11
+ # Wrapper functions
12
+ ###############################################################################
13
+
14
+ cdef nvJitLinkResult nvJitLinkCreate(nvJitLinkHandle* handle, uint32_t numOptions, const char** options) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil:
15
+ return _nvjitlink._nvJitLinkCreate(handle, numOptions, options)
16
+
17
+
18
+ cdef nvJitLinkResult nvJitLinkDestroy(nvJitLinkHandle* handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil:
19
+ return _nvjitlink._nvJitLinkDestroy(handle)
20
+
21
+
22
+ cdef nvJitLinkResult nvJitLinkAddData(nvJitLinkHandle handle, nvJitLinkInputType inputType, const void* data, size_t size, const char* name) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil:
23
+ return _nvjitlink._nvJitLinkAddData(handle, inputType, data, size, name)
24
+
25
+
26
+ cdef nvJitLinkResult nvJitLinkAddFile(nvJitLinkHandle handle, nvJitLinkInputType inputType, const char* fileName) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil:
27
+ return _nvjitlink._nvJitLinkAddFile(handle, inputType, fileName)
28
+
29
+
30
+ cdef nvJitLinkResult nvJitLinkComplete(nvJitLinkHandle handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil:
31
+ return _nvjitlink._nvJitLinkComplete(handle)
32
+
33
+
34
+ cdef nvJitLinkResult nvJitLinkGetLinkedCubinSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil:
35
+ return _nvjitlink._nvJitLinkGetLinkedCubinSize(handle, size)
36
+
37
+
38
+ cdef nvJitLinkResult nvJitLinkGetLinkedCubin(nvJitLinkHandle handle, void* cubin) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil:
39
+ return _nvjitlink._nvJitLinkGetLinkedCubin(handle, cubin)
40
+
41
+
42
+ cdef nvJitLinkResult nvJitLinkGetLinkedPtxSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil:
43
+ return _nvjitlink._nvJitLinkGetLinkedPtxSize(handle, size)
44
+
45
+
46
+ cdef nvJitLinkResult nvJitLinkGetLinkedPtx(nvJitLinkHandle handle, char* ptx) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil:
47
+ return _nvjitlink._nvJitLinkGetLinkedPtx(handle, ptx)
48
+
49
+
50
+ cdef nvJitLinkResult nvJitLinkGetErrorLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil:
51
+ return _nvjitlink._nvJitLinkGetErrorLogSize(handle, size)
52
+
53
+
54
+ cdef nvJitLinkResult nvJitLinkGetErrorLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil:
55
+ return _nvjitlink._nvJitLinkGetErrorLog(handle, log)
56
+
57
+
58
+ cdef nvJitLinkResult nvJitLinkGetInfoLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil:
59
+ return _nvjitlink._nvJitLinkGetInfoLogSize(handle, size)
60
+
61
+
62
+ cdef nvJitLinkResult nvJitLinkGetInfoLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil:
63
+ return _nvjitlink._nvJitLinkGetInfoLog(handle, log)
64
+
65
+
66
+ cdef nvJitLinkResult nvJitLinkVersion(unsigned int* major, unsigned int* minor) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil:
67
+ return _nvjitlink._nvJitLinkVersion(major, minor)
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cynvrtc.cpp ADDED
The diff for this file is too large to render. See raw diff
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cynvrtc.cpython-312-x86_64-linux-gnu.so ADDED
Binary file (31.6 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cynvrtc.pxd ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
3
+
4
+ # This code was automatically generated with version 12.9.0. Do not modify it directly.
5
+
6
+ from libc.stdint cimport uint32_t, uint64_t
7
+
8
+ cdef extern from "nvrtc.h":
9
+
10
+ ctypedef enum nvrtcResult:
11
+ NVRTC_SUCCESS = 0
12
+ NVRTC_ERROR_OUT_OF_MEMORY = 1
13
+ NVRTC_ERROR_PROGRAM_CREATION_FAILURE = 2
14
+ NVRTC_ERROR_INVALID_INPUT = 3
15
+ NVRTC_ERROR_INVALID_PROGRAM = 4
16
+ NVRTC_ERROR_INVALID_OPTION = 5
17
+ NVRTC_ERROR_COMPILATION = 6
18
+ NVRTC_ERROR_BUILTIN_OPERATION_FAILURE = 7
19
+ NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION = 8
20
+ NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION = 9
21
+ NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID = 10
22
+ NVRTC_ERROR_INTERNAL_ERROR = 11
23
+ NVRTC_ERROR_TIME_FILE_WRITE_FAILED = 12
24
+ NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED = 13
25
+ NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED = 14
26
+ NVRTC_ERROR_PCH_CREATE = 15
27
+ NVRTC_ERROR_CANCELLED = 16
28
+
29
+ cdef struct _nvrtcProgram:
30
+ pass
31
+ ctypedef _nvrtcProgram* nvrtcProgram
32
+
33
+ cdef const char* nvrtcGetErrorString(nvrtcResult result) except ?NULL nogil
34
+
35
+ cdef nvrtcResult nvrtcVersion(int* major, int* minor) except ?NVRTC_ERROR_INVALID_INPUT nogil
36
+
37
+ cdef nvrtcResult nvrtcGetNumSupportedArchs(int* numArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil
38
+
39
+ cdef nvrtcResult nvrtcGetSupportedArchs(int* supportedArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil
40
+
41
+ cdef nvrtcResult nvrtcCreateProgram(nvrtcProgram* prog, const char* src, const char* name, int numHeaders, const char** headers, const char** includeNames) except ?NVRTC_ERROR_INVALID_INPUT nogil
42
+
43
+ cdef nvrtcResult nvrtcDestroyProgram(nvrtcProgram* prog) except ?NVRTC_ERROR_INVALID_INPUT nogil
44
+
45
+ cdef nvrtcResult nvrtcCompileProgram(nvrtcProgram prog, int numOptions, const char** options) except ?NVRTC_ERROR_INVALID_INPUT nogil
46
+
47
+ cdef nvrtcResult nvrtcGetPTXSize(nvrtcProgram prog, size_t* ptxSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil
48
+
49
+ cdef nvrtcResult nvrtcGetPTX(nvrtcProgram prog, char* ptx) except ?NVRTC_ERROR_INVALID_INPUT nogil
50
+
51
+ cdef nvrtcResult nvrtcGetCUBINSize(nvrtcProgram prog, size_t* cubinSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil
52
+
53
+ cdef nvrtcResult nvrtcGetCUBIN(nvrtcProgram prog, char* cubin) except ?NVRTC_ERROR_INVALID_INPUT nogil
54
+
55
+ cdef nvrtcResult nvrtcGetNVVMSize(nvrtcProgram prog, size_t* nvvmSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil
56
+
57
+ cdef nvrtcResult nvrtcGetNVVM(nvrtcProgram prog, char* nvvm) except ?NVRTC_ERROR_INVALID_INPUT nogil
58
+
59
+ cdef nvrtcResult nvrtcGetLTOIRSize(nvrtcProgram prog, size_t* LTOIRSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil
60
+
61
+ cdef nvrtcResult nvrtcGetLTOIR(nvrtcProgram prog, char* LTOIR) except ?NVRTC_ERROR_INVALID_INPUT nogil
62
+
63
+ cdef nvrtcResult nvrtcGetOptiXIRSize(nvrtcProgram prog, size_t* optixirSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil
64
+
65
+ cdef nvrtcResult nvrtcGetOptiXIR(nvrtcProgram prog, char* optixir) except ?NVRTC_ERROR_INVALID_INPUT nogil
66
+
67
+ cdef nvrtcResult nvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil
68
+
69
+ cdef nvrtcResult nvrtcGetProgramLog(nvrtcProgram prog, char* log) except ?NVRTC_ERROR_INVALID_INPUT nogil
70
+
71
+ cdef nvrtcResult nvrtcAddNameExpression(nvrtcProgram prog, const char* name_expression) except ?NVRTC_ERROR_INVALID_INPUT nogil
72
+
73
+ cdef nvrtcResult nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) except ?NVRTC_ERROR_INVALID_INPUT nogil
74
+
75
+ cdef nvrtcResult nvrtcGetPCHHeapSize(size_t* ret) except ?NVRTC_ERROR_INVALID_INPUT nogil
76
+
77
+ cdef nvrtcResult nvrtcSetPCHHeapSize(size_t size) except ?NVRTC_ERROR_INVALID_INPUT nogil
78
+
79
+ cdef nvrtcResult nvrtcGetPCHCreateStatus(nvrtcProgram prog) except ?NVRTC_ERROR_INVALID_INPUT nogil
80
+
81
+ cdef nvrtcResult nvrtcGetPCHHeapSizeRequired(nvrtcProgram prog, size_t* size) except ?NVRTC_ERROR_INVALID_INPUT nogil
82
+
83
+ cdef nvrtcResult nvrtcSetFlowCallback(nvrtcProgram prog, void* callback, void* payload) except ?NVRTC_ERROR_INVALID_INPUT nogil
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cynvrtc.pyx ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
3
+
4
+ # This code was automatically generated with version 12.9.0. Do not modify it directly.
5
+ cimport cuda.bindings._bindings.cynvrtc as cynvrtc
6
+
7
+ cdef const char* nvrtcGetErrorString(nvrtcResult result) except ?NULL nogil:
8
+ return cynvrtc._nvrtcGetErrorString(result)
9
+
10
+ cdef nvrtcResult nvrtcVersion(int* major, int* minor) except ?NVRTC_ERROR_INVALID_INPUT nogil:
11
+ return cynvrtc._nvrtcVersion(major, minor)
12
+
13
+ cdef nvrtcResult nvrtcGetNumSupportedArchs(int* numArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil:
14
+ return cynvrtc._nvrtcGetNumSupportedArchs(numArchs)
15
+
16
+ cdef nvrtcResult nvrtcGetSupportedArchs(int* supportedArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil:
17
+ return cynvrtc._nvrtcGetSupportedArchs(supportedArchs)
18
+
19
+ cdef nvrtcResult nvrtcCreateProgram(nvrtcProgram* prog, const char* src, const char* name, int numHeaders, const char** headers, const char** includeNames) except ?NVRTC_ERROR_INVALID_INPUT nogil:
20
+ return cynvrtc._nvrtcCreateProgram(prog, src, name, numHeaders, headers, includeNames)
21
+
22
+ cdef nvrtcResult nvrtcDestroyProgram(nvrtcProgram* prog) except ?NVRTC_ERROR_INVALID_INPUT nogil:
23
+ return cynvrtc._nvrtcDestroyProgram(prog)
24
+
25
+ cdef nvrtcResult nvrtcCompileProgram(nvrtcProgram prog, int numOptions, const char** options) except ?NVRTC_ERROR_INVALID_INPUT nogil:
26
+ return cynvrtc._nvrtcCompileProgram(prog, numOptions, options)
27
+
28
+ cdef nvrtcResult nvrtcGetPTXSize(nvrtcProgram prog, size_t* ptxSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil:
29
+ return cynvrtc._nvrtcGetPTXSize(prog, ptxSizeRet)
30
+
31
+ cdef nvrtcResult nvrtcGetPTX(nvrtcProgram prog, char* ptx) except ?NVRTC_ERROR_INVALID_INPUT nogil:
32
+ return cynvrtc._nvrtcGetPTX(prog, ptx)
33
+
34
+ cdef nvrtcResult nvrtcGetCUBINSize(nvrtcProgram prog, size_t* cubinSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil:
35
+ return cynvrtc._nvrtcGetCUBINSize(prog, cubinSizeRet)
36
+
37
+ cdef nvrtcResult nvrtcGetCUBIN(nvrtcProgram prog, char* cubin) except ?NVRTC_ERROR_INVALID_INPUT nogil:
38
+ return cynvrtc._nvrtcGetCUBIN(prog, cubin)
39
+
40
+ cdef nvrtcResult nvrtcGetNVVMSize(nvrtcProgram prog, size_t* nvvmSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil:
41
+ return cynvrtc._nvrtcGetNVVMSize(prog, nvvmSizeRet)
42
+
43
+ cdef nvrtcResult nvrtcGetNVVM(nvrtcProgram prog, char* nvvm) except ?NVRTC_ERROR_INVALID_INPUT nogil:
44
+ return cynvrtc._nvrtcGetNVVM(prog, nvvm)
45
+
46
+ cdef nvrtcResult nvrtcGetLTOIRSize(nvrtcProgram prog, size_t* LTOIRSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil:
47
+ return cynvrtc._nvrtcGetLTOIRSize(prog, LTOIRSizeRet)
48
+
49
+ cdef nvrtcResult nvrtcGetLTOIR(nvrtcProgram prog, char* LTOIR) except ?NVRTC_ERROR_INVALID_INPUT nogil:
50
+ return cynvrtc._nvrtcGetLTOIR(prog, LTOIR)
51
+
52
+ cdef nvrtcResult nvrtcGetOptiXIRSize(nvrtcProgram prog, size_t* optixirSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil:
53
+ return cynvrtc._nvrtcGetOptiXIRSize(prog, optixirSizeRet)
54
+
55
+ cdef nvrtcResult nvrtcGetOptiXIR(nvrtcProgram prog, char* optixir) except ?NVRTC_ERROR_INVALID_INPUT nogil:
56
+ return cynvrtc._nvrtcGetOptiXIR(prog, optixir)
57
+
58
+ cdef nvrtcResult nvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil:
59
+ return cynvrtc._nvrtcGetProgramLogSize(prog, logSizeRet)
60
+
61
+ cdef nvrtcResult nvrtcGetProgramLog(nvrtcProgram prog, char* log) except ?NVRTC_ERROR_INVALID_INPUT nogil:
62
+ return cynvrtc._nvrtcGetProgramLog(prog, log)
63
+
64
+ cdef nvrtcResult nvrtcAddNameExpression(nvrtcProgram prog, const char* name_expression) except ?NVRTC_ERROR_INVALID_INPUT nogil:
65
+ return cynvrtc._nvrtcAddNameExpression(prog, name_expression)
66
+
67
+ cdef nvrtcResult nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) except ?NVRTC_ERROR_INVALID_INPUT nogil:
68
+ return cynvrtc._nvrtcGetLoweredName(prog, name_expression, lowered_name)
69
+
70
+ cdef nvrtcResult nvrtcGetPCHHeapSize(size_t* ret) except ?NVRTC_ERROR_INVALID_INPUT nogil:
71
+ return cynvrtc._nvrtcGetPCHHeapSize(ret)
72
+
73
+ cdef nvrtcResult nvrtcSetPCHHeapSize(size_t size) except ?NVRTC_ERROR_INVALID_INPUT nogil:
74
+ return cynvrtc._nvrtcSetPCHHeapSize(size)
75
+
76
+ cdef nvrtcResult nvrtcGetPCHCreateStatus(nvrtcProgram prog) except ?NVRTC_ERROR_INVALID_INPUT nogil:
77
+ return cynvrtc._nvrtcGetPCHCreateStatus(prog)
78
+
79
+ cdef nvrtcResult nvrtcGetPCHHeapSizeRequired(nvrtcProgram prog, size_t* size) except ?NVRTC_ERROR_INVALID_INPUT nogil:
80
+ return cynvrtc._nvrtcGetPCHHeapSizeRequired(prog, size)
81
+
82
+ cdef nvrtcResult nvrtcSetFlowCallback(nvrtcProgram prog, void* callback, void* payload) except ?NVRTC_ERROR_INVALID_INPUT nogil:
83
+ return cynvrtc._nvrtcSetFlowCallback(prog, callback, payload)
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cynvvm.cpp ADDED
The diff for this file is too large to render. See raw diff
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cynvvm.pxd ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ #
3
+ # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
4
+ #
5
+ # This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly.
6
+
7
+
8
+ ###############################################################################
9
+ # Types (structs, enums, ...)
10
+ ###############################################################################
11
+
12
+ # enums
13
+ ctypedef enum nvvmResult "nvvmResult":
14
+ NVVM_SUCCESS "NVVM_SUCCESS" = 0
15
+ NVVM_ERROR_OUT_OF_MEMORY "NVVM_ERROR_OUT_OF_MEMORY" = 1
16
+ NVVM_ERROR_PROGRAM_CREATION_FAILURE "NVVM_ERROR_PROGRAM_CREATION_FAILURE" = 2
17
+ NVVM_ERROR_IR_VERSION_MISMATCH "NVVM_ERROR_IR_VERSION_MISMATCH" = 3
18
+ NVVM_ERROR_INVALID_INPUT "NVVM_ERROR_INVALID_INPUT" = 4
19
+ NVVM_ERROR_INVALID_PROGRAM "NVVM_ERROR_INVALID_PROGRAM" = 5
20
+ NVVM_ERROR_INVALID_IR "NVVM_ERROR_INVALID_IR" = 6
21
+ NVVM_ERROR_INVALID_OPTION "NVVM_ERROR_INVALID_OPTION" = 7
22
+ NVVM_ERROR_NO_MODULE_IN_PROGRAM "NVVM_ERROR_NO_MODULE_IN_PROGRAM" = 8
23
+ NVVM_ERROR_COMPILATION "NVVM_ERROR_COMPILATION" = 9
24
+ NVVM_ERROR_CANCELLED "NVVM_ERROR_CANCELLED" = 10
25
+ _NVVMRESULT_INTERNAL_LOADING_ERROR "_NVVMRESULT_INTERNAL_LOADING_ERROR" = -42
26
+
27
+
28
+ # types
29
+ ctypedef void* nvvmProgram 'nvvmProgram'
30
+
31
+
32
+ ###############################################################################
33
+ # Functions
34
+ ###############################################################################
35
+
36
+ cdef const char* nvvmGetErrorString(nvvmResult result) except?NULL nogil
37
+ cdef nvvmResult nvvmVersion(int* major, int* minor) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil
38
+ cdef nvvmResult nvvmIRVersion(int* majorIR, int* minorIR, int* majorDbg, int* minorDbg) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil
39
+ cdef nvvmResult nvvmCreateProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil
40
+ cdef nvvmResult nvvmDestroyProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil
41
+ cdef nvvmResult nvvmAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil
42
+ cdef nvvmResult nvvmLazyAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil
43
+ cdef nvvmResult nvvmCompileProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil
44
+ cdef nvvmResult nvvmVerifyProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil
45
+ cdef nvvmResult nvvmGetCompiledResultSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil
46
+ cdef nvvmResult nvvmGetCompiledResult(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil
47
+ cdef nvvmResult nvvmGetProgramLogSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil
48
+ cdef nvvmResult nvvmGetProgramLog(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cyruntime.cpp ADDED
The diff for this file is too large to render. See raw diff
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cyruntime.pxd ADDED
@@ -0,0 +1,1015 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
3
+
4
+ # This code was automatically generated with version 12.9.0. Do not modify it directly.
5
+
6
+ from libc.stdint cimport uint32_t, uint64_t
7
+
8
+ include "cyruntime_types.pxi"
9
+
10
+ ctypedef unsigned int GLenum
11
+
12
+ ctypedef unsigned int GLuint
13
+
14
+ cdef extern from "":
15
+ cdef struct void:
16
+ pass
17
+ ctypedef void* EGLImageKHR
18
+
19
+ cdef extern from "":
20
+ cdef struct void:
21
+ pass
22
+ ctypedef void* EGLStreamKHR
23
+
24
+ ctypedef unsigned int EGLint
25
+
26
+ cdef extern from "":
27
+ cdef struct void:
28
+ pass
29
+ ctypedef void* EGLSyncKHR
30
+
31
+ ctypedef uint32_t VdpDevice
32
+
33
+ ctypedef unsigned long long VdpGetProcAddress
34
+
35
+ ctypedef uint32_t VdpVideoSurface
36
+
37
+ ctypedef uint32_t VdpOutputSurface
38
+
39
+ cdef enum cudaEglFrameType_enum:
40
+ cudaEglFrameTypeArray = 0
41
+ cudaEglFrameTypePitch = 1
42
+
43
+ ctypedef cudaEglFrameType_enum cudaEglFrameType
44
+
45
+ cdef enum cudaEglResourceLocationFlags_enum:
46
+ cudaEglResourceLocationSysmem = 0
47
+ cudaEglResourceLocationVidmem = 1
48
+
49
+ ctypedef cudaEglResourceLocationFlags_enum cudaEglResourceLocationFlags
50
+
51
+ cdef enum cudaEglColorFormat_enum:
52
+ cudaEglColorFormatYUV420Planar = 0
53
+ cudaEglColorFormatYUV420SemiPlanar = 1
54
+ cudaEglColorFormatYUV422Planar = 2
55
+ cudaEglColorFormatYUV422SemiPlanar = 3
56
+ cudaEglColorFormatARGB = 6
57
+ cudaEglColorFormatRGBA = 7
58
+ cudaEglColorFormatL = 8
59
+ cudaEglColorFormatR = 9
60
+ cudaEglColorFormatYUV444Planar = 10
61
+ cudaEglColorFormatYUV444SemiPlanar = 11
62
+ cudaEglColorFormatYUYV422 = 12
63
+ cudaEglColorFormatUYVY422 = 13
64
+ cudaEglColorFormatABGR = 14
65
+ cudaEglColorFormatBGRA = 15
66
+ cudaEglColorFormatA = 16
67
+ cudaEglColorFormatRG = 17
68
+ cudaEglColorFormatAYUV = 18
69
+ cudaEglColorFormatYVU444SemiPlanar = 19
70
+ cudaEglColorFormatYVU422SemiPlanar = 20
71
+ cudaEglColorFormatYVU420SemiPlanar = 21
72
+ cudaEglColorFormatY10V10U10_444SemiPlanar = 22
73
+ cudaEglColorFormatY10V10U10_420SemiPlanar = 23
74
+ cudaEglColorFormatY12V12U12_444SemiPlanar = 24
75
+ cudaEglColorFormatY12V12U12_420SemiPlanar = 25
76
+ cudaEglColorFormatVYUY_ER = 26
77
+ cudaEglColorFormatUYVY_ER = 27
78
+ cudaEglColorFormatYUYV_ER = 28
79
+ cudaEglColorFormatYVYU_ER = 29
80
+ cudaEglColorFormatYUVA_ER = 31
81
+ cudaEglColorFormatAYUV_ER = 32
82
+ cudaEglColorFormatYUV444Planar_ER = 33
83
+ cudaEglColorFormatYUV422Planar_ER = 34
84
+ cudaEglColorFormatYUV420Planar_ER = 35
85
+ cudaEglColorFormatYUV444SemiPlanar_ER = 36
86
+ cudaEglColorFormatYUV422SemiPlanar_ER = 37
87
+ cudaEglColorFormatYUV420SemiPlanar_ER = 38
88
+ cudaEglColorFormatYVU444Planar_ER = 39
89
+ cudaEglColorFormatYVU422Planar_ER = 40
90
+ cudaEglColorFormatYVU420Planar_ER = 41
91
+ cudaEglColorFormatYVU444SemiPlanar_ER = 42
92
+ cudaEglColorFormatYVU422SemiPlanar_ER = 43
93
+ cudaEglColorFormatYVU420SemiPlanar_ER = 44
94
+ cudaEglColorFormatBayerRGGB = 45
95
+ cudaEglColorFormatBayerBGGR = 46
96
+ cudaEglColorFormatBayerGRBG = 47
97
+ cudaEglColorFormatBayerGBRG = 48
98
+ cudaEglColorFormatBayer10RGGB = 49
99
+ cudaEglColorFormatBayer10BGGR = 50
100
+ cudaEglColorFormatBayer10GRBG = 51
101
+ cudaEglColorFormatBayer10GBRG = 52
102
+ cudaEglColorFormatBayer12RGGB = 53
103
+ cudaEglColorFormatBayer12BGGR = 54
104
+ cudaEglColorFormatBayer12GRBG = 55
105
+ cudaEglColorFormatBayer12GBRG = 56
106
+ cudaEglColorFormatBayer14RGGB = 57
107
+ cudaEglColorFormatBayer14BGGR = 58
108
+ cudaEglColorFormatBayer14GRBG = 59
109
+ cudaEglColorFormatBayer14GBRG = 60
110
+ cudaEglColorFormatBayer20RGGB = 61
111
+ cudaEglColorFormatBayer20BGGR = 62
112
+ cudaEglColorFormatBayer20GRBG = 63
113
+ cudaEglColorFormatBayer20GBRG = 64
114
+ cudaEglColorFormatYVU444Planar = 65
115
+ cudaEglColorFormatYVU422Planar = 66
116
+ cudaEglColorFormatYVU420Planar = 67
117
+ cudaEglColorFormatBayerIspRGGB = 68
118
+ cudaEglColorFormatBayerIspBGGR = 69
119
+ cudaEglColorFormatBayerIspGRBG = 70
120
+ cudaEglColorFormatBayerIspGBRG = 71
121
+ cudaEglColorFormatBayerBCCR = 72
122
+ cudaEglColorFormatBayerRCCB = 73
123
+ cudaEglColorFormatBayerCRBC = 74
124
+ cudaEglColorFormatBayerCBRC = 75
125
+ cudaEglColorFormatBayer10CCCC = 76
126
+ cudaEglColorFormatBayer12BCCR = 77
127
+ cudaEglColorFormatBayer12RCCB = 78
128
+ cudaEglColorFormatBayer12CRBC = 79
129
+ cudaEglColorFormatBayer12CBRC = 80
130
+ cudaEglColorFormatBayer12CCCC = 81
131
+ cudaEglColorFormatY = 82
132
+ cudaEglColorFormatYUV420SemiPlanar_2020 = 83
133
+ cudaEglColorFormatYVU420SemiPlanar_2020 = 84
134
+ cudaEglColorFormatYUV420Planar_2020 = 85
135
+ cudaEglColorFormatYVU420Planar_2020 = 86
136
+ cudaEglColorFormatYUV420SemiPlanar_709 = 87
137
+ cudaEglColorFormatYVU420SemiPlanar_709 = 88
138
+ cudaEglColorFormatYUV420Planar_709 = 89
139
+ cudaEglColorFormatYVU420Planar_709 = 90
140
+ cudaEglColorFormatY10V10U10_420SemiPlanar_709 = 91
141
+ cudaEglColorFormatY10V10U10_420SemiPlanar_2020 = 92
142
+ cudaEglColorFormatY10V10U10_422SemiPlanar_2020 = 93
143
+ cudaEglColorFormatY10V10U10_422SemiPlanar = 94
144
+ cudaEglColorFormatY10V10U10_422SemiPlanar_709 = 95
145
+ cudaEglColorFormatY_ER = 96
146
+ cudaEglColorFormatY_709_ER = 97
147
+ cudaEglColorFormatY10_ER = 98
148
+ cudaEglColorFormatY10_709_ER = 99
149
+ cudaEglColorFormatY12_ER = 100
150
+ cudaEglColorFormatY12_709_ER = 101
151
+ cudaEglColorFormatYUVA = 102
152
+ cudaEglColorFormatYVYU = 104
153
+ cudaEglColorFormatVYUY = 105
154
+ cudaEglColorFormatY10V10U10_420SemiPlanar_ER = 106
155
+ cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER = 107
156
+ cudaEglColorFormatY10V10U10_444SemiPlanar_ER = 108
157
+ cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER = 109
158
+ cudaEglColorFormatY12V12U12_420SemiPlanar_ER = 110
159
+ cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER = 111
160
+ cudaEglColorFormatY12V12U12_444SemiPlanar_ER = 112
161
+ cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER = 113
162
+ cudaEglColorFormatUYVY709 = 114
163
+ cudaEglColorFormatUYVY709_ER = 115
164
+ cudaEglColorFormatUYVY2020 = 116
165
+
166
+ ctypedef cudaEglColorFormat_enum cudaEglColorFormat
167
+
168
+ cdef struct cudaEglPlaneDesc_st:
169
+ unsigned int width
170
+ unsigned int height
171
+ unsigned int depth
172
+ unsigned int pitch
173
+ unsigned int numChannels
174
+ cudaChannelFormatDesc channelDesc
175
+ unsigned int reserved[4]
176
+
177
+ ctypedef cudaEglPlaneDesc_st cudaEglPlaneDesc
178
+
179
+ cdef union anon_union11:
180
+ cudaArray_t pArray[3]
181
+ cudaPitchedPtr pPitch[3]
182
+
183
+ cdef struct cudaEglFrame_st:
184
+ anon_union11 frame
185
+ cudaEglPlaneDesc planeDesc[3]
186
+ unsigned int planeCount
187
+ cudaEglFrameType frameType
188
+ cudaEglColorFormat eglColorFormat
189
+
190
+ ctypedef cudaEglFrame_st cudaEglFrame
191
+
192
+ cdef extern from "":
193
+ cdef struct CUeglStreamConnection_st:
194
+ pass
195
+ ctypedef CUeglStreamConnection_st* cudaEglStreamConnection
196
+
197
+ cdef enum cudaGLDeviceList:
198
+ cudaGLDeviceListAll = 1
199
+ cudaGLDeviceListCurrentFrame = 2
200
+ cudaGLDeviceListNextFrame = 3
201
+
202
+ cdef enum cudaGLMapFlags:
203
+ cudaGLMapFlagsNone = 0
204
+ cudaGLMapFlagsReadOnly = 1
205
+ cudaGLMapFlagsWriteDiscard = 2
206
+
207
+ cdef cudaError_t cudaDeviceReset() except ?cudaErrorCallRequiresNewerDriver nogil
208
+
209
+ cdef cudaError_t cudaDeviceSynchronize() except ?cudaErrorCallRequiresNewerDriver nogil
210
+
211
+ cdef cudaError_t cudaDeviceSetLimit(cudaLimit limit, size_t value) except ?cudaErrorCallRequiresNewerDriver nogil
212
+
213
+ cdef cudaError_t cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) except ?cudaErrorCallRequiresNewerDriver nogil
214
+
215
+ cdef cudaError_t cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) except ?cudaErrorCallRequiresNewerDriver nogil
216
+
217
+ cdef cudaError_t cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil
218
+
219
+ cdef cudaError_t cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?cudaErrorCallRequiresNewerDriver nogil
220
+
221
+ cdef cudaError_t cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil
222
+
223
+ cdef cudaError_t cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) except ?cudaErrorCallRequiresNewerDriver nogil
224
+
225
+ cdef cudaError_t cudaDeviceGetPCIBusId(char* pciBusId, int length, int device) except ?cudaErrorCallRequiresNewerDriver nogil
226
+
227
+ cdef cudaError_t cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
228
+
229
+ cdef cudaError_t cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) except ?cudaErrorCallRequiresNewerDriver nogil
230
+
231
+ cdef cudaError_t cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil
232
+
233
+ cdef cudaError_t cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
234
+
235
+ cdef cudaError_t cudaIpcCloseMemHandle(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil
236
+
237
+ cdef cudaError_t cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) except ?cudaErrorCallRequiresNewerDriver nogil
238
+
239
+ cdef cudaError_t cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) except ?cudaErrorCallRequiresNewerDriver nogil
240
+
241
+ cdef cudaError_t cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) except ?cudaErrorCallRequiresNewerDriver nogil
242
+
243
+ cdef cudaError_t cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) except ?cudaErrorCallRequiresNewerDriver nogil
244
+
245
+ cdef cudaError_t cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil
246
+
247
+ cdef cudaError_t cudaGetLastError() except ?cudaErrorCallRequiresNewerDriver nogil
248
+
249
+ cdef cudaError_t cudaPeekAtLastError() except ?cudaErrorCallRequiresNewerDriver nogil
250
+
251
+ cdef const char* cudaGetErrorName(cudaError_t error) except ?NULL nogil
252
+
253
+ cdef const char* cudaGetErrorString(cudaError_t error) except ?NULL nogil
254
+
255
+ cdef cudaError_t cudaGetDeviceCount(int* count) except ?cudaErrorCallRequiresNewerDriver nogil
256
+
257
+ cdef cudaError_t cudaGetDeviceProperties(cudaDeviceProp* prop, int device) except ?cudaErrorCallRequiresNewerDriver nogil
258
+
259
+ cdef cudaError_t cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) except ?cudaErrorCallRequiresNewerDriver nogil
260
+
261
+ cdef cudaError_t cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil
262
+
263
+ cdef cudaError_t cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil
264
+
265
+ cdef cudaError_t cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil
266
+
267
+ cdef cudaError_t cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) except ?cudaErrorCallRequiresNewerDriver nogil
268
+
269
+ cdef cudaError_t cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil
270
+
271
+ cdef cudaError_t cudaChooseDevice(int* device, const cudaDeviceProp* prop) except ?cudaErrorCallRequiresNewerDriver nogil
272
+
273
+ cdef cudaError_t cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
274
+
275
+ cdef cudaError_t cudaSetDevice(int device) except ?cudaErrorCallRequiresNewerDriver nogil
276
+
277
+ cdef cudaError_t cudaGetDevice(int* device) except ?cudaErrorCallRequiresNewerDriver nogil
278
+
279
+ cdef cudaError_t cudaSetDeviceFlags(unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
280
+
281
+ cdef cudaError_t cudaGetDeviceFlags(unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil
282
+
283
+ cdef cudaError_t cudaStreamCreate(cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil
284
+
285
+ cdef cudaError_t cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
286
+
287
+ cdef cudaError_t cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil
288
+
289
+ cdef cudaError_t cudaStreamGetPriority(cudaStream_t hStream, int* priority) except ?cudaErrorCallRequiresNewerDriver nogil
290
+
291
+ cdef cudaError_t cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil
292
+
293
+ cdef cudaError_t cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) except ?cudaErrorCallRequiresNewerDriver nogil
294
+
295
+ cdef cudaError_t cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil
296
+
297
+ cdef cudaError_t cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil
298
+
299
+ cdef cudaError_t cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) except ?cudaErrorCallRequiresNewerDriver nogil
300
+
301
+ cdef cudaError_t cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil
302
+
303
+ cdef cudaError_t cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil
304
+
305
+ cdef cudaError_t cudaStreamDestroy(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
306
+
307
+ cdef cudaError_t cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
308
+
309
+ cdef cudaError_t cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
310
+
311
+ cdef cudaError_t cudaStreamSynchronize(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
312
+
313
+ cdef cudaError_t cudaStreamQuery(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
314
+
315
+ cdef cudaError_t cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
316
+
317
+ cdef cudaError_t cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil
318
+
319
+ cdef cudaError_t cudaStreamBeginCaptureToGraph(cudaStream_t stream, cudaGraph_t graph, const cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil
320
+
321
+ cdef cudaError_t cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) except ?cudaErrorCallRequiresNewerDriver nogil
322
+
323
+ cdef cudaError_t cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil
324
+
325
+ cdef cudaError_t cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) except ?cudaErrorCallRequiresNewerDriver nogil
326
+
327
+ cdef cudaError_t cudaStreamGetCaptureInfo(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, size_t* numDependencies_out) except ?cudaErrorCallRequiresNewerDriver nogil
328
+
329
+ cdef cudaError_t cudaStreamGetCaptureInfo_v3(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, const cudaGraphEdgeData** edgeData_out, size_t* numDependencies_out) except ?cudaErrorCallRequiresNewerDriver nogil
330
+
331
+ cdef cudaError_t cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
332
+
333
+ cdef cudaError_t cudaStreamUpdateCaptureDependencies_v2(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
334
+
335
+ cdef cudaError_t cudaEventCreate(cudaEvent_t* event) except ?cudaErrorCallRequiresNewerDriver nogil
336
+
337
+ cdef cudaError_t cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
338
+
339
+ cdef cudaError_t cudaEventRecord(cudaEvent_t event, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
340
+
341
+ cdef cudaError_t cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
342
+
343
+ cdef cudaError_t cudaEventQuery(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
344
+
345
+ cdef cudaError_t cudaEventSynchronize(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
346
+
347
+ cdef cudaError_t cudaEventDestroy(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
348
+
349
+ cdef cudaError_t cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil
350
+
351
+ cdef cudaError_t cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil
352
+
353
+ cdef cudaError_t cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil
354
+
355
+ cdef cudaError_t cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) except ?cudaErrorCallRequiresNewerDriver nogil
356
+
357
+ cdef cudaError_t cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) except ?cudaErrorCallRequiresNewerDriver nogil
358
+
359
+ cdef cudaError_t cudaDestroyExternalMemory(cudaExternalMemory_t extMem) except ?cudaErrorCallRequiresNewerDriver nogil
360
+
361
+ cdef cudaError_t cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil
362
+
363
+ cdef cudaError_t cudaSignalExternalSemaphoresAsync(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
364
+
365
+ cdef cudaError_t cudaWaitExternalSemaphoresAsync(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
366
+
367
+ cdef cudaError_t cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) except ?cudaErrorCallRequiresNewerDriver nogil
368
+
369
+ cdef cudaError_t cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil
370
+
371
+ cdef cudaError_t cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil
372
+
373
+ cdef cudaError_t cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) except ?cudaErrorCallRequiresNewerDriver nogil
374
+
375
+ cdef cudaError_t cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) except ?cudaErrorCallRequiresNewerDriver nogil
376
+
377
+ cdef cudaError_t cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil
378
+
379
+ cdef cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) except ?cudaErrorCallRequiresNewerDriver nogil
380
+
381
+ cdef cudaError_t cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) except ?cudaErrorCallRequiresNewerDriver nogil
382
+
383
+ cdef cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
384
+
385
+ cdef cudaError_t cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
386
+
387
+ cdef cudaError_t cudaMalloc(void** devPtr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil
388
+
389
+ cdef cudaError_t cudaMallocHost(void** ptr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil
390
+
391
+ cdef cudaError_t cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil
392
+
393
+ cdef cudaError_t cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
394
+
395
+ cdef cudaError_t cudaFree(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil
396
+
397
+ cdef cudaError_t cudaFreeHost(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil
398
+
399
+ cdef cudaError_t cudaFreeArray(cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil
400
+
401
+ cdef cudaError_t cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) except ?cudaErrorCallRequiresNewerDriver nogil
402
+
403
+ cdef cudaError_t cudaHostAlloc(void** pHost, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
404
+
405
+ cdef cudaError_t cudaHostRegister(void* ptr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
406
+
407
+ cdef cudaError_t cudaHostUnregister(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil
408
+
409
+ cdef cudaError_t cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
410
+
411
+ cdef cudaError_t cudaHostGetFlags(unsigned int* pFlags, void* pHost) except ?cudaErrorCallRequiresNewerDriver nogil
412
+
413
+ cdef cudaError_t cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil
414
+
415
+ cdef cudaError_t cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
416
+
417
+ cdef cudaError_t cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
418
+
419
+ cdef cudaError_t cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) except ?cudaErrorCallRequiresNewerDriver nogil
420
+
421
+ cdef cudaError_t cudaMemcpy3D(const cudaMemcpy3DParms* p) except ?cudaErrorCallRequiresNewerDriver nogil
422
+
423
+ cdef cudaError_t cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) except ?cudaErrorCallRequiresNewerDriver nogil
424
+
425
+ cdef cudaError_t cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
426
+
427
+ cdef cudaError_t cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
428
+
429
+ cdef cudaError_t cudaMemGetInfo(size_t* free, size_t* total) except ?cudaErrorCallRequiresNewerDriver nogil
430
+
431
+ cdef cudaError_t cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil
432
+
433
+ cdef cudaError_t cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) except ?cudaErrorCallRequiresNewerDriver nogil
434
+
435
+ cdef cudaError_t cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) except ?cudaErrorCallRequiresNewerDriver nogil
436
+
437
+ cdef cudaError_t cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) except ?cudaErrorCallRequiresNewerDriver nogil
438
+
439
+ cdef cudaError_t cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil
440
+
441
+ cdef cudaError_t cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) except ?cudaErrorCallRequiresNewerDriver nogil
442
+
443
+ cdef cudaError_t cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
444
+
445
+ cdef cudaError_t cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil
446
+
447
+ cdef cudaError_t cudaMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
448
+
449
+ cdef cudaError_t cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
450
+
451
+ cdef cudaError_t cudaMemcpy2DFromArray(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
452
+
453
+ cdef cudaError_t cudaMemcpy2DArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
454
+
455
+ cdef cudaError_t cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
456
+
457
+ cdef cudaError_t cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
458
+
459
+ cdef cudaError_t cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
460
+
461
+ cdef cudaError_t cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
462
+
463
+ cdef cudaError_t cudaMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
464
+
465
+ cdef cudaError_t cudaMemcpy2DToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
466
+
467
+ cdef cudaError_t cudaMemcpy2DFromArrayAsync(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
468
+
469
+ cdef cudaError_t cudaMemset(void* devPtr, int value, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil
470
+
471
+ cdef cudaError_t cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil
472
+
473
+ cdef cudaError_t cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil
474
+
475
+ cdef cudaError_t cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
476
+
477
+ cdef cudaError_t cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
478
+
479
+ cdef cudaError_t cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
480
+
481
+ cdef cudaError_t cudaMemPrefetchAsync(const void* devPtr, size_t count, int dstDevice, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
482
+
483
+ cdef cudaError_t cudaMemPrefetchAsync_v2(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
484
+
485
+ cdef cudaError_t cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, int device) except ?cudaErrorCallRequiresNewerDriver nogil
486
+
487
+ cdef cudaError_t cudaMemAdvise_v2(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) except ?cudaErrorCallRequiresNewerDriver nogil
488
+
489
+ cdef cudaError_t cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil
490
+
491
+ cdef cudaError_t cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil
492
+
493
+ cdef cudaError_t cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
494
+
495
+ cdef cudaError_t cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
496
+
497
+ cdef cudaError_t cudaMemcpyArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
498
+
499
+ cdef cudaError_t cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
500
+
501
+ cdef cudaError_t cudaMemcpyFromArrayAsync(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
502
+
503
+ cdef cudaError_t cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil
504
+
505
+ cdef cudaError_t cudaFreeAsync(void* devPtr, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil
506
+
507
+ cdef cudaError_t cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) except ?cudaErrorCallRequiresNewerDriver nogil
508
+
509
+ cdef cudaError_t cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil
510
+
511
+ cdef cudaError_t cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil
512
+
513
+ cdef cudaError_t cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil
514
+
515
+ cdef cudaError_t cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) except ?cudaErrorCallRequiresNewerDriver nogil
516
+
517
+ cdef cudaError_t cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) except ?cudaErrorCallRequiresNewerDriver nogil
518
+
519
+ cdef cudaError_t cudaMemPoolDestroy(cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil
520
+
521
+ cdef cudaError_t cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
522
+
523
+ cdef cudaError_t cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
524
+
525
+ cdef cudaError_t cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
526
+
527
+ cdef cudaError_t cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil
528
+
529
+ cdef cudaError_t cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) except ?cudaErrorCallRequiresNewerDriver nogil
530
+
531
+ cdef cudaError_t cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil
532
+
533
+ cdef cudaError_t cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil
534
+
535
+ cdef cudaError_t cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
536
+
537
+ cdef cudaError_t cudaDeviceDisablePeerAccess(int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil
538
+
539
+ cdef cudaError_t cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil
540
+
541
+ cdef cudaError_t cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
542
+
543
+ cdef cudaError_t cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
544
+
545
+ cdef cudaError_t cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
546
+
547
+ cdef cudaError_t cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil
548
+
549
+ cdef cudaError_t cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil
550
+
551
+ cdef cudaError_t cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil
552
+
553
+ cdef cudaError_t cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil
554
+
555
+ cdef cudaChannelFormatDesc cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil
556
+
557
+ cdef cudaError_t cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) except ?cudaErrorCallRequiresNewerDriver nogil
558
+
559
+ cdef cudaError_t cudaDestroyTextureObject(cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil
560
+
561
+ cdef cudaError_t cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil
562
+
563
+ cdef cudaError_t cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil
564
+
565
+ cdef cudaError_t cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil
566
+
567
+ cdef cudaError_t cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) except ?cudaErrorCallRequiresNewerDriver nogil
568
+
569
+ cdef cudaError_t cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil
570
+
571
+ cdef cudaError_t cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil
572
+
573
+ cdef cudaError_t cudaDriverGetVersion(int* driverVersion) except ?cudaErrorCallRequiresNewerDriver nogil
574
+
575
+ cdef cudaError_t cudaRuntimeGetVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil
576
+
577
+ cdef cudaError_t cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
578
+
579
+ cdef cudaError_t cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
580
+
581
+ cdef cudaError_t cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
582
+
583
+ cdef cudaError_t cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
584
+
585
+ cdef cudaError_t cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hSrc, cudaGraphNode_t hDst) except ?cudaErrorCallRequiresNewerDriver nogil
586
+
587
+ cdef cudaError_t cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil
588
+
589
+ cdef cudaError_t cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil
590
+
591
+ cdef cudaError_t cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) except ?cudaErrorCallRequiresNewerDriver nogil
592
+
593
+ cdef cudaError_t cudaGraphAddMemcpyNode1D(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
594
+
595
+ cdef cudaError_t cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
596
+
597
+ cdef cudaError_t cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
598
+
599
+ cdef cudaError_t cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
600
+
601
+ cdef cudaError_t cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) except ?cudaErrorCallRequiresNewerDriver nogil
602
+
603
+ cdef cudaError_t cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
604
+
605
+ cdef cudaError_t cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
606
+
607
+ cdef cudaError_t cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
608
+
609
+ cdef cudaError_t cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
610
+
611
+ cdef cudaError_t cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
612
+
613
+ cdef cudaError_t cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil
614
+
615
+ cdef cudaError_t cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil
616
+
617
+ cdef cudaError_t cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil
618
+
619
+ cdef cudaError_t cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
620
+
621
+ cdef cudaError_t cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil
622
+
623
+ cdef cudaError_t cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
624
+
625
+ cdef cudaError_t cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
626
+
627
+ cdef cudaError_t cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil
628
+
629
+ cdef cudaError_t cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
630
+
631
+ cdef cudaError_t cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
632
+
633
+ cdef cudaError_t cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil
634
+
635
+ cdef cudaError_t cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
636
+
637
+ cdef cudaError_t cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
638
+
639
+ cdef cudaError_t cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil
640
+
641
+ cdef cudaError_t cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
642
+
643
+ cdef cudaError_t cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
644
+
645
+ cdef cudaError_t cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil
646
+
647
+ cdef cudaError_t cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) except ?cudaErrorCallRequiresNewerDriver nogil
648
+
649
+ cdef cudaError_t cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) except ?cudaErrorCallRequiresNewerDriver nogil
650
+
651
+ cdef cudaError_t cudaDeviceGraphMemTrim(int device) except ?cudaErrorCallRequiresNewerDriver nogil
652
+
653
+ cdef cudaError_t cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil
654
+
655
+ cdef cudaError_t cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil
656
+
657
+ cdef cudaError_t cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) except ?cudaErrorCallRequiresNewerDriver nogil
658
+
659
+ cdef cudaError_t cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) except ?cudaErrorCallRequiresNewerDriver nogil
660
+
661
+ cdef cudaError_t cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) except ?cudaErrorCallRequiresNewerDriver nogil
662
+
663
+ cdef cudaError_t cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) except ?cudaErrorCallRequiresNewerDriver nogil
664
+
665
+ cdef cudaError_t cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) except ?cudaErrorCallRequiresNewerDriver nogil
666
+
667
+ cdef cudaError_t cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil
668
+
669
+ cdef cudaError_t cudaGraphGetEdges_v2(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil
670
+
671
+ cdef cudaError_t cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil
672
+
673
+ cdef cudaError_t cudaGraphNodeGetDependencies_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil
674
+
675
+ cdef cudaError_t cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil
676
+
677
+ cdef cudaError_t cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil
678
+
679
+ cdef cudaError_t cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil
680
+
681
+ cdef cudaError_t cudaGraphAddDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil
682
+
683
+ cdef cudaError_t cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil
684
+
685
+ cdef cudaError_t cudaGraphRemoveDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil
686
+
687
+ cdef cudaError_t cudaGraphDestroyNode(cudaGraphNode_t node) except ?cudaErrorCallRequiresNewerDriver nogil
688
+
689
+ cdef cudaError_t cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil
690
+
691
+ cdef cudaError_t cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil
692
+
693
+ cdef cudaError_t cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) except ?cudaErrorCallRequiresNewerDriver nogil
694
+
695
+ cdef cudaError_t cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) except ?cudaErrorCallRequiresNewerDriver nogil
696
+
697
+ cdef cudaError_t cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
698
+
699
+ cdef cudaError_t cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
700
+
701
+ cdef cudaError_t cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
702
+
703
+ cdef cudaError_t cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
704
+
705
+ cdef cudaError_t cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
706
+
707
+ cdef cudaError_t cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil
708
+
709
+ cdef cudaError_t cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
710
+
711
+ cdef cudaError_t cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
712
+
713
+ cdef cudaError_t cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
714
+
715
+ cdef cudaError_t cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
716
+
717
+ cdef cudaError_t cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil
718
+
719
+ cdef cudaError_t cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil
720
+
721
+ cdef cudaError_t cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) except ?cudaErrorCallRequiresNewerDriver nogil
722
+
723
+ cdef cudaError_t cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
724
+
725
+ cdef cudaError_t cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
726
+
727
+ cdef cudaError_t cudaGraphExecDestroy(cudaGraphExec_t graphExec) except ?cudaErrorCallRequiresNewerDriver nogil
728
+
729
+ cdef cudaError_t cudaGraphDestroy(cudaGraph_t graph) except ?cudaErrorCallRequiresNewerDriver nogil
730
+
731
+ cdef cudaError_t cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
732
+
733
+ cdef cudaError_t cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
734
+
735
+ cdef cudaError_t cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil
736
+
737
+ cdef cudaError_t cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil
738
+
739
+ cdef cudaError_t cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
740
+
741
+ cdef cudaError_t cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil
742
+
743
+ cdef cudaError_t cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
744
+
745
+ cdef cudaError_t cudaGraphAddNode_v2(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
746
+
747
+ cdef cudaError_t cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
748
+
749
+ cdef cudaError_t cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
750
+
751
+ cdef cudaError_t cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
752
+
753
+ cdef cudaError_t cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil
754
+
755
+ cdef cudaError_t cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil
756
+
757
+ cdef cudaError_t cudaLibraryLoadData(cudaLibrary_t* library, const void* code, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil
758
+
759
+ cdef cudaError_t cudaLibraryLoadFromFile(cudaLibrary_t* library, const char* fileName, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil
760
+
761
+ cdef cudaError_t cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil
762
+
763
+ cdef cudaError_t cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil
764
+
765
+ cdef cudaError_t cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil
766
+
767
+ cdef cudaError_t cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil
768
+
769
+ cdef cudaError_t cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil
770
+
771
+ cdef cudaError_t cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil
772
+
773
+ cdef cudaError_t cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil
774
+
775
+ cdef cudaError_t cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil
776
+
777
+ cdef cudaError_t cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil
778
+
779
+ cdef cudaError_t cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil
780
+
781
+ cdef cudaPitchedPtr make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil
782
+
783
+ cdef cudaPos make_cudaPos(size_t x, size_t y, size_t z) except* nogil
784
+
785
+ cdef cudaExtent make_cudaExtent(size_t w, size_t h, size_t d) except* nogil
786
+
787
+ cdef cudaError_t cudaGraphicsEGLRegisterImage(cudaGraphicsResource** pCudaResource, EGLImageKHR image, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
788
+
789
+ cdef cudaError_t cudaEGLStreamConsumerConnect(cudaEglStreamConnection* conn, EGLStreamKHR eglStream) except ?cudaErrorCallRequiresNewerDriver nogil
790
+
791
+ cdef cudaError_t cudaEGLStreamConsumerConnectWithFlags(cudaEglStreamConnection* conn, EGLStreamKHR eglStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
792
+
793
+ cdef cudaError_t cudaEGLStreamConsumerDisconnect(cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil
794
+
795
+ cdef cudaError_t cudaEGLStreamConsumerAcquireFrame(cudaEglStreamConnection* conn, cudaGraphicsResource_t* pCudaResource, cudaStream_t* pStream, unsigned int timeout) except ?cudaErrorCallRequiresNewerDriver nogil
796
+
797
+ cdef cudaError_t cudaEGLStreamConsumerReleaseFrame(cudaEglStreamConnection* conn, cudaGraphicsResource_t pCudaResource, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil
798
+
799
+ cdef cudaError_t cudaEGLStreamProducerConnect(cudaEglStreamConnection* conn, EGLStreamKHR eglStream, EGLint width, EGLint height) except ?cudaErrorCallRequiresNewerDriver nogil
800
+
801
+ cdef cudaError_t cudaEGLStreamProducerDisconnect(cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil
802
+
803
+ cdef cudaError_t cudaEGLStreamProducerPresentFrame(cudaEglStreamConnection* conn, cudaEglFrame eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil
804
+
805
+ cdef cudaError_t cudaEGLStreamProducerReturnFrame(cudaEglStreamConnection* conn, cudaEglFrame* eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil
806
+
807
+ cdef cudaError_t cudaGraphicsResourceGetMappedEglFrame(cudaEglFrame* eglFrame, cudaGraphicsResource_t resource, unsigned int index, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil
808
+
809
+ cdef cudaError_t cudaEventCreateFromEGLSync(cudaEvent_t* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
810
+
811
+ cdef cudaError_t cudaProfilerStart() except ?cudaErrorCallRequiresNewerDriver nogil
812
+
813
+ cdef cudaError_t cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver nogil
814
+
815
+ cdef cudaError_t cudaGLGetDevices(unsigned int* pCudaDeviceCount, int* pCudaDevices, unsigned int cudaDeviceCount, cudaGLDeviceList deviceList) except ?cudaErrorCallRequiresNewerDriver nogil
816
+
817
+ cdef cudaError_t cudaGraphicsGLRegisterImage(cudaGraphicsResource** resource, GLuint image, GLenum target, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
818
+
819
+ cdef cudaError_t cudaGraphicsGLRegisterBuffer(cudaGraphicsResource** resource, GLuint buffer, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
820
+
821
+ cdef cudaError_t cudaVDPAUGetDevice(int* device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil
822
+
823
+ cdef cudaError_t cudaVDPAUSetVDPAUDevice(int device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil
824
+
825
+ cdef cudaError_t cudaGraphicsVDPAURegisterVideoSurface(cudaGraphicsResource** resource, VdpVideoSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
826
+
827
+ cdef cudaError_t cudaGraphicsVDPAURegisterOutputSurface(cudaGraphicsResource** resource, VdpOutputSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
828
+
829
+ cdef cudaError_t getLocalRuntimeVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil
830
+
831
+ cdef enum: cudaHostAllocDefault = 0
832
+
833
+ cdef enum: cudaHostAllocPortable = 1
834
+
835
+ cdef enum: cudaHostAllocMapped = 2
836
+
837
+ cdef enum: cudaHostAllocWriteCombined = 4
838
+
839
+ cdef enum: cudaHostRegisterDefault = 0
840
+
841
+ cdef enum: cudaHostRegisterPortable = 1
842
+
843
+ cdef enum: cudaHostRegisterMapped = 2
844
+
845
+ cdef enum: cudaHostRegisterIoMemory = 4
846
+
847
+ cdef enum: cudaHostRegisterReadOnly = 8
848
+
849
+ cdef enum: cudaPeerAccessDefault = 0
850
+
851
+ cdef enum: cudaStreamDefault = 0
852
+
853
+ cdef enum: cudaStreamNonBlocking = 1
854
+
855
+ cdef enum: cudaStreamLegacy = 1
856
+
857
+ cdef enum: cudaStreamPerThread = 2
858
+
859
+ cdef enum: cudaEventDefault = 0
860
+
861
+ cdef enum: cudaEventBlockingSync = 1
862
+
863
+ cdef enum: cudaEventDisableTiming = 2
864
+
865
+ cdef enum: cudaEventInterprocess = 4
866
+
867
+ cdef enum: cudaEventRecordDefault = 0
868
+
869
+ cdef enum: cudaEventRecordExternal = 1
870
+
871
+ cdef enum: cudaEventWaitDefault = 0
872
+
873
+ cdef enum: cudaEventWaitExternal = 1
874
+
875
+ cdef enum: cudaDeviceScheduleAuto = 0
876
+
877
+ cdef enum: cudaDeviceScheduleSpin = 1
878
+
879
+ cdef enum: cudaDeviceScheduleYield = 2
880
+
881
+ cdef enum: cudaDeviceScheduleBlockingSync = 4
882
+
883
+ cdef enum: cudaDeviceBlockingSync = 4
884
+
885
+ cdef enum: cudaDeviceScheduleMask = 7
886
+
887
+ cdef enum: cudaDeviceMapHost = 8
888
+
889
+ cdef enum: cudaDeviceLmemResizeToMax = 16
890
+
891
+ cdef enum: cudaDeviceSyncMemops = 128
892
+
893
+ cdef enum: cudaDeviceMask = 255
894
+
895
+ cdef enum: cudaArrayDefault = 0
896
+
897
+ cdef enum: cudaArrayLayered = 1
898
+
899
+ cdef enum: cudaArraySurfaceLoadStore = 2
900
+
901
+ cdef enum: cudaArrayCubemap = 4
902
+
903
+ cdef enum: cudaArrayTextureGather = 8
904
+
905
+ cdef enum: cudaArrayColorAttachment = 32
906
+
907
+ cdef enum: cudaArraySparse = 64
908
+
909
+ cdef enum: cudaArrayDeferredMapping = 128
910
+
911
+ cdef enum: cudaIpcMemLazyEnablePeerAccess = 1
912
+
913
+ cdef enum: cudaMemAttachGlobal = 1
914
+
915
+ cdef enum: cudaMemAttachHost = 2
916
+
917
+ cdef enum: cudaMemAttachSingle = 4
918
+
919
+ cdef enum: cudaOccupancyDefault = 0
920
+
921
+ cdef enum: cudaOccupancyDisableCachingOverride = 1
922
+
923
+ cdef enum: cudaCpuDeviceId = -1
924
+
925
+ cdef enum: cudaInvalidDeviceId = -2
926
+
927
+ cdef enum: cudaInitDeviceFlagsAreValid = 1
928
+
929
+ cdef enum: cudaCooperativeLaunchMultiDeviceNoPreSync = 1
930
+
931
+ cdef enum: cudaCooperativeLaunchMultiDeviceNoPostSync = 2
932
+
933
+ cdef enum: cudaArraySparsePropertiesSingleMipTail = 1
934
+
935
+ cdef enum: cudaMemPoolCreateUsageHwDecompress = 2
936
+
937
+ cdef enum: CUDA_IPC_HANDLE_SIZE = 64
938
+
939
+ cdef enum: cudaExternalMemoryDedicated = 1
940
+
941
+ cdef enum: cudaExternalSemaphoreSignalSkipNvSciBufMemSync = 1
942
+
943
+ cdef enum: cudaExternalSemaphoreWaitSkipNvSciBufMemSync = 2
944
+
945
+ cdef enum: cudaNvSciSyncAttrSignal = 1
946
+
947
+ cdef enum: cudaNvSciSyncAttrWait = 2
948
+
949
+ cdef enum: cudaGraphKernelNodePortDefault = 0
950
+
951
+ cdef enum: cudaGraphKernelNodePortProgrammatic = 1
952
+
953
+ cdef enum: cudaGraphKernelNodePortLaunchCompletion = 2
954
+
955
+ cdef enum: cudaStreamAttributeAccessPolicyWindow = 1
956
+
957
+ cdef enum: cudaStreamAttributeSynchronizationPolicy = 3
958
+
959
+ cdef enum: cudaStreamAttributeMemSyncDomainMap = 9
960
+
961
+ cdef enum: cudaStreamAttributeMemSyncDomain = 10
962
+
963
+ cdef enum: cudaStreamAttributePriority = 8
964
+
965
+ cdef enum: cudaKernelNodeAttributeAccessPolicyWindow = 1
966
+
967
+ cdef enum: cudaKernelNodeAttributeCooperative = 2
968
+
969
+ cdef enum: cudaKernelNodeAttributePriority = 8
970
+
971
+ cdef enum: cudaKernelNodeAttributeClusterDimension = 4
972
+
973
+ cdef enum: cudaKernelNodeAttributeClusterSchedulingPolicyPreference = 5
974
+
975
+ cdef enum: cudaKernelNodeAttributeMemSyncDomainMap = 9
976
+
977
+ cdef enum: cudaKernelNodeAttributeMemSyncDomain = 10
978
+
979
+ cdef enum: cudaKernelNodeAttributePreferredSharedMemoryCarveout = 14
980
+
981
+ cdef enum: cudaKernelNodeAttributeDeviceUpdatableKernelNode = 13
982
+
983
+ cdef enum: cudaSurfaceType1D = 1
984
+
985
+ cdef enum: cudaSurfaceType2D = 2
986
+
987
+ cdef enum: cudaSurfaceType3D = 3
988
+
989
+ cdef enum: cudaSurfaceTypeCubemap = 12
990
+
991
+ cdef enum: cudaSurfaceType1DLayered = 241
992
+
993
+ cdef enum: cudaSurfaceType2DLayered = 242
994
+
995
+ cdef enum: cudaSurfaceTypeCubemapLayered = 252
996
+
997
+ cdef enum: cudaTextureType1D = 1
998
+
999
+ cdef enum: cudaTextureType2D = 2
1000
+
1001
+ cdef enum: cudaTextureType3D = 3
1002
+
1003
+ cdef enum: cudaTextureTypeCubemap = 12
1004
+
1005
+ cdef enum: cudaTextureType1DLayered = 241
1006
+
1007
+ cdef enum: cudaTextureType2DLayered = 242
1008
+
1009
+ cdef enum: cudaTextureTypeCubemapLayered = 252
1010
+
1011
+ cdef enum: CUDART_VERSION = 12090
1012
+
1013
+ cdef enum: __CUDART_API_VERSION = 12090
1014
+
1015
+ cdef enum: CUDA_EGL_MAX_PLANES = 3
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cyruntime.pyx ADDED
@@ -0,0 +1,974 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
3
+
4
+ # This code was automatically generated with version 12.9.0. Do not modify it directly.
5
+ cimport cuda.bindings._bindings.cyruntime as cyruntime
6
+ cimport cython
7
+
8
+ cdef cudaError_t cudaDeviceReset() except ?cudaErrorCallRequiresNewerDriver nogil:
9
+ return cyruntime._cudaDeviceReset()
10
+
11
+ cdef cudaError_t cudaDeviceSynchronize() except ?cudaErrorCallRequiresNewerDriver nogil:
12
+ return cyruntime._cudaDeviceSynchronize()
13
+
14
+ cdef cudaError_t cudaDeviceSetLimit(cudaLimit limit, size_t value) except ?cudaErrorCallRequiresNewerDriver nogil:
15
+ return cyruntime._cudaDeviceSetLimit(limit, value)
16
+
17
+ cdef cudaError_t cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) except ?cudaErrorCallRequiresNewerDriver nogil:
18
+ return cyruntime._cudaDeviceGetLimit(pValue, limit)
19
+
20
+ cdef cudaError_t cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) except ?cudaErrorCallRequiresNewerDriver nogil:
21
+ return cyruntime._cudaDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, fmtDesc, device)
22
+
23
+ cdef cudaError_t cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil:
24
+ return cyruntime._cudaDeviceGetCacheConfig(pCacheConfig)
25
+
26
+ cdef cudaError_t cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?cudaErrorCallRequiresNewerDriver nogil:
27
+ return cyruntime._cudaDeviceGetStreamPriorityRange(leastPriority, greatestPriority)
28
+
29
+ cdef cudaError_t cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil:
30
+ return cyruntime._cudaDeviceSetCacheConfig(cacheConfig)
31
+
32
+ cdef cudaError_t cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) except ?cudaErrorCallRequiresNewerDriver nogil:
33
+ return cyruntime._cudaDeviceGetByPCIBusId(device, pciBusId)
34
+
35
+ cdef cudaError_t cudaDeviceGetPCIBusId(char* pciBusId, int length, int device) except ?cudaErrorCallRequiresNewerDriver nogil:
36
+ return cyruntime._cudaDeviceGetPCIBusId(pciBusId, length, device)
37
+
38
+ cdef cudaError_t cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil:
39
+ return cyruntime._cudaIpcGetEventHandle(handle, event)
40
+
41
+ cdef cudaError_t cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) except ?cudaErrorCallRequiresNewerDriver nogil:
42
+ return cyruntime._cudaIpcOpenEventHandle(event, handle)
43
+
44
+ cdef cudaError_t cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil:
45
+ return cyruntime._cudaIpcGetMemHandle(handle, devPtr)
46
+
47
+ cdef cudaError_t cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
48
+ return cyruntime._cudaIpcOpenMemHandle(devPtr, handle, flags)
49
+
50
+ cdef cudaError_t cudaIpcCloseMemHandle(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil:
51
+ return cyruntime._cudaIpcCloseMemHandle(devPtr)
52
+
53
+ cdef cudaError_t cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) except ?cudaErrorCallRequiresNewerDriver nogil:
54
+ return cyruntime._cudaDeviceFlushGPUDirectRDMAWrites(target, scope)
55
+
56
+ cdef cudaError_t cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) except ?cudaErrorCallRequiresNewerDriver nogil:
57
+ return cyruntime._cudaDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback)
58
+
59
+ cdef cudaError_t cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) except ?cudaErrorCallRequiresNewerDriver nogil:
60
+ return cyruntime._cudaDeviceUnregisterAsyncNotification(device, callback)
61
+
62
+ cdef cudaError_t cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) except ?cudaErrorCallRequiresNewerDriver nogil:
63
+ return cyruntime._cudaDeviceGetSharedMemConfig(pConfig)
64
+
65
+ cdef cudaError_t cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil:
66
+ return cyruntime._cudaDeviceSetSharedMemConfig(config)
67
+
68
+ cdef cudaError_t cudaGetLastError() except ?cudaErrorCallRequiresNewerDriver nogil:
69
+ return cyruntime._cudaGetLastError()
70
+
71
+ cdef cudaError_t cudaPeekAtLastError() except ?cudaErrorCallRequiresNewerDriver nogil:
72
+ return cyruntime._cudaPeekAtLastError()
73
+
74
+ cdef const char* cudaGetErrorName(cudaError_t error) except ?NULL nogil:
75
+ return cyruntime._cudaGetErrorName(error)
76
+
77
+ cdef const char* cudaGetErrorString(cudaError_t error) except ?NULL nogil:
78
+ return cyruntime._cudaGetErrorString(error)
79
+
80
+ cdef cudaError_t cudaGetDeviceCount(int* count) except ?cudaErrorCallRequiresNewerDriver nogil:
81
+ return cyruntime._cudaGetDeviceCount(count)
82
+
83
+ cdef cudaError_t cudaGetDeviceProperties(cudaDeviceProp* prop, int device) except ?cudaErrorCallRequiresNewerDriver nogil:
84
+ return cyruntime._cudaGetDeviceProperties_v2(prop, device)
85
+
86
+ cdef cudaError_t cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) except ?cudaErrorCallRequiresNewerDriver nogil:
87
+ return cyruntime._cudaDeviceGetAttribute(value, attr, device)
88
+
89
+ cdef cudaError_t cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil:
90
+ return cyruntime._cudaDeviceGetDefaultMemPool(memPool, device)
91
+
92
+ cdef cudaError_t cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil:
93
+ return cyruntime._cudaDeviceSetMemPool(device, memPool)
94
+
95
+ cdef cudaError_t cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil:
96
+ return cyruntime._cudaDeviceGetMemPool(memPool, device)
97
+
98
+ cdef cudaError_t cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
99
+ return cyruntime._cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, device, flags)
100
+
101
+ cdef cudaError_t cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil:
102
+ return cyruntime._cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice)
103
+
104
+ cdef cudaError_t cudaChooseDevice(int* device, const cudaDeviceProp* prop) except ?cudaErrorCallRequiresNewerDriver nogil:
105
+ return cyruntime._cudaChooseDevice(device, prop)
106
+
107
+ cdef cudaError_t cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
108
+ return cyruntime._cudaInitDevice(device, deviceFlags, flags)
109
+
110
+ cdef cudaError_t cudaSetDevice(int device) except ?cudaErrorCallRequiresNewerDriver nogil:
111
+ return cyruntime._cudaSetDevice(device)
112
+
113
+ cdef cudaError_t cudaGetDevice(int* device) except ?cudaErrorCallRequiresNewerDriver nogil:
114
+ return cyruntime._cudaGetDevice(device)
115
+
116
+ cdef cudaError_t cudaSetDeviceFlags(unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
117
+ return cyruntime._cudaSetDeviceFlags(flags)
118
+
119
+ cdef cudaError_t cudaGetDeviceFlags(unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil:
120
+ return cyruntime._cudaGetDeviceFlags(flags)
121
+
122
+ cdef cudaError_t cudaStreamCreate(cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil:
123
+ return cyruntime._cudaStreamCreate(pStream)
124
+
125
+ cdef cudaError_t cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
126
+ return cyruntime._cudaStreamCreateWithFlags(pStream, flags)
127
+
128
+ cdef cudaError_t cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil:
129
+ return cyruntime._cudaStreamCreateWithPriority(pStream, flags, priority)
130
+
131
+ cdef cudaError_t cudaStreamGetPriority(cudaStream_t hStream, int* priority) except ?cudaErrorCallRequiresNewerDriver nogil:
132
+ return cyruntime._cudaStreamGetPriority(hStream, priority)
133
+
134
+ cdef cudaError_t cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil:
135
+ return cyruntime._cudaStreamGetFlags(hStream, flags)
136
+
137
+ cdef cudaError_t cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) except ?cudaErrorCallRequiresNewerDriver nogil:
138
+ return cyruntime._cudaStreamGetId(hStream, streamId)
139
+
140
+ cdef cudaError_t cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil:
141
+ return cyruntime._cudaStreamGetDevice(hStream, device)
142
+
143
+ cdef cudaError_t cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil:
144
+ return cyruntime._cudaCtxResetPersistingL2Cache()
145
+
146
+ cdef cudaError_t cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) except ?cudaErrorCallRequiresNewerDriver nogil:
147
+ return cyruntime._cudaStreamCopyAttributes(dst, src)
148
+
149
+ cdef cudaError_t cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil:
150
+ return cyruntime._cudaStreamGetAttribute(hStream, attr, value_out)
151
+
152
+ cdef cudaError_t cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil:
153
+ return cyruntime._cudaStreamSetAttribute(hStream, attr, value)
154
+
155
+ cdef cudaError_t cudaStreamDestroy(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil:
156
+ return cyruntime._cudaStreamDestroy(stream)
157
+
158
+ cdef cudaError_t cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
159
+ return cyruntime._cudaStreamWaitEvent(stream, event, flags)
160
+
161
+ cdef cudaError_t cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
162
+ return cyruntime._cudaStreamAddCallback(stream, callback, userData, flags)
163
+
164
+ cdef cudaError_t cudaStreamSynchronize(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil:
165
+ return cyruntime._cudaStreamSynchronize(stream)
166
+
167
+ cdef cudaError_t cudaStreamQuery(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil:
168
+ return cyruntime._cudaStreamQuery(stream)
169
+
170
+ cdef cudaError_t cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
171
+ return cyruntime._cudaStreamAttachMemAsync(stream, devPtr, length, flags)
172
+
173
+ cdef cudaError_t cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil:
174
+ return cyruntime._cudaStreamBeginCapture(stream, mode)
175
+
176
+ cdef cudaError_t cudaStreamBeginCaptureToGraph(cudaStream_t stream, cudaGraph_t graph, const cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil:
177
+ return cyruntime._cudaStreamBeginCaptureToGraph(stream, graph, dependencies, dependencyData, numDependencies, mode)
178
+
179
+ cdef cudaError_t cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) except ?cudaErrorCallRequiresNewerDriver nogil:
180
+ return cyruntime._cudaThreadExchangeStreamCaptureMode(mode)
181
+
182
+ cdef cudaError_t cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil:
183
+ return cyruntime._cudaStreamEndCapture(stream, pGraph)
184
+
185
+ cdef cudaError_t cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) except ?cudaErrorCallRequiresNewerDriver nogil:
186
+ return cyruntime._cudaStreamIsCapturing(stream, pCaptureStatus)
187
+
188
+ cdef cudaError_t cudaStreamGetCaptureInfo(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, size_t* numDependencies_out) except ?cudaErrorCallRequiresNewerDriver nogil:
189
+ return cyruntime._cudaStreamGetCaptureInfo_v2(stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out)
190
+
191
+ cdef cudaError_t cudaStreamGetCaptureInfo_v3(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, const cudaGraphEdgeData** edgeData_out, size_t* numDependencies_out) except ?cudaErrorCallRequiresNewerDriver nogil:
192
+ return cyruntime._cudaStreamGetCaptureInfo_v3(stream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out)
193
+
194
+ cdef cudaError_t cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
195
+ return cyruntime._cudaStreamUpdateCaptureDependencies(stream, dependencies, numDependencies, flags)
196
+
197
+ cdef cudaError_t cudaStreamUpdateCaptureDependencies_v2(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
198
+ return cyruntime._cudaStreamUpdateCaptureDependencies_v2(stream, dependencies, dependencyData, numDependencies, flags)
199
+
200
+ cdef cudaError_t cudaEventCreate(cudaEvent_t* event) except ?cudaErrorCallRequiresNewerDriver nogil:
201
+ return cyruntime._cudaEventCreate(event)
202
+
203
+ cdef cudaError_t cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
204
+ return cyruntime._cudaEventCreateWithFlags(event, flags)
205
+
206
+ cdef cudaError_t cudaEventRecord(cudaEvent_t event, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil:
207
+ return cyruntime._cudaEventRecord(event, stream)
208
+
209
+ cdef cudaError_t cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
210
+ return cyruntime._cudaEventRecordWithFlags(event, stream, flags)
211
+
212
+ cdef cudaError_t cudaEventQuery(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil:
213
+ return cyruntime._cudaEventQuery(event)
214
+
215
+ cdef cudaError_t cudaEventSynchronize(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil:
216
+ return cyruntime._cudaEventSynchronize(event)
217
+
218
+ cdef cudaError_t cudaEventDestroy(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil:
219
+ return cyruntime._cudaEventDestroy(event)
220
+
221
+ cdef cudaError_t cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil:
222
+ return cyruntime._cudaEventElapsedTime(ms, start, end)
223
+
224
+ cdef cudaError_t cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil:
225
+ return cyruntime._cudaEventElapsedTime_v2(ms, start, end)
226
+
227
+ cdef cudaError_t cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil:
228
+ return cyruntime._cudaImportExternalMemory(extMem_out, memHandleDesc)
229
+
230
+ cdef cudaError_t cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) except ?cudaErrorCallRequiresNewerDriver nogil:
231
+ return cyruntime._cudaExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc)
232
+
233
+ cdef cudaError_t cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) except ?cudaErrorCallRequiresNewerDriver nogil:
234
+ return cyruntime._cudaExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc)
235
+
236
+ cdef cudaError_t cudaDestroyExternalMemory(cudaExternalMemory_t extMem) except ?cudaErrorCallRequiresNewerDriver nogil:
237
+ return cyruntime._cudaDestroyExternalMemory(extMem)
238
+
239
+ cdef cudaError_t cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil:
240
+ return cyruntime._cudaImportExternalSemaphore(extSem_out, semHandleDesc)
241
+
242
+ cdef cudaError_t cudaSignalExternalSemaphoresAsync(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil:
243
+ return cyruntime._cudaSignalExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream)
244
+
245
+ cdef cudaError_t cudaWaitExternalSemaphoresAsync(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil:
246
+ return cyruntime._cudaWaitExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream)
247
+
248
+ cdef cudaError_t cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) except ?cudaErrorCallRequiresNewerDriver nogil:
249
+ return cyruntime._cudaDestroyExternalSemaphore(extSem)
250
+
251
+ cdef cudaError_t cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil:
252
+ return cyruntime._cudaFuncSetCacheConfig(func, cacheConfig)
253
+
254
+ cdef cudaError_t cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil:
255
+ return cyruntime._cudaFuncGetAttributes(attr, func)
256
+
257
+ cdef cudaError_t cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) except ?cudaErrorCallRequiresNewerDriver nogil:
258
+ return cyruntime._cudaFuncSetAttribute(func, attr, value)
259
+
260
+ cdef cudaError_t cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) except ?cudaErrorCallRequiresNewerDriver nogil:
261
+ return cyruntime._cudaLaunchHostFunc(stream, fn, userData)
262
+
263
+ cdef cudaError_t cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil:
264
+ return cyruntime._cudaFuncSetSharedMemConfig(func, config)
265
+
266
+ cdef cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) except ?cudaErrorCallRequiresNewerDriver nogil:
267
+ return cyruntime._cudaOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize)
268
+
269
+ cdef cudaError_t cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) except ?cudaErrorCallRequiresNewerDriver nogil:
270
+ return cyruntime._cudaOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize)
271
+
272
+ cdef cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
273
+ return cyruntime._cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags)
274
+
275
+ cdef cudaError_t cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
276
+ return cyruntime._cudaMallocManaged(devPtr, size, flags)
277
+
278
+ cdef cudaError_t cudaMalloc(void** devPtr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil:
279
+ return cyruntime._cudaMalloc(devPtr, size)
280
+
281
+ cdef cudaError_t cudaMallocHost(void** ptr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil:
282
+ return cyruntime._cudaMallocHost(ptr, size)
283
+
284
+ cdef cudaError_t cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil:
285
+ return cyruntime._cudaMallocPitch(devPtr, pitch, width, height)
286
+
287
+ cdef cudaError_t cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
288
+ return cyruntime._cudaMallocArray(array, desc, width, height, flags)
289
+
290
+ cdef cudaError_t cudaFree(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil:
291
+ return cyruntime._cudaFree(devPtr)
292
+
293
+ cdef cudaError_t cudaFreeHost(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil:
294
+ return cyruntime._cudaFreeHost(ptr)
295
+
296
+ cdef cudaError_t cudaFreeArray(cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil:
297
+ return cyruntime._cudaFreeArray(array)
298
+
299
+ cdef cudaError_t cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) except ?cudaErrorCallRequiresNewerDriver nogil:
300
+ return cyruntime._cudaFreeMipmappedArray(mipmappedArray)
301
+
302
+ cdef cudaError_t cudaHostAlloc(void** pHost, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
303
+ return cyruntime._cudaHostAlloc(pHost, size, flags)
304
+
305
+ cdef cudaError_t cudaHostRegister(void* ptr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
306
+ return cyruntime._cudaHostRegister(ptr, size, flags)
307
+
308
+ cdef cudaError_t cudaHostUnregister(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil:
309
+ return cyruntime._cudaHostUnregister(ptr)
310
+
311
+ cdef cudaError_t cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
312
+ return cyruntime._cudaHostGetDevicePointer(pDevice, pHost, flags)
313
+
314
+ cdef cudaError_t cudaHostGetFlags(unsigned int* pFlags, void* pHost) except ?cudaErrorCallRequiresNewerDriver nogil:
315
+ return cyruntime._cudaHostGetFlags(pFlags, pHost)
316
+
317
+ cdef cudaError_t cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil:
318
+ return cyruntime._cudaMalloc3D(pitchedDevPtr, extent)
319
+
320
+ cdef cudaError_t cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
321
+ return cyruntime._cudaMalloc3DArray(array, desc, extent, flags)
322
+
323
+ cdef cudaError_t cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
324
+ return cyruntime._cudaMallocMipmappedArray(mipmappedArray, desc, extent, numLevels, flags)
325
+
326
+ cdef cudaError_t cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) except ?cudaErrorCallRequiresNewerDriver nogil:
327
+ return cyruntime._cudaGetMipmappedArrayLevel(levelArray, mipmappedArray, level)
328
+
329
+ cdef cudaError_t cudaMemcpy3D(const cudaMemcpy3DParms* p) except ?cudaErrorCallRequiresNewerDriver nogil:
330
+ return cyruntime._cudaMemcpy3D(p)
331
+
332
+ cdef cudaError_t cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) except ?cudaErrorCallRequiresNewerDriver nogil:
333
+ return cyruntime._cudaMemcpy3DPeer(p)
334
+
335
+ cdef cudaError_t cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil:
336
+ return cyruntime._cudaMemcpy3DAsync(p, stream)
337
+
338
+ cdef cudaError_t cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil:
339
+ return cyruntime._cudaMemcpy3DPeerAsync(p, stream)
340
+
341
+ cdef cudaError_t cudaMemGetInfo(size_t* free, size_t* total) except ?cudaErrorCallRequiresNewerDriver nogil:
342
+ return cyruntime._cudaMemGetInfo(free, total)
343
+
344
+ cdef cudaError_t cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil:
345
+ return cyruntime._cudaArrayGetInfo(desc, extent, flags, array)
346
+
347
+ cdef cudaError_t cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) except ?cudaErrorCallRequiresNewerDriver nogil:
348
+ return cyruntime._cudaArrayGetPlane(pPlaneArray, hArray, planeIdx)
349
+
350
+ cdef cudaError_t cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) except ?cudaErrorCallRequiresNewerDriver nogil:
351
+ return cyruntime._cudaArrayGetMemoryRequirements(memoryRequirements, array, device)
352
+
353
+ cdef cudaError_t cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) except ?cudaErrorCallRequiresNewerDriver nogil:
354
+ return cyruntime._cudaMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device)
355
+
356
+ cdef cudaError_t cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil:
357
+ return cyruntime._cudaArrayGetSparseProperties(sparseProperties, array)
358
+
359
+ cdef cudaError_t cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) except ?cudaErrorCallRequiresNewerDriver nogil:
360
+ return cyruntime._cudaMipmappedArrayGetSparseProperties(sparseProperties, mipmap)
361
+
362
+ cdef cudaError_t cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil:
363
+ return cyruntime._cudaMemcpy(dst, src, count, kind)
364
+
365
+ cdef cudaError_t cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil:
366
+ return cyruntime._cudaMemcpyPeer(dst, dstDevice, src, srcDevice, count)
367
+
368
+ cdef cudaError_t cudaMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil:
369
+ return cyruntime._cudaMemcpy2D(dst, dpitch, src, spitch, width, height, kind)
370
+
371
+ cdef cudaError_t cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil:
372
+ return cyruntime._cudaMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, width, height, kind)
373
+
374
+ cdef cudaError_t cudaMemcpy2DFromArray(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil:
375
+ return cyruntime._cudaMemcpy2DFromArray(dst, dpitch, src, wOffset, hOffset, width, height, kind)
376
+
377
+ cdef cudaError_t cudaMemcpy2DArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil:
378
+ return cyruntime._cudaMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, width, height, kind)
379
+
380
+ cdef cudaError_t cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil:
381
+ return cyruntime._cudaMemcpyAsync(dst, src, count, kind, stream)
382
+
383
+ cdef cudaError_t cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil:
384
+ return cyruntime._cudaMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream)
385
+
386
+ cdef cudaError_t cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil:
387
+ return cyruntime._cudaMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream)
388
+
389
+ cdef cudaError_t cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil:
390
+ return cyruntime._cudaMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream)
391
+
392
+ cdef cudaError_t cudaMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil:
393
+ return cyruntime._cudaMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream)
394
+
395
+ cdef cudaError_t cudaMemcpy2DToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil:
396
+ return cyruntime._cudaMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, spitch, width, height, kind, stream)
397
+
398
+ cdef cudaError_t cudaMemcpy2DFromArrayAsync(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil:
399
+ return cyruntime._cudaMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, hOffset, width, height, kind, stream)
400
+
401
+ cdef cudaError_t cudaMemset(void* devPtr, int value, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil:
402
+ return cyruntime._cudaMemset(devPtr, value, count)
403
+
404
+ cdef cudaError_t cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil:
405
+ return cyruntime._cudaMemset2D(devPtr, pitch, value, width, height)
406
+
407
+ cdef cudaError_t cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil:
408
+ return cyruntime._cudaMemset3D(pitchedDevPtr, value, extent)
409
+
410
+ cdef cudaError_t cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil:
411
+ return cyruntime._cudaMemsetAsync(devPtr, value, count, stream)
412
+
413
+ cdef cudaError_t cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil:
414
+ return cyruntime._cudaMemset2DAsync(devPtr, pitch, value, width, height, stream)
415
+
416
+ cdef cudaError_t cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil:
417
+ return cyruntime._cudaMemset3DAsync(pitchedDevPtr, value, extent, stream)
418
+
419
+ cdef cudaError_t cudaMemPrefetchAsync(const void* devPtr, size_t count, int dstDevice, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil:
420
+ return cyruntime._cudaMemPrefetchAsync(devPtr, count, dstDevice, stream)
421
+
422
+ cdef cudaError_t cudaMemPrefetchAsync_v2(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil:
423
+ return cyruntime._cudaMemPrefetchAsync_v2(devPtr, count, location, flags, stream)
424
+
425
+ cdef cudaError_t cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, int device) except ?cudaErrorCallRequiresNewerDriver nogil:
426
+ return cyruntime._cudaMemAdvise(devPtr, count, advice, device)
427
+
428
+ cdef cudaError_t cudaMemAdvise_v2(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) except ?cudaErrorCallRequiresNewerDriver nogil:
429
+ return cyruntime._cudaMemAdvise_v2(devPtr, count, advice, location)
430
+
431
+ cdef cudaError_t cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil:
432
+ return cyruntime._cudaMemRangeGetAttribute(data, dataSize, attribute, devPtr, count)
433
+
434
+ cdef cudaError_t cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil:
435
+ return cyruntime._cudaMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count)
436
+
437
+ cdef cudaError_t cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil:
438
+ return cyruntime._cudaMemcpyToArray(dst, wOffset, hOffset, src, count, kind)
439
+
440
+ cdef cudaError_t cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil:
441
+ return cyruntime._cudaMemcpyFromArray(dst, src, wOffset, hOffset, count, kind)
442
+
443
+ cdef cudaError_t cudaMemcpyArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil:
444
+ return cyruntime._cudaMemcpyArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, count, kind)
445
+
446
+ cdef cudaError_t cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil:
447
+ return cyruntime._cudaMemcpyToArrayAsync(dst, wOffset, hOffset, src, count, kind, stream)
448
+
449
+ cdef cudaError_t cudaMemcpyFromArrayAsync(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil:
450
+ return cyruntime._cudaMemcpyFromArrayAsync(dst, src, wOffset, hOffset, count, kind, stream)
451
+
452
+ cdef cudaError_t cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil:
453
+ return cyruntime._cudaMallocAsync(devPtr, size, hStream)
454
+
455
+ cdef cudaError_t cudaFreeAsync(void* devPtr, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil:
456
+ return cyruntime._cudaFreeAsync(devPtr, hStream)
457
+
458
+ cdef cudaError_t cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) except ?cudaErrorCallRequiresNewerDriver nogil:
459
+ return cyruntime._cudaMemPoolTrimTo(memPool, minBytesToKeep)
460
+
461
+ cdef cudaError_t cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil:
462
+ return cyruntime._cudaMemPoolSetAttribute(memPool, attr, value)
463
+
464
+ cdef cudaError_t cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil:
465
+ return cyruntime._cudaMemPoolGetAttribute(memPool, attr, value)
466
+
467
+ cdef cudaError_t cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil:
468
+ return cyruntime._cudaMemPoolSetAccess(memPool, descList, count)
469
+
470
+ cdef cudaError_t cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) except ?cudaErrorCallRequiresNewerDriver nogil:
471
+ return cyruntime._cudaMemPoolGetAccess(flags, memPool, location)
472
+
473
+ cdef cudaError_t cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) except ?cudaErrorCallRequiresNewerDriver nogil:
474
+ return cyruntime._cudaMemPoolCreate(memPool, poolProps)
475
+
476
+ cdef cudaError_t cudaMemPoolDestroy(cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil:
477
+ return cyruntime._cudaMemPoolDestroy(memPool)
478
+
479
+ cdef cudaError_t cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil:
480
+ return cyruntime._cudaMallocFromPoolAsync(ptr, size, memPool, stream)
481
+
482
+ cdef cudaError_t cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
483
+ return cyruntime._cudaMemPoolExportToShareableHandle(shareableHandle, memPool, handleType, flags)
484
+
485
+ cdef cudaError_t cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
486
+ return cyruntime._cudaMemPoolImportFromShareableHandle(memPool, shareableHandle, handleType, flags)
487
+
488
+ cdef cudaError_t cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil:
489
+ return cyruntime._cudaMemPoolExportPointer(exportData, ptr)
490
+
491
+ cdef cudaError_t cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) except ?cudaErrorCallRequiresNewerDriver nogil:
492
+ return cyruntime._cudaMemPoolImportPointer(ptr, memPool, exportData)
493
+
494
+ cdef cudaError_t cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil:
495
+ return cyruntime._cudaPointerGetAttributes(attributes, ptr)
496
+
497
+ cdef cudaError_t cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil:
498
+ return cyruntime._cudaDeviceCanAccessPeer(canAccessPeer, device, peerDevice)
499
+
500
+ cdef cudaError_t cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
501
+ return cyruntime._cudaDeviceEnablePeerAccess(peerDevice, flags)
502
+
503
+ cdef cudaError_t cudaDeviceDisablePeerAccess(int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil:
504
+ return cyruntime._cudaDeviceDisablePeerAccess(peerDevice)
505
+
506
+ cdef cudaError_t cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil:
507
+ return cyruntime._cudaGraphicsUnregisterResource(resource)
508
+
509
+ cdef cudaError_t cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
510
+ return cyruntime._cudaGraphicsResourceSetMapFlags(resource, flags)
511
+
512
+ cdef cudaError_t cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil:
513
+ return cyruntime._cudaGraphicsMapResources(count, resources, stream)
514
+
515
+ cdef cudaError_t cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil:
516
+ return cyruntime._cudaGraphicsUnmapResources(count, resources, stream)
517
+
518
+ cdef cudaError_t cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil:
519
+ return cyruntime._cudaGraphicsResourceGetMappedPointer(devPtr, size, resource)
520
+
521
+ cdef cudaError_t cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil:
522
+ return cyruntime._cudaGraphicsSubResourceGetMappedArray(array, resource, arrayIndex, mipLevel)
523
+
524
+ cdef cudaError_t cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil:
525
+ return cyruntime._cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray, resource)
526
+
527
+ cdef cudaError_t cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil:
528
+ return cyruntime._cudaGetChannelDesc(desc, array)
529
+ @cython.show_performance_hints(False)
530
+ cdef cudaChannelFormatDesc cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil:
531
+ return cyruntime._cudaCreateChannelDesc(x, y, z, w, f)
532
+
533
+ cdef cudaError_t cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) except ?cudaErrorCallRequiresNewerDriver nogil:
534
+ return cyruntime._cudaCreateTextureObject(pTexObject, pResDesc, pTexDesc, pResViewDesc)
535
+
536
+ cdef cudaError_t cudaDestroyTextureObject(cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil:
537
+ return cyruntime._cudaDestroyTextureObject(texObject)
538
+
539
+ cdef cudaError_t cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil:
540
+ return cyruntime._cudaGetTextureObjectResourceDesc(pResDesc, texObject)
541
+
542
+ cdef cudaError_t cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil:
543
+ return cyruntime._cudaGetTextureObjectTextureDesc(pTexDesc, texObject)
544
+
545
+ cdef cudaError_t cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil:
546
+ return cyruntime._cudaGetTextureObjectResourceViewDesc(pResViewDesc, texObject)
547
+
548
+ cdef cudaError_t cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) except ?cudaErrorCallRequiresNewerDriver nogil:
549
+ return cyruntime._cudaCreateSurfaceObject(pSurfObject, pResDesc)
550
+
551
+ cdef cudaError_t cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil:
552
+ return cyruntime._cudaDestroySurfaceObject(surfObject)
553
+
554
+ cdef cudaError_t cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil:
555
+ return cyruntime._cudaGetSurfaceObjectResourceDesc(pResDesc, surfObject)
556
+
557
+ cdef cudaError_t cudaDriverGetVersion(int* driverVersion) except ?cudaErrorCallRequiresNewerDriver nogil:
558
+ return cyruntime._cudaDriverGetVersion(driverVersion)
559
+
560
+ cdef cudaError_t cudaRuntimeGetVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil:
561
+ return cyruntime._cudaRuntimeGetVersion(runtimeVersion)
562
+
563
+ cdef cudaError_t cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
564
+ return cyruntime._cudaGraphCreate(pGraph, flags)
565
+
566
+ cdef cudaError_t cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil:
567
+ return cyruntime._cudaGraphAddKernelNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams)
568
+
569
+ cdef cudaError_t cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil:
570
+ return cyruntime._cudaGraphKernelNodeGetParams(node, pNodeParams)
571
+
572
+ cdef cudaError_t cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil:
573
+ return cyruntime._cudaGraphKernelNodeSetParams(node, pNodeParams)
574
+
575
+ cdef cudaError_t cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hSrc, cudaGraphNode_t hDst) except ?cudaErrorCallRequiresNewerDriver nogil:
576
+ return cyruntime._cudaGraphKernelNodeCopyAttributes(hSrc, hDst)
577
+
578
+ cdef cudaError_t cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil:
579
+ return cyruntime._cudaGraphKernelNodeGetAttribute(hNode, attr, value_out)
580
+
581
+ cdef cudaError_t cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil:
582
+ return cyruntime._cudaGraphKernelNodeSetAttribute(hNode, attr, value)
583
+
584
+ cdef cudaError_t cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) except ?cudaErrorCallRequiresNewerDriver nogil:
585
+ return cyruntime._cudaGraphAddMemcpyNode(pGraphNode, graph, pDependencies, numDependencies, pCopyParams)
586
+
587
+ cdef cudaError_t cudaGraphAddMemcpyNode1D(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil:
588
+ return cyruntime._cudaGraphAddMemcpyNode1D(pGraphNode, graph, pDependencies, numDependencies, dst, src, count, kind)
589
+
590
+ cdef cudaError_t cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil:
591
+ return cyruntime._cudaGraphMemcpyNodeGetParams(node, pNodeParams)
592
+
593
+ cdef cudaError_t cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil:
594
+ return cyruntime._cudaGraphMemcpyNodeSetParams(node, pNodeParams)
595
+
596
+ cdef cudaError_t cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil:
597
+ return cyruntime._cudaGraphMemcpyNodeSetParams1D(node, dst, src, count, kind)
598
+
599
+ cdef cudaError_t cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) except ?cudaErrorCallRequiresNewerDriver nogil:
600
+ return cyruntime._cudaGraphAddMemsetNode(pGraphNode, graph, pDependencies, numDependencies, pMemsetParams)
601
+
602
+ cdef cudaError_t cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil:
603
+ return cyruntime._cudaGraphMemsetNodeGetParams(node, pNodeParams)
604
+
605
+ cdef cudaError_t cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil:
606
+ return cyruntime._cudaGraphMemsetNodeSetParams(node, pNodeParams)
607
+
608
+ cdef cudaError_t cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil:
609
+ return cyruntime._cudaGraphAddHostNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams)
610
+
611
+ cdef cudaError_t cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil:
612
+ return cyruntime._cudaGraphHostNodeGetParams(node, pNodeParams)
613
+
614
+ cdef cudaError_t cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil:
615
+ return cyruntime._cudaGraphHostNodeSetParams(node, pNodeParams)
616
+
617
+ cdef cudaError_t cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil:
618
+ return cyruntime._cudaGraphAddChildGraphNode(pGraphNode, graph, pDependencies, numDependencies, childGraph)
619
+
620
+ cdef cudaError_t cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil:
621
+ return cyruntime._cudaGraphChildGraphNodeGetGraph(node, pGraph)
622
+
623
+ cdef cudaError_t cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil:
624
+ return cyruntime._cudaGraphAddEmptyNode(pGraphNode, graph, pDependencies, numDependencies)
625
+
626
+ cdef cudaError_t cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil:
627
+ return cyruntime._cudaGraphAddEventRecordNode(pGraphNode, graph, pDependencies, numDependencies, event)
628
+
629
+ cdef cudaError_t cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil:
630
+ return cyruntime._cudaGraphEventRecordNodeGetEvent(node, event_out)
631
+
632
+ cdef cudaError_t cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil:
633
+ return cyruntime._cudaGraphEventRecordNodeSetEvent(node, event)
634
+
635
+ cdef cudaError_t cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil:
636
+ return cyruntime._cudaGraphAddEventWaitNode(pGraphNode, graph, pDependencies, numDependencies, event)
637
+
638
+ cdef cudaError_t cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil:
639
+ return cyruntime._cudaGraphEventWaitNodeGetEvent(node, event_out)
640
+
641
+ cdef cudaError_t cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil:
642
+ return cyruntime._cudaGraphEventWaitNodeSetEvent(node, event)
643
+
644
+ cdef cudaError_t cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil:
645
+ return cyruntime._cudaGraphAddExternalSemaphoresSignalNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams)
646
+
647
+ cdef cudaError_t cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil:
648
+ return cyruntime._cudaGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out)
649
+
650
+ cdef cudaError_t cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil:
651
+ return cyruntime._cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams)
652
+
653
+ cdef cudaError_t cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil:
654
+ return cyruntime._cudaGraphAddExternalSemaphoresWaitNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams)
655
+
656
+ cdef cudaError_t cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil:
657
+ return cyruntime._cudaGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out)
658
+
659
+ cdef cudaError_t cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil:
660
+ return cyruntime._cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams)
661
+
662
+ cdef cudaError_t cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil:
663
+ return cyruntime._cudaGraphAddMemAllocNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams)
664
+
665
+ cdef cudaError_t cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil:
666
+ return cyruntime._cudaGraphMemAllocNodeGetParams(node, params_out)
667
+
668
+ cdef cudaError_t cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) except ?cudaErrorCallRequiresNewerDriver nogil:
669
+ return cyruntime._cudaGraphAddMemFreeNode(pGraphNode, graph, pDependencies, numDependencies, dptr)
670
+
671
+ cdef cudaError_t cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) except ?cudaErrorCallRequiresNewerDriver nogil:
672
+ return cyruntime._cudaGraphMemFreeNodeGetParams(node, dptr_out)
673
+
674
+ cdef cudaError_t cudaDeviceGraphMemTrim(int device) except ?cudaErrorCallRequiresNewerDriver nogil:
675
+ return cyruntime._cudaDeviceGraphMemTrim(device)
676
+
677
+ cdef cudaError_t cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil:
678
+ return cyruntime._cudaDeviceGetGraphMemAttribute(device, attr, value)
679
+
680
+ cdef cudaError_t cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil:
681
+ return cyruntime._cudaDeviceSetGraphMemAttribute(device, attr, value)
682
+
683
+ cdef cudaError_t cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) except ?cudaErrorCallRequiresNewerDriver nogil:
684
+ return cyruntime._cudaGraphClone(pGraphClone, originalGraph)
685
+
686
+ cdef cudaError_t cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) except ?cudaErrorCallRequiresNewerDriver nogil:
687
+ return cyruntime._cudaGraphNodeFindInClone(pNode, originalNode, clonedGraph)
688
+
689
+ cdef cudaError_t cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) except ?cudaErrorCallRequiresNewerDriver nogil:
690
+ return cyruntime._cudaGraphNodeGetType(node, pType)
691
+
692
+ cdef cudaError_t cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) except ?cudaErrorCallRequiresNewerDriver nogil:
693
+ return cyruntime._cudaGraphGetNodes(graph, nodes, numNodes)
694
+
695
+ cdef cudaError_t cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) except ?cudaErrorCallRequiresNewerDriver nogil:
696
+ return cyruntime._cudaGraphGetRootNodes(graph, pRootNodes, pNumRootNodes)
697
+
698
+ cdef cudaError_t cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil:
699
+ return cyruntime._cudaGraphGetEdges(graph, from_, to, numEdges)
700
+
701
+ cdef cudaError_t cudaGraphGetEdges_v2(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil:
702
+ return cyruntime._cudaGraphGetEdges_v2(graph, from_, to, edgeData, numEdges)
703
+
704
+ cdef cudaError_t cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil:
705
+ return cyruntime._cudaGraphNodeGetDependencies(node, pDependencies, pNumDependencies)
706
+
707
+ cdef cudaError_t cudaGraphNodeGetDependencies_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil:
708
+ return cyruntime._cudaGraphNodeGetDependencies_v2(node, pDependencies, edgeData, pNumDependencies)
709
+
710
+ cdef cudaError_t cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil:
711
+ return cyruntime._cudaGraphNodeGetDependentNodes(node, pDependentNodes, pNumDependentNodes)
712
+
713
+ cdef cudaError_t cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil:
714
+ return cyruntime._cudaGraphNodeGetDependentNodes_v2(node, pDependentNodes, edgeData, pNumDependentNodes)
715
+
716
+ cdef cudaError_t cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil:
717
+ return cyruntime._cudaGraphAddDependencies(graph, from_, to, numDependencies)
718
+
719
+ cdef cudaError_t cudaGraphAddDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil:
720
+ return cyruntime._cudaGraphAddDependencies_v2(graph, from_, to, edgeData, numDependencies)
721
+
722
+ cdef cudaError_t cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil:
723
+ return cyruntime._cudaGraphRemoveDependencies(graph, from_, to, numDependencies)
724
+
725
+ cdef cudaError_t cudaGraphRemoveDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil:
726
+ return cyruntime._cudaGraphRemoveDependencies_v2(graph, from_, to, edgeData, numDependencies)
727
+
728
+ cdef cudaError_t cudaGraphDestroyNode(cudaGraphNode_t node) except ?cudaErrorCallRequiresNewerDriver nogil:
729
+ return cyruntime._cudaGraphDestroyNode(node)
730
+
731
+ cdef cudaError_t cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil:
732
+ return cyruntime._cudaGraphInstantiate(pGraphExec, graph, flags)
733
+
734
+ cdef cudaError_t cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil:
735
+ return cyruntime._cudaGraphInstantiateWithFlags(pGraphExec, graph, flags)
736
+
737
+ cdef cudaError_t cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) except ?cudaErrorCallRequiresNewerDriver nogil:
738
+ return cyruntime._cudaGraphInstantiateWithParams(pGraphExec, graph, instantiateParams)
739
+
740
+ cdef cudaError_t cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) except ?cudaErrorCallRequiresNewerDriver nogil:
741
+ return cyruntime._cudaGraphExecGetFlags(graphExec, flags)
742
+
743
+ cdef cudaError_t cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil:
744
+ return cyruntime._cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams)
745
+
746
+ cdef cudaError_t cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil:
747
+ return cyruntime._cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams)
748
+
749
+ cdef cudaError_t cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil:
750
+ return cyruntime._cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, count, kind)
751
+
752
+ cdef cudaError_t cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil:
753
+ return cyruntime._cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams)
754
+
755
+ cdef cudaError_t cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil:
756
+ return cyruntime._cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams)
757
+
758
+ cdef cudaError_t cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil:
759
+ return cyruntime._cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph)
760
+
761
+ cdef cudaError_t cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil:
762
+ return cyruntime._cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event)
763
+
764
+ cdef cudaError_t cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil:
765
+ return cyruntime._cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event)
766
+
767
+ cdef cudaError_t cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil:
768
+ return cyruntime._cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams)
769
+
770
+ cdef cudaError_t cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil:
771
+ return cyruntime._cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams)
772
+
773
+ cdef cudaError_t cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil:
774
+ return cyruntime._cudaGraphNodeSetEnabled(hGraphExec, hNode, isEnabled)
775
+
776
+ cdef cudaError_t cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil:
777
+ return cyruntime._cudaGraphNodeGetEnabled(hGraphExec, hNode, isEnabled)
778
+
779
+ cdef cudaError_t cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) except ?cudaErrorCallRequiresNewerDriver nogil:
780
+ return cyruntime._cudaGraphExecUpdate(hGraphExec, hGraph, resultInfo)
781
+
782
+ cdef cudaError_t cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil:
783
+ return cyruntime._cudaGraphUpload(graphExec, stream)
784
+
785
+ cdef cudaError_t cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil:
786
+ return cyruntime._cudaGraphLaunch(graphExec, stream)
787
+
788
+ cdef cudaError_t cudaGraphExecDestroy(cudaGraphExec_t graphExec) except ?cudaErrorCallRequiresNewerDriver nogil:
789
+ return cyruntime._cudaGraphExecDestroy(graphExec)
790
+
791
+ cdef cudaError_t cudaGraphDestroy(cudaGraph_t graph) except ?cudaErrorCallRequiresNewerDriver nogil:
792
+ return cyruntime._cudaGraphDestroy(graph)
793
+
794
+ cdef cudaError_t cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
795
+ return cyruntime._cudaGraphDebugDotPrint(graph, path, flags)
796
+
797
+ cdef cudaError_t cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
798
+ return cyruntime._cudaUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags)
799
+
800
+ cdef cudaError_t cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil:
801
+ return cyruntime._cudaUserObjectRetain(object, count)
802
+
803
+ cdef cudaError_t cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil:
804
+ return cyruntime._cudaUserObjectRelease(object, count)
805
+
806
+ cdef cudaError_t cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
807
+ return cyruntime._cudaGraphRetainUserObject(graph, object, count, flags)
808
+
809
+ cdef cudaError_t cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil:
810
+ return cyruntime._cudaGraphReleaseUserObject(graph, object, count)
811
+
812
+ cdef cudaError_t cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil:
813
+ return cyruntime._cudaGraphAddNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams)
814
+
815
+ cdef cudaError_t cudaGraphAddNode_v2(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil:
816
+ return cyruntime._cudaGraphAddNode_v2(pGraphNode, graph, pDependencies, dependencyData, numDependencies, nodeParams)
817
+
818
+ cdef cudaError_t cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil:
819
+ return cyruntime._cudaGraphNodeSetParams(node, nodeParams)
820
+
821
+ cdef cudaError_t cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil:
822
+ return cyruntime._cudaGraphExecNodeSetParams(graphExec, node, nodeParams)
823
+
824
+ cdef cudaError_t cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
825
+ return cyruntime._cudaGraphConditionalHandleCreate(pHandle_out, graph, defaultLaunchValue, flags)
826
+
827
+ cdef cudaError_t cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil:
828
+ return cyruntime._cudaGetDriverEntryPoint(symbol, funcPtr, flags, driverStatus)
829
+
830
+ cdef cudaError_t cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil:
831
+ return cyruntime._cudaGetDriverEntryPointByVersion(symbol, funcPtr, cudaVersion, flags, driverStatus)
832
+
833
+ cdef cudaError_t cudaLibraryLoadData(cudaLibrary_t* library, const void* code, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil:
834
+ return cyruntime._cudaLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions)
835
+
836
+ cdef cudaError_t cudaLibraryLoadFromFile(cudaLibrary_t* library, const char* fileName, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil:
837
+ return cyruntime._cudaLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions)
838
+
839
+ cdef cudaError_t cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil:
840
+ return cyruntime._cudaLibraryUnload(library)
841
+
842
+ cdef cudaError_t cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil:
843
+ return cyruntime._cudaLibraryGetKernel(pKernel, library, name)
844
+
845
+ cdef cudaError_t cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil:
846
+ return cyruntime._cudaLibraryGetGlobal(dptr, numbytes, library, name)
847
+
848
+ cdef cudaError_t cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil:
849
+ return cyruntime._cudaLibraryGetManaged(dptr, numbytes, library, name)
850
+
851
+ cdef cudaError_t cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil:
852
+ return cyruntime._cudaLibraryGetUnifiedFunction(fptr, library, symbol)
853
+
854
+ cdef cudaError_t cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil:
855
+ return cyruntime._cudaLibraryGetKernelCount(count, lib)
856
+
857
+ cdef cudaError_t cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil:
858
+ return cyruntime._cudaLibraryEnumerateKernels(kernels, numKernels, lib)
859
+
860
+ cdef cudaError_t cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil:
861
+ return cyruntime._cudaKernelSetAttributeForDevice(kernel, attr, value, device)
862
+
863
+ cdef cudaError_t cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil:
864
+ return cyruntime._cudaGetExportTable(ppExportTable, pExportTableId)
865
+
866
+ cdef cudaError_t cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil:
867
+ return cyruntime._cudaGetKernel(kernelPtr, entryFuncAddr)
868
+ @cython.show_performance_hints(False)
869
+ cdef cudaPitchedPtr make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil:
870
+ return cyruntime._make_cudaPitchedPtr(d, p, xsz, ysz)
871
+ @cython.show_performance_hints(False)
872
+ cdef cudaPos make_cudaPos(size_t x, size_t y, size_t z) except* nogil:
873
+ return cyruntime._make_cudaPos(x, y, z)
874
+ @cython.show_performance_hints(False)
875
+ cdef cudaExtent make_cudaExtent(size_t w, size_t h, size_t d) except* nogil:
876
+ return cyruntime._make_cudaExtent(w, h, d)
877
+
878
+ cdef cudaError_t cudaGraphicsEGLRegisterImage(cudaGraphicsResource** pCudaResource, EGLImageKHR image, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
879
+ return cyruntime._cudaGraphicsEGLRegisterImage(pCudaResource, image, flags)
880
+
881
+ cdef cudaError_t cudaEGLStreamConsumerConnect(cudaEglStreamConnection* conn, EGLStreamKHR eglStream) except ?cudaErrorCallRequiresNewerDriver nogil:
882
+ return cyruntime._cudaEGLStreamConsumerConnect(conn, eglStream)
883
+
884
+ cdef cudaError_t cudaEGLStreamConsumerConnectWithFlags(cudaEglStreamConnection* conn, EGLStreamKHR eglStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
885
+ return cyruntime._cudaEGLStreamConsumerConnectWithFlags(conn, eglStream, flags)
886
+
887
+ cdef cudaError_t cudaEGLStreamConsumerDisconnect(cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil:
888
+ return cyruntime._cudaEGLStreamConsumerDisconnect(conn)
889
+
890
+ cdef cudaError_t cudaEGLStreamConsumerAcquireFrame(cudaEglStreamConnection* conn, cudaGraphicsResource_t* pCudaResource, cudaStream_t* pStream, unsigned int timeout) except ?cudaErrorCallRequiresNewerDriver nogil:
891
+ return cyruntime._cudaEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout)
892
+
893
+ cdef cudaError_t cudaEGLStreamConsumerReleaseFrame(cudaEglStreamConnection* conn, cudaGraphicsResource_t pCudaResource, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil:
894
+ return cyruntime._cudaEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream)
895
+
896
+ cdef cudaError_t cudaEGLStreamProducerConnect(cudaEglStreamConnection* conn, EGLStreamKHR eglStream, EGLint width, EGLint height) except ?cudaErrorCallRequiresNewerDriver nogil:
897
+ return cyruntime._cudaEGLStreamProducerConnect(conn, eglStream, width, height)
898
+
899
+ cdef cudaError_t cudaEGLStreamProducerDisconnect(cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil:
900
+ return cyruntime._cudaEGLStreamProducerDisconnect(conn)
901
+
902
+ cdef cudaError_t cudaEGLStreamProducerPresentFrame(cudaEglStreamConnection* conn, cudaEglFrame eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil:
903
+ return cyruntime._cudaEGLStreamProducerPresentFrame(conn, eglframe, pStream)
904
+
905
+ cdef cudaError_t cudaEGLStreamProducerReturnFrame(cudaEglStreamConnection* conn, cudaEglFrame* eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil:
906
+ return cyruntime._cudaEGLStreamProducerReturnFrame(conn, eglframe, pStream)
907
+
908
+ cdef cudaError_t cudaGraphicsResourceGetMappedEglFrame(cudaEglFrame* eglFrame, cudaGraphicsResource_t resource, unsigned int index, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil:
909
+ return cyruntime._cudaGraphicsResourceGetMappedEglFrame(eglFrame, resource, index, mipLevel)
910
+
911
+ cdef cudaError_t cudaEventCreateFromEGLSync(cudaEvent_t* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
912
+ return cyruntime._cudaEventCreateFromEGLSync(phEvent, eglSync, flags)
913
+
914
+ cdef cudaError_t cudaProfilerStart() except ?cudaErrorCallRequiresNewerDriver nogil:
915
+ return cyruntime._cudaProfilerStart()
916
+
917
+ cdef cudaError_t cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver nogil:
918
+ return cyruntime._cudaProfilerStop()
919
+
920
+ cdef cudaError_t cudaGLGetDevices(unsigned int* pCudaDeviceCount, int* pCudaDevices, unsigned int cudaDeviceCount, cudaGLDeviceList deviceList) except ?cudaErrorCallRequiresNewerDriver nogil:
921
+ return cyruntime._cudaGLGetDevices(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList)
922
+
923
+ cdef cudaError_t cudaGraphicsGLRegisterImage(cudaGraphicsResource** resource, GLuint image, GLenum target, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
924
+ return cyruntime._cudaGraphicsGLRegisterImage(resource, image, target, flags)
925
+
926
+ cdef cudaError_t cudaGraphicsGLRegisterBuffer(cudaGraphicsResource** resource, GLuint buffer, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
927
+ return cyruntime._cudaGraphicsGLRegisterBuffer(resource, buffer, flags)
928
+
929
+ cdef cudaError_t cudaVDPAUGetDevice(int* device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil:
930
+ return cyruntime._cudaVDPAUGetDevice(device, vdpDevice, vdpGetProcAddress)
931
+
932
+ cdef cudaError_t cudaVDPAUSetVDPAUDevice(int device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil:
933
+ return cyruntime._cudaVDPAUSetVDPAUDevice(device, vdpDevice, vdpGetProcAddress)
934
+
935
+ cdef cudaError_t cudaGraphicsVDPAURegisterVideoSurface(cudaGraphicsResource** resource, VdpVideoSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
936
+ return cyruntime._cudaGraphicsVDPAURegisterVideoSurface(resource, vdpSurface, flags)
937
+
938
+ cdef cudaError_t cudaGraphicsVDPAURegisterOutputSurface(cudaGraphicsResource** resource, VdpOutputSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil:
939
+ return cyruntime._cudaGraphicsVDPAURegisterOutputSurface(resource, vdpSurface, flags)
940
+
941
+ from libc.stdint cimport uintptr_t
942
+ from cuda.pathfinder import load_nvidia_dynamic_lib
943
+ cimport cuda.bindings._lib.dlfcn as dlfcn
944
+
945
+ cdef cudaError_t getLocalRuntimeVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil:
946
+ # Load
947
+ with gil:
948
+ loaded_dl = load_nvidia_dynamic_lib("cudart")
949
+ handle = <void *><uintptr_t>loaded_dl._handle_uint
950
+ __cudaRuntimeGetVersion = dlfcn.dlsym(handle, 'cudaRuntimeGetVersion')
951
+
952
+ if __cudaRuntimeGetVersion == NULL:
953
+ with gil:
954
+ raise RuntimeError(f'Function "cudaRuntimeGetVersion" not found in {loaded_dl.abs_path}')
955
+
956
+ # Call
957
+ cdef cudaError_t err = cudaSuccess
958
+ err = (<cudaError_t (*)(int*) except ?cudaErrorCallRequiresNewerDriver nogil> __cudaRuntimeGetVersion)(runtimeVersion)
959
+
960
+ # We explicitly do *NOT* cleanup the library handle here, acknowledging
961
+ # that, yes, the handle leaks. The reason is that there's a
962
+ # `functools.cache` on the top-level caller of this function.
963
+ #
964
+ # This means this library would be opened once and then immediately closed,
965
+ # all the while remaining in the cache lurking there for people to call.
966
+ #
967
+ # Since we open the library one time (technically once per unique library name),
968
+ # there's not a ton of leakage, which we deem acceptable for the 1000x speedup
969
+ # achieved by caching (ultimately) `ctypes.CDLL` calls.
970
+ #
971
+ # Long(er)-term we can explore cleaning up the library using higher-level
972
+ # Python mechanisms, like `__del__` or `weakref.finalizer`s.
973
+
974
+ return err
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cyruntime_functions.pxi ADDED
@@ -0,0 +1,897 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
3
+
4
+ # This code was automatically generated with version 12.9.0. Do not modify it directly.
5
+ cdef extern from "cuda_runtime_api.h":
6
+
7
+
8
+ cudaError_t cudaDeviceReset() nogil
9
+
10
+
11
+ cudaError_t cudaDeviceSynchronize() nogil
12
+
13
+
14
+ cudaError_t cudaDeviceSetLimit(cudaLimit limit, size_t value) nogil
15
+
16
+
17
+ cudaError_t cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) nogil
18
+
19
+
20
+ cudaError_t cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) nogil
21
+
22
+
23
+ cudaError_t cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) nogil
24
+
25
+
26
+ cudaError_t cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) nogil
27
+
28
+
29
+ cudaError_t cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) nogil
30
+
31
+
32
+ cudaError_t cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) nogil
33
+
34
+
35
+ cudaError_t cudaDeviceGetPCIBusId(char* pciBusId, int length, int device) nogil
36
+
37
+
38
+ cudaError_t cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) nogil
39
+
40
+
41
+ cudaError_t cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) nogil
42
+
43
+
44
+ cudaError_t cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) nogil
45
+
46
+
47
+ cudaError_t cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) nogil
48
+
49
+
50
+ cudaError_t cudaIpcCloseMemHandle(void* devPtr) nogil
51
+
52
+
53
+ cudaError_t cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) nogil
54
+
55
+
56
+ cudaError_t cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) nogil
57
+
58
+
59
+ cudaError_t cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) nogil
60
+
61
+
62
+ cudaError_t cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) nogil
63
+
64
+
65
+ cudaError_t cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) nogil
66
+
67
+
68
+ cudaError_t cudaGetLastError() nogil
69
+
70
+
71
+ cudaError_t cudaPeekAtLastError() nogil
72
+
73
+
74
+ const char* cudaGetErrorName(cudaError_t error) nogil
75
+
76
+
77
+ const char* cudaGetErrorString(cudaError_t error) nogil
78
+
79
+
80
+ cudaError_t cudaGetDeviceCount(int* count) nogil
81
+
82
+
83
+ cudaError_t cudaGetDeviceProperties_v2(cudaDeviceProp* prop, int device) nogil
84
+
85
+
86
+ cudaError_t cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) nogil
87
+
88
+
89
+ cudaError_t cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) nogil
90
+
91
+
92
+ cudaError_t cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) nogil
93
+
94
+
95
+ cudaError_t cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) nogil
96
+
97
+
98
+ cudaError_t cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) nogil
99
+
100
+
101
+ cudaError_t cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) nogil
102
+
103
+
104
+ cudaError_t cudaChooseDevice(int* device, const cudaDeviceProp* prop) nogil
105
+
106
+
107
+ cudaError_t cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) nogil
108
+
109
+
110
+ cudaError_t cudaSetDevice(int device) nogil
111
+
112
+
113
+ cudaError_t cudaGetDevice(int* device) nogil
114
+
115
+
116
+ cudaError_t cudaSetDeviceFlags(unsigned int flags) nogil
117
+
118
+
119
+ cudaError_t cudaGetDeviceFlags(unsigned int* flags) nogil
120
+
121
+
122
+ cudaError_t cudaStreamCreate(cudaStream_t* pStream) nogil
123
+
124
+
125
+ cudaError_t cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) nogil
126
+
127
+
128
+ cudaError_t cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) nogil
129
+
130
+
131
+ cudaError_t cudaStreamGetPriority(cudaStream_t hStream, int* priority) nogil
132
+
133
+
134
+ cudaError_t cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) nogil
135
+
136
+
137
+ cudaError_t cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) nogil
138
+
139
+
140
+ cudaError_t cudaStreamGetDevice(cudaStream_t hStream, int* device) nogil
141
+
142
+
143
+ cudaError_t cudaCtxResetPersistingL2Cache() nogil
144
+
145
+
146
+ cudaError_t cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) nogil
147
+
148
+
149
+ cudaError_t cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) nogil
150
+
151
+
152
+ cudaError_t cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) nogil
153
+
154
+
155
+ cudaError_t cudaStreamDestroy(cudaStream_t stream) nogil
156
+
157
+
158
+ cudaError_t cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) nogil
159
+
160
+
161
+ cudaError_t cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) nogil
162
+
163
+
164
+ cudaError_t cudaStreamSynchronize(cudaStream_t stream) nogil
165
+
166
+
167
+ cudaError_t cudaStreamQuery(cudaStream_t stream) nogil
168
+
169
+
170
+ cudaError_t cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) nogil
171
+
172
+
173
+ cudaError_t cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) nogil
174
+
175
+
176
+ cudaError_t cudaStreamBeginCaptureToGraph(cudaStream_t stream, cudaGraph_t graph, const cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaStreamCaptureMode mode) nogil
177
+
178
+
179
+ cudaError_t cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) nogil
180
+
181
+
182
+ cudaError_t cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) nogil
183
+
184
+
185
+ cudaError_t cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) nogil
186
+
187
+
188
+ cudaError_t cudaStreamGetCaptureInfo_v2_ptsz(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, size_t* numDependencies_out) nogil
189
+
190
+
191
+ cudaError_t cudaStreamGetCaptureInfo_v2(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, size_t* numDependencies_out) nogil
192
+
193
+
194
+ cudaError_t cudaStreamGetCaptureInfo_v3(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, const cudaGraphEdgeData** edgeData_out, size_t* numDependencies_out) nogil
195
+
196
+
197
+ cudaError_t cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, size_t numDependencies, unsigned int flags) nogil
198
+
199
+
200
+ cudaError_t cudaStreamUpdateCaptureDependencies_v2(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) nogil
201
+
202
+
203
+ cudaError_t cudaEventCreate(cudaEvent_t* event) nogil
204
+
205
+
206
+ cudaError_t cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) nogil
207
+
208
+
209
+ cudaError_t cudaEventRecord(cudaEvent_t event, cudaStream_t stream) nogil
210
+
211
+
212
+ cudaError_t cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) nogil
213
+
214
+
215
+ cudaError_t cudaEventQuery(cudaEvent_t event) nogil
216
+
217
+
218
+ cudaError_t cudaEventSynchronize(cudaEvent_t event) nogil
219
+
220
+
221
+ cudaError_t cudaEventDestroy(cudaEvent_t event) nogil
222
+
223
+
224
+ cudaError_t cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) nogil
225
+
226
+
227
+ cudaError_t cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) nogil
228
+
229
+
230
+ cudaError_t cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) nogil
231
+
232
+
233
+ cudaError_t cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) nogil
234
+
235
+
236
+ cudaError_t cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) nogil
237
+
238
+
239
+ cudaError_t cudaDestroyExternalMemory(cudaExternalMemory_t extMem) nogil
240
+
241
+
242
+ cudaError_t cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) nogil
243
+
244
+
245
+ cudaError_t cudaSignalExternalSemaphoresAsync_v2_ptsz(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) nogil
246
+
247
+
248
+ cudaError_t cudaSignalExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) nogil
249
+
250
+
251
+ cudaError_t cudaWaitExternalSemaphoresAsync_v2_ptsz(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) nogil
252
+
253
+
254
+ cudaError_t cudaWaitExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) nogil
255
+
256
+
257
+ cudaError_t cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) nogil
258
+
259
+
260
+ cudaError_t cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) nogil
261
+
262
+
263
+ cudaError_t cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) nogil
264
+
265
+
266
+ cudaError_t cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) nogil
267
+
268
+
269
+ cudaError_t cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) nogil
270
+
271
+
272
+ cudaError_t cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) nogil
273
+
274
+
275
+ cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) nogil
276
+
277
+
278
+ cudaError_t cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) nogil
279
+
280
+
281
+ cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) nogil
282
+
283
+
284
+ cudaError_t cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) nogil
285
+
286
+
287
+ cudaError_t cudaMalloc(void** devPtr, size_t size) nogil
288
+
289
+
290
+ cudaError_t cudaMallocHost(void** ptr, size_t size) nogil
291
+
292
+
293
+ cudaError_t cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) nogil
294
+
295
+
296
+ cudaError_t cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) nogil
297
+
298
+
299
+ cudaError_t cudaFree(void* devPtr) nogil
300
+
301
+
302
+ cudaError_t cudaFreeHost(void* ptr) nogil
303
+
304
+
305
+ cudaError_t cudaFreeArray(cudaArray_t array) nogil
306
+
307
+
308
+ cudaError_t cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) nogil
309
+
310
+
311
+ cudaError_t cudaHostAlloc(void** pHost, size_t size, unsigned int flags) nogil
312
+
313
+
314
+ cudaError_t cudaHostRegister(void* ptr, size_t size, unsigned int flags) nogil
315
+
316
+
317
+ cudaError_t cudaHostUnregister(void* ptr) nogil
318
+
319
+
320
+ cudaError_t cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) nogil
321
+
322
+
323
+ cudaError_t cudaHostGetFlags(unsigned int* pFlags, void* pHost) nogil
324
+
325
+
326
+ cudaError_t cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) nogil
327
+
328
+
329
+ cudaError_t cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) nogil
330
+
331
+
332
+ cudaError_t cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) nogil
333
+
334
+
335
+ cudaError_t cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) nogil
336
+
337
+
338
+ cudaError_t cudaMemcpy3D(const cudaMemcpy3DParms* p) nogil
339
+
340
+
341
+ cudaError_t cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) nogil
342
+
343
+
344
+ cudaError_t cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) nogil
345
+
346
+
347
+ cudaError_t cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) nogil
348
+
349
+
350
+ cudaError_t cudaMemGetInfo(size_t* free, size_t* total) nogil
351
+
352
+
353
+ cudaError_t cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) nogil
354
+
355
+
356
+ cudaError_t cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) nogil
357
+
358
+
359
+ cudaError_t cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) nogil
360
+
361
+
362
+ cudaError_t cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) nogil
363
+
364
+
365
+ cudaError_t cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) nogil
366
+
367
+
368
+ cudaError_t cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) nogil
369
+
370
+
371
+ cudaError_t cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) nogil
372
+
373
+
374
+ cudaError_t cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) nogil
375
+
376
+
377
+ cudaError_t cudaMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) nogil
378
+
379
+
380
+ cudaError_t cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) nogil
381
+
382
+
383
+ cudaError_t cudaMemcpy2DFromArray(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind) nogil
384
+
385
+
386
+ cudaError_t cudaMemcpy2DArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t width, size_t height, cudaMemcpyKind kind) nogil
387
+
388
+
389
+ cudaError_t cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) nogil
390
+
391
+
392
+ cudaError_t cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) nogil
393
+
394
+
395
+ cudaError_t cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) nogil
396
+
397
+
398
+ cudaError_t cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) nogil
399
+
400
+
401
+ cudaError_t cudaMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) nogil
402
+
403
+
404
+ cudaError_t cudaMemcpy2DToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) nogil
405
+
406
+
407
+ cudaError_t cudaMemcpy2DFromArrayAsync(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) nogil
408
+
409
+
410
+ cudaError_t cudaMemset(void* devPtr, int value, size_t count) nogil
411
+
412
+
413
+ cudaError_t cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) nogil
414
+
415
+
416
+ cudaError_t cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) nogil
417
+
418
+
419
+ cudaError_t cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) nogil
420
+
421
+
422
+ cudaError_t cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) nogil
423
+
424
+
425
+ cudaError_t cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) nogil
426
+
427
+
428
+ cudaError_t cudaMemPrefetchAsync(const void* devPtr, size_t count, int dstDevice, cudaStream_t stream) nogil
429
+
430
+
431
+ cudaError_t cudaMemPrefetchAsync_v2(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) nogil
432
+
433
+
434
+ cudaError_t cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, int device) nogil
435
+
436
+
437
+ cudaError_t cudaMemAdvise_v2(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) nogil
438
+
439
+
440
+ cudaError_t cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) nogil
441
+
442
+
443
+ cudaError_t cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) nogil
444
+
445
+
446
+ cudaError_t cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) nogil
447
+
448
+
449
+ cudaError_t cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) nogil
450
+
451
+
452
+ cudaError_t cudaMemcpyArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, cudaMemcpyKind kind) nogil
453
+
454
+
455
+ cudaError_t cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) nogil
456
+
457
+
458
+ cudaError_t cudaMemcpyFromArrayAsync(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind, cudaStream_t stream) nogil
459
+
460
+
461
+ cudaError_t cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) nogil
462
+
463
+
464
+ cudaError_t cudaFreeAsync(void* devPtr, cudaStream_t hStream) nogil
465
+
466
+
467
+ cudaError_t cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) nogil
468
+
469
+
470
+ cudaError_t cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) nogil
471
+
472
+
473
+ cudaError_t cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) nogil
474
+
475
+
476
+ cudaError_t cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) nogil
477
+
478
+
479
+ cudaError_t cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) nogil
480
+
481
+
482
+ cudaError_t cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) nogil
483
+
484
+
485
+ cudaError_t cudaMemPoolDestroy(cudaMemPool_t memPool) nogil
486
+
487
+
488
+ cudaError_t cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) nogil
489
+
490
+
491
+ cudaError_t cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) nogil
492
+
493
+
494
+ cudaError_t cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) nogil
495
+
496
+
497
+ cudaError_t cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) nogil
498
+
499
+
500
+ cudaError_t cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) nogil
501
+
502
+
503
+ cudaError_t cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) nogil
504
+
505
+
506
+ cudaError_t cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) nogil
507
+
508
+
509
+ cudaError_t cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) nogil
510
+
511
+
512
+ cudaError_t cudaDeviceDisablePeerAccess(int peerDevice) nogil
513
+
514
+
515
+ cudaError_t cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) nogil
516
+
517
+
518
+ cudaError_t cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) nogil
519
+
520
+
521
+ cudaError_t cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) nogil
522
+
523
+
524
+ cudaError_t cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) nogil
525
+
526
+
527
+ cudaError_t cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) nogil
528
+
529
+
530
+ cudaError_t cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) nogil
531
+
532
+
533
+ cudaError_t cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) nogil
534
+
535
+
536
+ cudaError_t cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) nogil
537
+
538
+
539
+ cudaChannelFormatDesc cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) nogil
540
+
541
+
542
+ cudaError_t cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) nogil
543
+
544
+
545
+ cudaError_t cudaDestroyTextureObject(cudaTextureObject_t texObject) nogil
546
+
547
+
548
+ cudaError_t cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) nogil
549
+
550
+
551
+ cudaError_t cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) nogil
552
+
553
+
554
+ cudaError_t cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) nogil
555
+
556
+
557
+ cudaError_t cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) nogil
558
+
559
+
560
+ cudaError_t cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) nogil
561
+
562
+
563
+ cudaError_t cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) nogil
564
+
565
+
566
+ cudaError_t cudaDriverGetVersion(int* driverVersion) nogil
567
+
568
+
569
+ cudaError_t cudaRuntimeGetVersion(int* runtimeVersion) nogil
570
+
571
+
572
+ cudaError_t cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) nogil
573
+
574
+
575
+ cudaError_t cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) nogil
576
+
577
+
578
+ cudaError_t cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) nogil
579
+
580
+
581
+ cudaError_t cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) nogil
582
+
583
+
584
+ cudaError_t cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hSrc, cudaGraphNode_t hDst) nogil
585
+
586
+
587
+ cudaError_t cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) nogil
588
+
589
+
590
+ cudaError_t cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) nogil
591
+
592
+
593
+ cudaError_t cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) nogil
594
+
595
+
596
+ cudaError_t cudaGraphAddMemcpyNode1D(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* src, size_t count, cudaMemcpyKind kind) nogil
597
+
598
+
599
+ cudaError_t cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) nogil
600
+
601
+
602
+ cudaError_t cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) nogil
603
+
604
+
605
+ cudaError_t cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) nogil
606
+
607
+
608
+ cudaError_t cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) nogil
609
+
610
+
611
+ cudaError_t cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) nogil
612
+
613
+
614
+ cudaError_t cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) nogil
615
+
616
+
617
+ cudaError_t cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) nogil
618
+
619
+
620
+ cudaError_t cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) nogil
621
+
622
+
623
+ cudaError_t cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) nogil
624
+
625
+
626
+ cudaError_t cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) nogil
627
+
628
+
629
+ cudaError_t cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) nogil
630
+
631
+
632
+ cudaError_t cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) nogil
633
+
634
+
635
+ cudaError_t cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) nogil
636
+
637
+
638
+ cudaError_t cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) nogil
639
+
640
+
641
+ cudaError_t cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) nogil
642
+
643
+
644
+ cudaError_t cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) nogil
645
+
646
+
647
+ cudaError_t cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) nogil
648
+
649
+
650
+ cudaError_t cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) nogil
651
+
652
+
653
+ cudaError_t cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) nogil
654
+
655
+
656
+ cudaError_t cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) nogil
657
+
658
+
659
+ cudaError_t cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) nogil
660
+
661
+
662
+ cudaError_t cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) nogil
663
+
664
+
665
+ cudaError_t cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) nogil
666
+
667
+
668
+ cudaError_t cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) nogil
669
+
670
+
671
+ cudaError_t cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) nogil
672
+
673
+
674
+ cudaError_t cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) nogil
675
+
676
+
677
+ cudaError_t cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) nogil
678
+
679
+
680
+ cudaError_t cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) nogil
681
+
682
+
683
+ cudaError_t cudaDeviceGraphMemTrim(int device) nogil
684
+
685
+
686
+ cudaError_t cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) nogil
687
+
688
+
689
+ cudaError_t cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) nogil
690
+
691
+
692
+ cudaError_t cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) nogil
693
+
694
+
695
+ cudaError_t cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) nogil
696
+
697
+
698
+ cudaError_t cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) nogil
699
+
700
+
701
+ cudaError_t cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) nogil
702
+
703
+
704
+ cudaError_t cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) nogil
705
+
706
+
707
+ cudaError_t cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, size_t* numEdges) nogil
708
+
709
+
710
+ cudaError_t cudaGraphGetEdges_v2(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) nogil
711
+
712
+
713
+ cudaError_t cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, size_t* pNumDependencies) nogil
714
+
715
+
716
+ cudaError_t cudaGraphNodeGetDependencies_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) nogil
717
+
718
+
719
+ cudaError_t cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, size_t* pNumDependentNodes) nogil
720
+
721
+
722
+ cudaError_t cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) nogil
723
+
724
+
725
+ cudaError_t cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) nogil
726
+
727
+
728
+ cudaError_t cudaGraphAddDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) nogil
729
+
730
+
731
+ cudaError_t cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) nogil
732
+
733
+
734
+ cudaError_t cudaGraphRemoveDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) nogil
735
+
736
+
737
+ cudaError_t cudaGraphDestroyNode(cudaGraphNode_t node) nogil
738
+
739
+
740
+ cudaError_t cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) nogil
741
+
742
+
743
+ cudaError_t cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) nogil
744
+
745
+
746
+ cudaError_t cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) nogil
747
+
748
+
749
+ cudaError_t cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) nogil
750
+
751
+
752
+ cudaError_t cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) nogil
753
+
754
+
755
+ cudaError_t cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) nogil
756
+
757
+
758
+ cudaError_t cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) nogil
759
+
760
+
761
+ cudaError_t cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) nogil
762
+
763
+
764
+ cudaError_t cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) nogil
765
+
766
+
767
+ cudaError_t cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) nogil
768
+
769
+
770
+ cudaError_t cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) nogil
771
+
772
+
773
+ cudaError_t cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) nogil
774
+
775
+
776
+ cudaError_t cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) nogil
777
+
778
+
779
+ cudaError_t cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) nogil
780
+
781
+
782
+ cudaError_t cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) nogil
783
+
784
+
785
+ cudaError_t cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) nogil
786
+
787
+
788
+ cudaError_t cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) nogil
789
+
790
+
791
+ cudaError_t cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) nogil
792
+
793
+
794
+ cudaError_t cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) nogil
795
+
796
+
797
+ cudaError_t cudaGraphExecDestroy(cudaGraphExec_t graphExec) nogil
798
+
799
+
800
+ cudaError_t cudaGraphDestroy(cudaGraph_t graph) nogil
801
+
802
+
803
+ cudaError_t cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) nogil
804
+
805
+
806
+ cudaError_t cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) nogil
807
+
808
+
809
+ cudaError_t cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) nogil
810
+
811
+
812
+ cudaError_t cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) nogil
813
+
814
+
815
+ cudaError_t cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) nogil
816
+
817
+
818
+ cudaError_t cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) nogil
819
+
820
+
821
+ cudaError_t cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraphNodeParams* nodeParams) nogil
822
+
823
+
824
+ cudaError_t cudaGraphAddNode_v2(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) nogil
825
+
826
+
827
+ cudaError_t cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) nogil
828
+
829
+
830
+ cudaError_t cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) nogil
831
+
832
+
833
+ cudaError_t cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) nogil
834
+
835
+
836
+ cudaError_t cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) nogil
837
+
838
+
839
+ cudaError_t cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) nogil
840
+
841
+
842
+ cudaError_t cudaLibraryLoadData(cudaLibrary_t* library, const void* code, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) nogil
843
+
844
+
845
+ cudaError_t cudaLibraryLoadFromFile(cudaLibrary_t* library, const char* fileName, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) nogil
846
+
847
+
848
+ cudaError_t cudaLibraryUnload(cudaLibrary_t library) nogil
849
+
850
+
851
+ cudaError_t cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) nogil
852
+
853
+
854
+ cudaError_t cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) nogil
855
+
856
+
857
+ cudaError_t cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) nogil
858
+
859
+
860
+ cudaError_t cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) nogil
861
+
862
+
863
+ cudaError_t cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) nogil
864
+
865
+
866
+ cudaError_t cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) nogil
867
+
868
+
869
+ cudaError_t cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) nogil
870
+
871
+
872
+ cudaError_t cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) nogil
873
+
874
+
875
+ cudaError_t cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) nogil
876
+
877
+
878
+ cdef extern from "cuda_runtime.h":
879
+
880
+
881
+ cudaPitchedPtr make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) nogil
882
+
883
+
884
+ cudaPos make_cudaPos(size_t x, size_t y, size_t z) nogil
885
+
886
+
887
+ cudaExtent make_cudaExtent(size_t w, size_t h, size_t d) nogil
888
+
889
+
890
+ cdef extern from "cuda_profiler_api.h":
891
+
892
+
893
+ cudaError_t cudaProfilerStart() nogil
894
+
895
+
896
+ cudaError_t cudaProfilerStop() nogil
897
+
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/cyruntime_types.pxi ADDED
@@ -0,0 +1,1559 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
3
+
4
+ # This code was automatically generated with version 12.9.0. Do not modify it directly.
5
+
6
+ cdef extern from "vector_types.h":
7
+
8
+ cdef struct dim3:
9
+ unsigned int x
10
+ unsigned int y
11
+ unsigned int z
12
+
13
+ cdef extern from "driver_types.h":
14
+
15
+ cdef enum cudaError:
16
+ cudaSuccess = 0
17
+ cudaErrorInvalidValue = 1
18
+ cudaErrorMemoryAllocation = 2
19
+ cudaErrorInitializationError = 3
20
+ cudaErrorCudartUnloading = 4
21
+ cudaErrorProfilerDisabled = 5
22
+ cudaErrorProfilerNotInitialized = 6
23
+ cudaErrorProfilerAlreadyStarted = 7
24
+ cudaErrorProfilerAlreadyStopped = 8
25
+ cudaErrorInvalidConfiguration = 9
26
+ cudaErrorInvalidPitchValue = 12
27
+ cudaErrorInvalidSymbol = 13
28
+ cudaErrorInvalidHostPointer = 16
29
+ cudaErrorInvalidDevicePointer = 17
30
+ cudaErrorInvalidTexture = 18
31
+ cudaErrorInvalidTextureBinding = 19
32
+ cudaErrorInvalidChannelDescriptor = 20
33
+ cudaErrorInvalidMemcpyDirection = 21
34
+ cudaErrorAddressOfConstant = 22
35
+ cudaErrorTextureFetchFailed = 23
36
+ cudaErrorTextureNotBound = 24
37
+ cudaErrorSynchronizationError = 25
38
+ cudaErrorInvalidFilterSetting = 26
39
+ cudaErrorInvalidNormSetting = 27
40
+ cudaErrorMixedDeviceExecution = 28
41
+ cudaErrorNotYetImplemented = 31
42
+ cudaErrorMemoryValueTooLarge = 32
43
+ cudaErrorStubLibrary = 34
44
+ cudaErrorInsufficientDriver = 35
45
+ cudaErrorCallRequiresNewerDriver = 36
46
+ cudaErrorInvalidSurface = 37
47
+ cudaErrorDuplicateVariableName = 43
48
+ cudaErrorDuplicateTextureName = 44
49
+ cudaErrorDuplicateSurfaceName = 45
50
+ cudaErrorDevicesUnavailable = 46
51
+ cudaErrorIncompatibleDriverContext = 49
52
+ cudaErrorMissingConfiguration = 52
53
+ cudaErrorPriorLaunchFailure = 53
54
+ cudaErrorLaunchMaxDepthExceeded = 65
55
+ cudaErrorLaunchFileScopedTex = 66
56
+ cudaErrorLaunchFileScopedSurf = 67
57
+ cudaErrorSyncDepthExceeded = 68
58
+ cudaErrorLaunchPendingCountExceeded = 69
59
+ cudaErrorInvalidDeviceFunction = 98
60
+ cudaErrorNoDevice = 100
61
+ cudaErrorInvalidDevice = 101
62
+ cudaErrorDeviceNotLicensed = 102
63
+ cudaErrorSoftwareValidityNotEstablished = 103
64
+ cudaErrorStartupFailure = 127
65
+ cudaErrorInvalidKernelImage = 200
66
+ cudaErrorDeviceUninitialized = 201
67
+ cudaErrorMapBufferObjectFailed = 205
68
+ cudaErrorUnmapBufferObjectFailed = 206
69
+ cudaErrorArrayIsMapped = 207
70
+ cudaErrorAlreadyMapped = 208
71
+ cudaErrorNoKernelImageForDevice = 209
72
+ cudaErrorAlreadyAcquired = 210
73
+ cudaErrorNotMapped = 211
74
+ cudaErrorNotMappedAsArray = 212
75
+ cudaErrorNotMappedAsPointer = 213
76
+ cudaErrorECCUncorrectable = 214
77
+ cudaErrorUnsupportedLimit = 215
78
+ cudaErrorDeviceAlreadyInUse = 216
79
+ cudaErrorPeerAccessUnsupported = 217
80
+ cudaErrorInvalidPtx = 218
81
+ cudaErrorInvalidGraphicsContext = 219
82
+ cudaErrorNvlinkUncorrectable = 220
83
+ cudaErrorJitCompilerNotFound = 221
84
+ cudaErrorUnsupportedPtxVersion = 222
85
+ cudaErrorJitCompilationDisabled = 223
86
+ cudaErrorUnsupportedExecAffinity = 224
87
+ cudaErrorUnsupportedDevSideSync = 225
88
+ cudaErrorContained = 226
89
+ cudaErrorInvalidSource = 300
90
+ cudaErrorFileNotFound = 301
91
+ cudaErrorSharedObjectSymbolNotFound = 302
92
+ cudaErrorSharedObjectInitFailed = 303
93
+ cudaErrorOperatingSystem = 304
94
+ cudaErrorInvalidResourceHandle = 400
95
+ cudaErrorIllegalState = 401
96
+ cudaErrorLossyQuery = 402
97
+ cudaErrorSymbolNotFound = 500
98
+ cudaErrorNotReady = 600
99
+ cudaErrorIllegalAddress = 700
100
+ cudaErrorLaunchOutOfResources = 701
101
+ cudaErrorLaunchTimeout = 702
102
+ cudaErrorLaunchIncompatibleTexturing = 703
103
+ cudaErrorPeerAccessAlreadyEnabled = 704
104
+ cudaErrorPeerAccessNotEnabled = 705
105
+ cudaErrorSetOnActiveProcess = 708
106
+ cudaErrorContextIsDestroyed = 709
107
+ cudaErrorAssert = 710
108
+ cudaErrorTooManyPeers = 711
109
+ cudaErrorHostMemoryAlreadyRegistered = 712
110
+ cudaErrorHostMemoryNotRegistered = 713
111
+ cudaErrorHardwareStackError = 714
112
+ cudaErrorIllegalInstruction = 715
113
+ cudaErrorMisalignedAddress = 716
114
+ cudaErrorInvalidAddressSpace = 717
115
+ cudaErrorInvalidPc = 718
116
+ cudaErrorLaunchFailure = 719
117
+ cudaErrorCooperativeLaunchTooLarge = 720
118
+ cudaErrorTensorMemoryLeak = 721
119
+ cudaErrorNotPermitted = 800
120
+ cudaErrorNotSupported = 801
121
+ cudaErrorSystemNotReady = 802
122
+ cudaErrorSystemDriverMismatch = 803
123
+ cudaErrorCompatNotSupportedOnDevice = 804
124
+ cudaErrorMpsConnectionFailed = 805
125
+ cudaErrorMpsRpcFailure = 806
126
+ cudaErrorMpsServerNotReady = 807
127
+ cudaErrorMpsMaxClientsReached = 808
128
+ cudaErrorMpsMaxConnectionsReached = 809
129
+ cudaErrorMpsClientTerminated = 810
130
+ cudaErrorCdpNotSupported = 811
131
+ cudaErrorCdpVersionMismatch = 812
132
+ cudaErrorStreamCaptureUnsupported = 900
133
+ cudaErrorStreamCaptureInvalidated = 901
134
+ cudaErrorStreamCaptureMerge = 902
135
+ cudaErrorStreamCaptureUnmatched = 903
136
+ cudaErrorStreamCaptureUnjoined = 904
137
+ cudaErrorStreamCaptureIsolation = 905
138
+ cudaErrorStreamCaptureImplicit = 906
139
+ cudaErrorCapturedEvent = 907
140
+ cudaErrorStreamCaptureWrongThread = 908
141
+ cudaErrorTimeout = 909
142
+ cudaErrorGraphExecUpdateFailure = 910
143
+ cudaErrorExternalDevice = 911
144
+ cudaErrorInvalidClusterSize = 912
145
+ cudaErrorFunctionNotLoaded = 913
146
+ cudaErrorInvalidResourceType = 914
147
+ cudaErrorInvalidResourceConfiguration = 915
148
+ cudaErrorUnknown = 999
149
+ cudaErrorApiFailureBase = 10000
150
+
151
+ ctypedef cudaError cudaError_t
152
+
153
+ cdef struct cudaChannelFormatDesc:
154
+ int x
155
+ int y
156
+ int z
157
+ int w
158
+ cudaChannelFormatKind f
159
+
160
+ cdef struct cudaArray:
161
+ pass
162
+ ctypedef cudaArray* cudaArray_t
163
+
164
+ cdef struct cudaArray:
165
+ pass
166
+ ctypedef cudaArray* cudaArray_const_t
167
+
168
+ cdef struct cudaMipmappedArray:
169
+ pass
170
+ ctypedef cudaMipmappedArray* cudaMipmappedArray_t
171
+
172
+ cdef struct cudaMipmappedArray:
173
+ pass
174
+ ctypedef cudaMipmappedArray* cudaMipmappedArray_const_t
175
+
176
+ cdef struct anon_struct0:
177
+ unsigned int width
178
+ unsigned int height
179
+ unsigned int depth
180
+
181
+ cdef struct cudaArraySparseProperties:
182
+ anon_struct0 tileExtent
183
+ unsigned int miptailFirstLevel
184
+ unsigned long long miptailSize
185
+ unsigned int flags
186
+ unsigned int reserved[4]
187
+
188
+ cdef struct cudaArrayMemoryRequirements:
189
+ size_t size
190
+ size_t alignment
191
+ unsigned int reserved[4]
192
+
193
+ cdef struct cudaPitchedPtr:
194
+ void* ptr
195
+ size_t pitch
196
+ size_t xsize
197
+ size_t ysize
198
+
199
+ cdef struct cudaExtent:
200
+ size_t width
201
+ size_t height
202
+ size_t depth
203
+
204
+ cdef struct cudaPos:
205
+ size_t x
206
+ size_t y
207
+ size_t z
208
+
209
+ cdef struct cudaMemcpy3DParms:
210
+ cudaArray_t srcArray
211
+ cudaPos srcPos
212
+ cudaPitchedPtr srcPtr
213
+ cudaArray_t dstArray
214
+ cudaPos dstPos
215
+ cudaPitchedPtr dstPtr
216
+ cudaExtent extent
217
+ cudaMemcpyKind kind
218
+
219
+ cdef struct cudaMemcpyNodeParams:
220
+ int flags
221
+ int reserved[3]
222
+ cudaMemcpy3DParms copyParams
223
+
224
+ cdef struct cudaMemcpy3DPeerParms:
225
+ cudaArray_t srcArray
226
+ cudaPos srcPos
227
+ cudaPitchedPtr srcPtr
228
+ int srcDevice
229
+ cudaArray_t dstArray
230
+ cudaPos dstPos
231
+ cudaPitchedPtr dstPtr
232
+ int dstDevice
233
+ cudaExtent extent
234
+
235
+ cdef struct cudaMemsetParams:
236
+ void* dst
237
+ size_t pitch
238
+ unsigned int value
239
+ unsigned int elementSize
240
+ size_t width
241
+ size_t height
242
+
243
+ cdef struct cudaMemsetParamsV2:
244
+ void* dst
245
+ size_t pitch
246
+ unsigned int value
247
+ unsigned int elementSize
248
+ size_t width
249
+ size_t height
250
+
251
+ cdef struct cudaAccessPolicyWindow:
252
+ void* base_ptr
253
+ size_t num_bytes
254
+ float hitRatio
255
+ cudaAccessProperty hitProp
256
+ cudaAccessProperty missProp
257
+
258
+ ctypedef void (*cudaHostFn_t)(void* userData)
259
+
260
+ cdef struct cudaHostNodeParams:
261
+ cudaHostFn_t fn
262
+ void* userData
263
+
264
+ cdef struct cudaHostNodeParamsV2:
265
+ cudaHostFn_t fn
266
+ void* userData
267
+
268
+ cdef struct anon_struct1:
269
+ cudaArray_t array
270
+
271
+ cdef struct anon_struct2:
272
+ cudaMipmappedArray_t mipmap
273
+
274
+ cdef struct anon_struct3:
275
+ void* devPtr
276
+ cudaChannelFormatDesc desc
277
+ size_t sizeInBytes
278
+
279
+ cdef struct anon_struct4:
280
+ void* devPtr
281
+ cudaChannelFormatDesc desc
282
+ size_t width
283
+ size_t height
284
+ size_t pitchInBytes
285
+
286
+ cdef union anon_union0:
287
+ anon_struct1 array
288
+ anon_struct2 mipmap
289
+ anon_struct3 linear
290
+ anon_struct4 pitch2D
291
+
292
+ cdef struct cudaResourceDesc:
293
+ cudaResourceType resType
294
+ anon_union0 res
295
+
296
+ cdef struct cudaResourceViewDesc:
297
+ cudaResourceViewFormat format
298
+ size_t width
299
+ size_t height
300
+ size_t depth
301
+ unsigned int firstMipmapLevel
302
+ unsigned int lastMipmapLevel
303
+ unsigned int firstLayer
304
+ unsigned int lastLayer
305
+
306
+ cdef struct cudaPointerAttributes:
307
+ cudaMemoryType type
308
+ int device
309
+ void* devicePointer
310
+ void* hostPointer
311
+
312
+ cdef struct cudaFuncAttributes:
313
+ size_t sharedSizeBytes
314
+ size_t constSizeBytes
315
+ size_t localSizeBytes
316
+ int maxThreadsPerBlock
317
+ int numRegs
318
+ int ptxVersion
319
+ int binaryVersion
320
+ int cacheModeCA
321
+ int maxDynamicSharedSizeBytes
322
+ int preferredShmemCarveout
323
+ int clusterDimMustBeSet
324
+ int requiredClusterWidth
325
+ int requiredClusterHeight
326
+ int requiredClusterDepth
327
+ int clusterSchedulingPolicyPreference
328
+ int nonPortableClusterSizeAllowed
329
+ int reserved[16]
330
+
331
+ cdef struct cudaMemLocation:
332
+ cudaMemLocationType type
333
+ int id
334
+
335
+ cdef struct cudaMemAccessDesc:
336
+ cudaMemLocation location
337
+ cudaMemAccessFlags flags
338
+
339
+ cdef struct cudaMemPoolProps:
340
+ cudaMemAllocationType allocType
341
+ cudaMemAllocationHandleType handleTypes
342
+ cudaMemLocation location
343
+ void* win32SecurityAttributes
344
+ size_t maxSize
345
+ unsigned short usage
346
+ unsigned char reserved[54]
347
+
348
+ cdef struct cudaMemPoolPtrExportData:
349
+ unsigned char reserved[64]
350
+
351
+ cdef struct cudaMemAllocNodeParams:
352
+ cudaMemPoolProps poolProps
353
+ const cudaMemAccessDesc* accessDescs
354
+ size_t accessDescCount
355
+ size_t bytesize
356
+ void* dptr
357
+
358
+ cdef struct cudaMemAllocNodeParamsV2:
359
+ cudaMemPoolProps poolProps
360
+ const cudaMemAccessDesc* accessDescs
361
+ size_t accessDescCount
362
+ size_t bytesize
363
+ void* dptr
364
+
365
+ cdef struct cudaMemFreeNodeParams:
366
+ void* dptr
367
+
368
+ cdef struct cudaMemcpyAttributes:
369
+ cudaMemcpySrcAccessOrder srcAccessOrder
370
+ cudaMemLocation srcLocHint
371
+ cudaMemLocation dstLocHint
372
+ unsigned int flags
373
+
374
+ cdef struct cudaOffset3D:
375
+ size_t x
376
+ size_t y
377
+ size_t z
378
+
379
+ cdef struct anon_struct5:
380
+ void* ptr
381
+ size_t rowLength
382
+ size_t layerHeight
383
+ cudaMemLocation locHint
384
+
385
+ cdef struct anon_struct6:
386
+ cudaArray_t array
387
+ cudaOffset3D offset
388
+
389
+ cdef union anon_union1:
390
+ anon_struct5 ptr
391
+ anon_struct6 array
392
+
393
+ cdef struct cudaMemcpy3DOperand:
394
+ cudaMemcpy3DOperandType type
395
+ anon_union1 op
396
+
397
+ cdef struct cudaMemcpy3DBatchOp:
398
+ cudaMemcpy3DOperand src
399
+ cudaMemcpy3DOperand dst
400
+ cudaExtent extent
401
+ cudaMemcpySrcAccessOrder srcAccessOrder
402
+ unsigned int flags
403
+
404
+ cdef struct CUuuid_st:
405
+ char bytes[16]
406
+
407
+ ctypedef CUuuid_st CUuuid
408
+
409
+ ctypedef CUuuid_st cudaUUID_t
410
+
411
+ cdef struct cudaDeviceProp:
412
+ char name[256]
413
+ cudaUUID_t uuid
414
+ char luid[8]
415
+ unsigned int luidDeviceNodeMask
416
+ size_t totalGlobalMem
417
+ size_t sharedMemPerBlock
418
+ int regsPerBlock
419
+ int warpSize
420
+ size_t memPitch
421
+ int maxThreadsPerBlock
422
+ int maxThreadsDim[3]
423
+ int maxGridSize[3]
424
+ int clockRate
425
+ size_t totalConstMem
426
+ int major
427
+ int minor
428
+ size_t textureAlignment
429
+ size_t texturePitchAlignment
430
+ int deviceOverlap
431
+ int multiProcessorCount
432
+ int kernelExecTimeoutEnabled
433
+ int integrated
434
+ int canMapHostMemory
435
+ int computeMode
436
+ int maxTexture1D
437
+ int maxTexture1DMipmap
438
+ int maxTexture1DLinear
439
+ int maxTexture2D[2]
440
+ int maxTexture2DMipmap[2]
441
+ int maxTexture2DLinear[3]
442
+ int maxTexture2DGather[2]
443
+ int maxTexture3D[3]
444
+ int maxTexture3DAlt[3]
445
+ int maxTextureCubemap
446
+ int maxTexture1DLayered[2]
447
+ int maxTexture2DLayered[3]
448
+ int maxTextureCubemapLayered[2]
449
+ int maxSurface1D
450
+ int maxSurface2D[2]
451
+ int maxSurface3D[3]
452
+ int maxSurface1DLayered[2]
453
+ int maxSurface2DLayered[3]
454
+ int maxSurfaceCubemap
455
+ int maxSurfaceCubemapLayered[2]
456
+ size_t surfaceAlignment
457
+ int concurrentKernels
458
+ int ECCEnabled
459
+ int pciBusID
460
+ int pciDeviceID
461
+ int pciDomainID
462
+ int tccDriver
463
+ int asyncEngineCount
464
+ int unifiedAddressing
465
+ int memoryClockRate
466
+ int memoryBusWidth
467
+ int l2CacheSize
468
+ int persistingL2CacheMaxSize
469
+ int maxThreadsPerMultiProcessor
470
+ int streamPrioritiesSupported
471
+ int globalL1CacheSupported
472
+ int localL1CacheSupported
473
+ size_t sharedMemPerMultiprocessor
474
+ int regsPerMultiprocessor
475
+ int managedMemory
476
+ int isMultiGpuBoard
477
+ int multiGpuBoardGroupID
478
+ int hostNativeAtomicSupported
479
+ int singleToDoublePrecisionPerfRatio
480
+ int pageableMemoryAccess
481
+ int concurrentManagedAccess
482
+ int computePreemptionSupported
483
+ int canUseHostPointerForRegisteredMem
484
+ int cooperativeLaunch
485
+ int cooperativeMultiDeviceLaunch
486
+ size_t sharedMemPerBlockOptin
487
+ int pageableMemoryAccessUsesHostPageTables
488
+ int directManagedMemAccessFromHost
489
+ int maxBlocksPerMultiProcessor
490
+ int accessPolicyMaxWindowSize
491
+ size_t reservedSharedMemPerBlock
492
+ int hostRegisterSupported
493
+ int sparseCudaArraySupported
494
+ int hostRegisterReadOnlySupported
495
+ int timelineSemaphoreInteropSupported
496
+ int memoryPoolsSupported
497
+ int gpuDirectRDMASupported
498
+ unsigned int gpuDirectRDMAFlushWritesOptions
499
+ int gpuDirectRDMAWritesOrdering
500
+ unsigned int memoryPoolSupportedHandleTypes
501
+ int deferredMappingCudaArraySupported
502
+ int ipcEventSupported
503
+ int clusterLaunch
504
+ int unifiedFunctionPointers
505
+ int reserved[63]
506
+
507
+ cdef struct cudaIpcEventHandle_st:
508
+ char reserved[64]
509
+
510
+ ctypedef cudaIpcEventHandle_st cudaIpcEventHandle_t
511
+
512
+ cdef struct cudaIpcMemHandle_st:
513
+ char reserved[64]
514
+
515
+ ctypedef cudaIpcMemHandle_st cudaIpcMemHandle_t
516
+
517
+ cdef struct cudaMemFabricHandle_st:
518
+ char reserved[64]
519
+
520
+ ctypedef cudaMemFabricHandle_st cudaMemFabricHandle_t
521
+
522
+ cdef struct anon_struct7:
523
+ void* handle
524
+ const void* name
525
+
526
+ cdef union anon_union2:
527
+ int fd
528
+ anon_struct7 win32
529
+ const void* nvSciBufObject
530
+
531
+ cdef struct cudaExternalMemoryHandleDesc:
532
+ cudaExternalMemoryHandleType type
533
+ anon_union2 handle
534
+ unsigned long long size
535
+ unsigned int flags
536
+
537
+ cdef struct cudaExternalMemoryBufferDesc:
538
+ unsigned long long offset
539
+ unsigned long long size
540
+ unsigned int flags
541
+
542
+ cdef struct cudaExternalMemoryMipmappedArrayDesc:
543
+ unsigned long long offset
544
+ cudaChannelFormatDesc formatDesc
545
+ cudaExtent extent
546
+ unsigned int flags
547
+ unsigned int numLevels
548
+
549
+ cdef struct anon_struct8:
550
+ void* handle
551
+ const void* name
552
+
553
+ cdef union anon_union3:
554
+ int fd
555
+ anon_struct8 win32
556
+ const void* nvSciSyncObj
557
+
558
+ cdef struct cudaExternalSemaphoreHandleDesc:
559
+ cudaExternalSemaphoreHandleType type
560
+ anon_union3 handle
561
+ unsigned int flags
562
+
563
+ cdef struct anon_struct15:
564
+ unsigned long long value
565
+
566
+ cdef union anon_union6:
567
+ void* fence
568
+ unsigned long long reserved
569
+
570
+ cdef struct anon_struct16:
571
+ unsigned long long key
572
+
573
+ cdef struct anon_struct17:
574
+ anon_struct15 fence
575
+ anon_union6 nvSciSync
576
+ anon_struct16 keyedMutex
577
+ unsigned int reserved[12]
578
+
579
+ cdef struct cudaExternalSemaphoreSignalParams:
580
+ anon_struct17 params
581
+ unsigned int flags
582
+ unsigned int reserved[16]
583
+
584
+ cdef struct anon_struct18:
585
+ unsigned long long value
586
+
587
+ cdef union anon_union7:
588
+ void* fence
589
+ unsigned long long reserved
590
+
591
+ cdef struct anon_struct19:
592
+ unsigned long long key
593
+ unsigned int timeoutMs
594
+
595
+ cdef struct anon_struct20:
596
+ anon_struct18 fence
597
+ anon_union7 nvSciSync
598
+ anon_struct19 keyedMutex
599
+ unsigned int reserved[10]
600
+
601
+ cdef struct cudaExternalSemaphoreWaitParams:
602
+ anon_struct20 params
603
+ unsigned int flags
604
+ unsigned int reserved[16]
605
+
606
+ cdef struct CUstream_st:
607
+ pass
608
+ ctypedef CUstream_st* cudaStream_t
609
+
610
+ cdef struct CUevent_st:
611
+ pass
612
+ ctypedef CUevent_st* cudaEvent_t
613
+
614
+ cdef struct cudaGraphicsResource:
615
+ pass
616
+ ctypedef cudaGraphicsResource* cudaGraphicsResource_t
617
+
618
+ cdef struct CUexternalMemory_st:
619
+ pass
620
+ ctypedef CUexternalMemory_st* cudaExternalMemory_t
621
+
622
+ cdef struct CUexternalSemaphore_st:
623
+ pass
624
+ ctypedef CUexternalSemaphore_st* cudaExternalSemaphore_t
625
+
626
+ cdef struct CUgraph_st:
627
+ pass
628
+ ctypedef CUgraph_st* cudaGraph_t
629
+
630
+ cdef struct CUgraphNode_st:
631
+ pass
632
+ ctypedef CUgraphNode_st* cudaGraphNode_t
633
+
634
+ cdef struct CUuserObject_st:
635
+ pass
636
+ ctypedef CUuserObject_st* cudaUserObject_t
637
+
638
+ ctypedef unsigned long long cudaGraphConditionalHandle
639
+
640
+ cdef struct CUfunc_st:
641
+ pass
642
+ ctypedef CUfunc_st* cudaFunction_t
643
+
644
+ cdef struct CUkern_st:
645
+ pass
646
+ ctypedef CUkern_st* cudaKernel_t
647
+
648
+ cdef struct cudalibraryHostUniversalFunctionAndDataTable:
649
+ void* functionTable
650
+ size_t functionWindowSize
651
+ void* dataTable
652
+ size_t dataWindowSize
653
+
654
+ cdef struct CUlib_st:
655
+ pass
656
+ ctypedef CUlib_st* cudaLibrary_t
657
+
658
+ cdef struct CUmemPoolHandle_st:
659
+ pass
660
+ ctypedef CUmemPoolHandle_st* cudaMemPool_t
661
+
662
+ cdef struct cudaKernelNodeParams:
663
+ void* func
664
+ dim3 gridDim
665
+ dim3 blockDim
666
+ unsigned int sharedMemBytes
667
+ void** kernelParams
668
+ void** extra
669
+
670
+ cdef struct cudaKernelNodeParamsV2:
671
+ void* func
672
+ dim3 gridDim
673
+ dim3 blockDim
674
+ unsigned int sharedMemBytes
675
+ void** kernelParams
676
+ void** extra
677
+
678
+ cdef struct cudaExternalSemaphoreSignalNodeParams:
679
+ cudaExternalSemaphore_t* extSemArray
680
+ const cudaExternalSemaphoreSignalParams* paramsArray
681
+ unsigned int numExtSems
682
+
683
+ cdef struct cudaExternalSemaphoreSignalNodeParamsV2:
684
+ cudaExternalSemaphore_t* extSemArray
685
+ const cudaExternalSemaphoreSignalParams* paramsArray
686
+ unsigned int numExtSems
687
+
688
+ cdef struct cudaExternalSemaphoreWaitNodeParams:
689
+ cudaExternalSemaphore_t* extSemArray
690
+ const cudaExternalSemaphoreWaitParams* paramsArray
691
+ unsigned int numExtSems
692
+
693
+ cdef struct cudaExternalSemaphoreWaitNodeParamsV2:
694
+ cudaExternalSemaphore_t* extSemArray
695
+ const cudaExternalSemaphoreWaitParams* paramsArray
696
+ unsigned int numExtSems
697
+
698
+ cdef struct cudaConditionalNodeParams:
699
+ cudaGraphConditionalHandle handle
700
+ cudaGraphConditionalNodeType type
701
+ unsigned int size
702
+ cudaGraph_t* phGraph_out
703
+
704
+ cdef struct cudaChildGraphNodeParams:
705
+ cudaGraph_t graph
706
+ cudaGraphChildGraphNodeOwnership ownership
707
+
708
+ cdef struct cudaEventRecordNodeParams:
709
+ cudaEvent_t event
710
+
711
+ cdef struct cudaEventWaitNodeParams:
712
+ cudaEvent_t event
713
+
714
+ cdef struct cudaGraphNodeParams:
715
+ cudaGraphNodeType type
716
+ int reserved0[3]
717
+ long long reserved1[29]
718
+ cudaKernelNodeParamsV2 kernel
719
+ cudaMemcpyNodeParams memcpy
720
+ cudaMemsetParamsV2 memset
721
+ cudaHostNodeParamsV2 host
722
+ cudaChildGraphNodeParams graph
723
+ cudaEventWaitNodeParams eventWait
724
+ cudaEventRecordNodeParams eventRecord
725
+ cudaExternalSemaphoreSignalNodeParamsV2 extSemSignal
726
+ cudaExternalSemaphoreWaitNodeParamsV2 extSemWait
727
+ cudaMemAllocNodeParamsV2 alloc
728
+ cudaMemFreeNodeParams free
729
+ cudaConditionalNodeParams conditional
730
+ long long reserved2
731
+
732
+ cdef enum cudaGraphDependencyType_enum:
733
+ cudaGraphDependencyTypeDefault = 0
734
+ cudaGraphDependencyTypeProgrammatic = 1
735
+
736
+ ctypedef cudaGraphDependencyType_enum cudaGraphDependencyType
737
+
738
+ cdef struct cudaGraphEdgeData_st:
739
+ unsigned char from_port
740
+ unsigned char to_port
741
+ unsigned char type
742
+ unsigned char reserved[5]
743
+
744
+ ctypedef cudaGraphEdgeData_st cudaGraphEdgeData
745
+
746
+ cdef struct CUgraphExec_st:
747
+ pass
748
+ ctypedef CUgraphExec_st* cudaGraphExec_t
749
+
750
+ cdef enum cudaGraphInstantiateResult:
751
+ cudaGraphInstantiateSuccess = 0
752
+ cudaGraphInstantiateError = 1
753
+ cudaGraphInstantiateInvalidStructure = 2
754
+ cudaGraphInstantiateNodeOperationNotSupported = 3
755
+ cudaGraphInstantiateMultipleDevicesNotSupported = 4
756
+ cudaGraphInstantiateConditionalHandleUnused = 5
757
+
758
+ cdef struct cudaGraphInstantiateParams_st:
759
+ unsigned long long flags
760
+ cudaStream_t uploadStream
761
+ cudaGraphNode_t errNode_out
762
+ cudaGraphInstantiateResult result_out
763
+
764
+ ctypedef cudaGraphInstantiateParams_st cudaGraphInstantiateParams
765
+
766
+ cdef struct cudaGraphExecUpdateResultInfo_st:
767
+ cudaGraphExecUpdateResult result
768
+ cudaGraphNode_t errorNode
769
+ cudaGraphNode_t errorFromNode
770
+
771
+ ctypedef cudaGraphExecUpdateResultInfo_st cudaGraphExecUpdateResultInfo
772
+
773
+ cdef struct CUgraphDeviceUpdatableNode_st:
774
+ pass
775
+ ctypedef CUgraphDeviceUpdatableNode_st* cudaGraphDeviceNode_t
776
+
777
+ cdef struct anon_struct21:
778
+ const void* pValue
779
+ size_t offset
780
+ size_t size
781
+
782
+ cdef union anon_union9:
783
+ dim3 gridDim
784
+ anon_struct21 param
785
+ unsigned int isEnabled
786
+
787
+ cdef struct cudaGraphKernelNodeUpdate:
788
+ cudaGraphDeviceNode_t node
789
+ cudaGraphKernelNodeField field
790
+ anon_union9 updateData
791
+
792
+ cdef enum cudaLaunchMemSyncDomain:
793
+ cudaLaunchMemSyncDomainDefault = 0
794
+ cudaLaunchMemSyncDomainRemote = 1
795
+
796
+ cdef struct cudaLaunchMemSyncDomainMap_st:
797
+ unsigned char default_
798
+ unsigned char remote
799
+
800
+ ctypedef cudaLaunchMemSyncDomainMap_st cudaLaunchMemSyncDomainMap
801
+
802
+ cdef enum cudaLaunchAttributeID:
803
+ cudaLaunchAttributeIgnore = 0
804
+ cudaLaunchAttributeAccessPolicyWindow = 1
805
+ cudaLaunchAttributeCooperative = 2
806
+ cudaLaunchAttributeSynchronizationPolicy = 3
807
+ cudaLaunchAttributeClusterDimension = 4
808
+ cudaLaunchAttributeClusterSchedulingPolicyPreference = 5
809
+ cudaLaunchAttributeProgrammaticStreamSerialization = 6
810
+ cudaLaunchAttributeProgrammaticEvent = 7
811
+ cudaLaunchAttributePriority = 8
812
+ cudaLaunchAttributeMemSyncDomainMap = 9
813
+ cudaLaunchAttributeMemSyncDomain = 10
814
+ cudaLaunchAttributePreferredClusterDimension = 11
815
+ cudaLaunchAttributeLaunchCompletionEvent = 12
816
+ cudaLaunchAttributeDeviceUpdatableKernelNode = 13
817
+ cudaLaunchAttributePreferredSharedMemoryCarveout = 14
818
+
819
+ cdef struct anon_struct22:
820
+ unsigned int x
821
+ unsigned int y
822
+ unsigned int z
823
+
824
+ cdef struct anon_struct23:
825
+ cudaEvent_t event
826
+ int flags
827
+ int triggerAtBlockStart
828
+
829
+ cdef struct anon_struct24:
830
+ unsigned int x
831
+ unsigned int y
832
+ unsigned int z
833
+
834
+ cdef struct anon_struct25:
835
+ cudaEvent_t event
836
+ int flags
837
+
838
+ cdef struct anon_struct26:
839
+ int deviceUpdatable
840
+ cudaGraphDeviceNode_t devNode
841
+
842
+ cdef union cudaLaunchAttributeValue:
843
+ char pad[64]
844
+ cudaAccessPolicyWindow accessPolicyWindow
845
+ int cooperative
846
+ cudaSynchronizationPolicy syncPolicy
847
+ anon_struct22 clusterDim
848
+ cudaClusterSchedulingPolicy clusterSchedulingPolicyPreference
849
+ int programmaticStreamSerializationAllowed
850
+ anon_struct23 programmaticEvent
851
+ int priority
852
+ cudaLaunchMemSyncDomainMap memSyncDomainMap
853
+ cudaLaunchMemSyncDomain memSyncDomain
854
+ anon_struct24 preferredClusterDim
855
+ anon_struct25 launchCompletionEvent
856
+ anon_struct26 deviceUpdatableKernelNode
857
+ unsigned int sharedMemCarveout
858
+
859
+ cdef struct cudaLaunchAttribute_st:
860
+ cudaLaunchAttributeID id
861
+ cudaLaunchAttributeValue val
862
+
863
+ ctypedef cudaLaunchAttribute_st cudaLaunchAttribute
864
+
865
+ cdef struct cudaAsyncCallbackEntry:
866
+ pass
867
+ ctypedef cudaAsyncCallbackEntry* cudaAsyncCallbackHandle_t
868
+
869
+ cdef enum cudaAsyncNotificationType_enum:
870
+ cudaAsyncNotificationTypeOverBudget = 1
871
+
872
+ ctypedef cudaAsyncNotificationType_enum cudaAsyncNotificationType
873
+
874
+ cdef struct anon_struct27:
875
+ unsigned long long bytesOverBudget
876
+
877
+ cdef union anon_union10:
878
+ anon_struct27 overBudget
879
+
880
+ cdef struct cudaAsyncNotificationInfo:
881
+ cudaAsyncNotificationType type
882
+ anon_union10 info
883
+
884
+ ctypedef cudaAsyncNotificationInfo cudaAsyncNotificationInfo_t
885
+
886
+ ctypedef void (*cudaAsyncCallback)(cudaAsyncNotificationInfo_t* , void* , cudaAsyncCallbackHandle_t )
887
+
888
+ cdef enum cudaChannelFormatKind:
889
+ cudaChannelFormatKindSigned = 0
890
+ cudaChannelFormatKindUnsigned = 1
891
+ cudaChannelFormatKindFloat = 2
892
+ cudaChannelFormatKindNone = 3
893
+ cudaChannelFormatKindNV12 = 4
894
+ cudaChannelFormatKindUnsignedNormalized8X1 = 5
895
+ cudaChannelFormatKindUnsignedNormalized8X2 = 6
896
+ cudaChannelFormatKindUnsignedNormalized8X4 = 7
897
+ cudaChannelFormatKindUnsignedNormalized16X1 = 8
898
+ cudaChannelFormatKindUnsignedNormalized16X2 = 9
899
+ cudaChannelFormatKindUnsignedNormalized16X4 = 10
900
+ cudaChannelFormatKindSignedNormalized8X1 = 11
901
+ cudaChannelFormatKindSignedNormalized8X2 = 12
902
+ cudaChannelFormatKindSignedNormalized8X4 = 13
903
+ cudaChannelFormatKindSignedNormalized16X1 = 14
904
+ cudaChannelFormatKindSignedNormalized16X2 = 15
905
+ cudaChannelFormatKindSignedNormalized16X4 = 16
906
+ cudaChannelFormatKindUnsignedBlockCompressed1 = 17
907
+ cudaChannelFormatKindUnsignedBlockCompressed1SRGB = 18
908
+ cudaChannelFormatKindUnsignedBlockCompressed2 = 19
909
+ cudaChannelFormatKindUnsignedBlockCompressed2SRGB = 20
910
+ cudaChannelFormatKindUnsignedBlockCompressed3 = 21
911
+ cudaChannelFormatKindUnsignedBlockCompressed3SRGB = 22
912
+ cudaChannelFormatKindUnsignedBlockCompressed4 = 23
913
+ cudaChannelFormatKindSignedBlockCompressed4 = 24
914
+ cudaChannelFormatKindUnsignedBlockCompressed5 = 25
915
+ cudaChannelFormatKindSignedBlockCompressed5 = 26
916
+ cudaChannelFormatKindUnsignedBlockCompressed6H = 27
917
+ cudaChannelFormatKindSignedBlockCompressed6H = 28
918
+ cudaChannelFormatKindUnsignedBlockCompressed7 = 29
919
+ cudaChannelFormatKindUnsignedBlockCompressed7SRGB = 30
920
+ cudaChannelFormatKindUnsignedNormalized1010102 = 31
921
+
922
+ cdef enum cudaMemoryType:
923
+ cudaMemoryTypeUnregistered = 0
924
+ cudaMemoryTypeHost = 1
925
+ cudaMemoryTypeDevice = 2
926
+ cudaMemoryTypeManaged = 3
927
+
928
+ cdef enum cudaMemcpyKind:
929
+ cudaMemcpyHostToHost = 0
930
+ cudaMemcpyHostToDevice = 1
931
+ cudaMemcpyDeviceToHost = 2
932
+ cudaMemcpyDeviceToDevice = 3
933
+ cudaMemcpyDefault = 4
934
+
935
+ cdef enum cudaAccessProperty:
936
+ cudaAccessPropertyNormal = 0
937
+ cudaAccessPropertyStreaming = 1
938
+ cudaAccessPropertyPersisting = 2
939
+
940
+ cdef enum cudaStreamCaptureStatus:
941
+ cudaStreamCaptureStatusNone = 0
942
+ cudaStreamCaptureStatusActive = 1
943
+ cudaStreamCaptureStatusInvalidated = 2
944
+
945
+ cdef enum cudaStreamCaptureMode:
946
+ cudaStreamCaptureModeGlobal = 0
947
+ cudaStreamCaptureModeThreadLocal = 1
948
+ cudaStreamCaptureModeRelaxed = 2
949
+
950
+ cdef enum cudaSynchronizationPolicy:
951
+ cudaSyncPolicyAuto = 1
952
+ cudaSyncPolicySpin = 2
953
+ cudaSyncPolicyYield = 3
954
+ cudaSyncPolicyBlockingSync = 4
955
+
956
+ cdef enum cudaClusterSchedulingPolicy:
957
+ cudaClusterSchedulingPolicyDefault = 0
958
+ cudaClusterSchedulingPolicySpread = 1
959
+ cudaClusterSchedulingPolicyLoadBalancing = 2
960
+
961
+ cdef enum cudaStreamUpdateCaptureDependenciesFlags:
962
+ cudaStreamAddCaptureDependencies = 0
963
+ cudaStreamSetCaptureDependencies = 1
964
+
965
+ cdef enum cudaUserObjectFlags:
966
+ cudaUserObjectNoDestructorSync = 1
967
+
968
+ cdef enum cudaUserObjectRetainFlags:
969
+ cudaGraphUserObjectMove = 1
970
+
971
+ cdef enum cudaGraphicsRegisterFlags:
972
+ cudaGraphicsRegisterFlagsNone = 0
973
+ cudaGraphicsRegisterFlagsReadOnly = 1
974
+ cudaGraphicsRegisterFlagsWriteDiscard = 2
975
+ cudaGraphicsRegisterFlagsSurfaceLoadStore = 4
976
+ cudaGraphicsRegisterFlagsTextureGather = 8
977
+
978
+ cdef enum cudaGraphicsMapFlags:
979
+ cudaGraphicsMapFlagsNone = 0
980
+ cudaGraphicsMapFlagsReadOnly = 1
981
+ cudaGraphicsMapFlagsWriteDiscard = 2
982
+
983
+ cdef enum cudaGraphicsCubeFace:
984
+ cudaGraphicsCubeFacePositiveX = 0
985
+ cudaGraphicsCubeFaceNegativeX = 1
986
+ cudaGraphicsCubeFacePositiveY = 2
987
+ cudaGraphicsCubeFaceNegativeY = 3
988
+ cudaGraphicsCubeFacePositiveZ = 4
989
+ cudaGraphicsCubeFaceNegativeZ = 5
990
+
991
+ cdef enum cudaResourceType:
992
+ cudaResourceTypeArray = 0
993
+ cudaResourceTypeMipmappedArray = 1
994
+ cudaResourceTypeLinear = 2
995
+ cudaResourceTypePitch2D = 3
996
+
997
+ cdef enum cudaResourceViewFormat:
998
+ cudaResViewFormatNone = 0
999
+ cudaResViewFormatUnsignedChar1 = 1
1000
+ cudaResViewFormatUnsignedChar2 = 2
1001
+ cudaResViewFormatUnsignedChar4 = 3
1002
+ cudaResViewFormatSignedChar1 = 4
1003
+ cudaResViewFormatSignedChar2 = 5
1004
+ cudaResViewFormatSignedChar4 = 6
1005
+ cudaResViewFormatUnsignedShort1 = 7
1006
+ cudaResViewFormatUnsignedShort2 = 8
1007
+ cudaResViewFormatUnsignedShort4 = 9
1008
+ cudaResViewFormatSignedShort1 = 10
1009
+ cudaResViewFormatSignedShort2 = 11
1010
+ cudaResViewFormatSignedShort4 = 12
1011
+ cudaResViewFormatUnsignedInt1 = 13
1012
+ cudaResViewFormatUnsignedInt2 = 14
1013
+ cudaResViewFormatUnsignedInt4 = 15
1014
+ cudaResViewFormatSignedInt1 = 16
1015
+ cudaResViewFormatSignedInt2 = 17
1016
+ cudaResViewFormatSignedInt4 = 18
1017
+ cudaResViewFormatHalf1 = 19
1018
+ cudaResViewFormatHalf2 = 20
1019
+ cudaResViewFormatHalf4 = 21
1020
+ cudaResViewFormatFloat1 = 22
1021
+ cudaResViewFormatFloat2 = 23
1022
+ cudaResViewFormatFloat4 = 24
1023
+ cudaResViewFormatUnsignedBlockCompressed1 = 25
1024
+ cudaResViewFormatUnsignedBlockCompressed2 = 26
1025
+ cudaResViewFormatUnsignedBlockCompressed3 = 27
1026
+ cudaResViewFormatUnsignedBlockCompressed4 = 28
1027
+ cudaResViewFormatSignedBlockCompressed4 = 29
1028
+ cudaResViewFormatUnsignedBlockCompressed5 = 30
1029
+ cudaResViewFormatSignedBlockCompressed5 = 31
1030
+ cudaResViewFormatUnsignedBlockCompressed6H = 32
1031
+ cudaResViewFormatSignedBlockCompressed6H = 33
1032
+ cudaResViewFormatUnsignedBlockCompressed7 = 34
1033
+
1034
+ cdef enum cudaFuncAttribute:
1035
+ cudaFuncAttributeMaxDynamicSharedMemorySize = 8
1036
+ cudaFuncAttributePreferredSharedMemoryCarveout = 9
1037
+ cudaFuncAttributeClusterDimMustBeSet = 10
1038
+ cudaFuncAttributeRequiredClusterWidth = 11
1039
+ cudaFuncAttributeRequiredClusterHeight = 12
1040
+ cudaFuncAttributeRequiredClusterDepth = 13
1041
+ cudaFuncAttributeNonPortableClusterSizeAllowed = 14
1042
+ cudaFuncAttributeClusterSchedulingPolicyPreference = 15
1043
+ cudaFuncAttributeMax = 16
1044
+
1045
+ cdef enum cudaFuncCache:
1046
+ cudaFuncCachePreferNone = 0
1047
+ cudaFuncCachePreferShared = 1
1048
+ cudaFuncCachePreferL1 = 2
1049
+ cudaFuncCachePreferEqual = 3
1050
+
1051
+ cdef enum cudaSharedMemConfig:
1052
+ cudaSharedMemBankSizeDefault = 0
1053
+ cudaSharedMemBankSizeFourByte = 1
1054
+ cudaSharedMemBankSizeEightByte = 2
1055
+
1056
+ cdef enum cudaSharedCarveout:
1057
+ cudaSharedmemCarveoutDefault = -1
1058
+ cudaSharedmemCarveoutMaxL1 = 0
1059
+ cudaSharedmemCarveoutMaxShared = 100
1060
+
1061
+ cdef enum cudaComputeMode:
1062
+ cudaComputeModeDefault = 0
1063
+ cudaComputeModeExclusive = 1
1064
+ cudaComputeModeProhibited = 2
1065
+ cudaComputeModeExclusiveProcess = 3
1066
+
1067
+ cdef enum cudaLimit:
1068
+ cudaLimitStackSize = 0
1069
+ cudaLimitPrintfFifoSize = 1
1070
+ cudaLimitMallocHeapSize = 2
1071
+ cudaLimitDevRuntimeSyncDepth = 3
1072
+ cudaLimitDevRuntimePendingLaunchCount = 4
1073
+ cudaLimitMaxL2FetchGranularity = 5
1074
+ cudaLimitPersistingL2CacheSize = 6
1075
+
1076
+ cdef enum cudaMemoryAdvise:
1077
+ cudaMemAdviseSetReadMostly = 1
1078
+ cudaMemAdviseUnsetReadMostly = 2
1079
+ cudaMemAdviseSetPreferredLocation = 3
1080
+ cudaMemAdviseUnsetPreferredLocation = 4
1081
+ cudaMemAdviseSetAccessedBy = 5
1082
+ cudaMemAdviseUnsetAccessedBy = 6
1083
+
1084
+ cdef enum cudaMemRangeAttribute:
1085
+ cudaMemRangeAttributeReadMostly = 1
1086
+ cudaMemRangeAttributePreferredLocation = 2
1087
+ cudaMemRangeAttributeAccessedBy = 3
1088
+ cudaMemRangeAttributeLastPrefetchLocation = 4
1089
+ cudaMemRangeAttributePreferredLocationType = 5
1090
+ cudaMemRangeAttributePreferredLocationId = 6
1091
+ cudaMemRangeAttributeLastPrefetchLocationType = 7
1092
+ cudaMemRangeAttributeLastPrefetchLocationId = 8
1093
+
1094
+ cdef enum cudaFlushGPUDirectRDMAWritesOptions:
1095
+ cudaFlushGPUDirectRDMAWritesOptionHost = 1
1096
+ cudaFlushGPUDirectRDMAWritesOptionMemOps = 2
1097
+
1098
+ cdef enum cudaGPUDirectRDMAWritesOrdering:
1099
+ cudaGPUDirectRDMAWritesOrderingNone = 0
1100
+ cudaGPUDirectRDMAWritesOrderingOwner = 100
1101
+ cudaGPUDirectRDMAWritesOrderingAllDevices = 200
1102
+
1103
+ cdef enum cudaFlushGPUDirectRDMAWritesScope:
1104
+ cudaFlushGPUDirectRDMAWritesToOwner = 100
1105
+ cudaFlushGPUDirectRDMAWritesToAllDevices = 200
1106
+
1107
+ cdef enum cudaFlushGPUDirectRDMAWritesTarget:
1108
+ cudaFlushGPUDirectRDMAWritesTargetCurrentDevice = 0
1109
+
1110
+ cdef enum cudaDeviceAttr:
1111
+ cudaDevAttrMaxThreadsPerBlock = 1
1112
+ cudaDevAttrMaxBlockDimX = 2
1113
+ cudaDevAttrMaxBlockDimY = 3
1114
+ cudaDevAttrMaxBlockDimZ = 4
1115
+ cudaDevAttrMaxGridDimX = 5
1116
+ cudaDevAttrMaxGridDimY = 6
1117
+ cudaDevAttrMaxGridDimZ = 7
1118
+ cudaDevAttrMaxSharedMemoryPerBlock = 8
1119
+ cudaDevAttrTotalConstantMemory = 9
1120
+ cudaDevAttrWarpSize = 10
1121
+ cudaDevAttrMaxPitch = 11
1122
+ cudaDevAttrMaxRegistersPerBlock = 12
1123
+ cudaDevAttrClockRate = 13
1124
+ cudaDevAttrTextureAlignment = 14
1125
+ cudaDevAttrGpuOverlap = 15
1126
+ cudaDevAttrMultiProcessorCount = 16
1127
+ cudaDevAttrKernelExecTimeout = 17
1128
+ cudaDevAttrIntegrated = 18
1129
+ cudaDevAttrCanMapHostMemory = 19
1130
+ cudaDevAttrComputeMode = 20
1131
+ cudaDevAttrMaxTexture1DWidth = 21
1132
+ cudaDevAttrMaxTexture2DWidth = 22
1133
+ cudaDevAttrMaxTexture2DHeight = 23
1134
+ cudaDevAttrMaxTexture3DWidth = 24
1135
+ cudaDevAttrMaxTexture3DHeight = 25
1136
+ cudaDevAttrMaxTexture3DDepth = 26
1137
+ cudaDevAttrMaxTexture2DLayeredWidth = 27
1138
+ cudaDevAttrMaxTexture2DLayeredHeight = 28
1139
+ cudaDevAttrMaxTexture2DLayeredLayers = 29
1140
+ cudaDevAttrSurfaceAlignment = 30
1141
+ cudaDevAttrConcurrentKernels = 31
1142
+ cudaDevAttrEccEnabled = 32
1143
+ cudaDevAttrPciBusId = 33
1144
+ cudaDevAttrPciDeviceId = 34
1145
+ cudaDevAttrTccDriver = 35
1146
+ cudaDevAttrMemoryClockRate = 36
1147
+ cudaDevAttrGlobalMemoryBusWidth = 37
1148
+ cudaDevAttrL2CacheSize = 38
1149
+ cudaDevAttrMaxThreadsPerMultiProcessor = 39
1150
+ cudaDevAttrAsyncEngineCount = 40
1151
+ cudaDevAttrUnifiedAddressing = 41
1152
+ cudaDevAttrMaxTexture1DLayeredWidth = 42
1153
+ cudaDevAttrMaxTexture1DLayeredLayers = 43
1154
+ cudaDevAttrMaxTexture2DGatherWidth = 45
1155
+ cudaDevAttrMaxTexture2DGatherHeight = 46
1156
+ cudaDevAttrMaxTexture3DWidthAlt = 47
1157
+ cudaDevAttrMaxTexture3DHeightAlt = 48
1158
+ cudaDevAttrMaxTexture3DDepthAlt = 49
1159
+ cudaDevAttrPciDomainId = 50
1160
+ cudaDevAttrTexturePitchAlignment = 51
1161
+ cudaDevAttrMaxTextureCubemapWidth = 52
1162
+ cudaDevAttrMaxTextureCubemapLayeredWidth = 53
1163
+ cudaDevAttrMaxTextureCubemapLayeredLayers = 54
1164
+ cudaDevAttrMaxSurface1DWidth = 55
1165
+ cudaDevAttrMaxSurface2DWidth = 56
1166
+ cudaDevAttrMaxSurface2DHeight = 57
1167
+ cudaDevAttrMaxSurface3DWidth = 58
1168
+ cudaDevAttrMaxSurface3DHeight = 59
1169
+ cudaDevAttrMaxSurface3DDepth = 60
1170
+ cudaDevAttrMaxSurface1DLayeredWidth = 61
1171
+ cudaDevAttrMaxSurface1DLayeredLayers = 62
1172
+ cudaDevAttrMaxSurface2DLayeredWidth = 63
1173
+ cudaDevAttrMaxSurface2DLayeredHeight = 64
1174
+ cudaDevAttrMaxSurface2DLayeredLayers = 65
1175
+ cudaDevAttrMaxSurfaceCubemapWidth = 66
1176
+ cudaDevAttrMaxSurfaceCubemapLayeredWidth = 67
1177
+ cudaDevAttrMaxSurfaceCubemapLayeredLayers = 68
1178
+ cudaDevAttrMaxTexture1DLinearWidth = 69
1179
+ cudaDevAttrMaxTexture2DLinearWidth = 70
1180
+ cudaDevAttrMaxTexture2DLinearHeight = 71
1181
+ cudaDevAttrMaxTexture2DLinearPitch = 72
1182
+ cudaDevAttrMaxTexture2DMipmappedWidth = 73
1183
+ cudaDevAttrMaxTexture2DMipmappedHeight = 74
1184
+ cudaDevAttrComputeCapabilityMajor = 75
1185
+ cudaDevAttrComputeCapabilityMinor = 76
1186
+ cudaDevAttrMaxTexture1DMipmappedWidth = 77
1187
+ cudaDevAttrStreamPrioritiesSupported = 78
1188
+ cudaDevAttrGlobalL1CacheSupported = 79
1189
+ cudaDevAttrLocalL1CacheSupported = 80
1190
+ cudaDevAttrMaxSharedMemoryPerMultiprocessor = 81
1191
+ cudaDevAttrMaxRegistersPerMultiprocessor = 82
1192
+ cudaDevAttrManagedMemory = 83
1193
+ cudaDevAttrIsMultiGpuBoard = 84
1194
+ cudaDevAttrMultiGpuBoardGroupID = 85
1195
+ cudaDevAttrHostNativeAtomicSupported = 86
1196
+ cudaDevAttrSingleToDoublePrecisionPerfRatio = 87
1197
+ cudaDevAttrPageableMemoryAccess = 88
1198
+ cudaDevAttrConcurrentManagedAccess = 89
1199
+ cudaDevAttrComputePreemptionSupported = 90
1200
+ cudaDevAttrCanUseHostPointerForRegisteredMem = 91
1201
+ cudaDevAttrReserved92 = 92
1202
+ cudaDevAttrReserved93 = 93
1203
+ cudaDevAttrReserved94 = 94
1204
+ cudaDevAttrCooperativeLaunch = 95
1205
+ cudaDevAttrCooperativeMultiDeviceLaunch = 96
1206
+ cudaDevAttrMaxSharedMemoryPerBlockOptin = 97
1207
+ cudaDevAttrCanFlushRemoteWrites = 98
1208
+ cudaDevAttrHostRegisterSupported = 99
1209
+ cudaDevAttrPageableMemoryAccessUsesHostPageTables = 100
1210
+ cudaDevAttrDirectManagedMemAccessFromHost = 101
1211
+ cudaDevAttrMaxBlocksPerMultiprocessor = 106
1212
+ cudaDevAttrMaxPersistingL2CacheSize = 108
1213
+ cudaDevAttrMaxAccessPolicyWindowSize = 109
1214
+ cudaDevAttrReservedSharedMemoryPerBlock = 111
1215
+ cudaDevAttrSparseCudaArraySupported = 112
1216
+ cudaDevAttrHostRegisterReadOnlySupported = 113
1217
+ cudaDevAttrTimelineSemaphoreInteropSupported = 114
1218
+ cudaDevAttrMaxTimelineSemaphoreInteropSupported = 114
1219
+ cudaDevAttrMemoryPoolsSupported = 115
1220
+ cudaDevAttrGPUDirectRDMASupported = 116
1221
+ cudaDevAttrGPUDirectRDMAFlushWritesOptions = 117
1222
+ cudaDevAttrGPUDirectRDMAWritesOrdering = 118
1223
+ cudaDevAttrMemoryPoolSupportedHandleTypes = 119
1224
+ cudaDevAttrClusterLaunch = 120
1225
+ cudaDevAttrDeferredMappingCudaArraySupported = 121
1226
+ cudaDevAttrReserved122 = 122
1227
+ cudaDevAttrReserved123 = 123
1228
+ cudaDevAttrReserved124 = 124
1229
+ cudaDevAttrIpcEventSupport = 125
1230
+ cudaDevAttrMemSyncDomainCount = 126
1231
+ cudaDevAttrReserved127 = 127
1232
+ cudaDevAttrReserved128 = 128
1233
+ cudaDevAttrReserved129 = 129
1234
+ cudaDevAttrNumaConfig = 130
1235
+ cudaDevAttrNumaId = 131
1236
+ cudaDevAttrReserved132 = 132
1237
+ cudaDevAttrMpsEnabled = 133
1238
+ cudaDevAttrHostNumaId = 134
1239
+ cudaDevAttrD3D12CigSupported = 135
1240
+ cudaDevAttrVulkanCigSupported = 138
1241
+ cudaDevAttrGpuPciDeviceId = 139
1242
+ cudaDevAttrGpuPciSubsystemId = 140
1243
+ cudaDevAttrReserved141 = 141
1244
+ cudaDevAttrHostNumaMemoryPoolsSupported = 142
1245
+ cudaDevAttrHostNumaMultinodeIpcSupported = 143
1246
+ cudaDevAttrMax = 144
1247
+
1248
+ cdef enum cudaMemPoolAttr:
1249
+ cudaMemPoolReuseFollowEventDependencies = 1
1250
+ cudaMemPoolReuseAllowOpportunistic = 2
1251
+ cudaMemPoolReuseAllowInternalDependencies = 3
1252
+ cudaMemPoolAttrReleaseThreshold = 4
1253
+ cudaMemPoolAttrReservedMemCurrent = 5
1254
+ cudaMemPoolAttrReservedMemHigh = 6
1255
+ cudaMemPoolAttrUsedMemCurrent = 7
1256
+ cudaMemPoolAttrUsedMemHigh = 8
1257
+
1258
+ cdef enum cudaMemLocationType:
1259
+ cudaMemLocationTypeInvalid = 0
1260
+ cudaMemLocationTypeDevice = 1
1261
+ cudaMemLocationTypeHost = 2
1262
+ cudaMemLocationTypeHostNuma = 3
1263
+ cudaMemLocationTypeHostNumaCurrent = 4
1264
+
1265
+ cdef enum cudaMemAccessFlags:
1266
+ cudaMemAccessFlagsProtNone = 0
1267
+ cudaMemAccessFlagsProtRead = 1
1268
+ cudaMemAccessFlagsProtReadWrite = 3
1269
+
1270
+ cdef enum cudaMemAllocationType:
1271
+ cudaMemAllocationTypeInvalid = 0
1272
+ cudaMemAllocationTypePinned = 1
1273
+ cudaMemAllocationTypeMax = 2147483647
1274
+
1275
+ cdef enum cudaMemAllocationHandleType:
1276
+ cudaMemHandleTypeNone = 0
1277
+ cudaMemHandleTypePosixFileDescriptor = 1
1278
+ cudaMemHandleTypeWin32 = 2
1279
+ cudaMemHandleTypeWin32Kmt = 4
1280
+ cudaMemHandleTypeFabric = 8
1281
+
1282
+ cdef enum cudaGraphMemAttributeType:
1283
+ cudaGraphMemAttrUsedMemCurrent = 0
1284
+ cudaGraphMemAttrUsedMemHigh = 1
1285
+ cudaGraphMemAttrReservedMemCurrent = 2
1286
+ cudaGraphMemAttrReservedMemHigh = 3
1287
+
1288
+ cdef enum cudaMemcpyFlags:
1289
+ cudaMemcpyFlagDefault = 0
1290
+ cudaMemcpyFlagPreferOverlapWithCompute = 1
1291
+
1292
+ cdef enum cudaMemcpySrcAccessOrder:
1293
+ cudaMemcpySrcAccessOrderInvalid = 0
1294
+ cudaMemcpySrcAccessOrderStream = 1
1295
+ cudaMemcpySrcAccessOrderDuringApiCall = 2
1296
+ cudaMemcpySrcAccessOrderAny = 3
1297
+ cudaMemcpySrcAccessOrderMax = 2147483647
1298
+
1299
+ cdef enum cudaMemcpy3DOperandType:
1300
+ cudaMemcpyOperandTypePointer = 1
1301
+ cudaMemcpyOperandTypeArray = 2
1302
+ cudaMemcpyOperandTypeMax = 2147483647
1303
+
1304
+ cdef enum cudaDeviceP2PAttr:
1305
+ cudaDevP2PAttrPerformanceRank = 1
1306
+ cudaDevP2PAttrAccessSupported = 2
1307
+ cudaDevP2PAttrNativeAtomicSupported = 3
1308
+ cudaDevP2PAttrCudaArrayAccessSupported = 4
1309
+
1310
+ cdef enum cudaExternalMemoryHandleType:
1311
+ cudaExternalMemoryHandleTypeOpaqueFd = 1
1312
+ cudaExternalMemoryHandleTypeOpaqueWin32 = 2
1313
+ cudaExternalMemoryHandleTypeOpaqueWin32Kmt = 3
1314
+ cudaExternalMemoryHandleTypeD3D12Heap = 4
1315
+ cudaExternalMemoryHandleTypeD3D12Resource = 5
1316
+ cudaExternalMemoryHandleTypeD3D11Resource = 6
1317
+ cudaExternalMemoryHandleTypeD3D11ResourceKmt = 7
1318
+ cudaExternalMemoryHandleTypeNvSciBuf = 8
1319
+
1320
+ cdef enum cudaExternalSemaphoreHandleType:
1321
+ cudaExternalSemaphoreHandleTypeOpaqueFd = 1
1322
+ cudaExternalSemaphoreHandleTypeOpaqueWin32 = 2
1323
+ cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt = 3
1324
+ cudaExternalSemaphoreHandleTypeD3D12Fence = 4
1325
+ cudaExternalSemaphoreHandleTypeD3D11Fence = 5
1326
+ cudaExternalSemaphoreHandleTypeNvSciSync = 6
1327
+ cudaExternalSemaphoreHandleTypeKeyedMutex = 7
1328
+ cudaExternalSemaphoreHandleTypeKeyedMutexKmt = 8
1329
+ cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd = 9
1330
+ cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 = 10
1331
+
1332
+ cdef enum cudaJitOption:
1333
+ cudaJitMaxRegisters = 0
1334
+ cudaJitThreadsPerBlock = 1
1335
+ cudaJitWallTime = 2
1336
+ cudaJitInfoLogBuffer = 3
1337
+ cudaJitInfoLogBufferSizeBytes = 4
1338
+ cudaJitErrorLogBuffer = 5
1339
+ cudaJitErrorLogBufferSizeBytes = 6
1340
+ cudaJitOptimizationLevel = 7
1341
+ cudaJitFallbackStrategy = 10
1342
+ cudaJitGenerateDebugInfo = 11
1343
+ cudaJitLogVerbose = 12
1344
+ cudaJitGenerateLineInfo = 13
1345
+ cudaJitCacheMode = 14
1346
+ cudaJitPositionIndependentCode = 30
1347
+ cudaJitMinCtaPerSm = 31
1348
+ cudaJitMaxThreadsPerBlock = 32
1349
+ cudaJitOverrideDirectiveValues = 33
1350
+
1351
+ cdef enum cudaLibraryOption:
1352
+ cudaLibraryHostUniversalFunctionAndDataTable = 0
1353
+ cudaLibraryBinaryIsPreserved = 1
1354
+
1355
+ cdef enum cudaJit_CacheMode:
1356
+ cudaJitCacheOptionNone = 0
1357
+ cudaJitCacheOptionCG = 1
1358
+ cudaJitCacheOptionCA = 2
1359
+
1360
+ cdef enum cudaJit_Fallback:
1361
+ cudaPreferPtx = 0
1362
+ cudaPreferBinary = 1
1363
+
1364
+ cdef enum cudaCGScope:
1365
+ cudaCGScopeInvalid = 0
1366
+ cudaCGScopeGrid = 1
1367
+ cudaCGScopeMultiGrid = 2
1368
+
1369
+ cdef enum cudaGraphConditionalHandleFlags:
1370
+ cudaGraphCondAssignDefault = 1
1371
+
1372
+ cdef enum cudaGraphConditionalNodeType:
1373
+ cudaGraphCondTypeIf = 0
1374
+ cudaGraphCondTypeWhile = 1
1375
+ cudaGraphCondTypeSwitch = 2
1376
+
1377
+ cdef enum cudaGraphNodeType:
1378
+ cudaGraphNodeTypeKernel = 0
1379
+ cudaGraphNodeTypeMemcpy = 1
1380
+ cudaGraphNodeTypeMemset = 2
1381
+ cudaGraphNodeTypeHost = 3
1382
+ cudaGraphNodeTypeGraph = 4
1383
+ cudaGraphNodeTypeEmpty = 5
1384
+ cudaGraphNodeTypeWaitEvent = 6
1385
+ cudaGraphNodeTypeEventRecord = 7
1386
+ cudaGraphNodeTypeExtSemaphoreSignal = 8
1387
+ cudaGraphNodeTypeExtSemaphoreWait = 9
1388
+ cudaGraphNodeTypeMemAlloc = 10
1389
+ cudaGraphNodeTypeMemFree = 11
1390
+ cudaGraphNodeTypeConditional = 13
1391
+ cudaGraphNodeTypeCount = 14
1392
+
1393
+ cdef enum cudaGraphChildGraphNodeOwnership:
1394
+ cudaGraphChildGraphOwnershipClone = 0
1395
+ cudaGraphChildGraphOwnershipMove = 1
1396
+
1397
+ cdef enum cudaGraphExecUpdateResult:
1398
+ cudaGraphExecUpdateSuccess = 0
1399
+ cudaGraphExecUpdateError = 1
1400
+ cudaGraphExecUpdateErrorTopologyChanged = 2
1401
+ cudaGraphExecUpdateErrorNodeTypeChanged = 3
1402
+ cudaGraphExecUpdateErrorFunctionChanged = 4
1403
+ cudaGraphExecUpdateErrorParametersChanged = 5
1404
+ cudaGraphExecUpdateErrorNotSupported = 6
1405
+ cudaGraphExecUpdateErrorUnsupportedFunctionChange = 7
1406
+ cudaGraphExecUpdateErrorAttributesChanged = 8
1407
+
1408
+ cdef enum cudaGraphKernelNodeField:
1409
+ cudaGraphKernelNodeFieldInvalid = 0
1410
+ cudaGraphKernelNodeFieldGridDim = 1
1411
+ cudaGraphKernelNodeFieldParam = 2
1412
+ cudaGraphKernelNodeFieldEnabled = 3
1413
+
1414
+ cdef enum cudaGetDriverEntryPointFlags:
1415
+ cudaEnableDefault = 0
1416
+ cudaEnableLegacyStream = 1
1417
+ cudaEnablePerThreadDefaultStream = 2
1418
+
1419
+ cdef enum cudaDriverEntryPointQueryResult:
1420
+ cudaDriverEntryPointSuccess = 0
1421
+ cudaDriverEntryPointSymbolNotFound = 1
1422
+ cudaDriverEntryPointVersionNotSufficent = 2
1423
+
1424
+ cdef enum cudaGraphDebugDotFlags:
1425
+ cudaGraphDebugDotFlagsVerbose = 1
1426
+ cudaGraphDebugDotFlagsKernelNodeParams = 4
1427
+ cudaGraphDebugDotFlagsMemcpyNodeParams = 8
1428
+ cudaGraphDebugDotFlagsMemsetNodeParams = 16
1429
+ cudaGraphDebugDotFlagsHostNodeParams = 32
1430
+ cudaGraphDebugDotFlagsEventNodeParams = 64
1431
+ cudaGraphDebugDotFlagsExtSemasSignalNodeParams = 128
1432
+ cudaGraphDebugDotFlagsExtSemasWaitNodeParams = 256
1433
+ cudaGraphDebugDotFlagsKernelNodeAttributes = 512
1434
+ cudaGraphDebugDotFlagsHandles = 1024
1435
+ cudaGraphDebugDotFlagsConditionalNodeParams = 32768
1436
+
1437
+ cdef enum cudaGraphInstantiateFlags:
1438
+ cudaGraphInstantiateFlagAutoFreeOnLaunch = 1
1439
+ cudaGraphInstantiateFlagUpload = 2
1440
+ cudaGraphInstantiateFlagDeviceLaunch = 4
1441
+ cudaGraphInstantiateFlagUseNodePriority = 8
1442
+
1443
+ cdef enum cudaDeviceNumaConfig:
1444
+ cudaDeviceNumaConfigNone = 0
1445
+ cudaDeviceNumaConfigNumaNode = 1
1446
+
1447
+ cdef extern from "surface_types.h":
1448
+
1449
+ ctypedef unsigned long long cudaSurfaceObject_t
1450
+
1451
+ cdef enum cudaSurfaceBoundaryMode:
1452
+ cudaBoundaryModeZero = 0
1453
+ cudaBoundaryModeClamp = 1
1454
+ cudaBoundaryModeTrap = 2
1455
+
1456
+ cdef enum cudaSurfaceFormatMode:
1457
+ cudaFormatModeForced = 0
1458
+ cudaFormatModeAuto = 1
1459
+
1460
+ cdef extern from "texture_types.h":
1461
+
1462
+ cdef struct cudaTextureDesc:
1463
+ cudaTextureAddressMode addressMode[3]
1464
+ cudaTextureFilterMode filterMode
1465
+ cudaTextureReadMode readMode
1466
+ int sRGB
1467
+ float borderColor[4]
1468
+ int normalizedCoords
1469
+ unsigned int maxAnisotropy
1470
+ cudaTextureFilterMode mipmapFilterMode
1471
+ float mipmapLevelBias
1472
+ float minMipmapLevelClamp
1473
+ float maxMipmapLevelClamp
1474
+ int disableTrilinearOptimization
1475
+ int seamlessCubemap
1476
+
1477
+ ctypedef unsigned long long cudaTextureObject_t
1478
+
1479
+ cdef enum cudaTextureAddressMode:
1480
+ cudaAddressModeWrap = 0
1481
+ cudaAddressModeClamp = 1
1482
+ cudaAddressModeMirror = 2
1483
+ cudaAddressModeBorder = 3
1484
+
1485
+ cdef enum cudaTextureFilterMode:
1486
+ cudaFilterModePoint = 0
1487
+ cudaFilterModeLinear = 1
1488
+
1489
+ cdef enum cudaTextureReadMode:
1490
+ cudaReadModeElementType = 0
1491
+ cudaReadModeNormalizedFloat = 1
1492
+
1493
+ cdef extern from "library_types.h":
1494
+
1495
+ cdef enum cudaDataType_t:
1496
+ CUDA_R_32F = 0
1497
+ CUDA_R_64F = 1
1498
+ CUDA_R_16F = 2
1499
+ CUDA_R_8I = 3
1500
+ CUDA_C_32F = 4
1501
+ CUDA_C_64F = 5
1502
+ CUDA_C_16F = 6
1503
+ CUDA_C_8I = 7
1504
+ CUDA_R_8U = 8
1505
+ CUDA_C_8U = 9
1506
+ CUDA_R_32I = 10
1507
+ CUDA_C_32I = 11
1508
+ CUDA_R_32U = 12
1509
+ CUDA_C_32U = 13
1510
+ CUDA_R_16BF = 14
1511
+ CUDA_C_16BF = 15
1512
+ CUDA_R_4I = 16
1513
+ CUDA_C_4I = 17
1514
+ CUDA_R_4U = 18
1515
+ CUDA_C_4U = 19
1516
+ CUDA_R_16I = 20
1517
+ CUDA_C_16I = 21
1518
+ CUDA_R_16U = 22
1519
+ CUDA_C_16U = 23
1520
+ CUDA_R_64I = 24
1521
+ CUDA_C_64I = 25
1522
+ CUDA_R_64U = 26
1523
+ CUDA_C_64U = 27
1524
+ CUDA_R_8F_E4M3 = 28
1525
+ CUDA_R_8F_UE4M3 = 28
1526
+ CUDA_R_8F_E5M2 = 29
1527
+ CUDA_R_8F_UE8M0 = 30
1528
+ CUDA_R_6F_E2M3 = 31
1529
+ CUDA_R_6F_E3M2 = 32
1530
+ CUDA_R_4F_E2M1 = 33
1531
+
1532
+ ctypedef cudaDataType_t cudaDataType
1533
+
1534
+ cdef enum libraryPropertyType_t:
1535
+ MAJOR_VERSION = 0
1536
+ MINOR_VERSION = 1
1537
+ PATCH_LEVEL = 2
1538
+
1539
+ ctypedef libraryPropertyType_t libraryPropertyType
1540
+
1541
+ cdef extern from "cuda_runtime_api.h":
1542
+
1543
+ ctypedef void (*cudaStreamCallback_t)(cudaStream_t stream, cudaError_t status, void* userData)
1544
+
1545
+ cdef extern from "device_types.h":
1546
+
1547
+ cdef enum cudaRoundMode:
1548
+ cudaRoundNearest = 0
1549
+ cudaRoundZero = 1
1550
+ cudaRoundPosInf = 2
1551
+ cudaRoundMinInf = 3
1552
+
1553
+ ctypedef cudaLaunchAttributeID cudaStreamAttrID
1554
+
1555
+ ctypedef cudaLaunchAttributeID cudaKernelNodeAttrID
1556
+
1557
+ ctypedef cudaLaunchAttributeValue cudaStreamAttrValue
1558
+
1559
+ ctypedef cudaLaunchAttributeValue cudaKernelNodeAttrValue
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/driver.pxd ADDED
The diff for this file is too large to render. See raw diff
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/driver.pyx ADDED
The diff for this file is too large to render. See raw diff
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/nvjitlink.cpp ADDED
The diff for this file is too large to render. See raw diff
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/nvjitlink.pxd ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ #
3
+ # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
4
+ #
5
+ # This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly.
6
+
7
+ from libc.stdint cimport intptr_t, uint32_t
8
+
9
+ from .cynvjitlink cimport *
10
+
11
+
12
+ ###############################################################################
13
+ # Types
14
+ ###############################################################################
15
+
16
+ ctypedef nvJitLinkHandle Handle
17
+
18
+
19
+ ###############################################################################
20
+ # Enum
21
+ ###############################################################################
22
+
23
+ ctypedef nvJitLinkResult _Result
24
+ ctypedef nvJitLinkInputType _InputType
25
+
26
+
27
+ ###############################################################################
28
+ # Functions
29
+ ###############################################################################
30
+
31
+ cpdef intptr_t create(uint32_t num_options, options) except -1
32
+ cpdef add_data(intptr_t handle, int input_type, data, size_t size, name)
33
+ cpdef add_file(intptr_t handle, int input_type, file_name)
34
+ cpdef complete(intptr_t handle)
35
+ cpdef size_t get_linked_cubin_size(intptr_t handle) except? 0
36
+ cpdef get_linked_cubin(intptr_t handle, cubin)
37
+ cpdef size_t get_linked_ptx_size(intptr_t handle) except? 0
38
+ cpdef get_linked_ptx(intptr_t handle, ptx)
39
+ cpdef size_t get_error_log_size(intptr_t handle) except? 0
40
+ cpdef get_error_log(intptr_t handle, log)
41
+ cpdef size_t get_info_log_size(intptr_t handle) except? 0
42
+ cpdef get_info_log(intptr_t handle, log)
43
+ cpdef tuple version()
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/nvrtc.cpp ADDED
The diff for this file is too large to render. See raw diff
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/nvrtc.pxd ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
3
+
4
+ # This code was automatically generated with version 12.9.0. Do not modify it directly.
5
+ cimport cuda.bindings.cynvrtc as cynvrtc
6
+
7
+ include "_lib/utils.pxd"
8
+
9
+ cdef class nvrtcProgram:
10
+ """ nvrtcProgram is the unit of compilation, and an opaque handle for a program.
11
+
12
+ To compile a CUDA program string, an instance of nvrtcProgram must be created first with nvrtcCreateProgram, then compiled with nvrtcCompileProgram.
13
+
14
+ Methods
15
+ -------
16
+ getPtr()
17
+ Get memory address of class instance
18
+
19
+ """
20
+ cdef cynvrtc.nvrtcProgram _pvt_val
21
+ cdef cynvrtc.nvrtcProgram* _pvt_ptr
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/nvrtc.pyx ADDED
@@ -0,0 +1,1021 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
3
+
4
+ # This code was automatically generated with version 12.9.0. Do not modify it directly.
5
+ from typing import Any, Optional
6
+ from enum import IntEnum
7
+ import cython
8
+ import ctypes
9
+ from libc.stdlib cimport calloc, malloc, free
10
+ from libc cimport string
11
+ from libc.stdint cimport int32_t, uint32_t, int64_t, uint64_t, uintptr_t
12
+ from libc.stddef cimport wchar_t
13
+ from libc.limits cimport CHAR_MIN
14
+ from libcpp.vector cimport vector
15
+ from cpython.buffer cimport PyObject_CheckBuffer, PyObject_GetBuffer, PyBuffer_Release, PyBUF_SIMPLE, PyBUF_ANY_CONTIGUOUS
16
+ from cpython.bytes cimport PyBytes_FromStringAndSize
17
+
18
+ import cuda.bindings.driver as _driver
19
+ _driver = _driver.__dict__
20
+ include "_lib/utils.pxi"
21
+
22
+ ctypedef unsigned long long signed_char_ptr
23
+ ctypedef unsigned long long unsigned_char_ptr
24
+ ctypedef unsigned long long char_ptr
25
+ ctypedef unsigned long long short_ptr
26
+ ctypedef unsigned long long unsigned_short_ptr
27
+ ctypedef unsigned long long int_ptr
28
+ ctypedef unsigned long long long_int_ptr
29
+ ctypedef unsigned long long long_long_int_ptr
30
+ ctypedef unsigned long long unsigned_int_ptr
31
+ ctypedef unsigned long long unsigned_long_int_ptr
32
+ ctypedef unsigned long long unsigned_long_long_int_ptr
33
+ ctypedef unsigned long long uint32_t_ptr
34
+ ctypedef unsigned long long uint64_t_ptr
35
+ ctypedef unsigned long long int32_t_ptr
36
+ ctypedef unsigned long long int64_t_ptr
37
+ ctypedef unsigned long long unsigned_ptr
38
+ ctypedef unsigned long long unsigned_long_long_ptr
39
+ ctypedef unsigned long long long_long_ptr
40
+ ctypedef unsigned long long size_t_ptr
41
+ ctypedef unsigned long long long_ptr
42
+ ctypedef unsigned long long float_ptr
43
+ ctypedef unsigned long long double_ptr
44
+ ctypedef unsigned long long void_ptr
45
+
46
+
47
+ class nvrtcResult(IntEnum):
48
+ """
49
+ The enumerated type nvrtcResult defines API call result codes.
50
+ NVRTC API functions return nvrtcResult to indicate the call result.
51
+ """
52
+ NVRTC_SUCCESS = cynvrtc.nvrtcResult.NVRTC_SUCCESS
53
+ NVRTC_ERROR_OUT_OF_MEMORY = cynvrtc.nvrtcResult.NVRTC_ERROR_OUT_OF_MEMORY
54
+ NVRTC_ERROR_PROGRAM_CREATION_FAILURE = cynvrtc.nvrtcResult.NVRTC_ERROR_PROGRAM_CREATION_FAILURE
55
+ NVRTC_ERROR_INVALID_INPUT = cynvrtc.nvrtcResult.NVRTC_ERROR_INVALID_INPUT
56
+ NVRTC_ERROR_INVALID_PROGRAM = cynvrtc.nvrtcResult.NVRTC_ERROR_INVALID_PROGRAM
57
+ NVRTC_ERROR_INVALID_OPTION = cynvrtc.nvrtcResult.NVRTC_ERROR_INVALID_OPTION
58
+ NVRTC_ERROR_COMPILATION = cynvrtc.nvrtcResult.NVRTC_ERROR_COMPILATION
59
+ NVRTC_ERROR_BUILTIN_OPERATION_FAILURE = cynvrtc.nvrtcResult.NVRTC_ERROR_BUILTIN_OPERATION_FAILURE
60
+ NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION = cynvrtc.nvrtcResult.NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION
61
+ NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION = cynvrtc.nvrtcResult.NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION
62
+ NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID = cynvrtc.nvrtcResult.NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID
63
+ NVRTC_ERROR_INTERNAL_ERROR = cynvrtc.nvrtcResult.NVRTC_ERROR_INTERNAL_ERROR
64
+ NVRTC_ERROR_TIME_FILE_WRITE_FAILED = cynvrtc.nvrtcResult.NVRTC_ERROR_TIME_FILE_WRITE_FAILED
65
+ NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED = cynvrtc.nvrtcResult.NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED
66
+ NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED = cynvrtc.nvrtcResult.NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED
67
+ NVRTC_ERROR_PCH_CREATE = cynvrtc.nvrtcResult.NVRTC_ERROR_PCH_CREATE
68
+ NVRTC_ERROR_CANCELLED = cynvrtc.nvrtcResult.NVRTC_ERROR_CANCELLED
69
+
70
+ _dict_nvrtcResult = dict(((int(v), v) for k, v in nvrtcResult.__members__.items()))
71
+
72
+ cdef class nvrtcProgram:
73
+ """ nvrtcProgram is the unit of compilation, and an opaque handle for a program.
74
+
75
+ To compile a CUDA program string, an instance of nvrtcProgram must be created first with nvrtcCreateProgram, then compiled with nvrtcCompileProgram.
76
+
77
+ Methods
78
+ -------
79
+ getPtr()
80
+ Get memory address of class instance
81
+
82
+ """
83
+ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
84
+ if _ptr == 0:
85
+ self._pvt_ptr = &self._pvt_val
86
+ self._pvt_ptr[0] = <cynvrtc.nvrtcProgram>init_value
87
+ else:
88
+ self._pvt_ptr = <cynvrtc.nvrtcProgram *>_ptr
89
+ def __init__(self, *args, **kwargs):
90
+ pass
91
+ def __repr__(self):
92
+ return '<nvrtcProgram ' + str(hex(self.__int__())) + '>'
93
+ def __index__(self):
94
+ return self.__int__()
95
+ def __eq__(self, other):
96
+ if not isinstance(other, nvrtcProgram):
97
+ return False
98
+ return self._pvt_ptr[0] == (<nvrtcProgram>other)._pvt_ptr[0]
99
+ def __hash__(self):
100
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
101
+ def __int__(self):
102
+ return <void_ptr>self._pvt_ptr[0]
103
+ def getPtr(self):
104
+ return <void_ptr>self._pvt_ptr
105
+
106
+ @cython.embedsignature(True)
107
+ def nvrtcGetErrorString(result not None : nvrtcResult):
108
+ """ nvrtcGetErrorString is a helper function that returns a string describing the given nvrtcResult code, e.g., NVRTC_SUCCESS to `"NVRTC_SUCCESS"`. For unrecognized enumeration values, it returns `"NVRTC_ERROR unknown"`.
109
+
110
+ Parameters
111
+ ----------
112
+ result : :py:obj:`~.nvrtcResult`
113
+ CUDA Runtime Compilation API result code.
114
+
115
+ Returns
116
+ -------
117
+ nvrtcResult.NVRTC_SUCCESS
118
+ nvrtcResult.NVRTC_SUCCESS
119
+ bytes
120
+ Message string for the given :py:obj:`~.nvrtcResult` code.
121
+ """
122
+ cdef cynvrtc.nvrtcResult cyresult = result.value
123
+ with nogil:
124
+ err = cynvrtc.nvrtcGetErrorString(cyresult)
125
+ return (nvrtcResult.NVRTC_SUCCESS, err)
126
+
127
+ @cython.embedsignature(True)
128
+ def nvrtcVersion():
129
+ """ nvrtcVersion sets the output parameters `major` and `minor` with the CUDA Runtime Compilation version number.
130
+
131
+ Returns
132
+ -------
133
+ nvrtcResult
134
+ - :py:obj:`~.NVRTC_SUCCESS`
135
+ - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`
136
+ major : int
137
+ CUDA Runtime Compilation major version number.
138
+ minor : int
139
+ CUDA Runtime Compilation minor version number.
140
+ """
141
+ cdef int major = 0
142
+ cdef int minor = 0
143
+ with nogil:
144
+ err = cynvrtc.nvrtcVersion(&major, &minor)
145
+ if err != cynvrtc.NVRTC_SUCCESS:
146
+ return (_dict_nvrtcResult[err], None, None)
147
+ return (_dict_nvrtcResult[err], major, minor)
148
+
149
+ @cython.embedsignature(True)
150
+ def nvrtcGetNumSupportedArchs():
151
+ """ nvrtcGetNumSupportedArchs sets the output parameter `numArchs` with the number of architectures supported by NVRTC. This can then be used to pass an array to :py:obj:`~.nvrtcGetSupportedArchs` to get the supported architectures.
152
+
153
+ see :py:obj:`~.nvrtcGetSupportedArchs`
154
+
155
+ Returns
156
+ -------
157
+ nvrtcResult
158
+ - :py:obj:`~.NVRTC_SUCCESS`
159
+ - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`
160
+ numArchs : int
161
+ number of supported architectures.
162
+ """
163
+ cdef int numArchs = 0
164
+ with nogil:
165
+ err = cynvrtc.nvrtcGetNumSupportedArchs(&numArchs)
166
+ if err != cynvrtc.NVRTC_SUCCESS:
167
+ return (_dict_nvrtcResult[err], None)
168
+ return (_dict_nvrtcResult[err], numArchs)
169
+
170
+ @cython.embedsignature(True)
171
+ def nvrtcGetSupportedArchs():
172
+ """ nvrtcGetSupportedArchs populates the array passed via the output parameter `supportedArchs` with the architectures supported by NVRTC. The array is sorted in the ascending order. The size of the array to be passed can be determined using :py:obj:`~.nvrtcGetNumSupportedArchs`.
173
+
174
+ see :py:obj:`~.nvrtcGetNumSupportedArchs`
175
+
176
+ Returns
177
+ -------
178
+ nvrtcResult
179
+ - :py:obj:`~.NVRTC_SUCCESS`
180
+ - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`
181
+ supportedArchs : list[int]
182
+ sorted array of supported architectures.
183
+ """
184
+ cdef vector[int] supportedArchs
185
+ _, s = nvrtcGetNumSupportedArchs()
186
+ supportedArchs.resize(s)
187
+
188
+ with nogil:
189
+ err = cynvrtc.nvrtcGetSupportedArchs(supportedArchs.data())
190
+ if err != cynvrtc.NVRTC_SUCCESS:
191
+ return (_dict_nvrtcResult[err], None)
192
+ return (_dict_nvrtcResult[err], supportedArchs)
193
+
194
+ @cython.embedsignature(True)
195
+ def nvrtcCreateProgram(char* src, char* name, int numHeaders, headers : Optional[tuple[bytes] | list[bytes]], includeNames : Optional[tuple[bytes] | list[bytes]]):
196
+ """ nvrtcCreateProgram creates an instance of nvrtcProgram with the given input parameters, and sets the output parameter `prog` with it.
197
+
198
+ Parameters
199
+ ----------
200
+ src : bytes
201
+ CUDA program source.
202
+ name : bytes
203
+ CUDA program name. `name` can be `NULL`; `"default_program"` is
204
+ used when `name` is `NULL` or "".
205
+ numHeaders : int
206
+ Number of headers used. `numHeaders` must be greater than or equal
207
+ to 0.
208
+ headers : list[bytes]
209
+ Sources of the headers. `headers` can be `NULL` when `numHeaders`
210
+ is 0.
211
+ includeNames : list[bytes]
212
+ Name of each header by which they can be included in the CUDA
213
+ program source. `includeNames` can be `NULL` when `numHeaders` is
214
+ 0. These headers must be included with the exact names specified
215
+ here.
216
+
217
+ Returns
218
+ -------
219
+ nvrtcResult
220
+ - :py:obj:`~.NVRTC_SUCCESS`
221
+ - :py:obj:`~.NVRTC_ERROR_OUT_OF_MEMORY`
222
+ - :py:obj:`~.NVRTC_ERROR_PROGRAM_CREATION_FAILURE`
223
+ - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`
224
+ - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`
225
+ prog : :py:obj:`~.nvrtcProgram`
226
+ CUDA Runtime Compilation program.
227
+
228
+ See Also
229
+ --------
230
+ :py:obj:`~.nvrtcDestroyProgram`
231
+ """
232
+ includeNames = [] if includeNames is None else includeNames
233
+ if not all(isinstance(_x, (bytes)) for _x in includeNames):
234
+ raise TypeError("Argument 'includeNames' is not instance of type (expected tuple[bytes] or list[bytes]")
235
+ headers = [] if headers is None else headers
236
+ if not all(isinstance(_x, (bytes)) for _x in headers):
237
+ raise TypeError("Argument 'headers' is not instance of type (expected tuple[bytes] or list[bytes]")
238
+ cdef nvrtcProgram prog = nvrtcProgram()
239
+ if numHeaders > len(headers): raise RuntimeError("List is too small: " + str(len(headers)) + " < " + str(numHeaders))
240
+ if numHeaders > len(includeNames): raise RuntimeError("List is too small: " + str(len(includeNames)) + " < " + str(numHeaders))
241
+ cdef vector[const char*] cyheaders = headers
242
+ cdef vector[const char*] cyincludeNames = includeNames
243
+ with nogil:
244
+ err = cynvrtc.nvrtcCreateProgram(<cynvrtc.nvrtcProgram*>prog._pvt_ptr, src, name, numHeaders, cyheaders.data(), cyincludeNames.data())
245
+ if err != cynvrtc.NVRTC_SUCCESS:
246
+ return (_dict_nvrtcResult[err], None)
247
+ return (_dict_nvrtcResult[err], prog)
248
+
249
+ @cython.embedsignature(True)
250
+ def nvrtcDestroyProgram(prog):
251
+ """ nvrtcDestroyProgram destroys the given program.
252
+
253
+ Parameters
254
+ ----------
255
+ prog : :py:obj:`~.nvrtcProgram`
256
+ CUDA Runtime Compilation program.
257
+
258
+ Returns
259
+ -------
260
+ nvrtcResult
261
+ - :py:obj:`~.NVRTC_SUCCESS`
262
+ - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`
263
+
264
+ See Also
265
+ --------
266
+ :py:obj:`~.nvrtcCreateProgram`
267
+ """
268
+ cdef cynvrtc.nvrtcProgram *cyprog
269
+ if prog is None:
270
+ cyprog = <cynvrtc.nvrtcProgram*><void_ptr>NULL
271
+ elif isinstance(prog, (nvrtcProgram,)):
272
+ pprog = prog.getPtr()
273
+ cyprog = <cynvrtc.nvrtcProgram*><void_ptr>pprog
274
+ elif isinstance(prog, (int)):
275
+ cyprog = <cynvrtc.nvrtcProgram*><void_ptr>prog
276
+ else:
277
+ raise TypeError("Argument 'prog' is not instance of type (expected <class 'int, nvrtc.nvrtcProgram'>, found " + str(type(prog)))
278
+ with nogil:
279
+ err = cynvrtc.nvrtcDestroyProgram(cyprog)
280
+ return (_dict_nvrtcResult[err],)
281
+
282
+ @cython.embedsignature(True)
283
+ def nvrtcCompileProgram(prog, int numOptions, options : Optional[tuple[bytes] | list[bytes]]):
284
+ """ nvrtcCompileProgram compiles the given program.
285
+
286
+ It supports compile options listed in :py:obj:`~.Supported Compile
287
+ Options`.
288
+
289
+ Parameters
290
+ ----------
291
+ prog : :py:obj:`~.nvrtcProgram`
292
+ CUDA Runtime Compilation program.
293
+ numOptions : int
294
+ Number of compiler options passed.
295
+ options : list[bytes]
296
+ Compiler options in the form of C string array. `options` can be
297
+ `NULL` when `numOptions` is 0.
298
+
299
+ Returns
300
+ -------
301
+ nvrtcResult
302
+ - :py:obj:`~.NVRTC_SUCCESS`
303
+ - :py:obj:`~.NVRTC_ERROR_OUT_OF_MEMORY`
304
+ - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`
305
+ - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`
306
+ - :py:obj:`~.NVRTC_ERROR_INVALID_OPTION`
307
+ - :py:obj:`~.NVRTC_ERROR_COMPILATION`
308
+ - :py:obj:`~.NVRTC_ERROR_BUILTIN_OPERATION_FAILURE`
309
+ - :py:obj:`~.NVRTC_ERROR_TIME_FILE_WRITE_FAILED`
310
+ - :py:obj:`~.NVRTC_ERROR_CANCELLED`
311
+ """
312
+ options = [] if options is None else options
313
+ if not all(isinstance(_x, (bytes)) for _x in options):
314
+ raise TypeError("Argument 'options' is not instance of type (expected tuple[bytes] or list[bytes]")
315
+ cdef cynvrtc.nvrtcProgram cyprog
316
+ if prog is None:
317
+ pprog = 0
318
+ elif isinstance(prog, (nvrtcProgram,)):
319
+ pprog = int(prog)
320
+ else:
321
+ pprog = int(nvrtcProgram(prog))
322
+ cyprog = <cynvrtc.nvrtcProgram><void_ptr>pprog
323
+ if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions))
324
+ cdef vector[const char*] cyoptions = options
325
+ with nogil:
326
+ err = cynvrtc.nvrtcCompileProgram(cyprog, numOptions, cyoptions.data())
327
+ return (_dict_nvrtcResult[err],)
328
+
329
+ @cython.embedsignature(True)
330
+ def nvrtcGetPTXSize(prog):
331
+ """ nvrtcGetPTXSize sets the value of `ptxSizeRet` with the size of the PTX generated by the previous compilation of `prog` (including the trailing `NULL`).
332
+
333
+ Parameters
334
+ ----------
335
+ prog : :py:obj:`~.nvrtcProgram`
336
+ CUDA Runtime Compilation program.
337
+
338
+ Returns
339
+ -------
340
+ nvrtcResult
341
+ - :py:obj:`~.NVRTC_SUCCESS`
342
+ - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`
343
+ - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`
344
+ ptxSizeRet : int
345
+ Size of the generated PTX (including the trailing `NULL`).
346
+
347
+ See Also
348
+ --------
349
+ :py:obj:`~.nvrtcGetPTX`
350
+ """
351
+ cdef cynvrtc.nvrtcProgram cyprog
352
+ if prog is None:
353
+ pprog = 0
354
+ elif isinstance(prog, (nvrtcProgram,)):
355
+ pprog = int(prog)
356
+ else:
357
+ pprog = int(nvrtcProgram(prog))
358
+ cyprog = <cynvrtc.nvrtcProgram><void_ptr>pprog
359
+ cdef size_t ptxSizeRet = 0
360
+ with nogil:
361
+ err = cynvrtc.nvrtcGetPTXSize(cyprog, &ptxSizeRet)
362
+ if err != cynvrtc.NVRTC_SUCCESS:
363
+ return (_dict_nvrtcResult[err], None)
364
+ return (_dict_nvrtcResult[err], ptxSizeRet)
365
+
366
+ @cython.embedsignature(True)
367
+ def nvrtcGetPTX(prog, char* ptx):
368
+ """ nvrtcGetPTX stores the PTX generated by the previous compilation of `prog` in the memory pointed by `ptx`.
369
+
370
+ Parameters
371
+ ----------
372
+ prog : :py:obj:`~.nvrtcProgram`
373
+ CUDA Runtime Compilation program.
374
+ ptx : bytes
375
+ Compiled result.
376
+
377
+ Returns
378
+ -------
379
+ nvrtcResult
380
+ - :py:obj:`~.NVRTC_SUCCESS`
381
+ - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`
382
+ - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`
383
+
384
+ See Also
385
+ --------
386
+ :py:obj:`~.nvrtcGetPTXSize`
387
+ """
388
+ cdef cynvrtc.nvrtcProgram cyprog
389
+ if prog is None:
390
+ pprog = 0
391
+ elif isinstance(prog, (nvrtcProgram,)):
392
+ pprog = int(prog)
393
+ else:
394
+ pprog = int(nvrtcProgram(prog))
395
+ cyprog = <cynvrtc.nvrtcProgram><void_ptr>pprog
396
+ with nogil:
397
+ err = cynvrtc.nvrtcGetPTX(cyprog, ptx)
398
+ return (_dict_nvrtcResult[err],)
399
+
400
+ @cython.embedsignature(True)
401
+ def nvrtcGetCUBINSize(prog):
402
+ """ nvrtcGetCUBINSize sets the value of `cubinSizeRet` with the size of the cubin generated by the previous compilation of `prog`. The value of cubinSizeRet is set to 0 if the value specified to `-arch` is a virtual architecture instead of an actual architecture.
403
+
404
+ Parameters
405
+ ----------
406
+ prog : :py:obj:`~.nvrtcProgram`
407
+ CUDA Runtime Compilation program.
408
+
409
+ Returns
410
+ -------
411
+ nvrtcResult
412
+ - :py:obj:`~.NVRTC_SUCCESS`
413
+ - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`
414
+ - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`
415
+ cubinSizeRet : int
416
+ Size of the generated cubin.
417
+
418
+ See Also
419
+ --------
420
+ :py:obj:`~.nvrtcGetCUBIN`
421
+ """
422
+ cdef cynvrtc.nvrtcProgram cyprog
423
+ if prog is None:
424
+ pprog = 0
425
+ elif isinstance(prog, (nvrtcProgram,)):
426
+ pprog = int(prog)
427
+ else:
428
+ pprog = int(nvrtcProgram(prog))
429
+ cyprog = <cynvrtc.nvrtcProgram><void_ptr>pprog
430
+ cdef size_t cubinSizeRet = 0
431
+ with nogil:
432
+ err = cynvrtc.nvrtcGetCUBINSize(cyprog, &cubinSizeRet)
433
+ if err != cynvrtc.NVRTC_SUCCESS:
434
+ return (_dict_nvrtcResult[err], None)
435
+ return (_dict_nvrtcResult[err], cubinSizeRet)
436
+
437
+ @cython.embedsignature(True)
438
+ def nvrtcGetCUBIN(prog, char* cubin):
439
+ """ nvrtcGetCUBIN stores the cubin generated by the previous compilation of `prog` in the memory pointed by `cubin`. No cubin is available if the value specified to `-arch` is a virtual architecture instead of an actual architecture.
440
+
441
+ Parameters
442
+ ----------
443
+ prog : :py:obj:`~.nvrtcProgram`
444
+ CUDA Runtime Compilation program.
445
+ cubin : bytes
446
+ Compiled and assembled result.
447
+
448
+ Returns
449
+ -------
450
+ nvrtcResult
451
+ - :py:obj:`~.NVRTC_SUCCESS`
452
+ - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`
453
+ - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`
454
+
455
+ See Also
456
+ --------
457
+ :py:obj:`~.nvrtcGetCUBINSize`
458
+ """
459
+ cdef cynvrtc.nvrtcProgram cyprog
460
+ if prog is None:
461
+ pprog = 0
462
+ elif isinstance(prog, (nvrtcProgram,)):
463
+ pprog = int(prog)
464
+ else:
465
+ pprog = int(nvrtcProgram(prog))
466
+ cyprog = <cynvrtc.nvrtcProgram><void_ptr>pprog
467
+ with nogil:
468
+ err = cynvrtc.nvrtcGetCUBIN(cyprog, cubin)
469
+ return (_dict_nvrtcResult[err],)
470
+
471
+ @cython.embedsignature(True)
472
+ def nvrtcGetNVVMSize(prog):
473
+ """ DEPRECATION NOTICE: This function will be removed in a future release. Please use nvrtcGetLTOIRSize (and nvrtcGetLTOIR) instead.
474
+
475
+ Parameters
476
+ ----------
477
+ prog : :py:obj:`~.nvrtcProgram`
478
+ None
479
+
480
+ Returns
481
+ -------
482
+ nvrtcResult
483
+
484
+ nvvmSizeRet : int
485
+ None
486
+ """
487
+ cdef cynvrtc.nvrtcProgram cyprog
488
+ if prog is None:
489
+ pprog = 0
490
+ elif isinstance(prog, (nvrtcProgram,)):
491
+ pprog = int(prog)
492
+ else:
493
+ pprog = int(nvrtcProgram(prog))
494
+ cyprog = <cynvrtc.nvrtcProgram><void_ptr>pprog
495
+ cdef size_t nvvmSizeRet = 0
496
+ with nogil:
497
+ err = cynvrtc.nvrtcGetNVVMSize(cyprog, &nvvmSizeRet)
498
+ if err != cynvrtc.NVRTC_SUCCESS:
499
+ return (_dict_nvrtcResult[err], None)
500
+ return (_dict_nvrtcResult[err], nvvmSizeRet)
501
+
502
+ @cython.embedsignature(True)
503
+ def nvrtcGetNVVM(prog, char* nvvm):
504
+ """ DEPRECATION NOTICE: This function will be removed in a future release. Please use nvrtcGetLTOIR (and nvrtcGetLTOIRSize) instead.
505
+
506
+ Parameters
507
+ ----------
508
+ prog : :py:obj:`~.nvrtcProgram`
509
+ None
510
+ nvvm : bytes
511
+ None
512
+
513
+ Returns
514
+ -------
515
+ nvrtcResult
516
+
517
+ """
518
+ cdef cynvrtc.nvrtcProgram cyprog
519
+ if prog is None:
520
+ pprog = 0
521
+ elif isinstance(prog, (nvrtcProgram,)):
522
+ pprog = int(prog)
523
+ else:
524
+ pprog = int(nvrtcProgram(prog))
525
+ cyprog = <cynvrtc.nvrtcProgram><void_ptr>pprog
526
+ with nogil:
527
+ err = cynvrtc.nvrtcGetNVVM(cyprog, nvvm)
528
+ return (_dict_nvrtcResult[err],)
529
+
530
+ @cython.embedsignature(True)
531
+ def nvrtcGetLTOIRSize(prog):
532
+ """ nvrtcGetLTOIRSize sets the value of `LTOIRSizeRet` with the size of the LTO IR generated by the previous compilation of `prog`. The value of LTOIRSizeRet is set to 0 if the program was not compiled with `-dlto`.
533
+
534
+ Parameters
535
+ ----------
536
+ prog : :py:obj:`~.nvrtcProgram`
537
+ CUDA Runtime Compilation program.
538
+
539
+ Returns
540
+ -------
541
+ nvrtcResult
542
+ - :py:obj:`~.NVRTC_SUCCESS`
543
+ - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`
544
+ - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`
545
+ LTOIRSizeRet : int
546
+ Size of the generated LTO IR.
547
+
548
+ See Also
549
+ --------
550
+ :py:obj:`~.nvrtcGetLTOIR`
551
+ """
552
+ cdef cynvrtc.nvrtcProgram cyprog
553
+ if prog is None:
554
+ pprog = 0
555
+ elif isinstance(prog, (nvrtcProgram,)):
556
+ pprog = int(prog)
557
+ else:
558
+ pprog = int(nvrtcProgram(prog))
559
+ cyprog = <cynvrtc.nvrtcProgram><void_ptr>pprog
560
+ cdef size_t LTOIRSizeRet = 0
561
+ with nogil:
562
+ err = cynvrtc.nvrtcGetLTOIRSize(cyprog, &LTOIRSizeRet)
563
+ if err != cynvrtc.NVRTC_SUCCESS:
564
+ return (_dict_nvrtcResult[err], None)
565
+ return (_dict_nvrtcResult[err], LTOIRSizeRet)
566
+
567
+ @cython.embedsignature(True)
568
+ def nvrtcGetLTOIR(prog, char* LTOIR):
569
+ """ nvrtcGetLTOIR stores the LTO IR generated by the previous compilation of `prog` in the memory pointed by `LTOIR`. No LTO IR is available if the program was compiled without `-dlto`.
570
+
571
+ Parameters
572
+ ----------
573
+ prog : :py:obj:`~.nvrtcProgram`
574
+ CUDA Runtime Compilation program.
575
+ LTOIR : bytes
576
+ Compiled result.
577
+
578
+ Returns
579
+ -------
580
+ nvrtcResult
581
+ - :py:obj:`~.NVRTC_SUCCESS`
582
+ - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`
583
+ - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`
584
+
585
+ See Also
586
+ --------
587
+ :py:obj:`~.nvrtcGetLTOIRSize`
588
+ """
589
+ cdef cynvrtc.nvrtcProgram cyprog
590
+ if prog is None:
591
+ pprog = 0
592
+ elif isinstance(prog, (nvrtcProgram,)):
593
+ pprog = int(prog)
594
+ else:
595
+ pprog = int(nvrtcProgram(prog))
596
+ cyprog = <cynvrtc.nvrtcProgram><void_ptr>pprog
597
+ with nogil:
598
+ err = cynvrtc.nvrtcGetLTOIR(cyprog, LTOIR)
599
+ return (_dict_nvrtcResult[err],)
600
+
601
+ @cython.embedsignature(True)
602
+ def nvrtcGetOptiXIRSize(prog):
603
+ """ nvrtcGetOptiXIRSize sets the value of `optixirSizeRet` with the size of the OptiX IR generated by the previous compilation of `prog`. The value of nvrtcGetOptiXIRSize is set to 0 if the program was compiled with options incompatible with OptiX IR generation.
604
+
605
+ Parameters
606
+ ----------
607
+ prog : :py:obj:`~.nvrtcProgram`
608
+ CUDA Runtime Compilation program.
609
+
610
+ Returns
611
+ -------
612
+ nvrtcResult
613
+ - :py:obj:`~.NVRTC_SUCCESS`
614
+ - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`
615
+ - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`
616
+ optixirSizeRet : int
617
+ Size of the generated LTO IR.
618
+
619
+ See Also
620
+ --------
621
+ :py:obj:`~.nvrtcGetOptiXIR`
622
+ """
623
+ cdef cynvrtc.nvrtcProgram cyprog
624
+ if prog is None:
625
+ pprog = 0
626
+ elif isinstance(prog, (nvrtcProgram,)):
627
+ pprog = int(prog)
628
+ else:
629
+ pprog = int(nvrtcProgram(prog))
630
+ cyprog = <cynvrtc.nvrtcProgram><void_ptr>pprog
631
+ cdef size_t optixirSizeRet = 0
632
+ with nogil:
633
+ err = cynvrtc.nvrtcGetOptiXIRSize(cyprog, &optixirSizeRet)
634
+ if err != cynvrtc.NVRTC_SUCCESS:
635
+ return (_dict_nvrtcResult[err], None)
636
+ return (_dict_nvrtcResult[err], optixirSizeRet)
637
+
638
+ @cython.embedsignature(True)
639
+ def nvrtcGetOptiXIR(prog, char* optixir):
640
+ """ nvrtcGetOptiXIR stores the OptiX IR generated by the previous compilation of `prog` in the memory pointed by `optixir`. No OptiX IR is available if the program was compiled with options incompatible with OptiX IR generation.
641
+
642
+ Parameters
643
+ ----------
644
+ prog : :py:obj:`~.nvrtcProgram`
645
+ CUDA Runtime Compilation program.
646
+ optixir : bytes
647
+ Optix IR Compiled result.
648
+
649
+ Returns
650
+ -------
651
+ nvrtcResult
652
+ - :py:obj:`~.NVRTC_SUCCESS`
653
+ - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`
654
+ - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`
655
+
656
+ See Also
657
+ --------
658
+ :py:obj:`~.nvrtcGetOptiXIRSize`
659
+ """
660
+ cdef cynvrtc.nvrtcProgram cyprog
661
+ if prog is None:
662
+ pprog = 0
663
+ elif isinstance(prog, (nvrtcProgram,)):
664
+ pprog = int(prog)
665
+ else:
666
+ pprog = int(nvrtcProgram(prog))
667
+ cyprog = <cynvrtc.nvrtcProgram><void_ptr>pprog
668
+ with nogil:
669
+ err = cynvrtc.nvrtcGetOptiXIR(cyprog, optixir)
670
+ return (_dict_nvrtcResult[err],)
671
+
672
+ @cython.embedsignature(True)
673
+ def nvrtcGetProgramLogSize(prog):
674
+ """ nvrtcGetProgramLogSize sets `logSizeRet` with the size of the log generated by the previous compilation of `prog` (including the trailing `NULL`).
675
+
676
+ Note that compilation log may be generated with warnings and
677
+ informative messages, even when the compilation of `prog` succeeds.
678
+
679
+ Parameters
680
+ ----------
681
+ prog : :py:obj:`~.nvrtcProgram`
682
+ CUDA Runtime Compilation program.
683
+
684
+ Returns
685
+ -------
686
+ nvrtcResult
687
+ - :py:obj:`~.NVRTC_SUCCESS`
688
+ - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`
689
+ - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`
690
+ logSizeRet : int
691
+ Size of the compilation log (including the trailing `NULL`).
692
+
693
+ See Also
694
+ --------
695
+ :py:obj:`~.nvrtcGetProgramLog`
696
+ """
697
+ cdef cynvrtc.nvrtcProgram cyprog
698
+ if prog is None:
699
+ pprog = 0
700
+ elif isinstance(prog, (nvrtcProgram,)):
701
+ pprog = int(prog)
702
+ else:
703
+ pprog = int(nvrtcProgram(prog))
704
+ cyprog = <cynvrtc.nvrtcProgram><void_ptr>pprog
705
+ cdef size_t logSizeRet = 0
706
+ with nogil:
707
+ err = cynvrtc.nvrtcGetProgramLogSize(cyprog, &logSizeRet)
708
+ if err != cynvrtc.NVRTC_SUCCESS:
709
+ return (_dict_nvrtcResult[err], None)
710
+ return (_dict_nvrtcResult[err], logSizeRet)
711
+
712
+ @cython.embedsignature(True)
713
+ def nvrtcGetProgramLog(prog, char* log):
714
+ """ nvrtcGetProgramLog stores the log generated by the previous compilation of `prog` in the memory pointed by `log`.
715
+
716
+ Parameters
717
+ ----------
718
+ prog : :py:obj:`~.nvrtcProgram`
719
+ CUDA Runtime Compilation program.
720
+ log : bytes
721
+ Compilation log.
722
+
723
+ Returns
724
+ -------
725
+ nvrtcResult
726
+ - :py:obj:`~.NVRTC_SUCCESS`
727
+ - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`
728
+ - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`
729
+
730
+ See Also
731
+ --------
732
+ :py:obj:`~.nvrtcGetProgramLogSize`
733
+ """
734
+ cdef cynvrtc.nvrtcProgram cyprog
735
+ if prog is None:
736
+ pprog = 0
737
+ elif isinstance(prog, (nvrtcProgram,)):
738
+ pprog = int(prog)
739
+ else:
740
+ pprog = int(nvrtcProgram(prog))
741
+ cyprog = <cynvrtc.nvrtcProgram><void_ptr>pprog
742
+ with nogil:
743
+ err = cynvrtc.nvrtcGetProgramLog(cyprog, log)
744
+ return (_dict_nvrtcResult[err],)
745
+
746
+ @cython.embedsignature(True)
747
+ def nvrtcAddNameExpression(prog, char* name_expression):
748
+ """ nvrtcAddNameExpression notes the given name expression denoting the address of a global function or device/__constant__ variable.
749
+
750
+ The identical name expression string must be provided on a subsequent
751
+ call to nvrtcGetLoweredName to extract the lowered name.
752
+
753
+ Parameters
754
+ ----------
755
+ prog : :py:obj:`~.nvrtcProgram`
756
+ CUDA Runtime Compilation program.
757
+ name_expression : bytes
758
+ constant expression denoting the address of a global function or
759
+ device/__constant__ variable.
760
+
761
+ Returns
762
+ -------
763
+ nvrtcResult
764
+ - :py:obj:`~.NVRTC_SUCCESS`
765
+ - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`
766
+ - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`
767
+ - :py:obj:`~.NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION`
768
+
769
+ See Also
770
+ --------
771
+ :py:obj:`~.nvrtcGetLoweredName`
772
+ """
773
+ cdef cynvrtc.nvrtcProgram cyprog
774
+ if prog is None:
775
+ pprog = 0
776
+ elif isinstance(prog, (nvrtcProgram,)):
777
+ pprog = int(prog)
778
+ else:
779
+ pprog = int(nvrtcProgram(prog))
780
+ cyprog = <cynvrtc.nvrtcProgram><void_ptr>pprog
781
+ with nogil:
782
+ err = cynvrtc.nvrtcAddNameExpression(cyprog, name_expression)
783
+ return (_dict_nvrtcResult[err],)
784
+
785
+ @cython.embedsignature(True)
786
+ def nvrtcGetLoweredName(prog, char* name_expression):
787
+ """ nvrtcGetLoweredName extracts the lowered (mangled) name for a global function or device/__constant__ variable, and updates lowered_name to point to it. The memory containing the name is released when the NVRTC program is destroyed by nvrtcDestroyProgram. The identical name expression must have been previously provided to nvrtcAddNameExpression.
788
+
789
+ Parameters
790
+ ----------
791
+ prog : nvrtcProgram
792
+ CUDA Runtime Compilation program.
793
+ name_expression : bytes
794
+ constant expression denoting the address of a global function or
795
+ device/__constant__ variable.
796
+
797
+ Returns
798
+ -------
799
+ nvrtcResult
800
+ NVRTC_SUCCESS
801
+ NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION
802
+ NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID
803
+ lowered_name : bytes
804
+ initialized by the function to point to a C string containing the
805
+ lowered (mangled) name corresponding to the provided name
806
+ expression.
807
+
808
+ See Also
809
+ --------
810
+ nvrtcAddNameExpression
811
+ """
812
+ cdef cynvrtc.nvrtcProgram cyprog
813
+ if prog is None:
814
+ pprog = 0
815
+ elif isinstance(prog, (nvrtcProgram,)):
816
+ pprog = int(prog)
817
+ else:
818
+ pprog = int(nvrtcProgram(prog))
819
+ cyprog = <cynvrtc.nvrtcProgram><void_ptr>pprog
820
+ cdef const char* lowered_name = NULL
821
+ with nogil:
822
+ err = cynvrtc.nvrtcGetLoweredName(cyprog, name_expression, &lowered_name)
823
+ if err != cynvrtc.NVRTC_SUCCESS:
824
+ return (_dict_nvrtcResult[err], None)
825
+ return (_dict_nvrtcResult[err], <bytes>lowered_name if lowered_name != NULL else None)
826
+
827
+ @cython.embedsignature(True)
828
+ def nvrtcGetPCHHeapSize():
829
+ """ retrieve the current size of the PCH Heap.
830
+
831
+ Returns
832
+ -------
833
+ nvrtcResult
834
+ - :py:obj:`~.NVRTC_SUCCESS`
835
+ - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`
836
+ ret : int
837
+ pointer to location where the size of the PCH Heap will be stored
838
+ """
839
+ cdef size_t ret = 0
840
+ with nogil:
841
+ err = cynvrtc.nvrtcGetPCHHeapSize(&ret)
842
+ if err != cynvrtc.NVRTC_SUCCESS:
843
+ return (_dict_nvrtcResult[err], None)
844
+ return (_dict_nvrtcResult[err], ret)
845
+
846
+ @cython.embedsignature(True)
847
+ def nvrtcSetPCHHeapSize(size_t size):
848
+ """ set the size of the PCH Heap.
849
+
850
+ The requested size may be rounded up to a platform dependent alignment
851
+ (e.g. page size). If the PCH Heap has already been allocated, the heap
852
+ memory will be freed and a new PCH Heap will be allocated.
853
+
854
+ Parameters
855
+ ----------
856
+ size : size_t
857
+ requested size of the PCH Heap, in bytes
858
+
859
+ Returns
860
+ -------
861
+ nvrtcResult
862
+ - :py:obj:`~.NVRTC_SUCCESS`
863
+ """
864
+ with nogil:
865
+ err = cynvrtc.nvrtcSetPCHHeapSize(size)
866
+ return (_dict_nvrtcResult[err],)
867
+
868
+ @cython.embedsignature(True)
869
+ def nvrtcGetPCHCreateStatus(prog):
870
+ """ returns the PCH creation status.
871
+
872
+ NVRTC_SUCCESS indicates that the PCH was successfully created.
873
+ NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED indicates that no PCH creation was
874
+ attempted, either because PCH functionality was not requested during
875
+ the preceding nvrtcCompileProgram call, or automatic PCH processing was
876
+ requested, and compiler chose not to create a PCH file.
877
+ NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED indicates that a PCH file could
878
+ potentially have been created, but the compiler ran out space in the
879
+ PCH heap. In this scenario, the
880
+ :py:obj:`~.nvrtcGetPCHHeapSizeRequired()` can be used to query the
881
+ required heap size, the heap can be reallocated for this size with
882
+ :py:obj:`~.nvrtcSetPCHHeapSize()` and PCH creation may be reattempted
883
+ again invoking :py:obj:`~.nvrtcCompileProgram()` with a new NVRTC
884
+ program instance. NVRTC_ERROR_PCH_CREATE indicates that an error
885
+ condition prevented the PCH file from being created.
886
+
887
+ Parameters
888
+ ----------
889
+ prog : :py:obj:`~.nvrtcProgram`
890
+ CUDA Runtime Compilation program.
891
+
892
+ Returns
893
+ -------
894
+ nvrtcResult
895
+ - :py:obj:`~.NVRTC_SUCCESS`
896
+ - :py:obj:`~.NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED`
897
+ - :py:obj:`~.NVRTC_ERROR_PCH_CREATE`
898
+ - :py:obj:`~.NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED`
899
+ - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`
900
+ """
901
+ cdef cynvrtc.nvrtcProgram cyprog
902
+ if prog is None:
903
+ pprog = 0
904
+ elif isinstance(prog, (nvrtcProgram,)):
905
+ pprog = int(prog)
906
+ else:
907
+ pprog = int(nvrtcProgram(prog))
908
+ cyprog = <cynvrtc.nvrtcProgram><void_ptr>pprog
909
+ with nogil:
910
+ err = cynvrtc.nvrtcGetPCHCreateStatus(cyprog)
911
+ return (_dict_nvrtcResult[err],)
912
+
913
+ @cython.embedsignature(True)
914
+ def nvrtcGetPCHHeapSizeRequired(prog):
915
+ """ retrieve the required size of the PCH heap required to compile the given program.
916
+
917
+ Parameters
918
+ ----------
919
+ prog : :py:obj:`~.nvrtcProgram`
920
+ CUDA Runtime Compilation program.
921
+
922
+ Returns
923
+ -------
924
+ nvrtcResult
925
+ - :py:obj:`~.NVRTC_SUCCESS`
926
+ - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`
927
+ - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT` The size retrieved using this function is only valid if :py:obj:`~.nvrtcGetPCHCreateStatus()` returned NVRTC_SUCCESS or NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED
928
+ size : int
929
+ pointer to location where the required size of the PCH Heap will be
930
+ stored
931
+ """
932
+ cdef cynvrtc.nvrtcProgram cyprog
933
+ if prog is None:
934
+ pprog = 0
935
+ elif isinstance(prog, (nvrtcProgram,)):
936
+ pprog = int(prog)
937
+ else:
938
+ pprog = int(nvrtcProgram(prog))
939
+ cyprog = <cynvrtc.nvrtcProgram><void_ptr>pprog
940
+ cdef size_t size = 0
941
+ with nogil:
942
+ err = cynvrtc.nvrtcGetPCHHeapSizeRequired(cyprog, &size)
943
+ if err != cynvrtc.NVRTC_SUCCESS:
944
+ return (_dict_nvrtcResult[err], None)
945
+ return (_dict_nvrtcResult[err], size)
946
+
947
+ @cython.embedsignature(True)
948
+ def nvrtcSetFlowCallback(prog, callback, payload):
949
+ """ nvrtcSetFlowCallback registers a callback function that the compiler will invoke at different points during a call to nvrtcCompileProgram, and the callback function can decide whether to cancel compilation by returning specific values.
950
+
951
+ The callback function must satisfy the following constraints:
952
+
953
+ (1) Its signature should be:
954
+
955
+ **View CUDA Toolkit Documentation for a C++ code example**
956
+
957
+ When invoking the callback, the compiler will always pass `payload` to
958
+ param1 so that the callback may make decisions based on `payload` .
959
+ It'll always pass NULL to param2 for now which is reserved for future
960
+ extensions.
961
+
962
+ (2) It must return 1 to cancel compilation or 0 to continue. Other
963
+ return values are reserved for future use.
964
+
965
+ (3) It must return consistent values. Once it returns 1 at one point,
966
+ it must return 1 in all following invocations during the current
967
+ nvrtcCompileProgram call in progress.
968
+
969
+ (4) It must be thread-safe.
970
+
971
+ (5) It must not invoke any nvrtc/libnvvm/ptx APIs.
972
+
973
+ Parameters
974
+ ----------
975
+ prog : :py:obj:`~.nvrtcProgram`
976
+ CUDA Runtime Compilation program.
977
+ callback : Any
978
+ the callback that issues cancellation signal.
979
+ payload : Any
980
+ to be passed as a parameter when invoking the callback.
981
+
982
+ Returns
983
+ -------
984
+ nvrtcResult
985
+ - :py:obj:`~.NVRTC_SUCCESS`
986
+ - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`
987
+ - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`
988
+ """
989
+ cdef cynvrtc.nvrtcProgram cyprog
990
+ if prog is None:
991
+ pprog = 0
992
+ elif isinstance(prog, (nvrtcProgram,)):
993
+ pprog = int(prog)
994
+ else:
995
+ pprog = int(nvrtcProgram(prog))
996
+ cyprog = <cynvrtc.nvrtcProgram><void_ptr>pprog
997
+ cycallback = _HelperInputVoidPtr(callback)
998
+ cdef void* cycallback_ptr = <void*><void_ptr>cycallback.cptr
999
+ cypayload = _HelperInputVoidPtr(payload)
1000
+ cdef void* cypayload_ptr = <void*><void_ptr>cypayload.cptr
1001
+ with nogil:
1002
+ err = cynvrtc.nvrtcSetFlowCallback(cyprog, cycallback_ptr, cypayload_ptr)
1003
+ return (_dict_nvrtcResult[err],)
1004
+
1005
+ @cython.embedsignature(True)
1006
+ def sizeof(objType):
1007
+ """ Returns the size of provided CUDA Python structure in bytes
1008
+
1009
+ Parameters
1010
+ ----------
1011
+ objType : Any
1012
+ CUDA Python object
1013
+
1014
+ Returns
1015
+ -------
1016
+ lowered_name : int
1017
+ The size of `objType` in bytes
1018
+ """
1019
+ if objType == nvrtcProgram:
1020
+ return sizeof(cynvrtc.nvrtcProgram)
1021
+ raise TypeError("Unknown type: " + str(objType))
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/nvvm.cpp ADDED
The diff for this file is too large to render. See raw diff
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/nvvm.pxd ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ #
3
+ # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
4
+ #
5
+ # This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly.
6
+
7
+ from libc.stdint cimport intptr_t
8
+
9
+ from .cynvvm cimport *
10
+
11
+
12
+ ###############################################################################
13
+ # Types
14
+ ###############################################################################
15
+
16
+ ctypedef nvvmProgram Program
17
+
18
+
19
+ ###############################################################################
20
+ # Enum
21
+ ###############################################################################
22
+
23
+ ctypedef nvvmResult _Result
24
+
25
+
26
+ ###############################################################################
27
+ # Functions
28
+ ###############################################################################
29
+
30
+ cpdef str get_error_string(int result)
31
+ cpdef tuple version()
32
+ cpdef tuple ir_version()
33
+ cpdef intptr_t create_program() except? 0
34
+ cpdef add_module_to_program(intptr_t prog, buffer, size_t size, name)
35
+ cpdef lazy_add_module_to_program(intptr_t prog, buffer, size_t size, name)
36
+ cpdef compile_program(intptr_t prog, int num_options, options)
37
+ cpdef verify_program(intptr_t prog, int num_options, options)
38
+ cpdef size_t get_compiled_result_size(intptr_t prog) except? 0
39
+ cpdef get_compiled_result(intptr_t prog, buffer)
40
+ cpdef size_t get_program_log_size(intptr_t prog) except? 0
41
+ cpdef get_program_log(intptr_t prog, buffer)
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/nvvm.pyx ADDED
@@ -0,0 +1,297 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ #
3
+ # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
4
+ #
5
+ # This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly.
6
+
7
+ cimport cython # NOQA
8
+
9
+ from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr,
10
+ nested_resource)
11
+
12
+ from enum import IntEnum as _IntEnum
13
+
14
+
15
+ ###############################################################################
16
+ # Enum
17
+ ###############################################################################
18
+
19
+ class Result(_IntEnum):
20
+ """See `nvvmResult`."""
21
+ SUCCESS = NVVM_SUCCESS
22
+ ERROR_OUT_OF_MEMORY = NVVM_ERROR_OUT_OF_MEMORY
23
+ ERROR_PROGRAM_CREATION_FAILURE = NVVM_ERROR_PROGRAM_CREATION_FAILURE
24
+ ERROR_IR_VERSION_MISMATCH = NVVM_ERROR_IR_VERSION_MISMATCH
25
+ ERROR_INVALID_INPUT = NVVM_ERROR_INVALID_INPUT
26
+ ERROR_INVALID_PROGRAM = NVVM_ERROR_INVALID_PROGRAM
27
+ ERROR_INVALID_IR = NVVM_ERROR_INVALID_IR
28
+ ERROR_INVALID_OPTION = NVVM_ERROR_INVALID_OPTION
29
+ ERROR_NO_MODULE_IN_PROGRAM = NVVM_ERROR_NO_MODULE_IN_PROGRAM
30
+ ERROR_COMPILATION = NVVM_ERROR_COMPILATION
31
+ ERROR_CANCELLED = NVVM_ERROR_CANCELLED
32
+
33
+
34
+ ###############################################################################
35
+ # Error handling
36
+ ###############################################################################
37
+
38
+ class nvvmError(Exception):
39
+
40
+ def __init__(self, status):
41
+ self.status = status
42
+ s = Result(status)
43
+ cdef str err = f"{s.name} ({s.value})"
44
+ super(nvvmError, self).__init__(err)
45
+
46
+ def __reduce__(self):
47
+ return (type(self), (self.status,))
48
+
49
+
50
+ @cython.profile(False)
51
+ cdef int check_status(int status) except 1 nogil:
52
+ if status != 0:
53
+ with gil:
54
+ raise nvvmError(status)
55
+ return status
56
+
57
+
58
+ ###############################################################################
59
+ # Wrapper functions
60
+ ###############################################################################
61
+
62
+ cpdef destroy_program(intptr_t prog):
63
+ """Destroy a program.
64
+
65
+ Args:
66
+ prog (intptr_t): nvvm prog.
67
+
68
+ .. seealso:: `nvvmDestroyProgram`
69
+ """
70
+ cdef Program p = <Program>prog
71
+ with nogil:
72
+ status = nvvmDestroyProgram(&p)
73
+ check_status(status)
74
+
75
+
76
+ cpdef str get_error_string(int result):
77
+ """Get the message string for the given ``nvvmResult`` code.
78
+
79
+ Args:
80
+ result (Result): NVVM API result code.
81
+
82
+ .. seealso:: `nvvmGetErrorString`
83
+ """
84
+ cdef bytes _output_
85
+ _output_ = nvvmGetErrorString(<_Result>result)
86
+ return _output_.decode()
87
+
88
+
89
+ cpdef tuple version():
90
+ """Get the NVVM version.
91
+
92
+ Returns:
93
+ A 2-tuple containing:
94
+
95
+ - int: NVVM major version number.
96
+ - int: NVVM minor version number.
97
+
98
+ .. seealso:: `nvvmVersion`
99
+ """
100
+ cdef int major
101
+ cdef int minor
102
+ with nogil:
103
+ status = nvvmVersion(&major, &minor)
104
+ check_status(status)
105
+ return (major, minor)
106
+
107
+
108
+ cpdef tuple ir_version():
109
+ """Get the NVVM IR version.
110
+
111
+ Returns:
112
+ A 4-tuple containing:
113
+
114
+ - int: NVVM IR major version number.
115
+ - int: NVVM IR minor version number.
116
+ - int: NVVM IR debug metadata major version number.
117
+ - int: NVVM IR debug metadata minor version number.
118
+
119
+ .. seealso:: `nvvmIRVersion`
120
+ """
121
+ cdef int major_ir
122
+ cdef int minor_ir
123
+ cdef int major_dbg
124
+ cdef int minor_dbg
125
+ with nogil:
126
+ status = nvvmIRVersion(&major_ir, &minor_ir, &major_dbg, &minor_dbg)
127
+ check_status(status)
128
+ return (major_ir, minor_ir, major_dbg, minor_dbg)
129
+
130
+
131
+ cpdef intptr_t create_program() except? 0:
132
+ """Create a program, and set the value of its handle to ``*prog``.
133
+
134
+ Returns:
135
+ intptr_t: NVVM program.
136
+
137
+ .. seealso:: `nvvmCreateProgram`
138
+ """
139
+ cdef Program prog
140
+ with nogil:
141
+ status = nvvmCreateProgram(&prog)
142
+ check_status(status)
143
+ return <intptr_t>prog
144
+
145
+
146
+ cpdef add_module_to_program(intptr_t prog, buffer, size_t size, name):
147
+ """Add a module level NVVM IR to a program.
148
+
149
+ Args:
150
+ prog (intptr_t): NVVM program.
151
+ buffer (bytes): NVVM IR module in the bitcode or text representation.
152
+ size (size_t): Size of the NVVM IR module.
153
+ name (str): Name of the NVVM IR module. If NULL, "<unnamed>" is used as the name.
154
+
155
+ .. seealso:: `nvvmAddModuleToProgram`
156
+ """
157
+ cdef void* _buffer_ = get_buffer_pointer(buffer, size, readonly=True)
158
+ if not isinstance(name, str):
159
+ raise TypeError("name must be a Python str")
160
+ cdef bytes _temp_name_ = (<str>name).encode()
161
+ cdef char* _name_ = _temp_name_
162
+ with nogil:
163
+ status = nvvmAddModuleToProgram(<Program>prog, <const char*>_buffer_, size, <const char*>_name_)
164
+ check_status(status)
165
+
166
+
167
+ cpdef lazy_add_module_to_program(intptr_t prog, buffer, size_t size, name):
168
+ """Add a module level NVVM IR to a program.
169
+
170
+ Args:
171
+ prog (intptr_t): NVVM program.
172
+ buffer (bytes): NVVM IR module in the bitcode representation.
173
+ size (size_t): Size of the NVVM IR module.
174
+ name (str): Name of the NVVM IR module. If NULL, "<unnamed>" is used as the name.
175
+
176
+ .. seealso:: `nvvmLazyAddModuleToProgram`
177
+ """
178
+ cdef void* _buffer_ = get_buffer_pointer(buffer, size, readonly=True)
179
+ if not isinstance(name, str):
180
+ raise TypeError("name must be a Python str")
181
+ cdef bytes _temp_name_ = (<str>name).encode()
182
+ cdef char* _name_ = _temp_name_
183
+ with nogil:
184
+ status = nvvmLazyAddModuleToProgram(<Program>prog, <const char*>_buffer_, size, <const char*>_name_)
185
+ check_status(status)
186
+
187
+
188
+ cpdef compile_program(intptr_t prog, int num_options, options):
189
+ """Compile the NVVM program.
190
+
191
+ Args:
192
+ prog (intptr_t): NVVM program.
193
+ num_options (int): Number of compiler ``options`` passed.
194
+ options (object): Compiler options in the form of C string array. It can be:
195
+
196
+ - an :class:`int` as the pointer address to the nested sequence, or
197
+ - a Python sequence of :class:`int`\s, each of which is a pointer address
198
+ to a valid sequence of 'char', or
199
+ - a nested Python sequence of ``str``.
200
+
201
+
202
+ .. seealso:: `nvvmCompileProgram`
203
+ """
204
+ cdef nested_resource[ char ] _options_
205
+ get_nested_resource_ptr[char](_options_, options, <char*>NULL)
206
+ with nogil:
207
+ status = nvvmCompileProgram(<Program>prog, num_options, <const char**>(_options_.ptrs.data()))
208
+ check_status(status)
209
+
210
+
211
+ cpdef verify_program(intptr_t prog, int num_options, options):
212
+ """Verify the NVVM program.
213
+
214
+ Args:
215
+ prog (intptr_t): NVVM program.
216
+ num_options (int): Number of compiler ``options`` passed.
217
+ options (object): Compiler options in the form of C string array. It can be:
218
+
219
+ - an :class:`int` as the pointer address to the nested sequence, or
220
+ - a Python sequence of :class:`int`\s, each of which is a pointer address
221
+ to a valid sequence of 'char', or
222
+ - a nested Python sequence of ``str``.
223
+
224
+
225
+ .. seealso:: `nvvmVerifyProgram`
226
+ """
227
+ cdef nested_resource[ char ] _options_
228
+ get_nested_resource_ptr[char](_options_, options, <char*>NULL)
229
+ with nogil:
230
+ status = nvvmVerifyProgram(<Program>prog, num_options, <const char**>(_options_.ptrs.data()))
231
+ check_status(status)
232
+
233
+
234
+ cpdef size_t get_compiled_result_size(intptr_t prog) except? 0:
235
+ """Get the size of the compiled result.
236
+
237
+ Args:
238
+ prog (intptr_t): NVVM program.
239
+
240
+ Returns:
241
+ size_t: Size of the compiled result (including the trailing NULL).
242
+
243
+ .. seealso:: `nvvmGetCompiledResultSize`
244
+ """
245
+ cdef size_t buffer_size_ret
246
+ with nogil:
247
+ status = nvvmGetCompiledResultSize(<Program>prog, &buffer_size_ret)
248
+ check_status(status)
249
+ return buffer_size_ret
250
+
251
+
252
+ cpdef get_compiled_result(intptr_t prog, buffer):
253
+ """Get the compiled result.
254
+
255
+ Args:
256
+ prog (intptr_t): NVVM program.
257
+ buffer (bytes): Compiled result.
258
+
259
+ .. seealso:: `nvvmGetCompiledResult`
260
+ """
261
+ cdef void* _buffer_ = get_buffer_pointer(buffer, -1, readonly=False)
262
+ with nogil:
263
+ status = nvvmGetCompiledResult(<Program>prog, <char*>_buffer_)
264
+ check_status(status)
265
+
266
+
267
+ cpdef size_t get_program_log_size(intptr_t prog) except? 0:
268
+ """Get the Size of Compiler/Verifier Message.
269
+
270
+ Args:
271
+ prog (intptr_t): NVVM program.
272
+
273
+ Returns:
274
+ size_t: Size of the compilation/verification log (including the trailing NULL).
275
+
276
+ .. seealso:: `nvvmGetProgramLogSize`
277
+ """
278
+ cdef size_t buffer_size_ret
279
+ with nogil:
280
+ status = nvvmGetProgramLogSize(<Program>prog, &buffer_size_ret)
281
+ check_status(status)
282
+ return buffer_size_ret
283
+
284
+
285
+ cpdef get_program_log(intptr_t prog, buffer):
286
+ """Get the Compiler/Verifier Message.
287
+
288
+ Args:
289
+ prog (intptr_t): NVVM program.
290
+ buffer (bytes): Compilation/Verification log.
291
+
292
+ .. seealso:: `nvvmGetProgramLog`
293
+ """
294
+ cdef void* _buffer_ = get_buffer_pointer(buffer, -1, readonly=False)
295
+ with nogil:
296
+ status = nvvmGetProgramLog(<Program>prog, <char*>_buffer_)
297
+ check_status(status)
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/runtime.pxd ADDED
The diff for this file is too large to render. See raw diff
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/bindings/runtime.pyx ADDED
The diff for this file is too large to render. See raw diff
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/pathfinder/README.md ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ ### The `cuda.pathfinder` documentation was moved
2
+
3
+ Please see https://nvidia.github.io/cuda-python/cuda-pathfinder/latest/
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/pathfinder/__init__.py ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ """cuda.pathfinder public APIs"""
5
+
6
+ from cuda.pathfinder._binaries.find_nvidia_binary_utility import (
7
+ find_nvidia_binary_utility as find_nvidia_binary_utility,
8
+ )
9
+ from cuda.pathfinder._binaries.supported_nvidia_binaries import SUPPORTED_BINARIES as _SUPPORTED_BINARIES
10
+ from cuda.pathfinder._dynamic_libs.load_dl_common import (
11
+ DynamicLibNotAvailableError as DynamicLibNotAvailableError,
12
+ )
13
+ from cuda.pathfinder._dynamic_libs.load_dl_common import DynamicLibNotFoundError as DynamicLibNotFoundError
14
+ from cuda.pathfinder._dynamic_libs.load_dl_common import (
15
+ DynamicLibUnknownError as DynamicLibUnknownError,
16
+ )
17
+ from cuda.pathfinder._dynamic_libs.load_dl_common import LoadedDL as LoadedDL
18
+ from cuda.pathfinder._dynamic_libs.load_nvidia_dynamic_lib import load_nvidia_dynamic_lib as load_nvidia_dynamic_lib
19
+ from cuda.pathfinder._dynamic_libs.supported_nvidia_libs import (
20
+ SUPPORTED_LIBNAMES as SUPPORTED_NVIDIA_LIBNAMES, # noqa: F401
21
+ )
22
+ from cuda.pathfinder._headers.find_nvidia_headers import LocatedHeaderDir as LocatedHeaderDir
23
+ from cuda.pathfinder._headers.find_nvidia_headers import find_nvidia_header_directory as find_nvidia_header_directory
24
+ from cuda.pathfinder._headers.find_nvidia_headers import (
25
+ locate_nvidia_header_directory as locate_nvidia_header_directory,
26
+ )
27
+ from cuda.pathfinder._headers.supported_nvidia_headers import SUPPORTED_HEADERS_CTK as _SUPPORTED_HEADERS_CTK
28
+ from cuda.pathfinder._static_libs.find_bitcode_lib import (
29
+ SUPPORTED_BITCODE_LIBS as _SUPPORTED_BITCODE_LIBS,
30
+ )
31
+ from cuda.pathfinder._static_libs.find_bitcode_lib import (
32
+ BitcodeLibNotFoundError as BitcodeLibNotFoundError,
33
+ )
34
+ from cuda.pathfinder._static_libs.find_bitcode_lib import (
35
+ LocatedBitcodeLib as LocatedBitcodeLib,
36
+ )
37
+ from cuda.pathfinder._static_libs.find_bitcode_lib import (
38
+ find_bitcode_lib as find_bitcode_lib,
39
+ )
40
+ from cuda.pathfinder._static_libs.find_bitcode_lib import (
41
+ locate_bitcode_lib as locate_bitcode_lib,
42
+ )
43
+
44
+ from cuda.pathfinder._version import __version__ # isort: skip # noqa: F401
45
+
46
+ # Indirections to help Sphinx find the docstrings.
47
+ #: Mapping from short CUDA Toolkit (CTK) library names to their canonical
48
+ #: header basenames (used to validate a discovered include directory).
49
+ #: Example: ``"cublas" → "cublas.h"``. The key set is platform-aware
50
+ #: (e.g., ``"cufile"`` may be Linux-only).
51
+ SUPPORTED_HEADERS_CTK = _SUPPORTED_HEADERS_CTK
52
+
53
+ #: Tuple of supported CUDA binary utility names that can be located
54
+ #: via ``find_nvidia_binary_utility()``. Platform-aware (e.g., some
55
+ #: utilities may be available only on Linux or Windows).
56
+ #: Example utilities: ``"nvdisasm"``, ``"cuobjdump"``, ``"nvcc"``.
57
+ SUPPORTED_BINARY_UTILITIES = _SUPPORTED_BINARIES
58
+
59
+ #: Tuple of supported bitcode library names that can be resolved
60
+ #: via ``locate_bitcode_lib()`` and ``find_bitcode_lib()``.
61
+ #: Example value: ``"device"``.
62
+ SUPPORTED_BITCODE_LIBS = _SUPPORTED_BITCODE_LIBS
63
+
64
+ # Backward compatibility: _find_nvidia_header_directory was added in release 1.2.2.
65
+ # It will be removed in release 1.2.4.
66
+ _find_nvidia_header_directory = find_nvidia_header_directory
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/cuda/pathfinder/_version.py ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # file generated by setuptools-scm
2
+ # don't change, don't track in version control
3
+
4
+ __all__ = [
5
+ "__version__",
6
+ "__version_tuple__",
7
+ "version",
8
+ "version_tuple",
9
+ "__commit_id__",
10
+ "commit_id",
11
+ ]
12
+
13
+ TYPE_CHECKING = False
14
+ if TYPE_CHECKING:
15
+ from typing import Tuple
16
+ from typing import Union
17
+
18
+ VERSION_TUPLE = Tuple[Union[int, str], ...]
19
+ COMMIT_ID = Union[str, None]
20
+ else:
21
+ VERSION_TUPLE = object
22
+ COMMIT_ID = object
23
+
24
+ version: str
25
+ __version__: str
26
+ __version_tuple__: VERSION_TUPLE
27
+ version_tuple: VERSION_TUPLE
28
+ commit_id: COMMIT_ID
29
+ __commit_id__: COMMIT_ID
30
+
31
+ __version__ = version = '1.4.0'
32
+ __version_tuple__ = version_tuple = (1, 4, 0)
33
+
34
+ __commit_id__ = commit_id = 'g8d0ccdd64'
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/pip/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (720 Bytes). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/pip/__pycache__/__main__.cpython-312.pyc ADDED
Binary file (874 Bytes). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/pip/__pycache__/__pip-runner__.cpython-312.pyc ADDED
Binary file (2.24 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/pip/_internal/__init__.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from typing import List, Optional
2
+
3
+ from pip._internal.utils import _log
4
+
5
+ # init_logging() must be called before any call to logging.getLogger()
6
+ # which happens at import of most modules.
7
+ _log.init_logging()
8
+
9
+
10
+ def main(args: Optional[List[str]] = None) -> int:
11
+ """This is preserved for old console scripts that may still be referencing
12
+ it.
13
+
14
+ For additional details, see https://github.com/pypa/pip/issues/7498.
15
+ """
16
+ from pip._internal.utils.entrypoints import _wrapper
17
+
18
+ return _wrapper(args)
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/pip/_internal/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (820 Bytes). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/pip/_internal/__pycache__/build_env.cpython-312.pyc ADDED
Binary file (14.8 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/pip/_internal/__pycache__/cache.cpython-312.pyc ADDED
Binary file (12.7 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/pip/_internal/__pycache__/configuration.cpython-312.pyc ADDED
Binary file (17.7 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/pip/_internal/__pycache__/exceptions.cpython-312.pyc ADDED
Binary file (36.9 kB). View file