diff --git a/.gitattributes b/.gitattributes index fec0a56a6152e19226f5e75f8108599db820ec60..f8ef6ff9a6718a5181efefa44b504efaf41410c5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -51,3 +51,23 @@ hug/lib/python3.12/site-packages/charset_normalizer/cd.cpython-312-x86_64-linux- hug/lib/python3.12/site-packages/charset_normalizer/md.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text hug/lib/python3.12/site-packages/click/__pycache__/core.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text hug/lib/python3.12/site-packages/contourpy/_contourpy.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +hug/lib/python3.12/site-packages/cuda/bindings/_internal/cufile.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +hug/lib/python3.12/site-packages/cuda/bindings/_internal/driver.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvml.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +hug/lib/python3.12/site-packages/cuda/bindings/_internal/runtime.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +hug/lib/python3.12/site-packages/cuda/bindings/_internal/runtime_ptds.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +hug/lib/python3.12/site-packages/cuda/bindings/_internal/utils.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +hug/lib/python3.12/site-packages/cuda/bindings/_v2/nvrtc.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +hug/lib/python3.12/site-packages/cuda/bindings/cudla.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +hug/lib/python3.12/site-packages/cuda/bindings/cufile.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +hug/lib/python3.12/site-packages/cuda/bindings/cydriver.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +hug/lib/python3.12/site-packages/cuda/bindings/cynvml.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +hug/lib/python3.12/site-packages/cuda/bindings/cyruntime.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +hug/lib/python3.12/site-packages/cuda/bindings/driver.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +hug/lib/python3.12/site-packages/cuda/bindings/nvfatbin.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +hug/lib/python3.12/site-packages/cuda/bindings/nvjitlink.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +hug/lib/python3.12/site-packages/cuda/bindings/nvml.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +hug/lib/python3.12/site-packages/cuda/bindings/nvrtc.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +hug/lib/python3.12/site-packages/cuda/bindings/nvvm.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +hug/lib/python3.12/site-packages/cuda/bindings/runtime.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +hug/lib/python3.12/site-packages/cv2/cv2.abi3.so filter=lfs diff=lfs merge=lfs -text diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_example_helpers/__pycache__/helper_cuda.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/bindings/_example_helpers/__pycache__/helper_cuda.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ede17510deacada49750a4c29ade5e893123f90c Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/bindings/_example_helpers/__pycache__/helper_cuda.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_example_helpers/__pycache__/helper_string.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/bindings/_example_helpers/__pycache__/helper_string.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1e228a461f8bff1f2f24e635c405884e8c423669 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/bindings/_example_helpers/__pycache__/helper_string.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_example_helpers/common.py b/hug/lib/python3.12/site-packages/cuda/bindings/_example_helpers/common.py new file mode 100644 index 0000000000000000000000000000000000000000..6335d3e3e4ae593881005e38b74ce432db653a4e --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_example_helpers/common.py @@ -0,0 +1,90 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + + +import os +import sys + +import numpy as np + +from cuda import pathfinder +from cuda.bindings import driver as cuda +from cuda.bindings import runtime as cudart +from cuda.bindings._v2 import nvrtc + +from .helper_cuda import check_cuda_errors + + +def requirement_not_met(message): + print(message, file=sys.stderr) # noqa: T201 + exitcode = os.environ.get("CUDA_BINDINGS_SKIP_EXAMPLE", "1") + return sys.exit(int(exitcode)) + + +def check_compute_capability_too_low(dev_id, required_cc_major_minor): + cc_major = check_cuda_errors( + cudart.cudaDeviceGetAttribute(cudart.cudaDeviceAttr.cudaDevAttrComputeCapabilityMajor, dev_id) + ) + cc_minor = check_cuda_errors( + cudart.cudaDeviceGetAttribute(cudart.cudaDeviceAttr.cudaDevAttrComputeCapabilityMinor, dev_id) + ) + have_cc_major_minor = (cc_major, cc_minor) + if have_cc_major_minor < required_cc_major_minor: + requirement_not_met( + f"CUDA device compute capability too low: {have_cc_major_minor=!r}, {required_cc_major_minor=!r}" + ) + + +class KernelHelper: + def __init__(self, code, dev_id): + include_dirs = [] + for libname in ("cudart", "cccl"): + hdr_dir = pathfinder.find_nvidia_header_directory(libname) + if hdr_dir is None: + requirement_not_met(f'pathfinder.find_nvidia_header_directory("{libname}") returned None') + include_dirs.append(hdr_dir) + + prog = nvrtc.create_program(str.encode(code), b"sourceCode.cu") + + # Initialize CUDA + check_cuda_errors(cudart.cudaFree(0)) + + major = check_cuda_errors( + cudart.cudaDeviceGetAttribute(cudart.cudaDeviceAttr.cudaDevAttrComputeCapabilityMajor, dev_id) + ) + minor = check_cuda_errors( + cudart.cudaDeviceGetAttribute(cudart.cudaDeviceAttr.cudaDevAttrComputeCapabilityMinor, dev_id) + ) + _, nvrtc_minor = nvrtc.version() + use_cubin = nvrtc_minor >= 1 + prefix = "sm" if use_cubin else "compute" + arch_arg = bytes(f"--gpu-architecture={prefix}_{major}{minor}", "ascii") + + opts = [ + b"--fmad=true", + arch_arg, + b"--std=c++17", + b"-default-device", + ] + for inc_dir in include_dirs: + opts.append(f"--include-path={inc_dir}".encode()) + + try: + nvrtc.compile_program(prog, opts) + except nvrtc.NvrtcError as err: + log = nvrtc.get_program_log(prog) + import sys + + print(log.decode(), file=sys.stderr) # noqa: T201 + print(err, file=sys.stderr) # noqa: T201 + sys.exit(1) + + if use_cubin: + data = nvrtc.get_cubin(prog) + else: + data = nvrtc.get_ptx(prog) + + self.module = check_cuda_errors(cuda.cuModuleLoadData(np.char.array(data))) + + def get_function(self, name): + return check_cuda_errors(cuda.cuModuleGetFunction(self.module, name)) diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_example_helpers/helper_cuda.py b/hug/lib/python3.12/site-packages/cuda/bindings/_example_helpers/helper_cuda.py new file mode 100644 index 0000000000000000000000000000000000000000..18fbecf59b9e36cd192c40f5dbc1b9e33234ea0b --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_example_helpers/helper_cuda.py @@ -0,0 +1,48 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +from cuda.bindings import driver as cuda +from cuda.bindings import nvrtc +from cuda.bindings import runtime as cudart + +from .helper_string import check_cmd_line_flag, get_cmd_line_argument_int + + +def _cuda_get_error_enum(error): + if isinstance(error, cuda.CUresult): + err, name = cuda.cuGetErrorName(error) + return name if err == cuda.CUresult.CUDA_SUCCESS else "" + elif isinstance(error, cudart.cudaError_t): + return cudart.cudaGetErrorName(error)[1] + elif isinstance(error, nvrtc.nvrtcResult): + return nvrtc.nvrtcGetErrorString(error)[1] + else: + raise RuntimeError(f"Unknown error type: {error}") + + +def check_cuda_errors(result): + if result[0].value: + raise RuntimeError(f"CUDA error code={result[0].value}({_cuda_get_error_enum(result[0])})") + if len(result) == 1: + return None + elif len(result) == 2: + return result[1] + else: + return result[1:] + + +def find_cuda_device(): + dev_id = 0 + if check_cmd_line_flag("device="): + dev_id = get_cmd_line_argument_int("device=") + check_cuda_errors(cudart.cudaSetDevice(dev_id)) + return dev_id + + +def find_cuda_device_drv(): + dev_id = 0 + if check_cmd_line_flag("device="): + dev_id = get_cmd_line_argument_int("device=") + check_cuda_errors(cuda.cuInit(0)) + cu_device = check_cuda_errors(cuda.cuDeviceGet(dev_id)) + return cu_device diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_example_helpers/helper_string.py b/hug/lib/python3.12/site-packages/cuda/bindings/_example_helpers/helper_string.py new file mode 100644 index 0000000000000000000000000000000000000000..ad15cecc9ca5a0dcce222ee5715bdbc258afc47d --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_example_helpers/helper_string.py @@ -0,0 +1,15 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +import sys + + +def check_cmd_line_flag(string_ref): + return any(string_ref == i and k < len(sys.argv) - 1 for i, k in enumerate(sys.argv)) + + +def get_cmd_line_argument_int(string_ref): + for i, k in enumerate(sys.argv): + if string_ref == i and k < len(sys.argv) - 1: + return sys.argv[k + 1] + return 0 diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_internal/__init__.py b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_internal/__pycache__/__init__.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3e22fa5baccfbff133eec1257f612c0d6d6bbb11 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/__pycache__/__init__.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_internal/__pycache__/_fast_enum.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/__pycache__/_fast_enum.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3aaceb90c8545c3c52378eec3171f43aefd51eb3 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/__pycache__/_fast_enum.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_internal/_fast_enum.py b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/_fast_enum.py new file mode 100644 index 0000000000000000000000000000000000000000..63a2336da1a7fa1dff10f37816d5218578934dae --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/_fast_enum.py @@ -0,0 +1,74 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + + +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=581469c1fadb5f72c43b478d73f2b905562136c8723a25e2f4240b5b681e2894 +""" +This is a replacement for the stdlib enum.IntEnum. + +Notably, it has much better import time performance, since it doesn't generate +and evaluate Python code at startup time. + +It supports the most important subset of the IntEnum API. See `test_enum` in +`cuda_bindings/tests/test_basics.py` for details. +""" + +from typing import Any, Iterator + + +class FastEnumMetaclass(type): + def __init__(cls, name, bases, namespace): + super().__init__(name, bases, namespace) + + cls.__singletons__ = {} + cls.__members__ = {} + for name, value in cls.__dict__.items(): + if name.startswith("__") and name.endswith("__"): + continue + + if isinstance(value, tuple): + value, doc = value + elif isinstance(value, int): + doc = None + else: + continue + + singleton = int.__new__(cls, value) + singleton.__doc__ = doc + singleton._name = name + cls.__singletons__[value] = singleton + cls.__members__[name] = singleton + + for name, member in cls.__members__.items(): + setattr(cls, name, member) + + def __repr__(cls) -> str: + return f"" + + def __len__(cls) -> int: + return len(cls.__members__) + + def __iter__(cls) -> Iterator["FastEnum"]: + return iter(cls.__members__.values()) + + def __contains__(cls, item: Any) -> bool: + return item in cls.__singletons__ + + +class FastEnum(int, metaclass=FastEnumMetaclass): + def __new__(cls, value: int) -> "FastEnum": + singleton: FastEnum = cls.__singletons__.get(value) + if singleton is None: + raise ValueError(f"{value} is not a valid {cls.__name__}") + return singleton + + def __repr__(self) -> str: + return f"<{self.__class__.__name__}.{self._name}: {int(self)}>" + + @property + def name(self) -> str: + return self._name + + @property + def value(self) -> int: + return int(self) diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_internal/cudla.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/cudla.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..78676249ef4a6bcc5082691be87c902e7684ef13 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/cudla.cpython-312-x86_64-linux-gnu.so differ diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_internal/cudla.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/cudla.pxd new file mode 100644 index 0000000000000000000000000000000000000000..52b1b777056ff2395f7efb26a0665bf2a8e5ab07 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/cudla.pxd @@ -0,0 +1,38 @@ +# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +# This code was automatically generated across versions from 1.5.0 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=6866708da9b12dc99b597cd56196b66a1f2645198821b572326bb0858b5906d3 + + +# <<<< PREAMBLE CONTENT >>>> + +from libc.stdint cimport ( + uint32_t, + uint64_t, + uint8_t, +) + + +# <<<< END OF PREAMBLE CONTENT >>>> + +from ..cycudla cimport * + + +############################################################################### +# Wrapper functions +############################################################################### + +cdef cudlaStatus _cudlaGetVersion(uint64_t* const version) except?_CUDLASTATUS_INTERNAL_LOADING_ERROR nogil +cdef cudlaStatus _cudlaDeviceGetCount(uint64_t* const pNumDevices) except?_CUDLASTATUS_INTERNAL_LOADING_ERROR nogil +cdef cudlaStatus _cudlaCreateDevice(const uint64_t device, cudlaDevHandle* const devHandle, const uint32_t flags) except?_CUDLASTATUS_INTERNAL_LOADING_ERROR nogil +cdef cudlaStatus _cudlaMemRegister(const cudlaDevHandle devHandle, const uint64_t* const ptr, const size_t size, uint64_t** const devPtr, const uint32_t flags) except?_CUDLASTATUS_INTERNAL_LOADING_ERROR nogil +cdef cudlaStatus _cudlaModuleLoadFromMemory(const cudlaDevHandle devHandle, const uint8_t* const pModule, const size_t moduleSize, cudlaModule* const hModule, const uint32_t flags) except?_CUDLASTATUS_INTERNAL_LOADING_ERROR nogil +cdef cudlaStatus _cudlaModuleGetAttributes(const cudlaModule hModule, const cudlaModuleAttributeType attrType, cudlaModuleAttribute* const attribute) except?_CUDLASTATUS_INTERNAL_LOADING_ERROR nogil +cdef cudlaStatus _cudlaModuleUnload(const cudlaModule hModule, const uint32_t flags) except?_CUDLASTATUS_INTERNAL_LOADING_ERROR nogil +cdef cudlaStatus _cudlaSubmitTask(const cudlaDevHandle devHandle, const cudlaTask* const ptrToTasks, const uint32_t numTasks, void* const stream, const uint32_t flags) except?_CUDLASTATUS_INTERNAL_LOADING_ERROR nogil +cdef cudlaStatus _cudlaDeviceGetAttribute(const cudlaDevHandle devHandle, const cudlaDevAttributeType attrib, cudlaDevAttribute* const pAttribute) except?_CUDLASTATUS_INTERNAL_LOADING_ERROR nogil +cdef cudlaStatus _cudlaMemUnregister(const cudlaDevHandle devHandle, const uint64_t* const devPtr) except?_CUDLASTATUS_INTERNAL_LOADING_ERROR nogil +cdef cudlaStatus _cudlaGetLastError(const cudlaDevHandle devHandle) except?_CUDLASTATUS_INTERNAL_LOADING_ERROR nogil +cdef cudlaStatus _cudlaDestroyDevice(const cudlaDevHandle devHandle) except?_CUDLASTATUS_INTERNAL_LOADING_ERROR nogil +cdef cudlaStatus _cudlaSetTaskTimeoutInMs(const cudlaDevHandle devHandle, const uint32_t timeout) except?_CUDLASTATUS_INTERNAL_LOADING_ERROR nogil diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_internal/cufile.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/cufile.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..7d21f29e79b3da1ea3799e3265dfe917980c65ba --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/cufile.cpython-312-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8472d815943e4fbb53fc0fd58730af6f8a09696edcdf68317dea5dae626d2681 +size 111664 diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_internal/cufile.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/cufile.pxd new file mode 100644 index 0000000000000000000000000000000000000000..9754670ed67f63b349f5617f2867e6f7b39aa31f --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/cufile.pxd @@ -0,0 +1,67 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This code was automatically generated across versions from 12.9.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ce1a8b4cfbbc98d5a6e7975adbfa4e5be9f62da604eb3841691dc555b4b72e76 + + +# <<<< PREAMBLE CONTENT >>>> + +from libcpp cimport bool as _cyb_bool + + +# <<<< END OF PREAMBLE CONTENT >>>> + +from ..cycufile cimport * + + +############################################################################### +# Wrapper functions +############################################################################### + +cdef CUfileError_t _cuFileHandleRegister(CUfileHandle_t* fh, CUfileDescr_t* descr) except?CUFILE_LOADING_ERROR nogil +cdef void _cuFileHandleDeregister(CUfileHandle_t fh) except* nogil +cdef CUfileError_t _cuFileBufRegister(const void* bufPtr_base, size_t length, int flags) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileBufDeregister(const void* bufPtr_base) except?CUFILE_LOADING_ERROR nogil +cdef ssize_t _cuFileRead(CUfileHandle_t fh, void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil +cdef ssize_t _cuFileWrite(CUfileHandle_t fh, const void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil +cdef CUfileError_t _cuFileDriverOpen() except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileDriverClose() except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileDriverClose_v2() except?CUFILE_LOADING_ERROR nogil +cdef long _cuFileUseCount() except* nogil +cdef CUfileError_t _cuFileDriverGetProperties(CUfileDrvProps_t* props) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileDriverSetPollMode(_cyb_bool poll, size_t poll_threshold_size) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileDriverSetMaxDirectIOSize(size_t max_direct_io_size) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileDriverSetMaxCacheSize(size_t max_cache_size) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileDriverSetMaxPinnedMemSize(size_t max_pinned_size) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileBatchIOSetUp(CUfileBatchHandle_t* batch_idp, unsigned nr) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileBatchIOSubmit(CUfileBatchHandle_t batch_idp, unsigned nr, CUfileIOParams_t* iocbp, unsigned int flags) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileBatchIOGetStatus(CUfileBatchHandle_t batch_idp, unsigned min_nr, unsigned* nr, CUfileIOEvents_t* iocbp, timespec* timeout) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileBatchIOCancel(CUfileBatchHandle_t batch_idp) except?CUFILE_LOADING_ERROR nogil +cdef void _cuFileBatchIODestroy(CUfileBatchHandle_t batch_idp) except* nogil +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?CUFILE_LOADING_ERROR nogil +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?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileStreamRegister(CUstream stream, unsigned flags) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileStreamDeregister(CUstream stream) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileGetVersion(int* version) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileGetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t* value) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileGetParameterBool(CUFileBoolConfigParameter_t param, _cyb_bool* value) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileGetParameterString(CUFileStringConfigParameter_t param, char* desc_str, int len) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileSetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t value) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileSetParameterBool(CUFileBoolConfigParameter_t param, _cyb_bool value) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileSetParameterString(CUFileStringConfigParameter_t param, const char* desc_str) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileGetParameterMinMaxValue(CUFileSizeTConfigParameter_t param, size_t* min_value, size_t* max_value) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileSetStatsLevel(int level) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileGetStatsLevel(int* level) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileStatsStart() except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileStatsStop() except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileStatsReset() except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileGetStatsL1(CUfileStatsLevel1_t* stats) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileGetStatsL2(CUfileStatsLevel2_t* stats) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileGetStatsL3(CUfileStatsLevel3_t* stats) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileGetBARSizeInKB(int gpuIndex, size_t* barSize) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileSetParameterPosixPoolSlabArray(const size_t* size_values, const size_t* count_values, int len) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileGetParameterPosixPoolSlabArray(size_t* size_values, size_t* count_values, int len) except?CUFILE_LOADING_ERROR nogil +cdef ssize_t _cuFileReadv(CUfileHandle_t fh, const CUfileIOVec_t* iov, size_t iovcnt, off_t file_offset, unsigned flags) except* nogil +cdef ssize_t _cuFileWritev(CUfileHandle_t fh, const CUfileIOVec_t* iov, size_t iovcnt, off_t file_offset, unsigned flags) except* nogil diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_internal/driver.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/driver.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..a5984429e9fd8cb1e6d1422a2038ce3052deb239 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/driver.cpython-312-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99ce62570a4f01fa7833cc82c1f46127f3b3a1a94e7076e966cac5fa763d7b08 +size 590672 diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_internal/driver.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/driver.pxd new file mode 100644 index 0000000000000000000000000000000000000000..d44e4b612bb981c96c574a3079452b6c04680d8d --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/driver.pxd @@ -0,0 +1,538 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. + +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b45f017467bf91c9ba21a48072bd362bdf84509c674379435823618c2aebc954 +from ..cydriver cimport * + + +############################################################################### +# Wrapper functions +############################################################################### + +cdef CUresult _cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGetErrorName(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuInit(unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDriverGetVersion(int* driverVersion) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceGet(CUdevice* device, int ordinal) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceGetCount(int* count) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceGetName(char* name, int len, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceTotalMem_v2(size_t* bytes, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format format, unsigned numChannels, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType type, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDevicePrimaryCtxRelease_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDevicePrimaryCtxSetFlags_v2(CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDevicePrimaryCtxReset_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxCreate_v2(CUcontext* pctx, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxCreate_v4(CUcontext* pctx, CUctxCreateParams* ctxCreateParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxDestroy_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxPushCurrent_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxPopCurrent_v2(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxSetCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxGetCurrent(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxGetDevice(CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxGetFlags(unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxSetFlags(unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxGetId(CUcontext ctx, unsigned long long* ctxId) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxSynchronize() except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxSetLimit(CUlimit limit, size_t value) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxGetLimit(size_t* pvalue, CUlimit limit) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxGetCacheConfig(CUfunc_cache* pconfig) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxSetCacheConfig(CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxResetPersistingL2Cache() except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType type) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxRecordEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxWaitEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxAttach(CUcontext* pctx, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxDetach(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxSetSharedMemConfig(CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuModuleLoad(CUmodule* module, const char* fname) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuModuleLoadData(CUmodule* module, const void* image) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuModuleUnload(CUmodule hmod) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuModuleGetFunctionCount(unsigned int* count, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuModuleEnumerateFunctions(CUfunction* functions, unsigned int numFunctions, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuModuleGetGlobal_v2(CUdeviceptr* dptr, size_t* bytes, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLinkCreate_v2(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLinkAddData_v2(CUlinkState state, CUjitInputType type, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLinkAddFile_v2(CUlinkState state, CUjitInputType type, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLinkDestroy(CUlinkState state) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLibraryLoadData(CUlibrary* library, const void* code, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLibraryLoadFromFile(CUlibrary* library, const char* fileName, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLibraryUnload(CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLibraryGetKernel(CUkernel* pKernel, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLibraryGetKernelCount(unsigned int* count, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLibraryEnumerateKernels(CUkernel* kernels, unsigned int numKernels, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLibraryGetModule(CUmodule* pMod, CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuKernelGetFunction(CUfunction* pFunc, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuKernelGetLibrary(CUlibrary* pLib, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLibraryGetGlobal(CUdeviceptr* dptr, size_t* bytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLibraryGetManaged(CUdeviceptr* dptr, size_t* bytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLibraryGetUnifiedFunction(void** fptr, CUlibrary library, const char* symbol) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuKernelGetAttribute(int* pi, CUfunction_attribute attrib, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuKernelSetAttribute(CUfunction_attribute attrib, int val, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuKernelSetCacheConfig(CUkernel kernel, CUfunc_cache config, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuKernelGetName(const char** name, CUkernel hfunc) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuKernelGetParamInfo(CUkernel kernel, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemGetInfo_v2(size_t* free, size_t* total) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemAlloc_v2(CUdeviceptr* dptr, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemAllocPitch_v2(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemFree_v2(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemGetAddressRange_v2(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemAllocHost_v2(void** pp, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemFreeHost(void* p) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemHostGetDevicePointer_v2(CUdeviceptr* pdptr, void* p, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemHostGetFlags(unsigned int* pFlags, void* p) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceRegisterAsyncNotification(CUdevice device, CUasyncCallback callbackFunc, void* userData, CUasyncCallbackHandle* callback) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceUnregisterAsyncNotification(CUdevice device, CUasyncCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceGetPCIBusId(char* pciBusId, int len, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuIpcOpenMemHandle_v2(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuIpcCloseMemHandle(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemHostRegister_v2(void* p, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemHostUnregister(void* p) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemcpyHtoD_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemcpyDtoH_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemcpyDtoD_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemcpyDtoA_v2(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemcpyAtoD_v2(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemcpyHtoA_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemcpyAtoH_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemcpyAtoA_v2(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemcpy2D_v2(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemcpy2DUnaligned_v2(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemcpy3D_v2(const CUDA_MEMCPY3D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemcpyHtoDAsync_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemcpyDtoHAsync_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemcpyDtoDAsync_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemcpyHtoAAsync_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemcpyAtoHAsync_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemcpy2DAsync_v2(const CUDA_MEMCPY2D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemcpy3DAsync_v2(const CUDA_MEMCPY3D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemsetD8_v2(CUdeviceptr dstDevice, unsigned char uc, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemsetD16_v2(CUdeviceptr dstDevice, unsigned short us, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemsetD32_v2(CUdeviceptr dstDevice, unsigned int ui, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemsetD2D8_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemsetD2D16_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemsetD2D32_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemsetD2D8Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemsetD2D16Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemsetD2D32Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuArrayCreate_v2(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuArrayGetDescriptor_v2(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuArrayDestroy(CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuArray3DCreate_v2(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuArray3DGetDescriptor_v2(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemBatchDecompressAsync(CUmemDecompressParams* paramsArray, size_t count, unsigned int flags, size_t* errorIndex, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemAddressFree(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemRelease(CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemUnmap(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemPoolDestroy(CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMulticastCreate(CUmemGenericAllocationHandle* mcHandle, const CUmulticastObjectProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMulticastAddDevice(CUmemGenericAllocationHandle mcHandle, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMulticastBindMem(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUmemGenericAllocationHandle memHandle, size_t memOffset, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMulticastBindAddr(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUdeviceptr memptr, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMulticastUnbind(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMulticastGetGranularity(size_t* granularity, const CUmulticastObjectProp* prop, CUmulticastGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemPrefetchAsync_v2(CUdeviceptr devPtr, size_t count, CUmemLocation location, unsigned int flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemAdvise_v2(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUmemLocation location) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamCreate(CUstream* phStream, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamGetDevice(CUstream hStream, CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamGetId(CUstream hStream, unsigned long long* streamId) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamGetCtx(CUstream hStream, CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamGetCtx_v2(CUstream hStream, CUcontext* pCtx, CUgreenCtx* pGreenCtx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamBeginCapture_v2(CUstream hStream, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamBeginCaptureToGraph(CUstream hStream, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamGetCaptureInfo_v2(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamGetCaptureInfo_v3(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, const CUgraphEdgeData** edgeData_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamUpdateCaptureDependencies_v2(CUstream hStream, CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamQuery(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamSynchronize(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamDestroy_v2(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamCopyAttributes(CUstream dst, CUstream src) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuEventCreate(CUevent* phEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuEventRecord(CUevent hEvent, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuEventQuery(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuEventSynchronize(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuEventDestroy_v2(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuEventElapsedTime_v2(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDestroyExternalMemory(CUexternalMemory extMem) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDestroyExternalSemaphore(CUexternalSemaphore extSem) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamWaitValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamWaitValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamWriteValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamWriteValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamBatchMemOp_v2(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuFuncGetName(const char** name, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuFuncGetParamInfo(CUfunction func, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuFuncIsLoaded(CUfunctionLoadingState* state, CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuFuncLoad(CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLaunchKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLaunchCooperativeKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void** kernelParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuFuncSetSharedSize(CUfunction hfunc, unsigned int bytes) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuParamSetSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuParamSeti(CUfunction hfunc, int offset, unsigned int value) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuParamSetf(CUfunction hfunc, int offset, float value) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLaunch(CUfunction f) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLaunchGrid(CUfunction f, int grid_width, int grid_height) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphCreate(CUgraph* phGraph, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphAddKernelNode_v2(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphKernelNodeGetParams_v2(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphKernelNodeSetParams_v2(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphAddMemsetNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphAddHostNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphAddExternalSemaphoresSignalNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphAddExternalSemaphoresWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphAddBatchMemOpNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphAddMemAllocNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceGraphMemTrim(CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* type) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphGetEdges_v2(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, CUgraphEdgeData* edgeData, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphNodeGetDependencies_v2(CUgraphNode hNode, CUgraphNode* dependencies, CUgraphEdgeData* edgeData, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphNodeGetDependentNodes_v2(CUgraphNode hNode, CUgraphNode* dependentNodes, CUgraphEdgeData* edgeData, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphAddDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphRemoveDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphDestroyNode(CUgraphNode hNode) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphInstantiateWithFlags(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphInstantiateWithParams(CUgraphExec* phGraphExec, CUgraph hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS* instantiateParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphExecGetFlags(CUgraphExec hGraphExec, cuuint64_t* flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphExecKernelNodeSetParams_v2(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphExecDestroy(CUgraphExec hGraphExec) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphDestroy(CUgraph hGraph) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphExecUpdate_v2(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphExecUpdateResultInfo* resultInfo) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuUserObjectRetain(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuUserObjectRelease(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphAddNode_v2(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphNodeSetParams(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphExecNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphConditionalHandleCreate(CUgraphConditionalHandle* pHandle_out, CUgraph hGraph, CUcontext ctx, unsigned int defaultLaunchValue, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuOccupancyMaxPotentialBlockSizeWithFlags(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexRefSetAddress_v2(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t bytes) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexRefSetAddress2D_v3(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexRefGetAddress_v2(CUdeviceptr* pdptr, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexRefCreate(CUtexref* pTexRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexRefDestroy(CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexObjectDestroy(CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuSurfObjectDestroy(CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTensorMapEncodeTiled(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, const cuuint32_t* boxDim, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTensorMapEncodeIm2col(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, const int* pixelBoxLowerCorner, const int* pixelBoxUpperCorner, cuuint32_t channelsPerPixel, cuuint32_t pixelsPerColumn, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTensorMapEncodeIm2colWide(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, int pixelBoxLowerCornerWidth, int pixelBoxUpperCornerWidth, cuuint32_t channelsPerPixel, cuuint32_t pixelsPerColumn, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapIm2ColWideMode mode, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxDisablePeerAccess(CUcontext peerContext) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphicsUnregisterResource(CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphicsResourceGetMappedPointer_v2(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphicsResourceSetMapFlags_v2(CUgraphicsResource resource, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGetProcAddress_v2(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags, CUdriverProcAddressQueryResult* symbolStatus) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCoredumpGetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCoredumpGetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCoredumpSetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCoredumpSetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGreenCtxCreate(CUgreenCtx* phCtx, CUdevResourceDesc desc, CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGreenCtxDestroy(CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxFromGreenCtx(CUcontext* pContext, CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceGetDevResource(CUdevice device, CUdevResource* resource, CUdevResourceType type) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxGetDevResource(CUcontext hCtx, CUdevResource* resource, CUdevResourceType type) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGreenCtxGetDevResource(CUgreenCtx hCtx, CUdevResource* resource, CUdevResourceType type) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDevSmResourceSplitByCount(CUdevResource* result, unsigned int* nbGroups, const CUdevResource* input, CUdevResource* remainder, unsigned int flags, unsigned int minCount) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDevResourceGenerateDesc(CUdevResourceDesc* phDesc, CUdevResource* resources, unsigned int nbResources) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGreenCtxRecordEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGreenCtxWaitEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamGetGreenCtx(CUstream hStream, CUgreenCtx* phCtx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGreenCtxStreamCreate(CUstream* phStream, CUgreenCtx greenCtx, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLogsRegisterCallback(CUlogsCallback callbackFunc, void* userData, CUlogsCallbackHandle* callback_out) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLogsUnregisterCallback(CUlogsCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLogsCurrent(CUlogIterator* iterator_out, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLogsDumpToFile(CUlogIterator* iterator, const char* pathToFile, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLogsDumpToMemory(CUlogIterator* iterator, char* buffer, size_t* size, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCheckpointProcessGetRestoreThreadId(int pid, int* tid) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCheckpointProcessGetState(int pid, CUprocessState* state) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCheckpointProcessLock(int pid, CUcheckpointLockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCheckpointProcessCheckpoint(int pid, CUcheckpointCheckpointArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCheckpointProcessRestore(int pid, CUcheckpointRestoreArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCheckpointProcessUnlock(int pid, CUcheckpointUnlockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGLGetDevices_v2(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGLCtxCreate_v2(CUcontext* pCtx, unsigned int Flags, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGLInit() except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGLRegisterBufferObject(GLuint buffer) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGLMapBufferObject_v2(CUdeviceptr* dptr, size_t* size, GLuint buffer) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGLUnmapBufferObject(GLuint buffer) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGLUnregisterBufferObject(GLuint buffer) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGLSetBufferObjectMapFlags(GLuint buffer, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGLMapBufferObjectAsync_v2(CUdeviceptr* dptr, size_t* size, GLuint buffer, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGLUnmapBufferObjectAsync(GLuint buffer, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuProfilerInitialize(const char* configFile, const char* outputFile, CUoutput_mode outputMode) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuProfilerStop() except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuVDPAUCtxCreate_v2(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceGetHostAtomicCapabilities(unsigned int* capabilities, const CUatomicOperation* operations, unsigned int count, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxGetDevice_v2(CUdevice* device, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxSynchronize_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemcpyBatchAsync_v2(CUdeviceptr* dsts, CUdeviceptr* srcs, size_t* sizes, size_t count, CUmemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemcpy3DBatchAsync_v2(size_t numOps, CUDA_MEMCPY3D_BATCH_OP* opList, unsigned long long flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemGetDefaultMemPool(CUmemoryPool* pool_out, CUmemLocation* location, CUmemAllocationType type) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemGetMemPool(CUmemoryPool* pool, CUmemLocation* location, CUmemAllocationType type) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemSetMemPool(CUmemLocation* location, CUmemAllocationType type, CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemPrefetchBatchAsync(CUdeviceptr* dptrs, size_t* sizes, size_t count, CUmemLocation* prefetchLocs, size_t* prefetchLocIdxs, size_t numPrefetchLocs, unsigned long long flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemDiscardBatchAsync(CUdeviceptr* dptrs, size_t* sizes, size_t count, unsigned long long flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemDiscardAndPrefetchBatchAsync(CUdeviceptr* dptrs, size_t* sizes, size_t count, CUmemLocation* prefetchLocs, size_t* prefetchLocIdxs, size_t numPrefetchLocs, unsigned long long flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceGetP2PAtomicCapabilities(unsigned int* capabilities, const CUatomicOperation* operations, unsigned int count, CUdevice srcDevice, CUdevice dstDevice) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGreenCtxGetId(CUgreenCtx greenCtx, unsigned long long* greenCtxId) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMulticastBindMem_v2(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, CUmemGenericAllocationHandle memHandle, size_t memOffset, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMulticastBindAddr_v2(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, CUdeviceptr memptr, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphNodeGetContainingGraph(CUgraphNode hNode, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphNodeGetLocalId(CUgraphNode hNode, unsigned int* nodeId) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphNodeGetToolsId(CUgraphNode hNode, unsigned long long* toolsNodeId) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphGetId(CUgraph hGraph, unsigned int* graphId) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphExecGetId(CUgraphExec hGraphExec, unsigned int* graphId) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDevSmResourceSplit(CUdevResource* result, unsigned int nbGroups, const CUdevResource* input, CUdevResource* remainder, unsigned int flags, CU_DEV_SM_RESOURCE_GROUP_PARAMS* groupParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamGetDevResource(CUstream hStream, CUdevResource* resource, CUdevResourceType type) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuKernelGetParamCount(CUkernel kernel, size_t* paramCount) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemcpyWithAttributesAsync(CUdeviceptr dst, CUdeviceptr src, size_t size, CUmemcpyAttributes* attr, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemcpy3DWithAttributesAsync(CUDA_MEMCPY3D_BATCH_OP* op, unsigned long long flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamBeginCaptureToCig(CUstream hStream, CUstreamCigCaptureParams* streamCigCaptureParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamEndCaptureToCig(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuFuncGetParamCount(CUfunction func, size_t* paramCount) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLaunchHostFunc_v2(CUstream hStream, CUhostFn fn, void* userData, unsigned int syncMode) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphNodeGetParams(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCoredumpRegisterStartCallback(CUcoredumpStatusCallback callback, void* userData, CUcoredumpCallbackHandle* callbackOut) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCoredumpRegisterCompleteCallback(CUcoredumpStatusCallback callback, void* userData, CUcoredumpCallbackHandle* callbackOut) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCoredumpDeregisterStartCallback(CUcoredumpCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCoredumpDeregisterCompleteCallback(CUcoredumpCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLogicalEndpointIdReserve(CUlogicalEndpointId* baseLeId, cuuint32_t count) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLogicalEndpointIdRelease(CUlogicalEndpointId baseLeId, cuuint32_t count) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLogicalEndpointCreate(CUlogicalEndpointId leId, const CUlogicalEndpointProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLogicalEndpointAddDevice(CUlogicalEndpointId leId, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLogicalEndpointDestroy(CUlogicalEndpointId leId) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLogicalEndpointBindAddr(CUlogicalEndpointId leId, CUdevice dev, cuuint64_t offset, void* ptr, cuuint64_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLogicalEndpointBindMem(CUlogicalEndpointId leId, CUdevice dev, cuuint64_t offset, CUmemGenericAllocationHandle memHandle, cuuint64_t memOffset, cuuint64_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLogicalEndpointUnbind(CUlogicalEndpointId leId, CUdevice dev, cuuint64_t offset, cuuint64_t size) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLogicalEndpointExport(void* handle, CUlogicalEndpointId leId, CUlogicalEndpointIpcHandleType handleType) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLogicalEndpointImport(CUlogicalEndpointId leId, const void* handle, CUlogicalEndpointIpcHandleType handleType) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLogicalEndpointGetLimits(cuuint64_t* bindAlignment, cuuint64_t* maxSize, const CUlogicalEndpointProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuLogicalEndpointQuery(CUlogicalEndpointId leId, cuuint32_t count, int* queryStatus) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamBeginRecaptureToGraph(CUstream hStream, CUstreamCaptureMode mode, CUgraph hGraph, CUgraphRecaptureCallback callbackFunc, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceGetFabricClusterUuid(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceGetCliqueCount(size_t* count, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceGetCliqueInfo(CUcliqueInfo* cliqueInfo, size_t* count, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemGetLocationInfo(CUdeviceptr ptr, size_t size, size_t summaryGranularity, size_t samplingGranularity, CUmemLocation* location_out) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphAddNode_v3(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphNodeSetParams_v2(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCheckpointOperationComplete(CUcheckpointOperationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvfatbin.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvfatbin.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..a8bd9a83b4570b3cd66ada6e485e0dfebb19be7e Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvfatbin.cpython-312-x86_64-linux-gnu.so differ diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvfatbin.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvfatbin.pxd new file mode 100644 index 0000000000000000000000000000000000000000..4eadeab01c899c5e9b42336d2cc1384265d7a606 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvfatbin.pxd @@ -0,0 +1,26 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This code was automatically generated across versions from 12.4.1 to 13.4.1. Do not modify it directly. + +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=4fc8b05be8a1a25737a1940a53339f6af3b7a1d4e513558109aaac48b3222681 +from ..cynvfatbin cimport * + + +############################################################################### +# Wrapper functions +############################################################################### + +cdef const char* _nvFatbinGetErrorString(nvFatbinResult result) except?NULL nogil +cdef nvFatbinResult _nvFatbinCreate(nvFatbinHandle* handle_indirect, const char** options, size_t optionsCount) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvFatbinResult _nvFatbinDestroy(nvFatbinHandle* handle_indirect) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvFatbinResult _nvFatbinAddPTX(nvFatbinHandle handle, const char* code, size_t size, const char* arch, const char* identifier, const char* optionsCmdLine) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvFatbinResult _nvFatbinAddCubin(nvFatbinHandle handle, const void* code, size_t size, const char* arch, const char* identifier) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvFatbinResult _nvFatbinAddLTOIR(nvFatbinHandle handle, const void* code, size_t size, const char* arch, const char* identifier, const char* optionsCmdLine) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvFatbinResult _nvFatbinSize(nvFatbinHandle handle, size_t* size) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvFatbinResult _nvFatbinGet(nvFatbinHandle handle, void* buffer) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvFatbinResult _nvFatbinVersion(unsigned int* major, unsigned int* minor) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvFatbinResult _nvFatbinAddIndex(nvFatbinHandle handle, const void* code, size_t size, const char* identifier) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvFatbinResult _nvFatbinAddReloc(nvFatbinHandle handle, const void* code, size_t size) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvFatbinResult _nvFatbinAddTileIR(nvFatbinHandle handle, const void* code, size_t size, const char* identifier, const char* optionsCmdLine) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvjitlink.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvjitlink.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..89f1dbd09c4643433cdaab76dcf04bdf243f414a Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvjitlink.cpython-312-x86_64-linux-gnu.so differ diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvjitlink.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvjitlink.pxd new file mode 100644 index 0000000000000000000000000000000000000000..bb1419ae94691a232fa0d5715935b4419f71ce84 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvjitlink.pxd @@ -0,0 +1,38 @@ +# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This code was automatically generated across versions from 12.0.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=f54caf5830f0b76772ca6e06487bc94eef354c725f6e6f3c908b993860ba6787 + + +# <<<< PREAMBLE CONTENT >>>> + +from libc.stdint cimport uint32_t + + +# <<<< END OF PREAMBLE CONTENT >>>> + +from ..cynvjitlink cimport * + + +############################################################################### +# Wrapper functions +############################################################################### + +cdef nvJitLinkResult _nvJitLinkCreate(nvJitLinkHandle* handle, uint32_t numOptions, const char** options) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult _nvJitLinkDestroy(nvJitLinkHandle* handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult _nvJitLinkAddData(nvJitLinkHandle handle, nvJitLinkInputType inputType, const void* data, size_t size, const char* name) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult _nvJitLinkAddFile(nvJitLinkHandle handle, nvJitLinkInputType inputType, const char* fileName) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult _nvJitLinkComplete(nvJitLinkHandle handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult _nvJitLinkGetLinkedCubinSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult _nvJitLinkGetLinkedCubin(nvJitLinkHandle handle, void* cubin) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult _nvJitLinkGetLinkedPtxSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult _nvJitLinkGetLinkedPtx(nvJitLinkHandle handle, char* ptx) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult _nvJitLinkGetErrorLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult _nvJitLinkGetErrorLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult _nvJitLinkGetInfoLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult _nvJitLinkGetInfoLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult _nvJitLinkVersion(unsigned int* major, unsigned int* minor) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult _nvJitLinkGetLinkedLTOIRSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult _nvJitLinkGetLinkedLTOIR(nvJitLinkHandle handle, void* ltoir) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvml.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvml.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..c71b2ca3f43f39c99e67f7ed2450a9d19364944f --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvml.cpython-312-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a813eb5b0490b57fea2634f5bbc02dbe8c9a28a4809ac29e18ac4d7538ee201a +size 458320 diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvml.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvml.pxd new file mode 100644 index 0000000000000000000000000000000000000000..11504e0f41d66e574cfb536ef1c867213456be4b --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvml.pxd @@ -0,0 +1,384 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This code was automatically generated across versions from 12.9.1 to 13.4.1. Do not modify it directly. + +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=25a9a64fc7aed96ba4ab9be2bd7b2c8c2b464e7d8fb7dab7b2dd85b32da0efe3 +from ..cynvml cimport * + + +############################################################################### +# Wrapper functions +############################################################################### + +cdef nvmlReturn_t _nvmlInit_v2() except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlInitWithFlags(unsigned int flags) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlShutdown() except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef const char* _nvmlErrorString(nvmlReturn_t result) except?NULL nogil +cdef nvmlReturn_t _nvmlSystemGetDriverVersion(char* version, unsigned int length) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlSystemGetNVMLVersion(char* version, unsigned int length) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlSystemGetCudaDriverVersion(int* cudaDriverVersion) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlSystemGetCudaDriverVersion_v2(int* cudaDriverVersion) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlSystemGetProcessName(unsigned int pid, char* name, unsigned int length) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlSystemGetHicVersion(unsigned int* hwbcCount, nvmlHwbcEntry_t* hwbcEntries) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlSystemGetTopologyGpuSet(unsigned int cpuNumber, unsigned int* count, nvmlDevice_t* deviceArray) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlSystemGetDriverBranch(nvmlSystemDriverBranchInfo_t* branchInfo, unsigned int length) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlUnitGetCount(unsigned int* unitCount) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlUnitGetHandleByIndex(unsigned int index, nvmlUnit_t* unit) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlUnitGetUnitInfo(nvmlUnit_t unit, nvmlUnitInfo_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlUnitGetLedState(nvmlUnit_t unit, nvmlLedState_t* state) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlUnitGetPsuInfo(nvmlUnit_t unit, nvmlPSUInfo_t* psu) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlUnitGetTemperature(nvmlUnit_t unit, unsigned int type, unsigned int* temp) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlUnitGetFanSpeedInfo(nvmlUnit_t unit, nvmlUnitFanSpeeds_t* fanSpeeds) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlUnitGetDevices(nvmlUnit_t unit, unsigned int* deviceCount, nvmlDevice_t* devices) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetCount_v2(unsigned int* deviceCount) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetAttributes_v2(nvmlDevice_t device, nvmlDeviceAttributes_t* attributes) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetHandleByIndex_v2(unsigned int index, nvmlDevice_t* device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetHandleBySerial(const char* serial, nvmlDevice_t* device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetHandleByUUID(const char* uuid, nvmlDevice_t* device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetHandleByUUIDV(const nvmlUUID_t* uuid, nvmlDevice_t* device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetHandleByPciBusId_v2(const char* pciBusId, nvmlDevice_t* device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetName(nvmlDevice_t device, char* name, unsigned int length) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetBrand(nvmlDevice_t device, nvmlBrandType_t* type) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetIndex(nvmlDevice_t device, unsigned int* index) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetSerial(nvmlDevice_t device, char* serial, unsigned int length) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetModuleId(nvmlDevice_t device, unsigned int* moduleId) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetC2cModeInfoV(nvmlDevice_t device, nvmlC2cModeInfo_v1_t* c2cModeInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetMemoryAffinity(nvmlDevice_t device, unsigned int nodeSetSize, unsigned long* nodeSet, nvmlAffinityScope_t scope) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetCpuAffinityWithinScope(nvmlDevice_t device, unsigned int cpuSetSize, unsigned long* cpuSet, nvmlAffinityScope_t scope) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetCpuAffinity(nvmlDevice_t device, unsigned int cpuSetSize, unsigned long* cpuSet) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetCpuAffinity(nvmlDevice_t device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceClearCpuAffinity(nvmlDevice_t device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetNumaNodeId(nvmlDevice_t device, unsigned int* node) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetTopologyCommonAncestor(nvmlDevice_t device1, nvmlDevice_t device2, nvmlGpuTopologyLevel_t* pathInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetTopologyNearestGpus(nvmlDevice_t device, nvmlGpuTopologyLevel_t level, unsigned int* count, nvmlDevice_t* deviceArray) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetP2PStatus(nvmlDevice_t device1, nvmlDevice_t device2, nvmlGpuP2PCapsIndex_t p2pIndex, nvmlGpuP2PStatus_t* p2pStatus) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetUUID(nvmlDevice_t device, char* uuid, unsigned int length) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetMinorNumber(nvmlDevice_t device, unsigned int* minorNumber) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetBoardPartNumber(nvmlDevice_t device, char* partNumber, unsigned int length) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetInforomVersion(nvmlDevice_t device, nvmlInforomObject_t object, char* version, unsigned int length) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetInforomImageVersion(nvmlDevice_t device, char* version, unsigned int length) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetInforomConfigurationChecksum(nvmlDevice_t device, unsigned int* checksum) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceValidateInforom(nvmlDevice_t device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetLastBBXFlushTime(nvmlDevice_t device, unsigned long long* timestamp, unsigned long* durationUs) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetDisplayMode(nvmlDevice_t device, nvmlEnableState_t* display) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetDisplayActive(nvmlDevice_t device, nvmlEnableState_t* isActive) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetPersistenceMode(nvmlDevice_t device, nvmlEnableState_t* mode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetPciInfoExt(nvmlDevice_t device, nvmlPciInfoExt_t* pci) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetPciInfo_v3(nvmlDevice_t device, nvmlPciInfo_t* pci) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetMaxPcieLinkGeneration(nvmlDevice_t device, unsigned int* maxLinkGen) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetGpuMaxPcieLinkGeneration(nvmlDevice_t device, unsigned int* maxLinkGenDevice) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetMaxPcieLinkWidth(nvmlDevice_t device, unsigned int* maxLinkWidth) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetCurrPcieLinkGeneration(nvmlDevice_t device, unsigned int* currLinkGen) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetCurrPcieLinkWidth(nvmlDevice_t device, unsigned int* currLinkWidth) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetPcieThroughput(nvmlDevice_t device, nvmlPcieUtilCounter_t counter, unsigned int* value) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetPcieReplayCounter(nvmlDevice_t device, unsigned int* value) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetClockInfo(nvmlDevice_t device, nvmlClockType_t type, unsigned int* clock) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetMaxClockInfo(nvmlDevice_t device, nvmlClockType_t type, unsigned int* clock) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetGpcClkVfOffset(nvmlDevice_t device, int* offset) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetClock(nvmlDevice_t device, nvmlClockType_t clockType, nvmlClockId_t clockId, unsigned int* clockMHz) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetMaxCustomerBoostClock(nvmlDevice_t device, nvmlClockType_t clockType, unsigned int* clockMHz) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetSupportedMemoryClocks(nvmlDevice_t device, unsigned int* count, unsigned int* clocksMHz) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetSupportedGraphicsClocks(nvmlDevice_t device, unsigned int memoryClockMHz, unsigned int* count, unsigned int* clocksMHz) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetAutoBoostedClocksEnabled(nvmlDevice_t device, nvmlEnableState_t* isEnabled, nvmlEnableState_t* defaultIsEnabled) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetFanSpeed(nvmlDevice_t device, unsigned int* speed) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetFanSpeed_v2(nvmlDevice_t device, unsigned int fan, unsigned int* speed) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetFanSpeedRPM(nvmlDevice_t device, nvmlFanSpeedInfo_t* fanSpeed) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetTargetFanSpeed(nvmlDevice_t device, unsigned int fan, unsigned int* targetSpeed) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetMinMaxFanSpeed(nvmlDevice_t device, unsigned int* minSpeed, unsigned int* maxSpeed) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetFanControlPolicy_v2(nvmlDevice_t device, unsigned int fan, nvmlFanControlPolicy_t* policy) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetNumFans(nvmlDevice_t device, unsigned int* numFans) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetCoolerInfo(nvmlDevice_t device, nvmlCoolerInfo_t* coolerInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetTemperatureV(nvmlDevice_t device, nvmlTemperature_t* temperature) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetTemperatureThreshold(nvmlDevice_t device, nvmlTemperatureThresholds_t thresholdType, unsigned int* temp) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetMarginTemperature(nvmlDevice_t device, nvmlMarginTemperature_t* marginTempInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetThermalSettings(nvmlDevice_t device, unsigned int sensorIndex, nvmlGpuThermalSettings_t* pThermalSettings) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetPerformanceState(nvmlDevice_t device, nvmlPstates_t* pState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetCurrentClocksEventReasons(nvmlDevice_t device, unsigned long long* clocksEventReasons) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetSupportedClocksEventReasons(nvmlDevice_t device, unsigned long long* supportedClocksEventReasons) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetPowerState(nvmlDevice_t device, nvmlPstates_t* pState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetDynamicPstatesInfo(nvmlDevice_t device, nvmlGpuDynamicPstatesInfo_t* pDynamicPstatesInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetMemClkVfOffset(nvmlDevice_t device, int* offset) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetMinMaxClockOfPState(nvmlDevice_t device, nvmlClockType_t type, nvmlPstates_t pstate, unsigned int* minClockMHz, unsigned int* maxClockMHz) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetSupportedPerformanceStates(nvmlDevice_t device, nvmlPstates_t* pstates, unsigned int size) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetGpcClkMinMaxVfOffset(nvmlDevice_t device, int* minOffset, int* maxOffset) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetMemClkMinMaxVfOffset(nvmlDevice_t device, int* minOffset, int* maxOffset) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetClockOffsets(nvmlDevice_t device, nvmlClockOffset_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetClockOffsets(nvmlDevice_t device, nvmlClockOffset_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetPerformanceModes(nvmlDevice_t device, nvmlDevicePerfModes_t* perfModes) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetCurrentClockFreqs(nvmlDevice_t device, nvmlDeviceCurrentClockFreqs_t* currentClockFreqs) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetPowerManagementLimit(nvmlDevice_t device, unsigned int* limit) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetPowerManagementLimitConstraints(nvmlDevice_t device, unsigned int* minLimit, unsigned int* maxLimit) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetPowerManagementDefaultLimit(nvmlDevice_t device, unsigned int* defaultLimit) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetPowerUsage(nvmlDevice_t device, unsigned int* power) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetTotalEnergyConsumption(nvmlDevice_t device, unsigned long long* energy) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetEnforcedPowerLimit(nvmlDevice_t device, unsigned int* limit) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetGpuOperationMode(nvmlDevice_t device, nvmlGpuOperationMode_t* current, nvmlGpuOperationMode_t* pending) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetMemoryInfo_v2(nvmlDevice_t device, nvmlMemory_v2_t* memory) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetComputeMode(nvmlDevice_t device, nvmlComputeMode_t* mode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetCudaComputeCapability(nvmlDevice_t device, int* major, int* minor) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetDramEncryptionMode(nvmlDevice_t device, nvmlDramEncryptionInfo_t* current, nvmlDramEncryptionInfo_t* pending) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetDramEncryptionMode(nvmlDevice_t device, const nvmlDramEncryptionInfo_t* dramEncryption) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetEccMode(nvmlDevice_t device, nvmlEnableState_t* current, nvmlEnableState_t* pending) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetDefaultEccMode(nvmlDevice_t device, nvmlEnableState_t* defaultMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetBoardId(nvmlDevice_t device, unsigned int* boardId) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetMultiGpuBoard(nvmlDevice_t device, unsigned int* multiGpuBool) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetTotalEccErrors(nvmlDevice_t device, nvmlMemoryErrorType_t errorType, nvmlEccCounterType_t counterType, unsigned long long* eccCounts) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetMemoryErrorCounter(nvmlDevice_t device, nvmlMemoryErrorType_t errorType, nvmlEccCounterType_t counterType, nvmlMemoryLocation_t locationType, unsigned long long* count) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetUtilizationRates(nvmlDevice_t device, nvmlUtilization_t* utilization) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetEncoderUtilization(nvmlDevice_t device, unsigned int* utilization, unsigned int* samplingPeriodUs) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetEncoderCapacity(nvmlDevice_t device, nvmlEncoderType_t encoderQueryType, unsigned int* encoderCapacity) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetEncoderStats(nvmlDevice_t device, unsigned int* sessionCount, unsigned int* averageFps, unsigned int* averageLatency) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetEncoderSessions(nvmlDevice_t device, unsigned int* sessionCount, nvmlEncoderSessionInfo_t* sessionInfos) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetDecoderUtilization(nvmlDevice_t device, unsigned int* utilization, unsigned int* samplingPeriodUs) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetJpgUtilization(nvmlDevice_t device, unsigned int* utilization, unsigned int* samplingPeriodUs) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetOfaUtilization(nvmlDevice_t device, unsigned int* utilization, unsigned int* samplingPeriodUs) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetFBCStats(nvmlDevice_t device, nvmlFBCStats_t* fbcStats) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetFBCSessions(nvmlDevice_t device, unsigned int* sessionCount, nvmlFBCSessionInfo_t* sessionInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetDriverModel_v2(nvmlDevice_t device, nvmlDriverModel_t* current, nvmlDriverModel_t* pending) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetVbiosVersion(nvmlDevice_t device, char* version, unsigned int length) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetBridgeChipInfo(nvmlDevice_t device, nvmlBridgeChipHierarchy_t* bridgeHierarchy) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetComputeRunningProcesses_v3(nvmlDevice_t device, unsigned int* infoCount, nvmlProcessInfo_t* infos) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetGraphicsRunningProcesses_v3(nvmlDevice_t device, unsigned int* infoCount, nvmlProcessInfo_t* infos) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetMPSComputeRunningProcesses_v3(nvmlDevice_t device, unsigned int* infoCount, nvmlProcessInfo_t* infos) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetRunningProcessDetailList(nvmlDevice_t device, nvmlProcessDetailList_t* plist) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceOnSameBoard(nvmlDevice_t device1, nvmlDevice_t device2, int* onSameBoard) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetAPIRestriction(nvmlDevice_t device, nvmlRestrictedAPI_t apiType, nvmlEnableState_t* isRestricted) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetSamples(nvmlDevice_t device, nvmlSamplingType_t type, unsigned long long lastSeenTimeStamp, nvmlValueType_t* sampleValType, unsigned int* sampleCount, nvmlSample_t* samples) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetBAR1MemoryInfo(nvmlDevice_t device, nvmlBAR1Memory_t* bar1Memory) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetIrqNum(nvmlDevice_t device, unsigned int* irqNum) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetNumGpuCores(nvmlDevice_t device, unsigned int* numCores) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetPowerSource(nvmlDevice_t device, nvmlPowerSource_t* powerSource) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetMemoryBusWidth(nvmlDevice_t device, unsigned int* busWidth) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetPcieLinkMaxSpeed(nvmlDevice_t device, unsigned int* maxSpeed) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetPcieSpeed(nvmlDevice_t device, unsigned int* pcieSpeed) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetAdaptiveClockInfoStatus(nvmlDevice_t device, unsigned int* adaptiveClockStatus) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetBusType(nvmlDevice_t device, nvmlBusType_t* type) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetGpuFabricInfoV(nvmlDevice_t device, nvmlGpuFabricInfoV_t* gpuFabricInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlSystemGetConfComputeCapabilities(nvmlConfComputeSystemCaps_t* capabilities) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlSystemGetConfComputeState(nvmlConfComputeSystemState_t* state) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetConfComputeMemSizeInfo(nvmlDevice_t device, nvmlConfComputeMemSizeInfo_t* memInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlSystemGetConfComputeGpusReadyState(unsigned int* isAcceptingWork) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetConfComputeProtectedMemoryUsage(nvmlDevice_t device, nvmlMemory_t* memory) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetConfComputeGpuCertificate(nvmlDevice_t device, nvmlConfComputeGpuCertificate_t* gpuCert) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetConfComputeGpuAttestationReport(nvmlDevice_t device, nvmlConfComputeGpuAttestationReport_t* gpuAtstReport) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlSystemGetConfComputeKeyRotationThresholdInfo(nvmlConfComputeGetKeyRotationThresholdInfo_t* pKeyRotationThrInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetConfComputeUnprotectedMemSize(nvmlDevice_t device, unsigned long long sizeKiB) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlSystemSetConfComputeGpusReadyState(unsigned int isAcceptingWork) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlSystemSetConfComputeKeyRotationThresholdInfo(nvmlConfComputeSetKeyRotationThresholdInfo_t* pKeyRotationThrInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlSystemGetConfComputeSettings(nvmlSystemConfComputeSettings_t* settings) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetGspFirmwareVersion(nvmlDevice_t device, char* version) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetGspFirmwareMode(nvmlDevice_t device, unsigned int* isEnabled, unsigned int* defaultMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetSramEccErrorStatus(nvmlDevice_t device, nvmlEccSramErrorStatus_t* status) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetAccountingMode(nvmlDevice_t device, nvmlEnableState_t* mode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetAccountingStats(nvmlDevice_t device, unsigned int pid, nvmlAccountingStats_t* stats) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetAccountingPids(nvmlDevice_t device, unsigned int* count, unsigned int* pids) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetAccountingBufferSize(nvmlDevice_t device, unsigned int* bufferSize) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetRetiredPages(nvmlDevice_t device, nvmlPageRetirementCause_t cause, unsigned int* pageCount, unsigned long long* addresses) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetRetiredPages_v2(nvmlDevice_t device, nvmlPageRetirementCause_t cause, unsigned int* pageCount, unsigned long long* addresses, unsigned long long* timestamps) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetRetiredPagesPendingStatus(nvmlDevice_t device, nvmlEnableState_t* isPending) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetRemappedRows(nvmlDevice_t device, unsigned int* corrRows, unsigned int* uncRows, unsigned int* isPending, unsigned int* failureOccurred) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetRowRemapperHistogram(nvmlDevice_t device, nvmlRowRemapperHistogramValues_t* values) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetArchitecture(nvmlDevice_t device, nvmlDeviceArchitecture_t* arch) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetClkMonStatus(nvmlDevice_t device, nvmlClkMonStatus_t* status) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetProcessUtilization(nvmlDevice_t device, nvmlProcessUtilizationSample_t* utilization, unsigned int* processSamplesCount, unsigned long long lastSeenTimeStamp) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetProcessesUtilizationInfo(nvmlDevice_t device, nvmlProcessesUtilizationInfo_t* procesesUtilInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetPlatformInfo(nvmlDevice_t device, nvmlPlatformInfo_t* platformInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlUnitSetLedState(nvmlUnit_t unit, nvmlLedColor_t color) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetPersistenceMode(nvmlDevice_t device, nvmlEnableState_t mode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetComputeMode(nvmlDevice_t device, nvmlComputeMode_t mode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetEccMode(nvmlDevice_t device, nvmlEnableState_t ecc) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceClearEccErrorCounts(nvmlDevice_t device, nvmlEccCounterType_t counterType) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetDriverModel(nvmlDevice_t device, nvmlDriverModel_t driverModel, unsigned int flags) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetGpuLockedClocks(nvmlDevice_t device, unsigned int minGpuClockMHz, unsigned int maxGpuClockMHz) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceResetGpuLockedClocks(nvmlDevice_t device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetMemoryLockedClocks(nvmlDevice_t device, unsigned int minMemClockMHz, unsigned int maxMemClockMHz) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceResetMemoryLockedClocks(nvmlDevice_t device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetAutoBoostedClocksEnabled(nvmlDevice_t device, nvmlEnableState_t enabled) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetDefaultAutoBoostedClocksEnabled(nvmlDevice_t device, nvmlEnableState_t enabled, unsigned int flags) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetDefaultFanSpeed_v2(nvmlDevice_t device, unsigned int fan) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetFanControlPolicy(nvmlDevice_t device, unsigned int fan, nvmlFanControlPolicy_t policy) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetTemperatureThreshold(nvmlDevice_t device, nvmlTemperatureThresholds_t thresholdType, int* temp) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetGpuOperationMode(nvmlDevice_t device, nvmlGpuOperationMode_t mode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetAPIRestriction(nvmlDevice_t device, nvmlRestrictedAPI_t apiType, nvmlEnableState_t isRestricted) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetFanSpeed_v2(nvmlDevice_t device, unsigned int fan, unsigned int speed) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetAccountingMode(nvmlDevice_t device, nvmlEnableState_t mode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceClearAccountingPids(nvmlDevice_t device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetPowerManagementLimit_v2(nvmlDevice_t device, nvmlPowerValue_v2_t* powerValue) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetNvLinkState(nvmlDevice_t device, unsigned int link, nvmlEnableState_t* isActive) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetNvLinkVersion(nvmlDevice_t device, unsigned int link, unsigned int* version) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetNvLinkCapability(nvmlDevice_t device, unsigned int link, nvmlNvLinkCapability_t capability, unsigned int* capResult) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetNvLinkRemotePciInfo_v2(nvmlDevice_t device, unsigned int link, nvmlPciInfo_t* pci) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetNvLinkErrorCounter(nvmlDevice_t device, unsigned int link, nvmlNvLinkErrorCounter_t counter, unsigned long long* counterValue) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceResetNvLinkErrorCounters(nvmlDevice_t device, unsigned int link) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetNvLinkRemoteDeviceType(nvmlDevice_t device, unsigned int link, nvmlIntNvLinkDeviceType_t* pNvLinkDeviceType) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetNvLinkDeviceLowPowerThreshold(nvmlDevice_t device, nvmlNvLinkPowerThres_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlSystemSetNvlinkBwMode(unsigned int nvlinkBwMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlSystemGetNvlinkBwMode(unsigned int* nvlinkBwMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetNvlinkSupportedBwModes(nvmlDevice_t device, nvmlNvlinkSupportedBwModes_t* supportedBwMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetNvlinkBwMode(nvmlDevice_t device, nvmlNvlinkGetBwMode_t* getBwMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetNvlinkBwMode(nvmlDevice_t device, nvmlNvlinkSetBwMode_t* setBwMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlEventSetCreate(nvmlEventSet_t* set) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceRegisterEvents(nvmlDevice_t device, unsigned long long eventTypes, nvmlEventSet_t set) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetSupportedEventTypes(nvmlDevice_t device, unsigned long long* eventTypes) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlEventSetWait_v2(nvmlEventSet_t set, nvmlEventData_t* data, unsigned int timeoutms) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlEventSetFree(nvmlEventSet_t set) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlSystemEventSetCreate(nvmlSystemEventSetCreateRequest_t* request) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlSystemEventSetFree(nvmlSystemEventSetFreeRequest_t* request) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlSystemRegisterEvents(nvmlSystemRegisterEventRequest_t* request) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlSystemEventSetWait(nvmlSystemEventSetWaitRequest_t* request) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceModifyDrainState(nvmlPciInfo_t* pciInfo, nvmlEnableState_t newState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceQueryDrainState(nvmlPciInfo_t* pciInfo, nvmlEnableState_t* currentState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceRemoveGpu_v2(nvmlPciInfo_t* pciInfo, nvmlDetachGpuState_t gpuState, nvmlPcieLinkState_t linkState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceDiscoverGpus(nvmlPciInfo_t* pciInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetFieldValues(nvmlDevice_t device, int valuesCount, nvmlFieldValue_t* values) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceClearFieldValues(nvmlDevice_t device, int valuesCount, nvmlFieldValue_t* values) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetVirtualizationMode(nvmlDevice_t device, nvmlGpuVirtualizationMode_t* pVirtualMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetHostVgpuMode(nvmlDevice_t device, nvmlHostVgpuMode_t* pHostVgpuMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetVirtualizationMode(nvmlDevice_t device, nvmlGpuVirtualizationMode_t virtualMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetVgpuHeterogeneousMode(nvmlDevice_t device, nvmlVgpuHeterogeneousMode_t* pHeterogeneousMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetVgpuHeterogeneousMode(nvmlDevice_t device, const nvmlVgpuHeterogeneousMode_t* pHeterogeneousMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuInstanceGetPlacementId(nvmlVgpuInstance_t vgpuInstance, nvmlVgpuPlacementId_t* pPlacement) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetVgpuTypeSupportedPlacements(nvmlDevice_t device, nvmlVgpuTypeId_t vgpuTypeId, nvmlVgpuPlacementList_t* pPlacementList) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetVgpuTypeCreatablePlacements(nvmlDevice_t device, nvmlVgpuTypeId_t vgpuTypeId, nvmlVgpuPlacementList_t* pPlacementList) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuTypeGetGspHeapSize(nvmlVgpuTypeId_t vgpuTypeId, unsigned long long* gspHeapSize) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuTypeGetFbReservation(nvmlVgpuTypeId_t vgpuTypeId, unsigned long long* fbReservation) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuInstanceGetRuntimeStateSize(nvmlVgpuInstance_t vgpuInstance, nvmlVgpuRuntimeState_t* pState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetVgpuCapabilities(nvmlDevice_t device, nvmlDeviceVgpuCapability_t capability, nvmlEnableState_t state) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetGridLicensableFeatures_v4(nvmlDevice_t device, nvmlGridLicensableFeatures_t* pGridLicensableFeatures) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlGetVgpuDriverCapabilities(nvmlVgpuDriverCapability_t capability, unsigned int* capResult) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetVgpuCapabilities(nvmlDevice_t device, nvmlDeviceVgpuCapability_t capability, unsigned int* capResult) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetSupportedVgpus(nvmlDevice_t device, unsigned int* vgpuCount, nvmlVgpuTypeId_t* vgpuTypeIds) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetCreatableVgpus(nvmlDevice_t device, unsigned int* vgpuCount, nvmlVgpuTypeId_t* vgpuTypeIds) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuTypeGetClass(nvmlVgpuTypeId_t vgpuTypeId, char* vgpuTypeClass, unsigned int* size) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuTypeGetName(nvmlVgpuTypeId_t vgpuTypeId, char* vgpuTypeName, unsigned int* size) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuTypeGetGpuInstanceProfileId(nvmlVgpuTypeId_t vgpuTypeId, unsigned int* gpuInstanceProfileId) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuTypeGetDeviceID(nvmlVgpuTypeId_t vgpuTypeId, unsigned long long* deviceID, unsigned long long* subsystemID) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuTypeGetFramebufferSize(nvmlVgpuTypeId_t vgpuTypeId, unsigned long long* fbSize) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuTypeGetNumDisplayHeads(nvmlVgpuTypeId_t vgpuTypeId, unsigned int* numDisplayHeads) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuTypeGetResolution(nvmlVgpuTypeId_t vgpuTypeId, unsigned int displayIndex, unsigned int* xdim, unsigned int* ydim) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuTypeGetLicense(nvmlVgpuTypeId_t vgpuTypeId, char* vgpuTypeLicenseString, unsigned int size) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuTypeGetFrameRateLimit(nvmlVgpuTypeId_t vgpuTypeId, unsigned int* frameRateLimit) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuTypeGetMaxInstances(nvmlDevice_t device, nvmlVgpuTypeId_t vgpuTypeId, unsigned int* vgpuInstanceCount) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuTypeGetMaxInstancesPerVm(nvmlVgpuTypeId_t vgpuTypeId, unsigned int* vgpuInstanceCountPerVm) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuTypeGetBAR1Info(nvmlVgpuTypeId_t vgpuTypeId, nvmlVgpuTypeBar1Info_t* bar1Info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetActiveVgpus(nvmlDevice_t device, unsigned int* vgpuCount, nvmlVgpuInstance_t* vgpuInstances) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuInstanceGetVmID(nvmlVgpuInstance_t vgpuInstance, char* vmId, unsigned int size, nvmlVgpuVmIdType_t* vmIdType) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuInstanceGetUUID(nvmlVgpuInstance_t vgpuInstance, char* uuid, unsigned int size) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuInstanceGetVmDriverVersion(nvmlVgpuInstance_t vgpuInstance, char* version, unsigned int length) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuInstanceGetFbUsage(nvmlVgpuInstance_t vgpuInstance, unsigned long long* fbUsage) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuInstanceGetLicenseStatus(nvmlVgpuInstance_t vgpuInstance, unsigned int* licensed) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuInstanceGetType(nvmlVgpuInstance_t vgpuInstance, nvmlVgpuTypeId_t* vgpuTypeId) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuInstanceGetFrameRateLimit(nvmlVgpuInstance_t vgpuInstance, unsigned int* frameRateLimit) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuInstanceGetEccMode(nvmlVgpuInstance_t vgpuInstance, nvmlEnableState_t* eccMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuInstanceGetEncoderCapacity(nvmlVgpuInstance_t vgpuInstance, unsigned int* encoderCapacity) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuInstanceSetEncoderCapacity(nvmlVgpuInstance_t vgpuInstance, unsigned int encoderCapacity) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuInstanceGetEncoderStats(nvmlVgpuInstance_t vgpuInstance, unsigned int* sessionCount, unsigned int* averageFps, unsigned int* averageLatency) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuInstanceGetEncoderSessions(nvmlVgpuInstance_t vgpuInstance, unsigned int* sessionCount, nvmlEncoderSessionInfo_t* sessionInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuInstanceGetFBCStats(nvmlVgpuInstance_t vgpuInstance, nvmlFBCStats_t* fbcStats) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuInstanceGetFBCSessions(nvmlVgpuInstance_t vgpuInstance, unsigned int* sessionCount, nvmlFBCSessionInfo_t* sessionInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuInstanceGetGpuInstanceId(nvmlVgpuInstance_t vgpuInstance, unsigned int* gpuInstanceId) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuInstanceGetGpuPciId(nvmlVgpuInstance_t vgpuInstance, char* vgpuPciId, unsigned int* length) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuTypeGetCapabilities(nvmlVgpuTypeId_t vgpuTypeId, nvmlVgpuCapability_t capability, unsigned int* capResult) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuInstanceGetMdevUUID(nvmlVgpuInstance_t vgpuInstance, char* mdevUuid, unsigned int size) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlGpuInstanceGetCreatableVgpus(nvmlGpuInstance_t gpuInstance, nvmlVgpuTypeIdInfo_t* pVgpus) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuTypeGetMaxInstancesPerGpuInstance(nvmlVgpuTypeMaxInstance_t* pMaxInstance) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlGpuInstanceGetActiveVgpus(nvmlGpuInstance_t gpuInstance, nvmlActiveVgpuInstanceInfo_t* pVgpuInstanceInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlGpuInstanceSetVgpuSchedulerState(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerState_t* pScheduler) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlGpuInstanceGetVgpuSchedulerState(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerStateInfo_t* pSchedulerStateInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlGpuInstanceGetVgpuSchedulerLog(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerLogInfo_t* pSchedulerLogInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlGpuInstanceGetVgpuTypeCreatablePlacements(nvmlGpuInstance_t gpuInstance, nvmlVgpuCreatablePlacementInfo_t* pCreatablePlacementInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlGpuInstanceGetVgpuHeterogeneousMode(nvmlGpuInstance_t gpuInstance, nvmlVgpuHeterogeneousMode_t* pHeterogeneousMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlGpuInstanceSetVgpuHeterogeneousMode(nvmlGpuInstance_t gpuInstance, const nvmlVgpuHeterogeneousMode_t* pHeterogeneousMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuInstanceGetMetadata(nvmlVgpuInstance_t vgpuInstance, nvmlVgpuMetadata_t* vgpuMetadata, unsigned int* bufferSize) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetVgpuMetadata(nvmlDevice_t device, nvmlVgpuPgpuMetadata_t* pgpuMetadata, unsigned int* bufferSize) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlGetVgpuCompatibility(nvmlVgpuMetadata_t* vgpuMetadata, nvmlVgpuPgpuMetadata_t* pgpuMetadata, nvmlVgpuPgpuCompatibility_t* compatibilityInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetPgpuMetadataString(nvmlDevice_t device, char* pgpuMetadata, unsigned int* bufferSize) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetVgpuSchedulerLog(nvmlDevice_t device, nvmlVgpuSchedulerLog_t* pSchedulerLog) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetVgpuSchedulerState(nvmlDevice_t device, nvmlVgpuSchedulerGetState_t* pSchedulerState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetVgpuSchedulerCapabilities(nvmlDevice_t device, nvmlVgpuSchedulerCapabilities_t* pCapabilities) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetVgpuSchedulerState(nvmlDevice_t device, nvmlVgpuSchedulerSetState_t* pSchedulerState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlGetVgpuVersion(nvmlVgpuVersion_t* supported, nvmlVgpuVersion_t* current) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlSetVgpuVersion(nvmlVgpuVersion_t* vgpuVersion) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetVgpuUtilization(nvmlDevice_t device, unsigned long long lastSeenTimeStamp, nvmlValueType_t* sampleValType, unsigned int* vgpuInstanceSamplesCount, nvmlVgpuInstanceUtilizationSample_t* utilizationSamples) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetVgpuInstancesUtilizationInfo(nvmlDevice_t device, nvmlVgpuInstancesUtilizationInfo_t* vgpuUtilInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetVgpuProcessUtilization(nvmlDevice_t device, unsigned long long lastSeenTimeStamp, unsigned int* vgpuProcessSamplesCount, nvmlVgpuProcessUtilizationSample_t* utilizationSamples) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetVgpuProcessesUtilizationInfo(nvmlDevice_t device, nvmlVgpuProcessesUtilizationInfo_t* vgpuProcUtilInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuInstanceGetAccountingMode(nvmlVgpuInstance_t vgpuInstance, nvmlEnableState_t* mode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuInstanceGetAccountingPids(nvmlVgpuInstance_t vgpuInstance, unsigned int* count, unsigned int* pids) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuInstanceGetAccountingStats(nvmlVgpuInstance_t vgpuInstance, unsigned int pid, nvmlAccountingStats_t* stats) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuInstanceClearAccountingPids(nvmlVgpuInstance_t vgpuInstance) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlVgpuInstanceGetLicenseInfo_v2(nvmlVgpuInstance_t vgpuInstance, nvmlVgpuLicenseInfo_t* licenseInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlGetExcludedDeviceCount(unsigned int* deviceCount) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlGetExcludedDeviceInfoByIndex(unsigned int index, nvmlExcludedDeviceInfo_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetMigMode(nvmlDevice_t device, unsigned int mode, nvmlReturn_t* activationStatus) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetMigMode(nvmlDevice_t device, unsigned int* currentMode, unsigned int* pendingMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetGpuInstanceProfileInfoV(nvmlDevice_t device, unsigned int profile, nvmlGpuInstanceProfileInfo_v2_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetGpuInstancePossiblePlacements_v2(nvmlDevice_t device, unsigned int profileId, nvmlGpuInstancePlacement_t* placements, unsigned int* count) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetGpuInstanceRemainingCapacity(nvmlDevice_t device, unsigned int profileId, unsigned int* count) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceCreateGpuInstance(nvmlDevice_t device, unsigned int profileId, nvmlGpuInstance_t* gpuInstance) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceCreateGpuInstanceWithPlacement(nvmlDevice_t device, unsigned int profileId, const nvmlGpuInstancePlacement_t* placement, nvmlGpuInstance_t* gpuInstance) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlGpuInstanceDestroy(nvmlGpuInstance_t gpuInstance) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetGpuInstances(nvmlDevice_t device, unsigned int profileId, nvmlGpuInstance_t* gpuInstances, unsigned int* count) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetGpuInstanceById(nvmlDevice_t device, unsigned int id, nvmlGpuInstance_t* gpuInstance) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlGpuInstanceGetInfo(nvmlGpuInstance_t gpuInstance, nvmlGpuInstanceInfo_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlGpuInstanceGetComputeInstanceProfileInfoV(nvmlGpuInstance_t gpuInstance, unsigned int profile, unsigned int engProfile, nvmlComputeInstanceProfileInfo_v2_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlGpuInstanceGetComputeInstanceRemainingCapacity(nvmlGpuInstance_t gpuInstance, unsigned int profileId, unsigned int* count) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlGpuInstanceGetComputeInstancePossiblePlacements(nvmlGpuInstance_t gpuInstance, unsigned int profileId, nvmlComputeInstancePlacement_t* placements, unsigned int* count) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlGpuInstanceCreateComputeInstance(nvmlGpuInstance_t gpuInstance, unsigned int profileId, nvmlComputeInstance_t* computeInstance) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlGpuInstanceCreateComputeInstanceWithPlacement(nvmlGpuInstance_t gpuInstance, unsigned int profileId, const nvmlComputeInstancePlacement_t* placement, nvmlComputeInstance_t* computeInstance) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlComputeInstanceDestroy(nvmlComputeInstance_t computeInstance) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlGpuInstanceGetComputeInstances(nvmlGpuInstance_t gpuInstance, unsigned int profileId, nvmlComputeInstance_t* computeInstances, unsigned int* count) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlGpuInstanceGetComputeInstanceById(nvmlGpuInstance_t gpuInstance, unsigned int id, nvmlComputeInstance_t* computeInstance) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlComputeInstanceGetInfo_v2(nvmlComputeInstance_t computeInstance, nvmlComputeInstanceInfo_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceIsMigDeviceHandle(nvmlDevice_t device, unsigned int* isMigDevice) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetGpuInstanceId(nvmlDevice_t device, unsigned int* id) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetComputeInstanceId(nvmlDevice_t device, unsigned int* id) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetMaxMigDeviceCount(nvmlDevice_t device, unsigned int* count) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetMigDeviceHandleByIndex(nvmlDevice_t device, unsigned int index, nvmlDevice_t* migDevice) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetDeviceHandleFromMigDeviceHandle(nvmlDevice_t migDevice, nvmlDevice_t* device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetCapabilities(nvmlDevice_t device, nvmlDeviceCapabilities_t* caps) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDevicePowerSmoothingActivatePresetProfile(nvmlDevice_t device, nvmlPowerSmoothingProfile_t* profile) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDevicePowerSmoothingUpdatePresetProfileParam(nvmlDevice_t device, nvmlPowerSmoothingProfile_t* profile) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDevicePowerSmoothingSetState(nvmlDevice_t device, nvmlPowerSmoothingState_t* state) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetAddressingMode(nvmlDevice_t device, nvmlDeviceAddressingMode_t* mode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetRepairStatus(nvmlDevice_t device, nvmlRepairStatus_t* repairStatus) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetPowerMizerMode_v1(nvmlDevice_t device, nvmlDevicePowerMizerModes_v1_t* powerMizerMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetPowerMizerMode_v1(nvmlDevice_t device, nvmlDevicePowerMizerModes_v1_t* powerMizerMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetPdi(nvmlDevice_t device, nvmlPdi_t* pdi) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetHostname_v1(nvmlDevice_t device, nvmlHostname_v1_t* hostname) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetHostname_v1(nvmlDevice_t device, nvmlHostname_v1_t* hostname) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetNvLinkInfo(nvmlDevice_t device, nvmlNvLinkInfo_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceReadWritePRM_v1(nvmlDevice_t device, nvmlPRMTLV_v1_t* buffer) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetGpuInstanceProfileInfoByIdV(nvmlDevice_t device, unsigned int profileId, nvmlGpuInstanceProfileInfo_v2_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetSramUniqueUncorrectedEccErrorCounts(nvmlDevice_t device, nvmlEccSramUniqueUncorrectedErrorCounts_t* errorCounts) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetUnrepairableMemoryFlag_v1(nvmlDevice_t device, nvmlUnrepairableMemoryStatus_v1_t* unrepairableMemoryStatus) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceReadPRMCounters_v1(nvmlDevice_t device, nvmlPRMCounterList_v1_t* counterList) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetRusdSettings_v1(nvmlDevice_t device, nvmlRusdSettings_v1_t* settings) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceVgpuForceGspUnload(nvmlDevice_t device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetVgpuSchedulerState_v2(nvmlDevice_t device, nvmlVgpuSchedulerStateInfo_v2_t* pSchedulerStateInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlGpuInstanceGetVgpuSchedulerState_v2(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerStateInfo_v2_t* pSchedulerStateInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetVgpuSchedulerLog_v2(nvmlDevice_t device, nvmlVgpuSchedulerLogInfo_v2_t* pSchedulerLogInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlGpuInstanceGetVgpuSchedulerLog_v2(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerLogInfo_v2_t* pSchedulerLogInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetVgpuSchedulerState_v2(nvmlDevice_t device, nvmlVgpuSchedulerState_v2_t* pSchedulerState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlGpuInstanceSetVgpuSchedulerState_v2(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerState_v2_t* pSchedulerState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlSystemGetCPER_v1(nvmlGetCPER_v1_t* cper) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetBBXTimeData_v1(nvmlDevice_t device, nvmlBBXTimeData_v1_t* timeData) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetAccountingStats_v2(nvmlDevice_t device, nvmlAccountingStats_v2_t* stats) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetRemappedRows_v2(nvmlDevice_t device, nvmlRemappedRowsInfo_v2_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetAdaptiveTgpMode_v1(nvmlDevice_t device, nvmlEnableState_t mode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetAdaptiveTgpModeInfo_v1(nvmlDevice_t device, nvmlAdaptiveTgpModeInfo_v1_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetMemoryLimits_v1(nvmlDevice_t device, nvmlSetMemoryLimits_v1_t* limits) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetMemoryLimits_v1(nvmlDevice_t device, nvmlGetMemoryLimits_v1_t* limits) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetGpuFabricInfo_v4(nvmlDevice_t device, nvmlGpuFabricInfo_v4_t* gpuFabricInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDevicePerfMetricsGetSamples_v1(nvmlDevice_t device, nvmlPerfMetricsSamples_v1_t* samples) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetNvlinkBwModeAsync_v1(nvmlDevice_t device, nvmlNvlinkSetBwModeAsync_v1_t* setBwModeAsync) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetNvLinkTelemetrySamples_v1(nvmlDevice_t device, nvmlNvlinkTelemetrySamples_v1_t* samples) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlEventSetRegisterGpuOperationalEvents_v1(nvmlEventSet_t eventSet, const nvmlGpuOperationalEventConfig_v1_t* config) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlEventSetWait_v3(nvmlEventSet_t set, nvmlEventSetWait_v3_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlEventSetGetContextCount_v1(nvmlEventSet_t set, nvmlEventSetGetContextCount_v1_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlEventSetGetContextInfo_v1(nvmlEventSet_t set, nvmlEventSetGetContextInfo_v1_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlEventSetGetContextData_v1(nvmlEventSet_t set, nvmlEventSetGetContextData_v1_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1(nvmlEventSet_t set, nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetBankRemapperStatus_v1(nvmlDevice_t device, nvmlEccBankRemapperStatus_v1_t* pBankRemapperStatus) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvrtc.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvrtc.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..18ee798d16ff7a0e764677925fd774d7753b9e5c Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvrtc.cpython-312-x86_64-linux-gnu.so differ diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvrtc.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvrtc.pxd new file mode 100644 index 0000000000000000000000000000000000000000..1da9da1cdcf6eb523b98b2188e59c0041f1bccea --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvrtc.pxd @@ -0,0 +1,43 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. + +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=1710f2e6f38e8023555cf41d7faf7c3aba487689e58eddac250903cc33d6d4fe +from ..cynvrtc cimport * + + +############################################################################### +# Wrapper functions +############################################################################### + +cdef const char* _nvrtcGetErrorString(nvrtcResult result) except?NULL nogil +cdef nvrtcResult _nvrtcVersion(int* major, int* minor) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult _nvrtcGetNumSupportedArchs(int* numArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult _nvrtcGetSupportedArchs(int* supportedArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil +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 +cdef nvrtcResult _nvrtcDestroyProgram(nvrtcProgram* prog) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult _nvrtcCompileProgram(nvrtcProgram prog, int numOptions, const char** options) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult _nvrtcGetPTXSize(nvrtcProgram prog, size_t* ptxSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult _nvrtcGetPTX(nvrtcProgram prog, char* ptx) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult _nvrtcGetCUBINSize(nvrtcProgram prog, size_t* cubinSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult _nvrtcGetCUBIN(nvrtcProgram prog, char* cubin) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult _nvrtcGetLTOIRSize(nvrtcProgram prog, size_t* LTOIRSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult _nvrtcGetLTOIR(nvrtcProgram prog, char* LTOIR) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult _nvrtcGetOptiXIRSize(nvrtcProgram prog, size_t* optixirSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult _nvrtcGetOptiXIR(nvrtcProgram prog, char* optixir) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult _nvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult _nvrtcGetProgramLog(nvrtcProgram prog, char* log) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult _nvrtcAddNameExpression(nvrtcProgram prog, const char* name_expression) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult _nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult _nvrtcGetPCHHeapSize(size_t* ret) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult _nvrtcSetPCHHeapSize(size_t size) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult _nvrtcGetPCHCreateStatus(nvrtcProgram prog) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult _nvrtcGetPCHHeapSizeRequired(nvrtcProgram prog, size_t* size) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult _nvrtcSetFlowCallback(nvrtcProgram prog, void * callback, void* payload) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult _nvrtcGetTileIRSize(nvrtcProgram prog, size_t* TileIRSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult _nvrtcGetTileIR(nvrtcProgram prog, char* TileIR) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult _nvrtcInstallBundledHeaders(const char* installPath, unsigned int flags, const char** errorLog) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult _nvrtcGetBundledHeadersInfo(nvrtcBundledHeadersInfo* info, const char** errorLog) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult _nvrtcRemoveBundledHeaders(const char* installPath, const char** errorLog) except ?NVRTC_ERROR_INVALID_INPUT nogil diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvvm.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvvm.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..5443a5d00faa6b3dcbf335cba588a74bc3f41b12 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvvm.cpython-312-x86_64-linux-gnu.so differ diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvvm.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvvm.pxd new file mode 100644 index 0000000000000000000000000000000000000000..5b9abafa5df9126a1ba16d480e0c02ecc566d86c --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/nvvm.pxd @@ -0,0 +1,28 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This code was automatically generated across versions from 12.0.1 to 13.4.1. Do not modify it directly. + +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=6be47c668a3a1086937075cb5f4798941232ec81027841b98ee6ca66c277ff0c +from ..cynvvm cimport * + + +############################################################################### +# Wrapper functions +############################################################################### + +cdef const char* _nvvmGetErrorString(nvvmResult result) except?NULL nogil +cdef nvvmResult _nvvmVersion(int* major, int* minor) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult _nvvmIRVersion(int* majorIR, int* minorIR, int* majorDbg, int* minorDbg) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult _nvvmCreateProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult _nvvmDestroyProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult _nvvmAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult _nvvmLazyAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult _nvvmCompileProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult _nvvmVerifyProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult _nvvmGetCompiledResultSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult _nvvmGetCompiledResult(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult _nvvmGetProgramLogSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult _nvvmGetProgramLog(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult _nvvmLLVMVersion(const char* arch, int* major) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_internal/runtime.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/runtime.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..bce484348e109974d1ee7e6beab90e2b1002dd7a --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/runtime.cpython-312-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:11f8ad74c897cab4bbc88a7e826c2401f8565b711d5daef5c675b9e0abb4376d +size 970800 diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_internal/runtime.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/runtime.pxd new file mode 100644 index 0000000000000000000000000000000000000000..f7f47c978563b0fad1b92b0c4677bcb765b9ceaa --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/runtime.pxd @@ -0,0 +1,340 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. + +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=0ffe9d8d30b5d068a7a7a368d66ca9f4904fbc62224f8617c3968dd73f017e25 +from ..cyruntime cimport * + +# EGL/GL/VDPAU helper declarations (implementations included in runtime_linux/windows.pyx) +include "../_lib/cyruntime/cyruntime.pxd" + +cdef cudaError_t _getLocalRuntimeVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil + + +############################################################################### +# Wrapper functions +############################################################################### + +cdef cudaError_t _cudaDeviceReset() except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceSynchronize() except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceSetLimit(cudaLimit limit, size_t value) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetPCIBusId(char* pciBusId, int len, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaIpcCloseMemHandle(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGetLastError() except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaPeekAtLastError() except ?cudaErrorCallRequiresNewerDriver nogil +cdef const char* _cudaGetErrorName(cudaError_t error) except?NULL nogil +cdef const char* _cudaGetErrorString(cudaError_t error) except?NULL nogil +cdef cudaError_t _cudaGetDeviceCount(int* count) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaChooseDevice(int* device, const cudaDeviceProp* prop) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaSetDevice(int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGetDevice(int* device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaSetDeviceFlags(unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGetDeviceFlags(unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamCreate(cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamGetPriority(cudaStream_t hStream, int* priority) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamDestroy(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamSynchronize(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamQuery(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil +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 +cdef cudaError_t _cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEventCreate(cudaEvent_t* event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEventRecord(cudaEvent_t event, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEventQuery(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEventSynchronize(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEventDestroy(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDestroyExternalMemory(cudaExternalMemory_t extMem) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaFuncGetName(const char** name, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaFuncGetParamInfo(const void* func, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMalloc(void** devPtr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMallocHost(void** ptr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaFree(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaFreeHost(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaFreeArray(cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaHostAlloc(void** pHost, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaHostRegister(void* ptr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaHostUnregister(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaHostGetFlags(unsigned int* pFlags, void* pHost) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemcpy3D(const cudaMemcpy3DParms* p) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemGetInfo(size_t* free, size_t* total) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil +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 +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 +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 +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 +cdef cudaError_t _cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemcpyBatchAsync(const void** dsts, const void** srcs, const size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +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 +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 +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 +cdef cudaError_t _cudaMemset(void* devPtr, int value, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemPrefetchAsync(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil +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 +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 +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 +cdef cudaError_t _cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaFreeAsync(void* devPtr, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemPoolDestroy(cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceDisablePeerAccess(int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaChannelFormatDesc _cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil +cdef cudaError_t _cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDestroyTextureObject(cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDriverGetVersion(int* driverVersion) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaRuntimeGetVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hDst, cudaGraphNode_t hSrc) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) except ?cudaErrorCallRequiresNewerDriver nogil +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 +cdef cudaError_t _cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGraphMemTrim(int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphDestroyNode(cudaGraphNode_t node) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecDestroy(cudaGraphExec_t graphExec) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphDestroy(cudaGraph_t graph) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil +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 +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 +cdef cudaError_t _cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaLibraryGetGlobal(void** dptr, size_t* bytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaLibraryGetManaged(void** dptr, size_t* bytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaProfilerStart() except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGetDeviceProperties(cudaDeviceProp* prop, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetHostAtomicCapabilities(unsigned int* capabilities, const cudaAtomicOperation* operations, unsigned int count, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetP2PAtomicCapabilities(unsigned int* capabilities, const cudaAtomicOperation* operations, unsigned int count, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamGetCaptureInfo(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 +cdef cudaError_t _cudaSignalExternalSemaphoresAsync(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaWaitExternalSemaphoresAsync(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemPrefetchBatchAsync(void** dptrs, size_t* sizes, size_t count, cudaMemLocation* prefetchLocs, size_t* prefetchLocIdxs, size_t numPrefetchLocs, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemDiscardBatchAsync(void** dptrs, size_t* sizes, size_t count, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemDiscardAndPrefetchBatchAsync(void** dptrs, size_t* sizes, size_t count, cudaMemLocation* prefetchLocs, size_t* prefetchLocIdxs, size_t numPrefetchLocs, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemGetDefaultMemPool(cudaMemPool_t* memPool, cudaMemLocation* location, cudaMemAllocationType type) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemGetMemPool(cudaMemPool_t* memPool, cudaMemLocation* location, cudaMemAllocationType type) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemSetMemPool(cudaMemLocation* location, cudaMemAllocationType type, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaLogsRegisterCallback(cudaLogsCallback_t callbackFunc, void* userData, cudaLogsCallbackHandle* callback_out) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaLogsUnregisterCallback(cudaLogsCallbackHandle callback) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaLogsCurrent(cudaLogIterator* iterator_out, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaLogsDumpToFile(cudaLogIterator* iterator, const char* pathToFile, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaLogsDumpToMemory(cudaLogIterator* iterator, char* buffer, size_t* size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphNodeGetContainingGraph(cudaGraphNode_t hNode, cudaGraph_t* phGraph) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphNodeGetLocalId(cudaGraphNode_t hNode, unsigned int* nodeId) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphNodeGetToolsId(cudaGraphNode_t hNode, unsigned long long* toolsNodeId) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphGetId(cudaGraph_t hGraph, unsigned int* graphID) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecGetId(cudaGraphExec_t hGraphExec, unsigned int* graphID) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphConditionalHandleCreate_v2(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, cudaExecutionContext_t ctx, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetDevResource(int device, cudaDevResource* resource, cudaDevResourceType type) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDevSmResourceSplitByCount(cudaDevResource* result, unsigned int* nbGroups, const cudaDevResource* input, cudaDevResource* remaining, unsigned int flags, unsigned int minCount) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDevSmResourceSplit(cudaDevResource* result, unsigned int nbGroups, const cudaDevResource* input, cudaDevResource* remainder, unsigned int flags, cudaDevSmResourceGroupParams* groupParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDevResourceGenerateDesc(cudaDevResourceDesc_t* phDesc, cudaDevResource* resources, unsigned int nbResources) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGreenCtxCreate(cudaExecutionContext_t* phCtx, cudaDevResourceDesc_t desc, int device, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaExecutionCtxDestroy(cudaExecutionContext_t ctx) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaExecutionCtxGetDevResource(cudaExecutionContext_t ctx, cudaDevResource* resource, cudaDevResourceType type) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaExecutionCtxGetDevice(int* device, cudaExecutionContext_t ctx) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaExecutionCtxGetId(cudaExecutionContext_t ctx, unsigned long long* ctxId) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaExecutionCtxStreamCreate(cudaStream_t* phStream, cudaExecutionContext_t ctx, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaExecutionCtxSynchronize(cudaExecutionContext_t ctx) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamGetDevResource(cudaStream_t hStream, cudaDevResource* resource, cudaDevResourceType type) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaExecutionCtxRecordEvent(cudaExecutionContext_t ctx, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaExecutionCtxWaitEvent(cudaExecutionContext_t ctx, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetExecutionCtx(cudaExecutionContext_t* ctx, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaFuncGetParamCount(const void* func, size_t* paramCount) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaLaunchHostFunc_v2(cudaStream_t stream, cudaHostFn_t fn, void* userData, unsigned int syncMode) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemcpyWithAttributesAsync(void* dst, const void* src, size_t size, cudaMemcpyAttributes* attr, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemcpy3DWithAttributesAsync(cudaMemcpy3DBatchOp* op, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphNodeGetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamBeginRecaptureToGraph(cudaStream_t stream, cudaStreamCaptureMode mode, cudaGraph_t graph, cudaGraphRecaptureCallbackData* callbackData) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemGetLocationInfo(void* devPtr, size_t size, size_t summaryGranularity, size_t samplingGranularity, cudaMemLocation* location_out) except ?cudaErrorCallRequiresNewerDriver nogil diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_internal/runtime_ptds.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/runtime_ptds.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..b27450feee58ac939bfcf39830960998891225bc --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/runtime_ptds.cpython-312-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a1ed1aafe85c8ede4330f384b72df3460ea47419aaeb127eba2f1a5c16f74eda +size 816240 diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_internal/runtime_ptds.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/runtime_ptds.pxd new file mode 100644 index 0000000000000000000000000000000000000000..322ecce25ce509aaced08e502ab5a834d74403d4 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/runtime_ptds.pxd @@ -0,0 +1,335 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. + +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=997d3bde508f97fcb58d0bfe138041c865c8c738f43dec215826d8498ad73cf2 +from ..cyruntime cimport * + + +############################################################################### +# Wrapper functions +############################################################################### + +cdef cudaError_t _cudaDeviceReset() except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceSynchronize() except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceSetLimit(cudaLimit limit, size_t value) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetPCIBusId(char* pciBusId, int len, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaIpcCloseMemHandle(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGetLastError() except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaPeekAtLastError() except ?cudaErrorCallRequiresNewerDriver nogil +cdef const char* _cudaGetErrorName(cudaError_t error) except?NULL nogil +cdef const char* _cudaGetErrorString(cudaError_t error) except?NULL nogil +cdef cudaError_t _cudaGetDeviceCount(int* count) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaChooseDevice(int* device, const cudaDeviceProp* prop) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaSetDevice(int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGetDevice(int* device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaSetDeviceFlags(unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGetDeviceFlags(unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamCreate(cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamGetPriority(cudaStream_t hStream, int* priority) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamDestroy(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamSynchronize(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamQuery(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil +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 +cdef cudaError_t _cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEventCreate(cudaEvent_t* event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEventRecord(cudaEvent_t event, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEventQuery(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEventSynchronize(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEventDestroy(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDestroyExternalMemory(cudaExternalMemory_t extMem) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaFuncGetName(const char** name, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaFuncGetParamInfo(const void* func, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMalloc(void** devPtr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMallocHost(void** ptr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaFree(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaFreeHost(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaFreeArray(cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaHostAlloc(void** pHost, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaHostRegister(void* ptr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaHostUnregister(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaHostGetFlags(unsigned int* pFlags, void* pHost) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemcpy3D(const cudaMemcpy3DParms* p) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemGetInfo(size_t* free, size_t* total) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil +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 +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 +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 +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 +cdef cudaError_t _cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemcpyBatchAsync(const void** dsts, const void** srcs, const size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +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 +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 +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 +cdef cudaError_t _cudaMemset(void* devPtr, int value, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemPrefetchAsync(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil +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 +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 +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 +cdef cudaError_t _cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaFreeAsync(void* devPtr, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemPoolDestroy(cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceDisablePeerAccess(int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaChannelFormatDesc _cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil +cdef cudaError_t _cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDestroyTextureObject(cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDriverGetVersion(int* driverVersion) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaRuntimeGetVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hDst, cudaGraphNode_t hSrc) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) except ?cudaErrorCallRequiresNewerDriver nogil +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 +cdef cudaError_t _cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGraphMemTrim(int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphDestroyNode(cudaGraphNode_t node) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecDestroy(cudaGraphExec_t graphExec) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphDestroy(cudaGraph_t graph) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil +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 +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 +cdef cudaError_t _cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaLibraryGetGlobal(void** dptr, size_t* bytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaLibraryGetManaged(void** dptr, size_t* bytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaProfilerStart() except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGetDeviceProperties(cudaDeviceProp* prop, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetHostAtomicCapabilities(unsigned int* capabilities, const cudaAtomicOperation* operations, unsigned int count, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetP2PAtomicCapabilities(unsigned int* capabilities, const cudaAtomicOperation* operations, unsigned int count, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamGetCaptureInfo(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 +cdef cudaError_t _cudaSignalExternalSemaphoresAsync(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaWaitExternalSemaphoresAsync(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemPrefetchBatchAsync(void** dptrs, size_t* sizes, size_t count, cudaMemLocation* prefetchLocs, size_t* prefetchLocIdxs, size_t numPrefetchLocs, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemDiscardBatchAsync(void** dptrs, size_t* sizes, size_t count, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemDiscardAndPrefetchBatchAsync(void** dptrs, size_t* sizes, size_t count, cudaMemLocation* prefetchLocs, size_t* prefetchLocIdxs, size_t numPrefetchLocs, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemGetDefaultMemPool(cudaMemPool_t* memPool, cudaMemLocation* location, cudaMemAllocationType type) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemGetMemPool(cudaMemPool_t* memPool, cudaMemLocation* location, cudaMemAllocationType type) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemSetMemPool(cudaMemLocation* location, cudaMemAllocationType type, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaLogsRegisterCallback(cudaLogsCallback_t callbackFunc, void* userData, cudaLogsCallbackHandle* callback_out) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaLogsUnregisterCallback(cudaLogsCallbackHandle callback) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaLogsCurrent(cudaLogIterator* iterator_out, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaLogsDumpToFile(cudaLogIterator* iterator, const char* pathToFile, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaLogsDumpToMemory(cudaLogIterator* iterator, char* buffer, size_t* size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphNodeGetContainingGraph(cudaGraphNode_t hNode, cudaGraph_t* phGraph) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphNodeGetLocalId(cudaGraphNode_t hNode, unsigned int* nodeId) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphNodeGetToolsId(cudaGraphNode_t hNode, unsigned long long* toolsNodeId) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphGetId(cudaGraph_t hGraph, unsigned int* graphID) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphExecGetId(cudaGraphExec_t hGraphExec, unsigned int* graphID) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphConditionalHandleCreate_v2(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, cudaExecutionContext_t ctx, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetDevResource(int device, cudaDevResource* resource, cudaDevResourceType type) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDevSmResourceSplitByCount(cudaDevResource* result, unsigned int* nbGroups, const cudaDevResource* input, cudaDevResource* remaining, unsigned int flags, unsigned int minCount) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDevSmResourceSplit(cudaDevResource* result, unsigned int nbGroups, const cudaDevResource* input, cudaDevResource* remainder, unsigned int flags, cudaDevSmResourceGroupParams* groupParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDevResourceGenerateDesc(cudaDevResourceDesc_t* phDesc, cudaDevResource* resources, unsigned int nbResources) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGreenCtxCreate(cudaExecutionContext_t* phCtx, cudaDevResourceDesc_t desc, int device, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaExecutionCtxDestroy(cudaExecutionContext_t ctx) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaExecutionCtxGetDevResource(cudaExecutionContext_t ctx, cudaDevResource* resource, cudaDevResourceType type) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaExecutionCtxGetDevice(int* device, cudaExecutionContext_t ctx) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaExecutionCtxGetId(cudaExecutionContext_t ctx, unsigned long long* ctxId) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaExecutionCtxStreamCreate(cudaStream_t* phStream, cudaExecutionContext_t ctx, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaExecutionCtxSynchronize(cudaExecutionContext_t ctx) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamGetDevResource(cudaStream_t hStream, cudaDevResource* resource, cudaDevResourceType type) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaExecutionCtxRecordEvent(cudaExecutionContext_t ctx, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaExecutionCtxWaitEvent(cudaExecutionContext_t ctx, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaDeviceGetExecutionCtx(cudaExecutionContext_t* ctx, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaFuncGetParamCount(const void* func, size_t* paramCount) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaLaunchHostFunc_v2(cudaStream_t stream, cudaHostFn_t fn, void* userData, unsigned int syncMode) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemcpyWithAttributesAsync(void* dst, const void* src, size_t size, cudaMemcpyAttributes* attr, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemcpy3DWithAttributesAsync(cudaMemcpy3DBatchOp* op, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphNodeGetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaStreamBeginRecaptureToGraph(cudaStream_t stream, cudaStreamCaptureMode mode, cudaGraph_t graph, cudaGraphRecaptureCallbackData* callbackData) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemGetLocationInfo(void* devPtr, size_t size, size_t summaryGranularity, size_t samplingGranularity, cudaMemLocation* location_out) except ?cudaErrorCallRequiresNewerDriver nogil diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_internal/utils.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/utils.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..c982bc5dd5f5ffdbdaa4d16ba2300333b16f1a4c --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/utils.cpython-312-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c85391bd66294bf7eba83c93655e4270988c7a4bae731a3f8dcbeca450782b82 +size 128072 diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_internal/utils.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/utils.pxd new file mode 100644 index 0000000000000000000000000000000000000000..f4a76de327ed273194665bca343bb180e7e63a4a --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_internal/utils.pxd @@ -0,0 +1,167 @@ +# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 + +from libc.stdint cimport int32_t, int64_t, intptr_t +from libcpp.vector cimport vector +from libcpp cimport bool as cppbool +from libcpp cimport nullptr_t, nullptr +from libcpp.memory cimport unique_ptr + + +cdef extern from * nogil: + """ + template + class nullable_unique_ptr { + public: + nullable_unique_ptr() noexcept = default; + + nullable_unique_ptr(std::nullptr_t) noexcept = delete; + + explicit nullable_unique_ptr(T* data, bool own_data): + own_data_(own_data) + { + if (own_data) + manager_.reset(data); + else + raw_data_ = data; + } + + nullable_unique_ptr(const nullable_unique_ptr&) = delete; + + nullable_unique_ptr& operator=(const nullable_unique_ptr&) = delete; + + nullable_unique_ptr(nullable_unique_ptr&& other) noexcept + { + own_data_ = other.own_data_; + other.own_data_ = false; // ownership is transferred + if (own_data_) + { + manager_ = std::move(other.manager_); + raw_data_ = nullptr; // just in case + } + else + { + manager_.reset(nullptr); // just in case + raw_data_ = other.raw_data_; + } + } + + nullable_unique_ptr& operator=(nullable_unique_ptr&& other) noexcept + { + own_data_ = other.own_data_; + other.own_data_ = false; // ownership is transferred + if (own_data_) + { + manager_ = std::move(other.manager_); + raw_data_ = nullptr; // just in case + } + else + { + manager_.reset(nullptr); // just in case + raw_data_ = other.raw_data_; + } + return *this; + } + + ~nullable_unique_ptr() = default; + + void reset(T* data, bool own_data) + { + own_data_ = own_data; + if (own_data_) + { + manager_.reset(data); + raw_data_ = nullptr; + } + else + { + manager_.reset(nullptr); + raw_data_ = data; + } + } + + void swap(nullable_unique_ptr& other) noexcept + { + std::swap(manager_, other.manager_); + std::swap(raw_data_, other.raw_data_); + std::swap(own_data_, other.own_data_); + } + + /* + * Get the pointer to the underlying object (this is different from data()!). + */ + T* get() const noexcept + { + if (own_data_) + return manager_.get(); + else + return raw_data_; + } + + /* + * Get the pointer to the underlying buffer (this is different from get()!). + */ + void* data() noexcept + { + if (own_data_) + return manager_.get()->data(); + else + return raw_data_; + } + + T& operator*() + { + if (own_data_) + return *manager_; + else + return *raw_data_; + } + + private: + std::unique_ptr manager_{}; + T* raw_data_{nullptr}; + bool own_data_{false}; + }; + """ + # xref: cython/Cython/Includes/libcpp/memory.pxd + cdef cppclass nullable_unique_ptr[T]: + nullable_unique_ptr() + nullable_unique_ptr(T*, cppbool) + nullable_unique_ptr(nullable_unique_ptr[T]&) + + # Modifiers + void reset(T*, cppbool) + void swap(nullable_unique_ptr&) + + # Observers + T* get() + T& operator*() + void* data() + + +ctypedef fused ResT: + int + int32_t + int64_t + char + float + double + + +ctypedef fused PtrT: + void + + +cdef cppclass nested_resource[T]: + nullable_unique_ptr[ vector[intptr_t] ] ptrs + nullable_unique_ptr[ vector[vector[T]] ] nested_resource_ptr + + +# accepts the output pointer as input to use the return value for exception propagation +cdef int get_resource_ptr(nullable_unique_ptr[vector[ResT]] &in_out_ptr, object obj, ResT* __unused) except 1 +cdef int get_resource_ptrs(nullable_unique_ptr[ vector[PtrT*] ] &in_out_ptr, object obj, PtrT* __unused) except 1 +cdef int get_nested_resource_ptr(nested_resource[ResT] &in_out_ptr, object obj, ResT* __unused) except 1 + +cdef bint is_nested_sequence(data) +cdef void* get_buffer_pointer(buf, Py_ssize_t size, readonly=*) except* diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_lib/__init__.py b/hug/lib/python3.12/site-packages/cuda/bindings/_lib/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_lib/__pycache__/__init__.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/bindings/_lib/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ce1345e7e830bf9c2708dd58baf7703d1b88c9be Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/bindings/_lib/__pycache__/__init__.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_lib/cyruntime/cyruntime.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/_lib/cyruntime/cyruntime.pxd new file mode 100644 index 0000000000000000000000000000000000000000..7258d4b43cc7f583ad125ea2ddc4ffe8847de355 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_lib/cyruntime/cyruntime.pxd @@ -0,0 +1,42 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +cimport cuda.bindings._internal.driver as _cydriver + +# These graphics API are the reimplemented version of what's supported by CUDA Runtime. +# Issue https://github.com/NVIDIA/cuda-python/issues/488 will remove them by letting us +# use call into the static library directly. +# +# This is an ABI breaking change which can only happen in a major version bump. + +# This file is included from cuda/bindings/_bindings/cyruntime.pxd.in but kept in a +# separate file to keep it separated from the auto-generated code there. + +# Prior to https://github.com/NVIDIA/cuda-python/pull/914, this was two +# independent modules (c.b._lib.cyruntime.cyruntime and +# c.b._lib.cyruntime.utils), but was merged into one. + +cdef cudaError_t _cudaEGLStreamProducerPresentFrame(cudaEglStreamConnection* conn, cudaEglFrame eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEGLStreamProducerReturnFrame(cudaEglStreamConnection* conn, cudaEglFrame* eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphicsResourceGetMappedEglFrame(cudaEglFrame* eglFrame, cudaGraphicsResource_t resource, unsigned int index, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaVDPAUSetVDPAUDevice(int device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaVDPAUGetDevice(int* device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphicsVDPAURegisterVideoSurface(cudaGraphicsResource** resource, VdpVideoSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphicsVDPAURegisterOutputSurface(cudaGraphicsResource** resource, VdpOutputSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGLGetDevices(unsigned int* pCudaDeviceCount, int* pCudaDevices, unsigned int cudaDeviceCount, cudaGLDeviceList deviceList) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphicsGLRegisterImage(cudaGraphicsResource** resource, GLuint image, GLenum target, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphicsGLRegisterBuffer(cudaGraphicsResource** resource, GLuint buffer, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphicsEGLRegisterImage(cudaGraphicsResource_t* pCudaResource, EGLImageKHR image, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEGLStreamConsumerConnect(cudaEglStreamConnection* conn, EGLStreamKHR eglStream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEGLStreamConsumerConnectWithFlags(cudaEglStreamConnection* conn, EGLStreamKHR eglStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEGLStreamConsumerDisconnect(cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEGLStreamConsumerAcquireFrame(cudaEglStreamConnection* conn, cudaGraphicsResource_t* pCudaResource, cudaStream_t* pStream, unsigned int timeout) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEGLStreamConsumerReleaseFrame(cudaEglStreamConnection* conn, cudaGraphicsResource_t pCudaResource, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEGLStreamProducerConnect(cudaEglStreamConnection* conn, EGLStreamKHR eglStream, EGLint width, EGLint height) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEGLStreamProducerDisconnect(cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEventCreateFromEGLSync(cudaEvent_t* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +# utility functions + +cdef cudaError_t getDriverEglFrame(_cydriver.CUeglFrame *cuEglFrame, cudaEglFrame eglFrame) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t getRuntimeEglFrame(cudaEglFrame *eglFrame, _cydriver.CUeglFrame cueglFrame) except ?cudaErrorCallRequiresNewerDriver nogil diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_lib/cyruntime/cyruntime.pxi b/hug/lib/python3.12/site-packages/cuda/bindings/_lib/cyruntime/cyruntime.pxi new file mode 100644 index 0000000000000000000000000000000000000000..dbdb3f2110d5bcd2902c333229e2fa54957b93c3 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_lib/cyruntime/cyruntime.pxi @@ -0,0 +1,1339 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +# These graphics API are the reimplemented version of what's supported by CUDA Runtime. +# Issue https://github.com/NVIDIA/cuda-python/issues/488 will remove them by letting us +# use call into the static library directly. + +# This file is included from cuda/bindings/_bindings/cyruntime.pyx.in but kept in a +# separate file to keep it separated from the auto-generated code there. + +# Prior to https://github.com/NVIDIA/cuda-python/pull/914, this was two +# independent modules (c.b._lib.cyruntime.cyruntime and +# c.b._lib.cyruntime.utils), but was merged into one. +import cython +cimport cython + +from libc.string cimport memset +cimport cuda.bindings._internal.driver as cydriver + +# Call make_cudaPitchedPtr directly from the C header to avoid a runtime import +# of cuda.bindings.cyruntime (the Cython wrapper lives there but including it +# here would create a circular import via _internal.runtime → cyruntime → _internal.runtime). +cdef extern from 'driver_functions.h': + cudaPitchedPtr _cylib_make_cudaPitchedPtr "make_cudaPitchedPtr"(void* d, size_t p, size_t xsz, size_t ysz) nogil + +cdef cudaError_t _cudaEGLStreamProducerPresentFrame(cudaEglStreamConnection* conn, cudaEglFrame eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = _cudaFree(0) + if err != cudaSuccess: + return err + cdef cydriver.CUeglFrame cueglFrame + err = getDriverEglFrame(&cueglFrame, eglframe) + if err != cudaSuccess: + return err + err = cydriver._cuEGLStreamProducerPresentFrame(conn, cueglFrame, pStream) + return err + +cdef cudaError_t _cudaEGLStreamProducerReturnFrame(cudaEglStreamConnection* conn, cudaEglFrame* eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = _cudaFree(0) + if err != cudaSuccess: + return err + if eglframe == NULL: + err = cudaErrorInvalidResourceHandle + return err + cdef cydriver.CUeglFrame cueglFrame + err = cydriver._cuEGLStreamProducerReturnFrame(conn, &cueglFrame, pStream) + if err != cudaSuccess: + return err + err = getRuntimeEglFrame(eglframe, cueglFrame) + return err + +cdef cudaError_t _cudaGraphicsResourceGetMappedEglFrame(cudaEglFrame* eglFrame, cudaGraphicsResource_t resource, unsigned int index, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = _cudaFree(0) + if err != cudaSuccess: + return err + cdef cydriver.CUeglFrame cueglFrame + memset(&cueglFrame, 0, sizeof(cueglFrame)) + err = cydriver._cuGraphicsResourceGetMappedEglFrame(&cueglFrame, resource, index, mipLevel) + if err != cudaSuccess: + return err + err = getRuntimeEglFrame(eglFrame, cueglFrame) + return err + +cdef cudaError_t _cudaVDPAUSetVDPAUDevice(int device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaErrorNotSupported + +cdef cudaError_t _cudaVDPAUGetDevice(int* device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = _cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuVDPAUGetDevice(device, vdpDevice, vdpGetProcAddress) + return err + +cdef cudaError_t _cudaGraphicsVDPAURegisterVideoSurface(cudaGraphicsResource** resource, VdpVideoSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = _cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuGraphicsVDPAURegisterVideoSurface(resource, vdpSurface, flags) + return err + +cdef cudaError_t _cudaGraphicsVDPAURegisterOutputSurface(cudaGraphicsResource** resource, VdpOutputSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = _cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuGraphicsVDPAURegisterOutputSurface(resource, vdpSurface, flags) + return err + +cdef cudaError_t _cudaGLGetDevices(unsigned int* pCudaDeviceCount, int* pCudaDevices, unsigned int cudaDeviceCount, cudaGLDeviceList deviceList) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = _cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuGLGetDevices_v2(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList) + return err + +cdef cudaError_t _cudaGraphicsGLRegisterImage(cudaGraphicsResource** resource, GLuint image, GLenum target, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = _cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuGraphicsGLRegisterImage(resource, image, target, flags) + return err + +cdef cudaError_t _cudaGraphicsGLRegisterBuffer(cudaGraphicsResource** resource, GLuint buffer, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = _cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuGraphicsGLRegisterBuffer(resource, buffer, flags) + return err + +cdef cudaError_t _cudaGraphicsEGLRegisterImage(cudaGraphicsResource_t* pCudaResource, EGLImageKHR image, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = _cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuGraphicsEGLRegisterImage(pCudaResource, image, flags) + return err + +cdef cudaError_t _cudaEGLStreamConsumerConnect(cudaEglStreamConnection* conn, EGLStreamKHR eglStream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = _cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuEGLStreamConsumerConnect(conn, eglStream) + return err + +cdef cudaError_t _cudaEGLStreamConsumerConnectWithFlags(cudaEglStreamConnection* conn, EGLStreamKHR eglStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = _cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuEGLStreamConsumerConnectWithFlags(conn, eglStream, flags) + return err + +cdef cudaError_t _cudaEGLStreamConsumerDisconnect(cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = _cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuEGLStreamConsumerDisconnect(conn) + return err + +cdef cudaError_t _cudaEGLStreamConsumerAcquireFrame(cudaEglStreamConnection* conn, cudaGraphicsResource_t* pCudaResource, cudaStream_t* pStream, unsigned int timeout) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = _cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout) + return err + +cdef cudaError_t _cudaEGLStreamConsumerReleaseFrame(cudaEglStreamConnection* conn, cudaGraphicsResource_t pCudaResource, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = _cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream) + return err + +cdef cudaError_t _cudaEGLStreamProducerConnect(cudaEglStreamConnection* conn, EGLStreamKHR eglStream, EGLint width, EGLint height) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = _cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuEGLStreamProducerConnect(conn, eglStream, width, height) + return err + +cdef cudaError_t _cudaEGLStreamProducerDisconnect(cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = _cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuEGLStreamProducerDisconnect(conn) + return err + +cdef cudaError_t _cudaEventCreateFromEGLSync(cudaEvent_t* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = _cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuEventCreateFromEGLSync(phEvent, eglSync, flags) + return err + +## utility functions + +cdef int case_desc(const cudaChannelFormatDesc* d, int x, int y, int z, int w, int f) except ?cudaErrorCallRequiresNewerDriver nogil: + return d[0].x == x and d[0].y == y and d[0].z == z and d[0].w == w and d[0].f == f + + +cdef cudaError_t getDescInfo(const cudaChannelFormatDesc* d, int *numberOfChannels, cydriver.CUarray_format *format) except ?cudaErrorCallRequiresNewerDriver nogil: + # Check validity + if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSigned, + cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + if (d[0].x != 8) and (d[0].x != 16) and (d[0].x != 32): + return cudaErrorInvalidChannelDescriptor + elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindFloat,): + if (d[0].x != 16) and (d[0].x != 32): + return cudaErrorInvalidChannelDescriptor + elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12,): + if (d[0].x != 8) or (d[0].y != 8) or (d[0].z != 8) or (d[0].w != 0): + return cudaErrorInvalidChannelDescriptor + elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1, + cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2, + cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4,): + if (d[0].x != 8): + return cudaErrorInvalidChannelDescriptor + elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1, + cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2, + cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4,): + if (d[0].x != 16): + return cudaErrorInvalidChannelDescriptor + elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4, + cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5, + cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB,): + if (d[0].x != 8): + return cudaErrorInvalidChannelDescriptor + elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H, + cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,): + if (d[0].x != 16) or (d[0].y != 16) or (d[0].z != 16) or (d[0].w != 0): + return cudaErrorInvalidChannelDescriptor + elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102,): + if (d[0].x != 10) or (d[0].y != 10) or (d[0].z != 10) or (d[0].w != 2): + return cudaErrorInvalidChannelDescriptor + elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsigned8Packed422, + cudaChannelFormatKind.cudaChannelFormatKindUnsigned8Packed444,): + if (d[0].x != 8) or (d[0].y != 8) or (d[0].z != 8) or (d[0].w != 8): + return cudaErrorInvalidChannelDescriptor + elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsigned8SemiPlanar420, + cudaChannelFormatKind.cudaChannelFormatKindUnsigned8SemiPlanar422, + cudaChannelFormatKind.cudaChannelFormatKindUnsigned8SemiPlanar444, + cudaChannelFormatKind.cudaChannelFormatKindUnsigned8Planar420, + cudaChannelFormatKind.cudaChannelFormatKindUnsigned8Planar422, + cudaChannelFormatKind.cudaChannelFormatKindUnsigned8Planar444,): + if (d[0].x != 8) or (d[0].y != 8) or (d[0].z != 8) or (d[0].w != 0): + return cudaErrorInvalidChannelDescriptor + elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsigned16SemiPlanar420, + cudaChannelFormatKind.cudaChannelFormatKindUnsigned16SemiPlanar422, + cudaChannelFormatKind.cudaChannelFormatKindUnsigned16SemiPlanar444, + cudaChannelFormatKind.cudaChannelFormatKindUnsigned16Planar420, + cudaChannelFormatKind.cudaChannelFormatKindUnsigned16Planar422, + cudaChannelFormatKind.cudaChannelFormatKindUnsigned16Planar444,): + if (d[0].x != 16) or (d[0].y != 16) or (d[0].z != 16) or (d[0].w != 0): + return cudaErrorInvalidChannelDescriptor + else: + return cudaErrorInvalidChannelDescriptor + + # If Y is non-zero, it must match X + # If Z is non-zero, it must match Y + # If W is non-zero, it must match Z + if (((d[0].y != 0) and (d[0].y != d[0].x)) or + ((d[0].z != 0) and (d[0].z != d[0].y)) or + ((d[0].w != 0) and (d[0].w != d[0].z))): + if d[0].f != cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102: + return cudaErrorInvalidChannelDescriptor + if case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + numberOfChannels[0] = 1 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 + elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + numberOfChannels[0] = 2 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 + elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 + elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindSigned): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 + elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + numberOfChannels[0] = 1 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 + elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + numberOfChannels[0] = 2 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 + elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 + elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 + elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + numberOfChannels[0] = 1 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 + elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + numberOfChannels[0] = 2 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 + elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 + elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindSigned): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 + elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + numberOfChannels[0] = 1 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 + elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + numberOfChannels[0] = 2 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 + elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 + elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 + elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + numberOfChannels[0] = 1 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 + elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + numberOfChannels[0] = 2 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 + elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 + elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindSigned): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 + elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + numberOfChannels[0] = 1 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 + elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + numberOfChannels[0] = 2 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 + elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 + elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 + elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + numberOfChannels[0] = 1 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF + elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + numberOfChannels[0] = 2 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF + elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF + elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindFloat): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF + elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + numberOfChannels[0] = 1 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT + elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + numberOfChannels[0] = 2 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT + elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT + elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindFloat): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT + elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindNV12): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_NV12 + elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM + elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM_SRGB + elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM + elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM_SRGB + elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM + elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM_SRGB + elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4): + numberOfChannels[0] = 1 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC4_UNORM + elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4): + numberOfChannels[0] = 1 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC4_SNORM + elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5): + numberOfChannels[0] = 2 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC5_UNORM + elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5): + numberOfChannels[0] = 2 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC5_SNORM + elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC6H_UF16 + elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC6H_SF16 + elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM + elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM_SRGB + elif case_desc(d, 10, 10, 10, 2, cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT_101010_2 + # 2a: normalized 8/16-bit kinds — validated above but previously had no case_desc arm + elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1): + numberOfChannels[0] = 1 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT8X1 + elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2): + numberOfChannels[0] = 2 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT8X2 + elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT8X4 + elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1): + numberOfChannels[0] = 1 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT8X1 + elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2): + numberOfChannels[0] = 2 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT8X2 + elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT8X4 + elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1): + numberOfChannels[0] = 1 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT16X1 + elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2): + numberOfChannels[0] = 2 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT16X2 + elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT16X4 + elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1): + numberOfChannels[0] = 1 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT16X1 + elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2): + numberOfChannels[0] = 2 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT16X2 + elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT16X4 + # 2b: CUDA 13.3/13.4 packed and multi-planar YUV kinds + elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsigned8Packed422): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT8_PACKED_422 + elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsigned8Packed444): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT8_PACKED_444 + elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned8SemiPlanar420): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT8_SEMIPLANAR_420 + elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned16SemiPlanar420): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT16_SEMIPLANAR_420 + elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned8SemiPlanar422): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT8_SEMIPLANAR_422 + elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned16SemiPlanar422): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT16_SEMIPLANAR_422 + elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned8SemiPlanar444): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT8_SEMIPLANAR_444 + elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned16SemiPlanar444): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT16_SEMIPLANAR_444 + elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned8Planar420): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT8_PLANAR_420 + elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned16Planar420): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT16_PLANAR_420 + elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned8Planar422): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT8_PLANAR_422 + elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned16Planar422): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT16_PLANAR_422 + elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned8Planar444): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT8_PLANAR_444 + elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned16Planar444): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT16_PLANAR_444 + else: + return cudaErrorInvalidChannelDescriptor + + if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H, + cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H, + cudaChannelFormatKind.cudaChannelFormatKindUnsigned8SemiPlanar420, + cudaChannelFormatKind.cudaChannelFormatKindUnsigned16SemiPlanar420, + cudaChannelFormatKind.cudaChannelFormatKindUnsigned8SemiPlanar422, + cudaChannelFormatKind.cudaChannelFormatKindUnsigned16SemiPlanar422, + cudaChannelFormatKind.cudaChannelFormatKindUnsigned8SemiPlanar444, + cudaChannelFormatKind.cudaChannelFormatKindUnsigned16SemiPlanar444, + cudaChannelFormatKind.cudaChannelFormatKindUnsigned8Planar420, + cudaChannelFormatKind.cudaChannelFormatKindUnsigned16Planar420, + cudaChannelFormatKind.cudaChannelFormatKindUnsigned8Planar422, + cudaChannelFormatKind.cudaChannelFormatKindUnsigned16Planar422, + cudaChannelFormatKind.cudaChannelFormatKindUnsigned8Planar444, + cudaChannelFormatKind.cudaChannelFormatKindUnsigned16Planar444,): + if numberOfChannels[0] != 3: + return cudaErrorInvalidChannelDescriptor + else: + if (numberOfChannels[0] != 1) and (numberOfChannels[0] != 2) and (numberOfChannels[0] != 4): + return cudaErrorInvalidChannelDescriptor + return cudaSuccess + +cdef cudaError_t getChannelFormatDescFromDriverDesc(cudaChannelFormatDesc* pRuntimeDesc, size_t* pDepth, size_t* pHeight, size_t* pWidth, const cydriver.CUDA_ARRAY3D_DESCRIPTOR_v2* pDriverDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef int channel_size = 0 + if pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNSIGNED_INT8: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNSIGNED_INT16: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned + channel_size = 16 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNSIGNED_INT32: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned + channel_size = 32 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SIGNED_INT8: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SIGNED_INT16: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned + channel_size = 16 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SIGNED_INT32: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned + channel_size = 32 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_HALF: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat + channel_size = 16 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_FLOAT: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat + channel_size = 32 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_NV12: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindNV12 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT8X1: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT8X2: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT8X4: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT8X1: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT8X2: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT8X4: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT16X1: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1 + channel_size = 16 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT16X2: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2 + channel_size = 16 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT16X4: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4 + channel_size = 16 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT16X1: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1 + channel_size = 16 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT16X2: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2 + channel_size = 16 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT16X4: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4 + channel_size = 16 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC1_UNORM: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC1_UNORM_SRGB: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC2_UNORM: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC2_UNORM_SRGB: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC3_UNORM: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC3_UNORM_SRGB: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC4_UNORM: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC4_SNORM: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC5_UNORM: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC5_SNORM: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC6H_UF16: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H + channel_size = 16 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC6H_SF16: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H + channel_size = 16 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC7_UNORM: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC7_UNORM_SRGB: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT_101010_2: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102 + # 2b: CUDA 13.3/13.4 packed and multi-planar YUV formats + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UINT8_PACKED_422: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned8Packed422 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UINT8_PACKED_444: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned8Packed444 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UINT8_SEMIPLANAR_420: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned8SemiPlanar420 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UINT16_SEMIPLANAR_420: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned16SemiPlanar420 + channel_size = 16 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UINT8_SEMIPLANAR_422: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned8SemiPlanar422 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UINT16_SEMIPLANAR_422: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned16SemiPlanar422 + channel_size = 16 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UINT8_SEMIPLANAR_444: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned8SemiPlanar444 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UINT16_SEMIPLANAR_444: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned16SemiPlanar444 + channel_size = 16 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UINT8_PLANAR_420: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned8Planar420 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UINT16_PLANAR_420: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned16Planar420 + channel_size = 16 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UINT8_PLANAR_422: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned8Planar422 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UINT16_PLANAR_422: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned16Planar422 + channel_size = 16 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UINT8_PLANAR_444: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned8Planar444 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UINT16_PLANAR_444: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned16Planar444 + channel_size = 16 + else: + return cudaErrorInvalidChannelDescriptor + + # populate bits per channel + pRuntimeDesc[0].x = 0 + pRuntimeDesc[0].y = 0 + pRuntimeDesc[0].z = 0 + pRuntimeDesc[0].w = 0 + + if pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT_101010_2 and pDriverDesc[0].NumChannels == 4: + pRuntimeDesc[0].w = 2 + pRuntimeDesc[0].z = 10 + pRuntimeDesc[0].y = 10 + pRuntimeDesc[0].x = 10 + else: + if pDriverDesc[0].NumChannels >= 4: + pRuntimeDesc[0].w = channel_size + if pDriverDesc[0].NumChannels >= 3: + pRuntimeDesc[0].z = channel_size + if pDriverDesc[0].NumChannels >= 2: + pRuntimeDesc[0].y = channel_size + if pDriverDesc[0].NumChannels >= 1: + pRuntimeDesc[0].x = channel_size + + if pDriverDesc[0].NumChannels not in (4, 3, 2, 1): + return cudaErrorInvalidChannelDescriptor + + # populate dimensions + if pDepth != NULL: + pDepth[0] = pDriverDesc[0].Depth + if pHeight != NULL: + pHeight[0] = pDriverDesc[0].Height + if pWidth != NULL: + pWidth[0] = pDriverDesc[0].Width + return cudaSuccess + +cdef cudaError_t getDriverEglFrame(cydriver.CUeglFrame *cuEglFrame, cudaEglFrame eglFrame) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + cdef unsigned int i = 0 + + err = getDescInfo(&eglFrame.planeDesc[0].channelDesc, &cuEglFrame[0].numChannels, &cuEglFrame[0].cuFormat) + if err != cudaSuccess: + return err + for i in range(eglFrame.planeCount): + if eglFrame.frameType == cudaEglFrameTypeArray: + cuEglFrame[0].frame.pArray[i] = eglFrame.frame.pArray[i] + else: + cuEglFrame[0].frame.pPitch[i] = eglFrame.frame.pPitch[i].ptr + cuEglFrame[0].width = eglFrame.planeDesc[0].width + cuEglFrame[0].height = eglFrame.planeDesc[0].height + cuEglFrame[0].depth = eglFrame.planeDesc[0].depth + cuEglFrame[0].pitch = eglFrame.planeDesc[0].pitch + cuEglFrame[0].planeCount = eglFrame.planeCount + if eglFrame.eglColorFormat == cudaEglColorFormatYUV420Planar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR + elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420SemiPlanar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR + elif eglFrame.eglColorFormat == cudaEglColorFormatYUV422Planar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR + elif eglFrame.eglColorFormat == cudaEglColorFormatYUV422SemiPlanar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR + elif eglFrame.eglColorFormat == cudaEglColorFormatYUV444Planar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR + elif eglFrame.eglColorFormat == cudaEglColorFormatYUV444SemiPlanar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR + elif eglFrame.eglColorFormat == cudaEglColorFormatYUYV422: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422 + elif eglFrame.eglColorFormat == cudaEglColorFormatUYVY422: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422 + elif eglFrame.eglColorFormat == cudaEglColorFormatUYVY709: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709 + elif eglFrame.eglColorFormat == cudaEglColorFormatUYVY709_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatUYVY2020: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_2020 + elif eglFrame.eglColorFormat == cudaEglColorFormatARGB: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB + elif eglFrame.eglColorFormat == cudaEglColorFormatRGBA: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA + elif eglFrame.eglColorFormat == cudaEglColorFormatABGR: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ABGR + elif eglFrame.eglColorFormat == cudaEglColorFormatBGRA: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGRA + elif eglFrame.eglColorFormat == cudaEglColorFormatL: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_L + elif eglFrame.eglColorFormat == cudaEglColorFormatR: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_R + elif eglFrame.eglColorFormat == cudaEglColorFormatA: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_A + elif eglFrame.eglColorFormat == cudaEglColorFormatRG: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RG + elif eglFrame.eglColorFormat == cudaEglColorFormatAYUV: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV + elif eglFrame.eglColorFormat == cudaEglColorFormatYVU444SemiPlanar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR + elif eglFrame.eglColorFormat == cudaEglColorFormatYVU422SemiPlanar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR + elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420SemiPlanar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR + elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_444SemiPlanar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR + elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR + elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_444SemiPlanar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR + elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_420SemiPlanar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR + elif eglFrame.eglColorFormat == cudaEglColorFormatVYUY_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatUYVY_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatYUYV_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatYVYU_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatYUVA_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatAYUV_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatYUV444Planar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatYUV422Planar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420Planar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatYUV444SemiPlanar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatYUV422SemiPlanar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420SemiPlanar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatYVU444Planar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatYVU422Planar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420Planar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatYVU444SemiPlanar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatYVU422SemiPlanar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420SemiPlanar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatBayerRGGB: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RGGB + elif eglFrame.eglColorFormat == cudaEglColorFormatBayerBGGR: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BGGR + elif eglFrame.eglColorFormat == cudaEglColorFormatBayerGRBG: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GRBG + elif eglFrame.eglColorFormat == cudaEglColorFormatBayerGBRG: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GBRG + elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10RGGB: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_RGGB + elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10BGGR: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_BGGR + elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10GRBG: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GRBG + elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10GBRG: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GBRG + elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12RGGB: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RGGB + elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12BGGR: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BGGR + elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12GRBG: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GRBG + elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12GBRG: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GBRG + elif eglFrame.eglColorFormat == cudaEglColorFormatBayer14RGGB: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_RGGB + elif eglFrame.eglColorFormat == cudaEglColorFormatBayer14BGGR: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_BGGR + elif eglFrame.eglColorFormat == cudaEglColorFormatBayer14GRBG: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GRBG + elif eglFrame.eglColorFormat == cudaEglColorFormatBayer14GBRG: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GBRG + elif eglFrame.eglColorFormat == cudaEglColorFormatBayer20RGGB: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_RGGB + elif eglFrame.eglColorFormat == cudaEglColorFormatBayer20BGGR: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_BGGR + elif eglFrame.eglColorFormat == cudaEglColorFormatBayer20GRBG: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GRBG + elif eglFrame.eglColorFormat == cudaEglColorFormatBayer20GBRG: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GBRG + elif eglFrame.eglColorFormat == cudaEglColorFormatBayerIspRGGB: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB + elif eglFrame.eglColorFormat == cudaEglColorFormatBayerIspBGGR: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR + elif eglFrame.eglColorFormat == cudaEglColorFormatBayerIspGRBG: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG + elif eglFrame.eglColorFormat == cudaEglColorFormatBayerIspGBRG: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG + elif eglFrame.eglColorFormat == cudaEglColorFormatYVU444Planar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR + elif eglFrame.eglColorFormat == cudaEglColorFormatYVU422Planar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR + elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420Planar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR + elif eglFrame.eglColorFormat == cudaEglColorFormatBayerBCCR: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BCCR + elif eglFrame.eglColorFormat == cudaEglColorFormatBayerRCCB: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RCCB + elif eglFrame.eglColorFormat == cudaEglColorFormatBayerCRBC: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CRBC + elif eglFrame.eglColorFormat == cudaEglColorFormatBayerCBRC: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CBRC + elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10CCCC: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_CCCC + elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12BCCR: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BCCR + elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12RCCB: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RCCB + elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12CRBC: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CRBC + elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12CBRC: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CBRC + elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12CCCC: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CCCC + elif eglFrame.eglColorFormat == cudaEglColorFormatY: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y + elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420SemiPlanar_2020: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 + elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420SemiPlanar_2020: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 + elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420Planar_2020: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 + elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420Planar_2020: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 + elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420SemiPlanar_709: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 + elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420SemiPlanar_709: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 + elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420Planar_709: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 + elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420Planar_709: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709 + elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar_709: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 + elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar_2020: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 + elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_422SemiPlanar_2020: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 + elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_422SemiPlanar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR + elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_422SemiPlanar_709: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709 + elif eglFrame.eglColorFormat == cudaEglColorFormatY_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatY_709_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_709_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatY10_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatY10_709_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_709_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatY12_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatY12_709_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_709_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatYUVA: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA + elif eglFrame.eglColorFormat == cudaEglColorFormatYVYU: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU + elif eglFrame.eglColorFormat == cudaEglColorFormatVYUY: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY + elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_444SemiPlanar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_420SemiPlanar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_444SemiPlanar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER + else: + return cudaErrorInvalidValue + if eglFrame.frameType == cudaEglFrameTypeArray: + cuEglFrame[0].frameType = cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY + elif eglFrame.frameType == cudaEglFrameTypePitch: + cuEglFrame[0].frameType = cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_PITCH + else: + return cudaErrorInvalidValue + +@cython.show_performance_hints(False) +cdef cudaError_t getRuntimeEglFrame(cudaEglFrame *eglFrame, cydriver.CUeglFrame cueglFrame) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + cdef unsigned int i + cdef cydriver.CUDA_ARRAY3D_DESCRIPTOR_v2 ad + cdef cudaPitchedPtr pPtr + memset(eglFrame, 0, sizeof(eglFrame[0])) + memset(&ad, 0, sizeof(ad)) + for i in range(cueglFrame.planeCount): + ad.Depth = cueglFrame.depth + ad.Flags = 0 + ad.Format = cueglFrame.cuFormat + ad.Height = cueglFrame.height + ad.NumChannels = cueglFrame.numChannels + ad.Width = cueglFrame.width + + err = getChannelFormatDescFromDriverDesc(&eglFrame[0].planeDesc[i].channelDesc, NULL, NULL, NULL, &ad) + if err != cudaSuccess: + return err + + eglFrame[0].planeDesc[i].depth = cueglFrame.depth + eglFrame[0].planeDesc[i].numChannels = cueglFrame.numChannels + if i == 0: + eglFrame[0].planeDesc[i].width = cueglFrame.width + eglFrame[0].planeDesc[i].height = cueglFrame.height + eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch + elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709): + eglFrame[0].planeDesc[i].width = (cueglFrame.width / 2) + eglFrame[0].planeDesc[i].height = (cueglFrame.height / 2) + eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) + elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER): + eglFrame[0].planeDesc[i].width = (cueglFrame.width / 2) + eglFrame[0].planeDesc[i].height = (cueglFrame.height / 2) + eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) + eglFrame[0].planeDesc[1].channelDesc.y = 8 + if (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER): + eglFrame[0].planeDesc[1].channelDesc.y = 16 + elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER): + eglFrame[0].planeDesc[i].height = cueglFrame.height + eglFrame[0].planeDesc[i].width = (cueglFrame.width / 2) + eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) + elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709): + eglFrame[0].planeDesc[i].width = (cueglFrame.width / 2) + eglFrame[0].planeDesc[i].height = cueglFrame.height + eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) + eglFrame[0].planeDesc[1].channelDesc.y = 8 + if (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709): + eglFrame[0].planeDesc[1].channelDesc.y = 16 + elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER): + eglFrame[0].planeDesc[i].height = cueglFrame.height + eglFrame[0].planeDesc[i].width = cueglFrame.width + eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch + elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER): + eglFrame[0].planeDesc[i].height = cueglFrame.height + eglFrame[0].planeDesc[i].width = cueglFrame.width + eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch + eglFrame[0].planeDesc[1].channelDesc.y = 8 + if (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER): + eglFrame[0].planeDesc[1].channelDesc.y = 16 + if cueglFrame.frameType == cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY: + eglFrame[0].frame.pArray[i] = cueglFrame.frame.pArray[i] + else: + pPtr = _cylib_make_cudaPitchedPtr(cueglFrame.frame.pPitch[i], eglFrame[0].planeDesc[i].pitch, + eglFrame[0].planeDesc[i].width, eglFrame[0].planeDesc[i].height) + eglFrame[0].frame.pPitch[i] = pPtr + + eglFrame[0].planeCount = cueglFrame.planeCount + if cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR: + eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420Planar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR: + eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420SemiPlanar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR: + eglFrame[0].eglColorFormat = cudaEglColorFormatYUV422Planar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR: + eglFrame[0].eglColorFormat = cudaEglColorFormatYUV422SemiPlanar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR: + eglFrame[0].eglColorFormat = cudaEglColorFormatYUV444Planar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR: + eglFrame[0].eglColorFormat = cudaEglColorFormatYUV444SemiPlanar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422: + eglFrame[0].eglColorFormat = cudaEglColorFormatYUYV422 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422: + eglFrame[0].eglColorFormat = cudaEglColorFormatUYVY422 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709: + eglFrame[0].eglColorFormat = cudaEglColorFormatUYVY709 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatUYVY709_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_2020: + eglFrame[0].eglColorFormat = cudaEglColorFormatUYVY2020 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB: + eglFrame[0].eglColorFormat = cudaEglColorFormatARGB + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA: + eglFrame[0].eglColorFormat = cudaEglColorFormatRGBA + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ABGR: + eglFrame[0].eglColorFormat = cudaEglColorFormatABGR + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGRA: + eglFrame[0].eglColorFormat = cudaEglColorFormatBGRA + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_L: + eglFrame[0].eglColorFormat = cudaEglColorFormatL + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_R: + eglFrame[0].eglColorFormat = cudaEglColorFormatR + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_A: + eglFrame[0].eglColorFormat = cudaEglColorFormatA + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RG: + eglFrame[0].eglColorFormat = cudaEglColorFormatRG + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV: + eglFrame[0].eglColorFormat = cudaEglColorFormatAYUV + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR: + eglFrame[0].eglColorFormat = cudaEglColorFormatYVU444SemiPlanar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR: + eglFrame[0].eglColorFormat = cudaEglColorFormatYVU422SemiPlanar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR: + eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420SemiPlanar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR: + eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_444SemiPlanar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR: + eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR: + eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_444SemiPlanar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR: + eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_420SemiPlanar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatVYUY_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatUYVY_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatYUYV_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatYVYU_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatYUVA_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatAYUV_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatYUV444Planar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatYUV422Planar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420Planar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatYUV444SemiPlanar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatYUV422SemiPlanar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420SemiPlanar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatYVU444Planar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatYVU422Planar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420Planar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatYVU444SemiPlanar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatYVU422SemiPlanar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420SemiPlanar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RGGB: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayerRGGB + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BGGR: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayerBGGR + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GRBG: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayerGRBG + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GBRG: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayerGBRG + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_RGGB: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10RGGB + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_BGGR: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10BGGR + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GRBG: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10GRBG + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GBRG: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10GBRG + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RGGB: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12RGGB + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BGGR: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12BGGR + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GRBG: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12GRBG + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GBRG: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12GBRG + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_RGGB: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayer14RGGB + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_BGGR: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayer14BGGR + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GRBG: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayer14GRBG + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GBRG: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayer14GBRG + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_RGGB: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayer20RGGB + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_BGGR: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayer20BGGR + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GRBG: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayer20GRBG + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GBRG: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayer20GBRG + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayerIspRGGB + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayerIspBGGR + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayerIspGRBG + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayerIspGBRG + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR: + eglFrame[0].eglColorFormat = cudaEglColorFormatYVU444Planar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR: + eglFrame[0].eglColorFormat = cudaEglColorFormatYVU422Planar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR: + eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420Planar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BCCR: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayerBCCR + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RCCB: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayerRCCB + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CRBC: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayerCRBC + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CBRC: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayerCBRC + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_CCCC: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10CCCC + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BCCR: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12BCCR + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RCCB: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12RCCB + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CRBC: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12CRBC + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CBRC: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12CBRC + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CCCC: + eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12CCCC + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y: + eglFrame[0].eglColorFormat = cudaEglColorFormatY + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020: + eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420SemiPlanar_2020 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020: + eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420SemiPlanar_2020 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020: + eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420Planar_2020 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020: + eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420Planar_2020 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709: + eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420SemiPlanar_709 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709: + eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420SemiPlanar_709 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709: + eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420Planar_709 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709: + eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420Planar_709 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709: + eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar_709 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020: + eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar_2020 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020: + eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_422SemiPlanar_2020 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR: + eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_422SemiPlanar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709: + eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_422SemiPlanar_709 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatY_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_709_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatY_709_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatY10_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_709_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatY10_709_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatY12_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_709_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatY12_709_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA: + eglFrame[0].eglColorFormat = cudaEglColorFormatYUVA + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU: + eglFrame[0].eglColorFormat = cudaEglColorFormatYVYU + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY: + eglFrame[0].eglColorFormat = cudaEglColorFormatVYUY + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_444SemiPlanar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_420SemiPlanar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_444SemiPlanar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER + else: + return cudaErrorInvalidValue + if cueglFrame.frameType == cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY: + eglFrame[0].frameType = cudaEglFrameTypeArray + elif cueglFrame.frameType == cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_PITCH: + eglFrame[0].frameType = cudaEglFrameTypePitch + else: + return cudaErrorInvalidValue diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_lib/dlfcn.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/_lib/dlfcn.pxd new file mode 100644 index 0000000000000000000000000000000000000000..23fbe2564848014d4aa0e212a3a4f80665e41dfc --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_lib/dlfcn.pxd @@ -0,0 +1,14 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +cdef extern from "" nogil: + void *dlopen(const char *, int) + char *dlerror() + void *dlsym(void *, const char *) + int dlclose(void *) + + enum: + RTLD_LAZY + RTLD_NOW + RTLD_GLOBAL + RTLD_LOCAL diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_lib/param_packer.h b/hug/lib/python3.12/site-packages/cuda/bindings/_lib/param_packer.h new file mode 100644 index 0000000000000000000000000000000000000000..b11c26dfb92a04d039c6e967b9580d1409666c47 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_lib/param_packer.h @@ -0,0 +1,171 @@ +// SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// SPDX-License-Identifier: Apache-2.0 + +#include + +#include +#include +#include +#include + +// PyLong_AsInt entered the public/stable CPython API in 3.13. cuda.bindings +// supports Python 3.10+, so provide a file-local backport for older builds. +// This is a copy of the CPython implementation; it is `static` (unlike the +// original) because this header is compiled into every extension module that +// includes it, mirroring the other helpers below. +#if PY_VERSION_HEX < 0x030D0000 +static int +PyLong_AsInt(PyObject *obj) +{ + int overflow; + long result = PyLong_AsLongAndOverflow(obj, &overflow); + if (overflow || result > INT_MAX || result < INT_MIN) { + PyErr_SetString(PyExc_OverflowError, + "Python int too large to convert to C int"); + return -1; + } + return (int)result; +} +#endif + +// Statics must be initialized at Python import time via init_param_packer() +// which happens when including utils.pxi. +// This includes the m_feeders maps as it must not be mutated from threads. +static bool param_packer_initialized = false; + +static PyTypeObject* ctypes_c_char = nullptr; +static PyTypeObject* ctypes_c_bool = nullptr; +static PyTypeObject* ctypes_c_wchar = nullptr; +static PyTypeObject* ctypes_c_byte = nullptr; +static PyTypeObject* ctypes_c_ubyte = nullptr; +static PyTypeObject* ctypes_c_short = nullptr; +static PyTypeObject* ctypes_c_ushort = nullptr; +static PyTypeObject* ctypes_c_int = nullptr; +static PyTypeObject* ctypes_c_uint = nullptr; +static PyTypeObject* ctypes_c_long = nullptr; +static PyTypeObject* ctypes_c_ulong = nullptr; +static PyTypeObject* ctypes_c_longlong = nullptr; +static PyTypeObject* ctypes_c_ulonglong = nullptr; +static PyTypeObject* ctypes_c_size_t = nullptr; +static PyTypeObject* ctypes_c_float = nullptr; +static PyTypeObject* ctypes_c_double = nullptr; +static PyTypeObject* ctypes_c_void_p = nullptr; + +// (target type, source type) +static std::map, std::function> m_feeders; + +// Helper to fetch a strong reference of the ctypes type. +static PyTypeObject* fetch_ctypes_type(PyObject* ctypes_module, const char* name) +{ + return (PyTypeObject*)PyObject_GetAttrString(ctypes_module, name); +} + +static bool fetch_ctypes() +{ + PyObject* ctypes_module = PyImport_ImportModule("ctypes"); + if (ctypes_module == nullptr) return false; + // Parenthesize each assignment: `=` binds looser than `&&`. + bool success = ( + (ctypes_c_char = fetch_ctypes_type(ctypes_module, "c_char")) && + (ctypes_c_bool = fetch_ctypes_type(ctypes_module, "c_bool")) && + (ctypes_c_wchar = fetch_ctypes_type(ctypes_module, "c_wchar")) && + (ctypes_c_byte = fetch_ctypes_type(ctypes_module, "c_byte")) && + (ctypes_c_ubyte = fetch_ctypes_type(ctypes_module, "c_ubyte")) && + (ctypes_c_short = fetch_ctypes_type(ctypes_module, "c_short")) && + (ctypes_c_ushort = fetch_ctypes_type(ctypes_module, "c_ushort")) && + (ctypes_c_int = fetch_ctypes_type(ctypes_module, "c_int")) && + (ctypes_c_uint = fetch_ctypes_type(ctypes_module, "c_uint")) && + (ctypes_c_long = fetch_ctypes_type(ctypes_module, "c_long")) && + (ctypes_c_ulong = fetch_ctypes_type(ctypes_module, "c_ulong")) && + (ctypes_c_longlong = fetch_ctypes_type(ctypes_module, "c_longlong")) && + (ctypes_c_ulonglong = fetch_ctypes_type(ctypes_module, "c_ulonglong")) && + (ctypes_c_size_t = fetch_ctypes_type(ctypes_module, "c_size_t")) && + (ctypes_c_float = fetch_ctypes_type(ctypes_module, "c_float")) && + (ctypes_c_double = fetch_ctypes_type(ctypes_module, "c_double")) && + (ctypes_c_void_p = fetch_ctypes_type(ctypes_module, "c_void_p")) // == c_voidp + ); + Py_DECREF(ctypes_module); + return success; +} + + +// Initialize common (target_type, Python type) pairs for fast argument feeding. +static void populate_feeders() +{ + m_feeders[{ctypes_c_int, &PyLong_Type}] = [](void* ptr, PyObject* value) -> int + { + // PyLong_AsInt range-checks against the 32-bit int slot and raises + // OverflowError itself, so an out-of-range value is rejected rather + // than silently truncated. + int v = PyLong_AsInt(value); + if (v == -1 && PyErr_Occurred()) + return -1; + *((int*)ptr) = v; + return sizeof(int); + }; + m_feeders[{ctypes_c_bool, &PyBool_Type}] = [](void* ptr, PyObject* value) -> int + { + *((bool*)ptr) = (value == Py_True); + return sizeof(bool); + }; + m_feeders[{ctypes_c_byte, &PyLong_Type}] = [](void* ptr, PyObject* value) -> int + { + // c_byte is an 8-bit slot with no dedicated CPython converter, so + // range-check explicitly against INT8_MIN/INT8_MAX. AsLongAndOverflow's + // `overflow` only flags values outside `long` (64-bit on LP64), so a + // value in that range would be silently truncated by (int8_t)v without + // the explicit bounds check. When overflow!=0, v is the -1 sentinel + // (not the real value), so that case must be caught before trusting v. + int overflow = 0; + long v = PyLong_AsLongAndOverflow(value, &overflow); + if (overflow == 0 && v == -1 && PyErr_Occurred()) + return -1; // non-overflow conversion error; exception already set + if (overflow != 0 || v < INT8_MIN || v > INT8_MAX) + { + PyErr_SetString(PyExc_OverflowError, + "Python int is out of range for a c_byte (8-bit) kernel argument"); + return -1; + } + *((int8_t*)ptr) = (int8_t)v; + return sizeof(int8_t); + }; + m_feeders[{ctypes_c_double, &PyFloat_Type}] = [](void* ptr, PyObject* value) -> int + { + *((double*)ptr) = (double)PyFloat_AsDouble(value); + return sizeof(double); + }; + m_feeders[{ctypes_c_float, &PyFloat_Type}] = [](void* ptr, PyObject* value) -> int + { + *((float*)ptr) = (float)PyFloat_AsDouble(value); + return sizeof(float); + }; + m_feeders[{ctypes_c_longlong, &PyLong_Type}] = [](void* ptr, PyObject* value) -> int + { + long long v = PyLong_AsLongLong(value); + if (v == -1 && PyErr_Occurred()) + return -1; + *((long long*)ptr) = v; + return sizeof(long long); + }; +} + +// Call once from each consuming module body (import, single-threaded). +static void init_param_packer() +{ + if (param_packer_initialized) + return; + if (!fetch_ctypes()) return; + populate_feeders(); + param_packer_initialized = true; +} + +// Never-mutated lookup. 0 -> ctypes fallback; -1 -> exception already set. +static int feed(void* ptr, PyObject* value, PyObject* type) +{ + auto found = m_feeders.find({(PyTypeObject*)type, Py_TYPE(value)}); + if (found != m_feeders.end()) + { + return found->second(ptr, value); + } + return 0; +} diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_lib/param_packer.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/_lib/param_packer.pxd new file mode 100644 index 0000000000000000000000000000000000000000..cf0c37be768bfeded15d82b5c988d68aa16ed18f --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_lib/param_packer.pxd @@ -0,0 +1,11 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +# Include "param_packer.h" so its contents get compiled into every +# Cython extension module that depends on param_packer.pxd. Each such module +# owns a copy of the header statics and must call init_param_packer(). +cdef extern from "param_packer.h": + # except +* so a C++ throw or pending ImportError become Python exceptions. + void init_param_packer() except +* + # -1 is a feeder rejection; 0 means no feeder (ctypes fallback). + int feed(void* ptr, object o, object ct) except -1 diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_lib/utils.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/_lib/utils.pxd new file mode 100644 index 0000000000000000000000000000000000000000..aaa6e272be199057b702b5b7709410e8dd57a5a5 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_lib/utils.pxd @@ -0,0 +1,172 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +cimport cuda.bindings.driver as driver +cimport cuda.bindings.cydriver as cydriver +cimport cuda.bindings.cyruntime as cyruntime +from libcpp.vector cimport vector +from libcpp cimport bool as cpp_bool +from cpython.buffer cimport PyBuffer_Release, Py_buffer + +cdef class _HelperKernelParams: + cdef Py_buffer _pybuffer + cdef bint _pyobj_acquired + cdef void** _ckernelParams + cdef char* _ckernelParamsData + cdef int _length + cdef bint _malloc_list_created + +cdef struct _HelperInputVoidPtrStruct: + Py_buffer _pybuffer + +cdef class _HelperInputVoidPtr: + cdef _HelperInputVoidPtrStruct _helper + cdef void* _cptr + +cdef void * _helper_input_void_ptr(ptr, _HelperInputVoidPtrStruct *buffer) + +cdef inline void * _helper_input_void_ptr_free(_HelperInputVoidPtrStruct *helper): + if helper[0]._pybuffer.buf != NULL: + PyBuffer_Release(&helper[0]._pybuffer) + + + +cdef class _HelperCUmemPool_attribute: + cdef void* _cptr + cdef cydriver.CUmemPool_attribute_enum _attr + cdef bint _is_getter + + # Return values + cdef int _int_val + cdef unsigned int _uint_val + cdef driver.cuuint64_t _cuuint64_t_val + + + +cdef class _HelperCUmem_range_attribute: + cdef void* _cptr + cdef cydriver.CUmem_range_attribute_enum _attr + cdef size_t _data_size + + # Return values + cdef int _int_val # 32 bit integer + cdef int* _int_val_list # 32 bit integer array + + + +cdef class _HelperCUpointer_attribute: + cdef void* _cptr + cdef cydriver.CUpointer_attribute_enum _attr + cdef bint _is_getter + + # Return values + cdef driver.CUcontext _ctx + cdef unsigned int _uint + cdef int _int + cdef driver.CUdeviceptr _devptr + cdef void* _void + cdef driver.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS _token + cdef bint _bool + cdef unsigned long long _ull + cdef size_t _size + cdef driver.CUmemoryPool _mempool + + + +cdef class _HelperCUgraphMem_attribute: + cdef void* _cptr + cdef cydriver.CUgraphMem_attribute_enum _attr + cdef bint _is_getter + + # Return values + cdef driver.cuuint64_t _cuuint64_t_val + + + +cdef class _HelperCUjit_option: + cdef void* _cptr + cdef cydriver.CUjit_option_enum _attr + + # Return values + cdef unsigned int _uint + cdef float _float + cdef char* _charstar + cdef cydriver.CUjit_target_enum _target + cdef cydriver.CUjit_fallback_enum _fallback + cdef int _int + cdef cydriver.CUjit_cacheMode_enum _cacheMode + cdef vector[char*] _charstarstar # list of names + cdef _InputVoidPtrPtrHelper _voidstarstar # list of addresses + + + +cdef class _HelperCudaJitOption: + cdef void* _cptr + cdef cyruntime.cudaJitOption _attr + + # Return values + cdef unsigned int _uint + cdef float _float + cdef char* _charstar + cdef cyruntime.cudaJit_Fallback _fallback + cdef int _int + cdef cyruntime.cudaJit_CacheMode _cacheMode + + + +cdef class _HelperCUlibraryOption: + cdef void* _cptr + cdef cydriver.CUlibraryOption_enum _attr + + # Return values + cdef unsigned int _uint + + + +cdef class _HelperCudaLibraryOption: + cdef void* _cptr + cdef cyruntime.cudaLibraryOption _attr + + # Return values + cdef unsigned int _uint + + + +cdef class _HelperCUmemAllocationHandleType: + cdef void* _cptr + cdef cydriver.CUmemAllocationHandleType_enum _type + + # Return values + cdef int _int + cdef void* _handle + cdef unsigned int _d3dkmt_handle + + cdef driver.CUmemFabricHandle _mem_fabric_handle + + +cdef class _HelperCUlogicalEndpointIpcHandleType: + cdef void* _cptr + cdef cydriver.CUlogicalEndpointIpcHandleType_enum _type + + # Return values + cdef int _int + cdef driver.CUlogicalEndpointFabricHandle _fabric_handle + + +cdef class _InputVoidPtrPtrHelper: + cdef object _references + cdef void** _cptr + + + +cdef class _HelperCUcoredumpSettings: + cdef void* _cptr + cdef cydriver.CUcoredumpSettings_enum _attrib + cdef bint _is_getter + cdef size_t _size + cdef object _references # keeps caller bytes alive so _charstar stays valid + + # Return values + cdef cpp_bool _bool + cdef unsigned int _uint + cdef char* _charstar diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_lib/utils.pxi b/hug/lib/python3.12/site-packages/cuda/bindings/_lib/utils.pxi new file mode 100644 index 0000000000000000000000000000000000000000..d39a32902a55f576b1a32e72b46dcb4e5a953afd --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_lib/utils.pxi @@ -0,0 +1,786 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +from cpython.buffer cimport PyObject_CheckBuffer, PyObject_GetBuffer, PyBuffer_Release, PyBUF_SIMPLE, PyBUF_ANY_CONTIGUOUS +from libc.stdlib cimport calloc, free +from libc.stdint cimport int32_t, uint32_t, int64_t, uint64_t +from libc.stddef cimport wchar_t +from libc.string cimport memcpy +from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum +import ctypes as _ctypes +cimport cuda.bindings.cydriver as cydriver +cimport cuda.bindings._lib.param_packer as param_packer + +# Import-time init so feed() is a pure read under free threading. +param_packer.init_param_packer() + +cdef void* _callocWrapper(length, size): + cdef void* out = calloc(length, size) + if out is NULL: + raise MemoryError('Failed to allocated length x size memory: {}x{}'.format(length, size)) + return out + +cdef class _HelperKernelParams: + supported_types = { # excluding void_p and None, which are handled specially + _ctypes.c_bool, + _ctypes.c_char, + _ctypes.c_wchar, + _ctypes.c_byte, + _ctypes.c_ubyte, + _ctypes.c_short, + _ctypes.c_ushort, + _ctypes.c_int, + _ctypes.c_uint, + _ctypes.c_long, + _ctypes.c_ulong, + _ctypes.c_longlong, + _ctypes.c_ulonglong, + _ctypes.c_size_t, + _ctypes.c_float, + _ctypes.c_double + } + + max_param_size = max(_ctypes.sizeof(max(_HelperKernelParams.supported_types, key=lambda t:_ctypes.sizeof(t))), sizeof(void_ptr)) + + def __cinit__(self, kernelParams): + self._pyobj_acquired = False + self._malloc_list_created = False + if kernelParams is None: + self._ckernelParams = NULL + elif isinstance(kernelParams, (int)): + # Easy run, user gave us an already configured void** address + self._ckernelParams = kernelParams + elif PyObject_CheckBuffer(kernelParams): + # Easy run, get address from Python Buffer Protocol + err_buffer = PyObject_GetBuffer(kernelParams, &self._pybuffer, PyBUF_SIMPLE | PyBUF_ANY_CONTIGUOUS) + if err_buffer == -1: + raise RuntimeError("Argument 'kernelParams' failed to retrieve buffer through Buffer Protocol") + self._pyobj_acquired = True + self._ckernelParams = self._pybuffer.buf + elif isinstance(kernelParams, (tuple)) and len(kernelParams) == 2 and isinstance(kernelParams[0], (tuple)) and isinstance(kernelParams[1], (tuple)): + # Hard run, construct and fill out contigues memory using provided kernel values and types based + if len(kernelParams[0]) != len(kernelParams[1]): + raise TypeError("Argument 'kernelParams' has tuples with different length") + if len(kernelParams[0]) != 0: + self._length = len(kernelParams[0]) + self._ckernelParams = _callocWrapper(len(kernelParams[0]), sizeof(void*)) + self._ckernelParamsData = _callocWrapper(len(kernelParams[0]), _HelperKernelParams.max_param_size) + self._malloc_list_created = True + + idx = 0 + data_idx = 0 + for value, ctype in zip(kernelParams[0], kernelParams[1]): + if ctype is None: + # special cases for None + if callable(getattr(value, 'getPtr', None)): + self._ckernelParams[idx] = value.getPtr() + elif isinstance(value, (_ctypes.Structure)): + self._ckernelParams[idx] = _ctypes.addressof(value) + elif isinstance(value, (_FastEnum)): + self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) + (self._ckernelParams[idx])[0] = value.value + data_idx += sizeof(int) + else: + raise TypeError("Provided argument is of type {} but expected Type {}, {} or CUDA Binding structure with getPtr() attribute".format(type(value), type(_ctypes.Structure), type(_ctypes.c_void_p))) + elif ctype in _HelperKernelParams.supported_types: + self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) + + # handle case where a float is passed as a double + if ctype == _ctypes.c_double and isinstance(value, _ctypes.c_float): + value = ctype(value.value) + if not isinstance(value, ctype): # make it a ctype + size = param_packer.feed(self._ckernelParams[idx], value, ctype) + if size == 0: # feed failed + value = ctype(value) + size = _ctypes.sizeof(ctype) + addr = (_ctypes.addressof(value)) + memcpy(self._ckernelParams[idx], addr, size) + else: + size = _ctypes.sizeof(ctype) + addr = (_ctypes.addressof(value)) + memcpy(self._ckernelParams[idx], addr, size) + data_idx += size + elif ctype == _ctypes.c_void_p: + # special cases for void_p + if isinstance(value, (int, _ctypes.c_void_p)): + self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) + (self._ckernelParams[idx])[0] = value.value if isinstance(value, (_ctypes.c_void_p)) else value + data_idx += sizeof(void_ptr) + elif callable(getattr(value, 'getPtr', None)): + self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) + (self._ckernelParams[idx])[0] = value.getPtr() + data_idx += sizeof(void_ptr) + else: + raise TypeError("Provided argument is of type {} but expected Type {}, {} or CUDA Binding structure with getPtr() attribute".format(type(value), type(int), type(_ctypes.c_void_p))) + else: + raise TypeError("Unsupported type: " + str(type(ctype))) + idx += 1 + else: + raise TypeError("Argument 'kernelParams' is not a valid type: tuple[tuple[Any, ...], tuple[Any, ...]] or PyObject implimenting Buffer Protocol or Int") + + def __dealloc__(self): + if self._pyobj_acquired is True: + PyBuffer_Release(&self._pybuffer) + if self._malloc_list_created is True: + free(self._ckernelParams) + free(self._ckernelParamsData) + + @property + def ckernelParams(self): + return self._ckernelParams + +cdef class _HelperInputVoidPtr: + def __cinit__(self, ptr): + self._cptr = _helper_input_void_ptr(ptr, &self._helper) + + def __dealloc__(self): + _helper_input_void_ptr_free(&self._helper) + + @property + def cptr(self): + return self._cptr + + +cdef void * _helper_input_void_ptr(ptr, _HelperInputVoidPtrStruct *helper): + helper[0]._pybuffer.buf = NULL + try: + return ptr + except: + if ptr is None: + return NULL + elif PyObject_CheckBuffer(ptr): + # Easy run, get address from Python Buffer Protocol + err_buffer = PyObject_GetBuffer(ptr, &helper[0]._pybuffer, PyBUF_SIMPLE | PyBUF_ANY_CONTIGUOUS) + if err_buffer == -1: + raise RuntimeError("Failed to retrieve buffer through Buffer Protocol") + return (helper[0]._pybuffer.buf) + else: + raise TypeError("Provided argument is of type {} but expected Type {}, {} or object with Buffer Protocol".format(type(ptr), type(None), type(int))) + + + + +cdef class _HelperCUmemPool_attribute: + def __cinit__(self, attr, init_value, is_getter=False): + self._is_getter = is_getter + self._attr = attr.value + if self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES,): + self._int_val = init_value + self._cptr = &self._int_val + elif self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RELEASE_THRESHOLD, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_CURRENT, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_HIGH, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_MAX_POOL_SIZE,): + if self._is_getter: + self._cuuint64_t_val = _driver["cuuint64_t"]() + self._cptr = self._cuuint64_t_val.getPtr() + else: + self._cptr = init_value.getPtr() + elif self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_ALLOCATION_TYPE, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_LOCATION_ID, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_LOCATION_TYPE, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_HW_DECOMPRESS_ENABLED, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_LOCALITY_DOMAIN_ID,): + self._int_val = init_value + self._cptr = &self._int_val + elif self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_EXPORT_HANDLE_TYPES,): + self._uint_val = init_value + self._cptr = &self._uint_val + else: + raise TypeError('Unsupported attribute: {}'.format(attr.name)) + + def __dealloc__(self): + pass + + @property + def cptr(self): + return self._cptr + + def pyObj(self): + assert(self._is_getter == True) + if self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES,): + return self._int_val + elif self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RELEASE_THRESHOLD, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_CURRENT, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_HIGH, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_MAX_POOL_SIZE,): + return self._cuuint64_t_val + elif self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_ALLOCATION_TYPE, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_LOCATION_ID, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_LOCATION_TYPE, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_HW_DECOMPRESS_ENABLED, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_LOCALITY_DOMAIN_ID,): + return self._int_val + elif self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_EXPORT_HANDLE_TYPES,): + return self._uint_val + else: + raise TypeError('Unsupported attribute value: {}'.format(self._attr)) + + + +cdef class _HelperCUmem_range_attribute: + def __cinit__(self, attr, data_size): + self._data_size = data_size + self._attr = attr.value + if self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY, + cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION, + cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION, + cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_TYPE, + cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_ID, + cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_TYPE, + cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_ID,): + self._cptr = &self._int_val + elif self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY,): + self._cptr = _callocWrapper(1, self._data_size) + self._int_val_list = self._cptr + else: + raise TypeError('Unsupported attribute: {}'.format(attr.name)) + + def __dealloc__(self): + if self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY,): + free(self._cptr) + + @property + def cptr(self): + return self._cptr + + def pyObj(self): + if self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY, + cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION, + cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION, + cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_TYPE, + cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_ID, + cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_TYPE, + cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_ID,): + return self._int_val + elif self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY,): + return [self._int_val_list[idx] for idx in range(int(self._data_size/4))] + else: + raise TypeError('Unsupported attribute value: {}'.format(self._attr)) + + + +cdef class _HelperCUpointer_attribute: + def __cinit__(self, attr, init_value, is_getter=False): + self._is_getter = is_getter + self._attr = attr.value + if self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_CONTEXT,): + if self._is_getter: + self._ctx = _driver["CUcontext"]() + self._cptr = self._ctx.getPtr() + else: + self._cptr = init_value.getPtr() + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_TYPE, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAGS,): + self._uint = init_value + self._cptr = &self._uint + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL,): + self._int = init_value + self._cptr = &self._int + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_POINTER, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_START_ADDR,): + if self._is_getter: + self._devptr = _driver["CUdeviceptr"]() + self._cptr = self._devptr.getPtr() + else: + self._cptr = init_value.getPtr() + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_HOST_POINTER,): + self._void = init_value + self._cptr = &self._void + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_P2P_TOKENS,): + if self._is_getter: + self._token = _driver["CUDA_POINTER_ATTRIBUTE_P2P_TOKENS"]() + self._cptr = self._token.getPtr() + else: + self._cptr = init_value.getPtr() + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_SYNC_MEMOPS, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_MANAGED, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MAPPED,): + self._bool = init_value + self._cptr = &self._bool + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_BUFFER_ID, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES,): + self._ull = init_value + self._cptr = &self._ull + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_SIZE, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MAPPING_SIZE,): + self._size = init_value + self._cptr = &self._size + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE,): + if self._is_getter: + self._mempool = _driver["CUmemoryPool"]() + self._cptr = self._mempool.getPtr() + else: + self._cptr = init_value.getPtr() + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MAPPING_BASE_ADDR,): + if self._is_getter: + self._devptr = _driver["CUdeviceptr"]() + self._cptr = self._devptr.getPtr() + else: + self._cptr = init_value.getPtr() + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_BLOCK_ID,): + self._ull = init_value + self._cptr = &self._ull + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_HW_DECOMPRESS_CAPABLE,): + self._bool = init_value + self._cptr = &self._bool + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_LOCALITY_DOMAIN_ORDINAL,): + self._int = init_value + self._cptr = &self._int + else: + raise TypeError('Unsupported attribute: {}'.format(attr.name)) + + def __dealloc__(self): + pass + + @property + def cptr(self): + return self._cptr + + def pyObj(self): + assert(self._is_getter == True) + if self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_CONTEXT,): + return self._ctx + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_TYPE, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAGS,): + return self._uint + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL,): + return self._int + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_POINTER, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_START_ADDR,): + return self._devptr + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_HOST_POINTER,): + return self._void + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_P2P_TOKENS,): + return self._token + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_SYNC_MEMOPS, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_MANAGED, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MAPPED,): + return self._bool + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_BUFFER_ID, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES,): + return self._ull + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_SIZE, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MAPPING_SIZE,): + return self._size + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE,): + return self._mempool + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MAPPING_BASE_ADDR,): + return self._devptr + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_BLOCK_ID,): + return self._ull + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_HW_DECOMPRESS_CAPABLE,): + return self._bool + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_LOCALITY_DOMAIN_ORDINAL,): + return self._int + else: + raise TypeError('Unsupported attribute value: {}'.format(self._attr)) + + + +cdef class _HelperCUgraphMem_attribute: + def __cinit__(self, attr, init_value, is_getter=False): + self._is_getter = is_getter + self._attr = attr.value + if self._attr in (cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT, + cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_HIGH, + cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT, + cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH,): + if self._is_getter: + self._cuuint64_t_val = _driver["cuuint64_t"]() + self._cptr = self._cuuint64_t_val.getPtr() + else: + self._cptr = init_value.getPtr() + else: + raise TypeError('Unsupported attribute: {}'.format(attr.name)) + + def __dealloc__(self): + pass + + @property + def cptr(self): + return self._cptr + + def pyObj(self): + assert(self._is_getter == True) + if self._attr in (cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT, + cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_HIGH, + cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT, + cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH,): + return self._cuuint64_t_val + else: + raise TypeError('Unsupported attribute value: {}'.format(self._attr)) + + + +cdef class _HelperCUjit_option: + def __cinit__(self, attr, init_value): + self._attr = attr.value + if self._attr in (cydriver.CUjit_option_enum.CU_JIT_MAX_REGISTERS, + cydriver.CUjit_option_enum.CU_JIT_THREADS_PER_BLOCK, + cydriver.CUjit_option_enum.CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES, + cydriver.CUjit_option_enum.CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES, + cydriver.CUjit_option_enum.CU_JIT_OPTIMIZATION_LEVEL, + cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_COUNT, + cydriver.CUjit_option_enum.CU_JIT_TARGET_FROM_CUCONTEXT, + cydriver.CUjit_option_enum.CU_JIT_REFERENCED_KERNEL_COUNT, + cydriver.CUjit_option_enum.CU_JIT_REFERENCED_VARIABLE_COUNT, + cydriver.CUjit_option_enum.CU_JIT_MIN_CTA_PER_SM, + cydriver.CUjit_option_enum.CU_JIT_SPLIT_COMPILE, + cydriver.CUjit_option_enum.CU_JIT_BINARY_LOADER_THREAD_COUNT,): + self._uint = init_value + self._cptr = self._uint + elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_WALL_TIME,): + self._float = init_value + # CU_JIT_WALL_TIME is an OUT option: CUDA writes the elapsed float + # back through the pointer. Use the address of _float so CUDA has + # valid storage to write into, rather than value-casting the float + # (which would produce a garbage address). + self._cptr = &self._float + elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_INFO_LOG_BUFFER, + cydriver.CUjit_option_enum.CU_JIT_ERROR_LOG_BUFFER): + self._charstar = init_value + self._cptr = self._charstar + elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_TARGET,): + self._target = init_value.value + self._cptr = self._target + elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_FALLBACK_STRATEGY,): + self._fallback = init_value.value + self._cptr = self._fallback + elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_GENERATE_DEBUG_INFO, + cydriver.CUjit_option_enum.CU_JIT_LOG_VERBOSE, + cydriver.CUjit_option_enum.CU_JIT_GENERATE_LINE_INFO, + cydriver.CUjit_option_enum.CU_JIT_LTO, + cydriver.CUjit_option_enum.CU_JIT_FTZ, + cydriver.CUjit_option_enum.CU_JIT_PREC_DIV, + cydriver.CUjit_option_enum.CU_JIT_PREC_SQRT, + cydriver.CUjit_option_enum.CU_JIT_FMA, + cydriver.CUjit_option_enum.CU_JIT_OPTIMIZE_UNUSED_DEVICE_VARIABLES, + cydriver.CUjit_option_enum.CU_JIT_POSITION_INDEPENDENT_CODE, + cydriver.CUjit_option_enum.CU_JIT_MAX_THREADS_PER_BLOCK, + cydriver.CUjit_option_enum.CU_JIT_OVERRIDE_DIRECTIVE_VALUES,): + self._int = init_value + self._cptr = self._int + elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_CACHE_MODE,): + self._cacheMode = init_value.value + self._cptr = self._cacheMode + elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_NAMES, + cydriver.CUjit_option_enum.CU_JIT_REFERENCED_KERNEL_NAMES, + cydriver.CUjit_option_enum.CU_JIT_REFERENCED_VARIABLE_NAMES,): + self._charstarstar = init_value + self._cptr = &self._charstarstar[0] + elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_ADDRESSES,): + pylist = [_HelperInputVoidPtr(val) for val in init_value] + self._voidstarstar = _InputVoidPtrPtrHelper(pylist) + self._cptr = self._voidstarstar.cptr + else: + raise TypeError('Unsupported attribute: {}'.format(attr.name)) + + def __dealloc__(self): + pass + + @property + def cptr(self): + return self._cptr + + + + +cdef class _HelperCudaJitOption: + def __cinit__(self, attr, init_value): + self._attr = attr.value + if self._attr in (cyruntime.cudaJitOption.cudaJitMaxRegisters, + cyruntime.cudaJitOption.cudaJitThreadsPerBlock, + cyruntime.cudaJitOption.cudaJitInfoLogBufferSizeBytes, + cyruntime.cudaJitOption.cudaJitErrorLogBufferSizeBytes, + cyruntime.cudaJitOption.cudaJitOptimizationLevel, + cyruntime.cudaJitOption.cudaJitMinCtaPerSm,): + self._uint = init_value + self._cptr = self._uint + elif self._attr in (cyruntime.cudaJitOption.cudaJitWallTime,): + self._float = init_value + # cudaJitWallTime is an OUT option: CUDA writes the elapsed float + # back through the pointer. Use the address of _float so CUDA has + # valid storage to write into, rather than value-casting the float + # (which would produce a garbage address). + self._cptr = &self._float + elif self._attr in (cyruntime.cudaJitOption.cudaJitInfoLogBuffer, + cyruntime.cudaJitOption.cudaJitErrorLogBuffer): + self._charstar = init_value + self._cptr = self._charstar + elif self._attr in (cyruntime.cudaJitOption.cudaJitFallbackStrategy,): + self._fallback = init_value.value + self._cptr = self._fallback + elif self._attr in (cyruntime.cudaJitOption.cudaJitGenerateDebugInfo, + cyruntime.cudaJitOption.cudaJitLogVerbose, + cyruntime.cudaJitOption.cudaJitGenerateLineInfo, + cyruntime.cudaJitOption.cudaJitPositionIndependentCode, + cyruntime.cudaJitOption.cudaJitMaxThreadsPerBlock, + cyruntime.cudaJitOption.cudaJitOverrideDirectiveValues,): + self._int = init_value + self._cptr = self._int + elif self._attr in (cyruntime.cudaJitOption.cudaJitCacheMode,): + self._cacheMode = init_value.value + self._cptr = self._cacheMode + else: + raise TypeError('Unsupported attribute: {}'.format(attr.name)) + + def __dealloc__(self): + pass + + @property + def cptr(self): + return self._cptr + + + + +cdef class _HelperCUlibraryOption: + def __cinit__(self, attr, init_value): + self._attr = attr.value + if False: + pass + + elif self._attr in (cydriver.CUlibraryOption_enum.CU_LIBRARY_HOST_UNIVERSAL_FUNCTION_AND_DATA_TABLE,): + self._cptr = init_value.getPtr() + + + elif self._attr in (cydriver.CUlibraryOption_enum.CU_LIBRARY_BINARY_IS_PRESERVED,): + self._uint = init_value + self._cptr = self._uint + + else: + raise TypeError('Unsupported attribute: {}'.format(attr.name)) + + def __dealloc__(self): + pass + + @property + def cptr(self): + return self._cptr + + + + +cdef class _HelperCudaLibraryOption: + def __cinit__(self, attr, init_value): + self._attr = attr.value + if False: + pass + + elif self._attr in (cyruntime.cudaLibraryOption.cudaLibraryHostUniversalFunctionAndDataTable,): + self._cptr = init_value.getPtr() + + + elif self._attr in (cyruntime.cudaLibraryOption.cudaLibraryBinaryIsPreserved,): + self._uint = init_value + self._cptr = self._uint + + else: + raise TypeError('Unsupported attribute: {}'.format(attr.name)) + + def __dealloc__(self): + pass + + @property + def cptr(self): + return self._cptr + + + + +cdef class _HelperCUmemAllocationHandleType: + def __cinit__(self, attr): + self._type = attr.value + if False: + pass + + elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_NONE,): + self._cptr = &self._int + + + elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR,): + self._cptr = &self._int + + + elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32,): + self._cptr = &self._handle + + + elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32_KMT,): + self._cptr = &self._d3dkmt_handle + + + elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_FABRIC,): + self._mem_fabric_handle = _driver["CUmemFabricHandle"]() + self._cptr = self._mem_fabric_handle.getPtr() + + else: + raise TypeError('Unsupported attribute: {}'.format(attr.name)) + + def __dealloc__(self): + pass + + @property + def cptr(self): + return self._cptr + + def pyObj(self): + if False: + pass + + elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_NONE,): + return self._int + + + elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR,): + return self._int + + + elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32,): + return self._handle + + + elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32_KMT,): + return self._d3dkmt_handle + + + elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_FABRIC,): + return self._mem_fabric_handle + + else: + raise TypeError('Unsupported attribute: {}'.format(self._type)) + + + +cdef class _HelperCUlogicalEndpointIpcHandleType: + def __cinit__(self, attr): + self._type = attr.value + if False: + pass + + elif self._type in (cydriver.CUlogicalEndpointIpcHandleType_enum.CU_LOGICAL_ENDPOINT_IPC_HANDLE_TYPE_NONE,): + self._cptr = &self._int + + + elif self._type in (cydriver.CUlogicalEndpointIpcHandleType_enum.CU_LOGICAL_ENDPOINT_IPC_HANDLE_TYPE_FABRIC,): + self._fabric_handle = _driver["CUlogicalEndpointFabricHandle"]() + self._cptr = self._fabric_handle.getPtr() + + else: + raise TypeError('Unsupported attribute: {}'.format(attr.name)) + + def __dealloc__(self): + pass + + @property + def cptr(self): + return self._cptr + + def pyObj(self): + if False: + pass + + elif self._type in (cydriver.CUlogicalEndpointIpcHandleType_enum.CU_LOGICAL_ENDPOINT_IPC_HANDLE_TYPE_NONE,): + return self._int + + + elif self._type in (cydriver.CUlogicalEndpointIpcHandleType_enum.CU_LOGICAL_ENDPOINT_IPC_HANDLE_TYPE_FABRIC,): + return self._fabric_handle + + else: + raise TypeError('Unsupported attribute: {}'.format(self._type)) + + +cdef class _InputVoidPtrPtrHelper: + def __cinit__(self, lst): + # Hold onto references to the original buffers so they + # won't be free'd behind our back + self._references = lst + self._cptr = _callocWrapper(len(lst), sizeof(void*)) + for idx in range(len(lst)): + self._cptr[idx] = lst[idx].cptr + + def __dealloc__(self): + free(self._cptr) + + @property + def cptr(self): + return self._cptr + + + +cdef class _HelperCUcoredumpSettings: + def __cinit__(self, attr, init_value, is_getter=False): + self._is_getter = is_getter + self._attrib = attr.value + if self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_FILE, + cydriver.CUcoredumpSettings_enum.CU_COREDUMP_PIPE,): + if self._is_getter: + self._charstar = _callocWrapper(1024, 1) + self._cptr = self._charstar + self._size = 1024 + else: + # Keep a reference so the borrowed _charstar buffer stays alive. + self._references = init_value + self._charstar = init_value + self._cptr = self._charstar + self._size = len(init_value) + elif self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_ON_EXCEPTION, + cydriver.CUcoredumpSettings_enum.CU_COREDUMP_TRIGGER_HOST, + cydriver.CUcoredumpSettings_enum.CU_COREDUMP_LIGHTWEIGHT, + cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_USER_TRIGGER,): + if self._is_getter == False: + self._bool = init_value + + self._cptr = &self._bool + self._size = sizeof(cpp_bool) + elif self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_GENERATION_FLAGS,): + if self._is_getter == False: + self._uint = init_value + + self._cptr = &self._uint + self._size = sizeof(unsigned int) + else: + raise TypeError('Unsupported attribute: {}'.format(attr.name)) + + def __dealloc__(self): + # Only the getter path owns heap (the calloc'd 1024-byte buffer). The + # setter borrows caller bytes and the bool path points at &self._bool, + # so only free for the getter. + if self._is_getter: + free(self._charstar) + + @property + def cptr(self): + return self._cptr + + def size(self): + return self._size + + def pyObj(self): + assert(self._is_getter == True) + if self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_FILE, + cydriver.CUcoredumpSettings_enum.CU_COREDUMP_PIPE,): + return self._charstar + elif self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_ON_EXCEPTION, + cydriver.CUcoredumpSettings_enum.CU_COREDUMP_TRIGGER_HOST, + cydriver.CUcoredumpSettings_enum.CU_COREDUMP_LIGHTWEIGHT, + cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_USER_TRIGGER,): + return self._bool + elif self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_GENERATION_FLAGS,): + return self._uint + else: + raise TypeError('Unsupported attribute value: {}'.format(self._attrib)) diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_lib/windll.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/_lib/windll.pxd new file mode 100644 index 0000000000000000000000000000000000000000..b5fd5c4db90ea1c389e2533192e35fd43d2ceec9 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_lib/windll.pxd @@ -0,0 +1,45 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +from libc.stddef cimport wchar_t +from libc.stdint cimport uintptr_t +from cpython cimport PyUnicode_AsWideCharString, PyMem_Free + +cdef extern from "windows.h" nogil: + ctypedef void* HMODULE + ctypedef void* HANDLE + ctypedef void* FARPROC + ctypedef unsigned long DWORD + ctypedef const wchar_t *LPCWSTR + ctypedef const char *LPCSTR + ctypedef int BOOL + + const DWORD LOAD_LIBRARY_SEARCH_SYSTEM32 + + HMODULE _LoadLibraryExW "LoadLibraryExW"( + LPCWSTR lpLibFileName, + HANDLE hFile, + DWORD dwFlags + ) + + FARPROC _GetProcAddress "GetProcAddress"(HMODULE hModule, LPCSTR lpProcName) + + BOOL _FreeLibrary "FreeLibrary"(HMODULE hLibModule) + +cdef inline uintptr_t LoadLibraryExW(str path, HANDLE hFile, DWORD dwFlags): + cdef uintptr_t result + cdef wchar_t* wpath = PyUnicode_AsWideCharString(path, NULL) + with nogil: + result = _LoadLibraryExW( + wpath, + hFile, + dwFlags + ) + PyMem_Free(wpath) + return result + +cdef inline FARPROC GetProcAddress(uintptr_t hModule, const char* lpProcName) nogil: + return _GetProcAddress(hModule, lpProcName) + +cdef inline BOOL FreeLibrary(uintptr_t hLibModule) nogil: + return _FreeLibrary(hLibModule) diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_v2/__init__.py b/hug/lib/python3.12/site-packages/cuda/bindings/_v2/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_v2/__pycache__/__init__.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/bindings/_v2/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..34360a33b88afa2e4a0165fddd85b85f8341af27 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/bindings/_v2/__pycache__/__init__.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_v2/nvrtc.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/_v2/nvrtc.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..5c7be122d89dcf791e9cd8c56614f0a770efa17b --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_v2/nvrtc.cpython-312-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b5db0beb9e50dff7497514796fcc0557845e20ec66e345298f5752ad1a8e5fa +size 326472 diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_v2/nvrtc.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/_v2/nvrtc.pxd new file mode 100644 index 0000000000000000000000000000000000000000..9c5978e5474b148d154881e36a6cca5fe01315be --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_v2/nvrtc.pxd @@ -0,0 +1,68 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5c7c24ae0ae5a6032e23f801fe9c3151a434eebd3b3429fbfd799985f87b184c + + +# <<<< PREAMBLE CONTENT >>>> + +from libc.stdint cimport intptr_t + + +# <<<< END OF PREAMBLE CONTENT >>>> + +from libc.stdint cimport intptr_t + +from ..cynvrtc cimport * + + +############################################################################### +# Types +############################################################################### + +ctypedef nvrtcProgram Program + + +############################################################################### +# Enum +############################################################################### + +ctypedef nvrtcResult _Result + + +############################################################################### +# Functions +############################################################################### + +cpdef intptr_t create_program(bytes src, name, headers=*, include_names=*) except? 0 +cpdef compile_program(intptr_t prog, options=*) +cpdef set_flow_callback(intptr_t prog, intptr_t callback, intptr_t payload) +cpdef bytes get_lowered_name(intptr_t prog, bytes name_expression) +cpdef install_bundled_headers(bytes install_path, unsigned int flags) +cpdef tuple get_bundled_headers_info() +cpdef remove_bundled_headers(bytes install_path) + +cpdef str get_error_string(int result) +cpdef tuple version() +cpdef int get_num_supported_archs() except? -1 +cpdef object get_supported_archs() +cpdef destroy_program(intptr_t prog) +cpdef size_t get_ptx_size(intptr_t prog) except? 0 +cpdef bytes get_ptx(intptr_t prog) +cpdef size_t get_cubin_size(intptr_t prog) except? 0 +cpdef bytes get_cubin(intptr_t prog) +cpdef size_t get_ltoir_size(intptr_t prog) except? 0 +cpdef bytes get_ltoir(intptr_t prog) +cpdef size_t get_optix_ir_size(intptr_t prog) except? 0 +cpdef bytes get_optix_ir(intptr_t prog) +cpdef size_t get_program_log_size(intptr_t prog) except? 0 +cpdef bytes get_program_log(intptr_t prog) +cpdef add_name_expression(intptr_t prog, name_expression) +cpdef size_t get_pch_heap_size() except? 0 +cpdef set_pch_heap_size(size_t size) +cpdef int get_pch_create_status(intptr_t prog) except? -1 +cpdef size_t get_pch_heap_size_required(intptr_t prog) except? 0 +cpdef size_t get_tile_ir_size(intptr_t prog) except? 0 +cpdef bytes get_tile_ir(intptr_t prog) diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/_version.py b/hug/lib/python3.12/site-packages/cuda/bindings/_version.py new file mode 100644 index 0000000000000000000000000000000000000000..d3e6ee9c04e01b5b151403495739c47c82148567 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/_version.py @@ -0,0 +1,24 @@ +# file generated by vcs-versioning +# don't change, don't track in version control +from __future__ import annotations + +__all__ = [ + "__version__", + "__version_tuple__", + "version", + "version_tuple", + "__commit_id__", + "commit_id", +] + +version: str +__version__: str +__version_tuple__: tuple[int | str, ...] +version_tuple: tuple[int | str, ...] +commit_id: str | None +__commit_id__: str | None + +__version__ = version = '13.4.4' +__version_tuple__ = version_tuple = (13, 4, 4) + +__commit_id__ = commit_id = 'g0f6315c0a' diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/cudla.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/cudla.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..61a9311f87ee96db22a6211fd020a332ce5bc13f --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/cudla.cpython-312-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c6769a003329c9f1ae73ce2a15025f46933fcf772eb4718b0e885299458fe0b3 +size 475632 diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/cudla.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/cudla.pxd new file mode 100644 index 0000000000000000000000000000000000000000..90cddb7e3427a875160a54aae8358074b6f267c3 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/cudla.pxd @@ -0,0 +1,66 @@ +# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +# This code was automatically generated across versions from 1.5.0 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=f6b70193e4ca3c62bd5749b3d19d305f0e268225bf1a6dcf6b95091cb0511791 + + +# <<<< PREAMBLE CONTENT >>>> + +from libc.stdint cimport ( + intptr_t, + uint32_t, + uint64_t, +) + + +# <<<< END OF PREAMBLE CONTENT >>>> + +from libc.stdint cimport intptr_t + +from .cycudla cimport * + + + + +############################################################################### +# Types +############################################################################### + +ctypedef cudlaDevHandle DevHandle +ctypedef cudlaModule Module + + +############################################################################### +# Enum +############################################################################### + +ctypedef cudlaStatus _Status +ctypedef cudlaMode _Mode +ctypedef cudlaModuleAttributeType _ModuleAttributeType +ctypedef cudlaFenceType _FenceType +ctypedef cudlaModuleLoadFlags _ModuleLoadFlags +ctypedef cudlaSubmissionFlags _SubmissionFlags +ctypedef cudlaAccessPermissionFlags _AccessPermissionFlags +ctypedef cudlaDevAttributeType _DevAttributeType +ctypedef cudlaScratchMemoryConfig _ScratchMemoryConfig + + +############################################################################### +# Functions +############################################################################### + +cpdef uint64_t get_version() except? -1 +cpdef uint64_t device_get_count() except? -1 +cpdef intptr_t create_device(uint64_t device, uint32_t flags) except * +cpdef intptr_t mem_register(intptr_t dev_handle, intptr_t ptr, size_t size, uint32_t flags) except * +cpdef intptr_t module_load_from_memory(intptr_t dev_handle, p_module, size_t module_size, uint32_t flags) except * +cpdef module_unload(intptr_t h_module, uint32_t flags) +cpdef submit_task(intptr_t dev_handle, intptr_t ptr_to_tasks, uint32_t num_tasks, intptr_t stream, uint32_t flags) +cpdef object device_get_attribute(intptr_t dev_handle, int attrib) +cpdef mem_unregister(intptr_t dev_handle, intptr_t dev_ptr) +cpdef int get_last_error(intptr_t dev_handle) except? 0 +cpdef destroy_device(intptr_t dev_handle) +cpdef set_task_timeout_in_ms(intptr_t dev_handle, uint32_t timeout) + +cpdef module_get_attributes(intptr_t h_module, int attr_type) diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/cufile.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/cufile.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..09122f67b050f56d3fbfe5f6011c7e608258696c --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/cufile.cpython-312-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8f053c0c6e2f8ce63f313bf2322ed6fe5af734a8e424e7aef50e6e8101b119c1 +size 841552 diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/cufile.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/cufile.pxd new file mode 100644 index 0000000000000000000000000000000000000000..1970c4f614a25d2983efa03517bd5304d57bd598 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/cufile.pxd @@ -0,0 +1,94 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This code was automatically generated across versions from 12.9.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=616e51ad15aa071792eceba5db17a6fb2b845b219395e2fdcc6278d3621f52de + + + +# <<<< PREAMBLE CONTENT >>>> + +from libc.stdint cimport intptr_t +from libcpp cimport bool as _cyb_bool + + +# <<<< END OF PREAMBLE CONTENT >>>> + +from .cycufile cimport * + + +############################################################################### +# Types +############################################################################### + +ctypedef CUfileHandle_t Handle +ctypedef CUfileBatchHandle_t BatchHandle +ctypedef CUfileError_t Error +ctypedef cufileRDMAInfo_t RDMAInfo +ctypedef CUfileFSOps_t FSOps +ctypedef CUfileDrvProps_t DrvProps + + +############################################################################### +# Enum +############################################################################### + +ctypedef CUfileOpError _OpError +ctypedef CUfileDriverStatusFlags_t _DriverStatusFlags +ctypedef CUfileDriverControlFlags_t _DriverControlFlags +ctypedef CUfileFeatureFlags_t _FeatureFlags +ctypedef CUfileFileHandleType _FileHandleType +ctypedef CUfileOpcode_t _Opcode +ctypedef CUfileStatus_t _Status +ctypedef CUfileBatchMode_t _BatchMode +ctypedef CUFileSizeTConfigParameter_t _SizeTConfigParameter +ctypedef CUFileBoolConfigParameter_t _BoolConfigParameter +ctypedef CUFileStringConfigParameter_t _StringConfigParameter +ctypedef CUFileArrayConfigParameter_t _ArrayConfigParameter +ctypedef CUfileP2PFlags_t _P2PFlags + + +############################################################################### +# Functions +############################################################################### + +cpdef intptr_t handle_register(intptr_t descr) except? 0 +cpdef void handle_deregister(intptr_t fh) except* +cpdef buf_register(intptr_t buf_ptr_base, size_t length, int flags) +cpdef buf_deregister(intptr_t buf_ptr_base) +cpdef driver_open() +cpdef use_count() +cpdef driver_get_properties(intptr_t props) +cpdef driver_set_poll_mode(bint poll, size_t poll_threshold_size) +cpdef driver_set_max_direct_io_size(size_t max_direct_io_size) +cpdef driver_set_max_cache_size(size_t max_cache_size) +cpdef driver_set_max_pinned_mem_size(size_t max_pinned_size) +cpdef intptr_t batch_io_set_up(unsigned nr) except? 0 +cpdef batch_io_submit(intptr_t batch_idp, unsigned nr, intptr_t iocbp, unsigned int flags) +cpdef batch_io_get_status(intptr_t batch_idp, unsigned min_nr, intptr_t nr, intptr_t iocbp, intptr_t timeout) +cpdef batch_io_cancel(intptr_t batch_idp) +cpdef void batch_io_destroy(intptr_t batch_idp) except* +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) +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) +cpdef stream_register(intptr_t stream, unsigned flags) +cpdef stream_deregister(intptr_t stream) +cpdef int get_version() except? 0 +cpdef size_t get_parameter_size_t(int param) except? 0 +cpdef bint get_parameter_bool(int param) except? 0 +cpdef str get_parameter_string(int param, int len) +cpdef set_parameter_size_t(int param, size_t value) +cpdef set_parameter_bool(int param, bint value) +cpdef set_parameter_string(int param, intptr_t desc_str) +cpdef tuple get_parameter_min_max_value(int param) +cpdef set_stats_level(int level) +cpdef int get_stats_level() except? 0 +cpdef stats_start() +cpdef stats_stop() +cpdef stats_reset() +cpdef get_stats_l1(intptr_t stats) +cpdef get_stats_l2(intptr_t stats) +cpdef get_stats_l3(intptr_t stats) +cpdef size_t get_bar_size_in_kb(int gpu_index) except? 0 +cpdef set_parameter_posix_pool_slab_array(intptr_t size_values, intptr_t count_values, int len) +cpdef get_parameter_posix_pool_slab_array(intptr_t size_values, intptr_t count_values, int len) diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/cycudla.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/cycudla.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..fb7f3a4ea6a9b45fa9531ce6fec80f1595dc6cd5 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/bindings/cycudla.cpython-312-x86_64-linux-gnu.so differ diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/cycudla.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/cycudla.pxd new file mode 100644 index 0000000000000000000000000000000000000000..bd47c37e1c603bc266e104a082ee5943fc52ec10 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/cycudla.pxd @@ -0,0 +1,175 @@ +# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +# This code was automatically generated across versions from 1.5.0 to 13.4.1. Do not modify it directly. +# This layer exposes the C header to Cython as-is. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=f769acaca3dada01ba364b7053e43bcc2439f912fee376ebf3f2139fd8786203 + + +# <<<< PREAMBLE CONTENT >>>> + +from libc.stdint cimport ( + uint32_t, + uint64_t, + uint8_t, +) + + +# <<<< END OF PREAMBLE CONTENT >>>> + +from libc.stddef cimport size_t + + + + +############################################################################### +# Types (structs, enums, ...) +############################################################################### + +# enums +ctypedef enum cudlaStatus "cudlaStatus": + cudlaSuccess "cudlaSuccess" = 0 + cudlaErrorInvalidParam "cudlaErrorInvalidParam" = 1 + cudlaErrorOutOfResources "cudlaErrorOutOfResources" = 2 + cudlaErrorCreationFailed "cudlaErrorCreationFailed" = 3 + cudlaErrorInvalidAddress "cudlaErrorInvalidAddress" = 4 + cudlaErrorOs "cudlaErrorOs" = 5 + cudlaErrorCuda "cudlaErrorCuda" = 6 + cudlaErrorUmd "cudlaErrorUmd" = 7 + cudlaErrorInvalidDevice "cudlaErrorInvalidDevice" = 8 + cudlaErrorInvalidAttribute "cudlaErrorInvalidAttribute" = 9 + cudlaErrorIncompatibleDlaSWVersion "cudlaErrorIncompatibleDlaSWVersion" = 10 + cudlaErrorMemoryRegistered "cudlaErrorMemoryRegistered" = 11 + cudlaErrorInvalidModule "cudlaErrorInvalidModule" = 12 + cudlaErrorUnsupportedOperation "cudlaErrorUnsupportedOperation" = 13 + cudlaErrorNvSci "cudlaErrorNvSci" = 14 + cudlaErrorDriverNotFound "cudlaErrorDriverNotFound" = 15 + cudlaErrorDlaErrInvalidInput "cudlaErrorDlaErrInvalidInput" = 0x40000001 + cudlaErrorDlaErrInvalidPreAction "cudlaErrorDlaErrInvalidPreAction" = 0x40000002 + cudlaErrorDlaErrNoMem "cudlaErrorDlaErrNoMem" = 0x40000003 + cudlaErrorDlaErrProcessorBusy "cudlaErrorDlaErrProcessorBusy" = 0x40000004 + cudlaErrorDlaErrTaskStatusMismatch "cudlaErrorDlaErrTaskStatusMismatch" = 0x40000005 + cudlaErrorDlaErrEngineTimeout "cudlaErrorDlaErrEngineTimeout" = 0x40000006 + cudlaErrorDlaErrDataMismatch "cudlaErrorDlaErrDataMismatch" = 0x40000007 + cudlaErrorUnknown "cudlaErrorUnknown" = 0x7fffffff + _CUDLASTATUS_INTERNAL_LOADING_ERROR "_CUDLASTATUS_INTERNAL_LOADING_ERROR" = -42 + +ctypedef enum cudlaMode "cudlaMode": + CUDLA_CUDA_DLA "CUDLA_CUDA_DLA" = 0 + CUDLA_STANDALONE "CUDLA_STANDALONE" = 1 + +ctypedef enum cudlaModuleAttributeType "cudlaModuleAttributeType": + CUDLA_NUM_INPUT_TENSORS "CUDLA_NUM_INPUT_TENSORS" = 0 + CUDLA_NUM_OUTPUT_TENSORS "CUDLA_NUM_OUTPUT_TENSORS" = 1 + CUDLA_INPUT_TENSOR_DESCRIPTORS "CUDLA_INPUT_TENSOR_DESCRIPTORS" = 2 + CUDLA_OUTPUT_TENSOR_DESCRIPTORS "CUDLA_OUTPUT_TENSOR_DESCRIPTORS" = 3 + CUDLA_NUM_OUTPUT_TASK_STATISTICS "CUDLA_NUM_OUTPUT_TASK_STATISTICS" = 4 + CUDLA_OUTPUT_TASK_STATISTICS_DESCRIPTORS "CUDLA_OUTPUT_TASK_STATISTICS_DESCRIPTORS" = 5 + +ctypedef enum cudlaFenceType "cudlaFenceType": + CUDLA_NVSCISYNC_FENCE "CUDLA_NVSCISYNC_FENCE" = 1 + CUDLA_NVSCISYNC_FENCE_SOF "CUDLA_NVSCISYNC_FENCE_SOF" = 2 + +ctypedef enum cudlaModuleLoadFlags "cudlaModuleLoadFlags": + CUDLA_MODULE_DEFAULT "CUDLA_MODULE_DEFAULT" = 0 + CUDLA_MODULE_ENABLE_FAULT_DIAGNOSTICS "CUDLA_MODULE_ENABLE_FAULT_DIAGNOSTICS" = 1 + +ctypedef enum cudlaSubmissionFlags "cudlaSubmissionFlags": + CUDLA_SUBMIT_NOOP "CUDLA_SUBMIT_NOOP" = 1 + CUDLA_SUBMIT_SKIP_LOCK_ACQUIRE "CUDLA_SUBMIT_SKIP_LOCK_ACQUIRE" = (1 << 1) + CUDLA_SUBMIT_DIAGNOSTICS_TASK "CUDLA_SUBMIT_DIAGNOSTICS_TASK" = (1 << 2) + +ctypedef enum cudlaAccessPermissionFlags "cudlaAccessPermissionFlags": + CUDLA_READ_WRITE_PERM "CUDLA_READ_WRITE_PERM" = 0 + CUDLA_READ_ONLY_PERM "CUDLA_READ_ONLY_PERM" = 1 + CUDLA_TASK_STATISTICS "CUDLA_TASK_STATISTICS" = (1 << 1) + +ctypedef enum cudlaDevAttributeType "cudlaDevAttributeType": + CUDLA_UNIFIED_ADDRESSING "CUDLA_UNIFIED_ADDRESSING" = 0 + CUDLA_DEVICE_VERSION "CUDLA_DEVICE_VERSION" = 1 + +ctypedef enum cudlaScratchMemoryConfig "cudlaScratchMemoryConfig": + CUDLA_SCRATCH_MEMORY_DEFAULT "CUDLA_SCRATCH_MEMORY_DEFAULT" = (0U << 1) + CUDLA_SCRATCH_MEMORY_SHARED_STATIC "CUDLA_SCRATCH_MEMORY_SHARED_STATIC" = (1U << 1) + CUDLA_SCRATCH_MEMORY_CONFIG_MAX "CUDLA_SCRATCH_MEMORY_CONFIG_MAX" = 0x7FFFFFFF + +# types +ctypedef void* cudlaDevHandle 'cudlaDevHandle' + +ctypedef void* cudlaModule 'cudlaModule' + +ctypedef struct cudlaExternalMemoryHandleDesc_t 'cudlaExternalMemoryHandleDesc_t': + void* extBufObject + unsigned long long size + +ctypedef struct cudlaExternalSemaphoreHandleDesc_t 'cudlaExternalSemaphoreHandleDesc_t': + void* extSyncObject + +ctypedef struct cudlaModuleTensorDescriptor 'cudlaModuleTensorDescriptor': + char name[(80U + 1)] + uint64_t size + uint64_t n + uint64_t c + uint64_t h + uint64_t w + uint8_t dataFormat + uint8_t dataType + uint8_t dataCategory + uint8_t pixelFormat + uint8_t pixelMapping + uint32_t stride[8U] + +ctypedef struct CudlaFence 'CudlaFence': + void* fence + cudlaFenceType type + +ctypedef union cudlaDevAttribute 'cudlaDevAttribute': + uint8_t unifiedAddressingSupported + uint32_t deviceVersion + +ctypedef union cudlaModuleAttribute 'cudlaModuleAttribute': + uint32_t numInputTensors + uint32_t numOutputTensors + cudlaModuleTensorDescriptor* inputTensorDesc + cudlaModuleTensorDescriptor* outputTensorDesc + +ctypedef struct cudlaWaitEvents 'cudlaWaitEvents': + CudlaFence* preFences + uint32_t numEvents + +ctypedef struct cudlaSignalEvents 'cudlaSignalEvents': + uint64_t** devPtrs + CudlaFence* eofFences + uint32_t numEvents + +ctypedef struct cudlaTask 'cudlaTask': + cudlaModule moduleHandle + uint64_t** outputTensor + uint32_t numOutputTensors + uint32_t numInputTensors + uint64_t** inputTensor + cudlaWaitEvents* waitEvents + cudlaSignalEvents* signalEvents + +# Typedef aliases for struct types (struct has _t, typedef doesn't) +ctypedef cudlaExternalMemoryHandleDesc_t cudlaExternalMemoryHandleDesc 'cudlaExternalMemoryHandleDesc' +ctypedef cudlaExternalSemaphoreHandleDesc_t cudlaExternalSemaphoreHandleDesc 'cudlaExternalSemaphoreHandleDesc' + + +############################################################################### +# Functions +############################################################################### + +cdef cudlaStatus cudlaGetVersion(uint64_t* const version) except?_CUDLASTATUS_INTERNAL_LOADING_ERROR nogil +cdef cudlaStatus cudlaDeviceGetCount(uint64_t* const pNumDevices) except?_CUDLASTATUS_INTERNAL_LOADING_ERROR nogil +cdef cudlaStatus cudlaCreateDevice(const uint64_t device, cudlaDevHandle* const devHandle, const uint32_t flags) except?_CUDLASTATUS_INTERNAL_LOADING_ERROR nogil +cdef cudlaStatus cudlaMemRegister(const cudlaDevHandle devHandle, const uint64_t* const ptr, const size_t size, uint64_t** const devPtr, const uint32_t flags) except?_CUDLASTATUS_INTERNAL_LOADING_ERROR nogil +cdef cudlaStatus cudlaModuleLoadFromMemory(const cudlaDevHandle devHandle, const uint8_t* const pModule, const size_t moduleSize, cudlaModule* const hModule, const uint32_t flags) except?_CUDLASTATUS_INTERNAL_LOADING_ERROR nogil +cdef cudlaStatus cudlaModuleGetAttributes(const cudlaModule hModule, const cudlaModuleAttributeType attrType, cudlaModuleAttribute* const attribute) except?_CUDLASTATUS_INTERNAL_LOADING_ERROR nogil +cdef cudlaStatus cudlaModuleUnload(const cudlaModule hModule, const uint32_t flags) except?_CUDLASTATUS_INTERNAL_LOADING_ERROR nogil +cdef cudlaStatus cudlaSubmitTask(const cudlaDevHandle devHandle, const cudlaTask* const ptrToTasks, const uint32_t numTasks, void* const stream, const uint32_t flags) except?_CUDLASTATUS_INTERNAL_LOADING_ERROR nogil +cdef cudlaStatus cudlaDeviceGetAttribute(const cudlaDevHandle devHandle, const cudlaDevAttributeType attrib, cudlaDevAttribute* const pAttribute) except?_CUDLASTATUS_INTERNAL_LOADING_ERROR nogil +cdef cudlaStatus cudlaMemUnregister(const cudlaDevHandle devHandle, const uint64_t* const devPtr) except?_CUDLASTATUS_INTERNAL_LOADING_ERROR nogil +cdef cudlaStatus cudlaGetLastError(const cudlaDevHandle devHandle) except?_CUDLASTATUS_INTERNAL_LOADING_ERROR nogil +cdef cudlaStatus cudlaDestroyDevice(const cudlaDevHandle devHandle) except?_CUDLASTATUS_INTERNAL_LOADING_ERROR nogil +cdef cudlaStatus cudlaSetTaskTimeoutInMs(const cudlaDevHandle devHandle, const uint32_t timeout) except?_CUDLASTATUS_INTERNAL_LOADING_ERROR nogil diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/cycufile.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/cycufile.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..d861863253d399c082886da9f58014c778f897b7 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/bindings/cycufile.cpython-312-x86_64-linux-gnu.so differ diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/cycufile.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/cycufile.pxd new file mode 100644 index 0000000000000000000000000000000000000000..3196f6a5eab71e185c29b900a12ffc816774357e --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/cycufile.pxd @@ -0,0 +1,474 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This code was automatically generated across versions from 12.9.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ee9acc9a7052fdb1b1eddc639c1fbe72ac5f3b2a9179cd832240c916edce8d74 + + +# <<<< PREAMBLE CONTENT >>>> + +from libc.stdint cimport ( + uint32_t, + uint64_t, +) +from libcpp cimport bool as _cyb_bool + + +# <<<< END OF PREAMBLE CONTENT >>>> + +from libc.time cimport time_t +from posix.types cimport off_t + +cimport cuda.bindings.cydriver +from cuda.bindings.cydriver cimport CUresult + + +############################################################################### +# Types (structs, enums, ...) +############################################################################### + +# TODO: switch to "from libc.time cimport timespec" once we can use recent +# Cython to build +cdef extern from "": + cdef struct timespec: + time_t tv_sec + long tv_nsec +cdef extern from "": + cdef struct sockaddr: + unsigned short sa_family + char sa_data[14] + ctypedef sockaddr sockaddr_t + + + + + # enums +cdef extern from 'cufile.h': + ctypedef enum CUfileOpError: + CU_FILE_SUCCESS + CU_FILE_DRIVER_NOT_INITIALIZED + CU_FILE_DRIVER_INVALID_PROPS + CU_FILE_DRIVER_UNSUPPORTED_LIMIT + CU_FILE_DRIVER_VERSION_MISMATCH + CU_FILE_DRIVER_VERSION_READ_ERROR + CU_FILE_DRIVER_CLOSING + CU_FILE_PLATFORM_NOT_SUPPORTED + CU_FILE_IO_NOT_SUPPORTED + CU_FILE_DEVICE_NOT_SUPPORTED + CU_FILE_NVFS_DRIVER_ERROR + CU_FILE_CUDA_DRIVER_ERROR + CU_FILE_CUDA_POINTER_INVALID + CU_FILE_CUDA_MEMORY_TYPE_INVALID + CU_FILE_CUDA_POINTER_RANGE_ERROR + CU_FILE_CUDA_CONTEXT_MISMATCH + CU_FILE_INVALID_MAPPING_SIZE + CU_FILE_INVALID_MAPPING_RANGE + CU_FILE_INVALID_FILE_TYPE + CU_FILE_INVALID_FILE_OPEN_FLAG + CU_FILE_DIO_NOT_SET + CU_FILE_INVALID_VALUE + CU_FILE_MEMORY_ALREADY_REGISTERED + CU_FILE_MEMORY_NOT_REGISTERED + CU_FILE_PERMISSION_DENIED + CU_FILE_DRIVER_ALREADY_OPEN + CU_FILE_HANDLE_NOT_REGISTERED + CU_FILE_HANDLE_ALREADY_REGISTERED + CU_FILE_DEVICE_NOT_FOUND + CU_FILE_INTERNAL_ERROR + CU_FILE_GETNEWFD_FAILED + CU_FILE_NVFS_SETUP_ERROR + CU_FILE_IO_DISABLED + CU_FILE_BATCH_SUBMIT_FAILED + CU_FILE_GPU_MEMORY_PINNING_FAILED + CU_FILE_BATCH_FULL + CU_FILE_ASYNC_NOT_SUPPORTED + CU_FILE_INTERNAL_BATCH_SETUP_ERROR + CU_FILE_INTERNAL_BATCH_SUBMIT_ERROR + CU_FILE_INTERNAL_BATCH_GETSTATUS_ERROR + CU_FILE_INTERNAL_BATCH_CANCEL_ERROR + CU_FILE_NOMEM_ERROR + CU_FILE_IO_ERROR + CU_FILE_INTERNAL_BUF_REGISTER_ERROR + CU_FILE_HASH_OPR_ERROR + CU_FILE_INVALID_CONTEXT_ERROR + CU_FILE_NVFS_INTERNAL_DRIVER_ERROR + CU_FILE_BATCH_NOCOMPAT_ERROR + CU_FILE_IO_MAX_ERROR + +cdef extern from 'cufile.h': + ctypedef enum CUfileDriverStatusFlags_t: + CU_FILE_LUSTRE_SUPPORTED + CU_FILE_WEKAFS_SUPPORTED + CU_FILE_NFS_SUPPORTED + CU_FILE_GPFS_SUPPORTED + CU_FILE_NVME_SUPPORTED + CU_FILE_NVMEOF_SUPPORTED + CU_FILE_SCSI_SUPPORTED + CU_FILE_SCALEFLUX_CSD_SUPPORTED + CU_FILE_NVMESH_SUPPORTED + CU_FILE_BEEGFS_SUPPORTED + CU_FILE_NVME_P2P_SUPPORTED + CU_FILE_SCATEFS_SUPPORTED + CU_FILE_VIRTIOFS_SUPPORTED + CU_FILE_MAX_TARGET_TYPES + +cdef extern from 'cufile.h': + ctypedef enum CUfileDriverControlFlags_t: + CU_FILE_USE_POLL_MODE + CU_FILE_ALLOW_COMPAT_MODE + CU_FILE_VANILLA_POSIX_IO_MODE + CU_FILE_POSIX_IO_MODE + CU_FILE_FALLBACK_IO_MODE + +cdef extern from 'cufile.h': + ctypedef enum CUfileFeatureFlags_t: + CU_FILE_DYN_ROUTING_SUPPORTED + CU_FILE_BATCH_IO_SUPPORTED + CU_FILE_STREAMS_SUPPORTED + CU_FILE_PARALLEL_IO_SUPPORTED + CU_FILE_P2P_SUPPORTED + +cdef extern from 'cufile.h': + ctypedef enum CUfileFileHandleType: + CU_FILE_HANDLE_TYPE_OPAQUE_FD + CU_FILE_HANDLE_TYPE_OPAQUE_WIN32 + CU_FILE_HANDLE_TYPE_USERSPACE_FS + +cdef extern from 'cufile.h': + ctypedef enum CUfileOpcode_t: + CUFILE_READ + CUFILE_WRITE + +cdef extern from 'cufile.h': + ctypedef enum CUfileStatus_t: + CUFILE_WAITING + CUFILE_PENDING + CUFILE_INVALID + CUFILE_CANCELED + CUFILE_COMPLETE + CUFILE_TIMEOUT + CUFILE_FAILED + +cdef extern from 'cufile.h': + ctypedef enum CUfileBatchMode_t: + CUFILE_BATCH + +cdef extern from 'cufile.h': + ctypedef enum CUFileSizeTConfigParameter_t: + CUFILE_PARAM_PROFILE_STATS + CUFILE_PARAM_EXECUTION_MAX_IO_QUEUE_DEPTH + CUFILE_PARAM_EXECUTION_MAX_IO_THREADS + CUFILE_PARAM_EXECUTION_MIN_IO_THRESHOLD_SIZE_KB + CUFILE_PARAM_EXECUTION_MAX_REQUEST_PARALLELISM + CUFILE_PARAM_PROPERTIES_MAX_DIRECT_IO_SIZE_KB + CUFILE_PARAM_PROPERTIES_MAX_DEVICE_CACHE_SIZE_KB + CUFILE_PARAM_PROPERTIES_PER_BUFFER_CACHE_SIZE_KB + CUFILE_PARAM_PROPERTIES_MAX_DEVICE_PINNED_MEM_SIZE_KB + CUFILE_PARAM_PROPERTIES_IO_BATCHSIZE + CUFILE_PARAM_POLLTHRESHOLD_SIZE_KB + CUFILE_PARAM_PROPERTIES_BATCH_IO_TIMEOUT_MS + +cdef extern from 'cufile.h': + ctypedef enum CUFileBoolConfigParameter_t: + CUFILE_PARAM_PROPERTIES_USE_POLL_MODE + CUFILE_PARAM_PROPERTIES_ALLOW_COMPAT_MODE + CUFILE_PARAM_FORCE_COMPAT_MODE + CUFILE_PARAM_FS_MISC_API_CHECK_AGGRESSIVE + CUFILE_PARAM_EXECUTION_PARALLEL_IO + CUFILE_PARAM_PROFILE_NVTX + CUFILE_PARAM_PROPERTIES_ALLOW_SYSTEM_MEMORY + CUFILE_PARAM_USE_PCIP2PDMA + CUFILE_PARAM_PREFER_IO_URING + CUFILE_PARAM_FORCE_ODIRECT_MODE + CUFILE_PARAM_SKIP_TOPOLOGY_DETECTION + CUFILE_PARAM_STREAM_MEMOPS_BYPASS + CUFILE_PARAM_PROPERTIES_POSIX_IO_MODE + CUFILE_PARAM_GDS_FALLBACK_IO + +cdef extern from 'cufile.h': + ctypedef enum CUFileStringConfigParameter_t: + CUFILE_PARAM_LOGGING_LEVEL + CUFILE_PARAM_ENV_LOGFILE_PATH + CUFILE_PARAM_LOG_DIR + CUFILE_PARAM_RDMA_TRANSPORT + +cdef extern from 'cufile.h': + ctypedef enum CUFileArrayConfigParameter_t: + CUFILE_PARAM_POSIX_POOL_SLAB_SIZE_KB + CUFILE_PARAM_POSIX_POOL_SLAB_COUNT + CUFILE_PARAM_GPU_BOUNCE_BUFFER_SLAB_SIZE_KB + CUFILE_PARAM_GPU_BOUNCE_BUFFER_SLAB_COUNT + +cdef extern from 'cufile.h': + ctypedef enum CUfileP2PFlags_t: + CUFILE_P2PDMA + CUFILE_NVFS + CUFILE_DMABUF + CUFILE_C2C + CUFILE_NVIDIA_PEERMEM +cdef enum: _CUFILEERROR_T_INTERNAL_LOADING_ERROR = -42 + + # types +cdef extern from 'cufile.h': + ctypedef void* CUfileHandle_t 'CUfileHandle_t' + + +cdef extern from 'cufile.h': + ctypedef void* CUfileBatchHandle_t 'CUfileBatchHandle_t' + + +cdef extern from 'cufile.h': + ctypedef struct CUfileError_t 'CUfileError_t': + CUfileOpError err + CUresult cu_err + +cdef struct cuda_bindings_cufile__anon_pod0: + unsigned int major_version + unsigned int minor_version + size_t poll_thresh_size + size_t max_direct_io_size + unsigned int dstatusflags + unsigned int dcontrolflags + +cdef extern from 'cufile.h': + ctypedef struct cufileRDMAInfo_t 'cufileRDMAInfo_t': + int version + int desc_len + char* desc_str + +cdef extern from 'cufile.h': + ctypedef struct CUfileFSOps_t 'CUfileFSOps_t': + char* (*fs_type)(const void*) + int (*getRDMADeviceList)(const void*, sockaddr_t**) + int (*getRDMADevicePriority)(const void*, char*, size_t, loff_t, const sockaddr_t*) + ssize_t (*read)(const void*, char*, size_t, loff_t, const cufileRDMAInfo_t*) + ssize_t (*write)(const void*, const char*, size_t, loff_t, const cufileRDMAInfo_t*) + +cdef union cuda_bindings_cufile__anon_pod1: + int fd + void* handle + +cdef struct cuda_bindings_cufile__anon_pod3: + void* devPtr_base + off_t file_offset + off_t devPtr_offset + size_t size + +cdef extern from 'cufile.h': + ctypedef struct CUfileIOEvents_t 'CUfileIOEvents_t': + void* cookie + CUfileStatus_t status + size_t ret + +cdef extern from 'cufile.h': + ctypedef struct CUfileOpCounter_t 'CUfileOpCounter_t': + uint64_t ok + uint64_t err + +cdef extern from 'cufile.h': + ctypedef struct CUfilePerGpuStats_t 'CUfilePerGpuStats_t': + char uuid[16] + uint64_t read_bytes + uint64_t read_bw_bytes_per_sec + uint64_t read_utilization + uint64_t read_duration_us + uint64_t n_total_reads + uint64_t n_p2p_reads + uint64_t n_nvfs_reads + uint64_t n_posix_reads + uint64_t n_unaligned_reads + uint64_t n_dr_reads + uint64_t n_sparse_regions + uint64_t n_inline_regions + uint64_t n_reads_err + uint64_t writes_bytes + uint64_t write_bw_bytes_per_sec + uint64_t write_utilization + uint64_t write_duration_us + uint64_t n_total_writes + uint64_t n_p2p_writes + uint64_t n_nvfs_writes + uint64_t n_posix_writes + uint64_t n_unaligned_writes + uint64_t n_dr_writes + uint64_t n_writes_err + uint64_t n_mmap + uint64_t n_mmap_ok + uint64_t n_mmap_err + uint64_t n_mmap_free + uint64_t reg_bytes + +cdef extern from 'cufile.h': + ctypedef struct CUfileIOVec_t 'CUfileIOVec_t': + void* base + size_t len + +cdef extern from 'cufile.h': + ctypedef struct CUfileDrvProps_t 'CUfileDrvProps_t': + cuda_bindings_cufile__anon_pod0 nvfs + unsigned int fflags + unsigned int max_device_cache_size + unsigned int per_buffer_cache_size + unsigned int max_device_pinned_mem_size + unsigned int max_batch_io_size + unsigned int max_batch_io_timeout_msecs + +cdef extern from 'cufile.h': + ctypedef struct CUfileDescr_t 'CUfileDescr_t': + CUfileFileHandleType type + cuda_bindings_cufile__anon_pod1 handle + CUfileFSOps_t* fs_ops + +cdef union cuda_bindings_cufile__anon_pod2: + cuda_bindings_cufile__anon_pod3 batch + +cdef extern from 'cufile.h': + ctypedef struct CUfileStatsLevel1_t 'CUfileStatsLevel1_t': + CUfileOpCounter_t read_ops + CUfileOpCounter_t write_ops + CUfileOpCounter_t hdl_register_ops + CUfileOpCounter_t hdl_deregister_ops + CUfileOpCounter_t buf_register_ops + CUfileOpCounter_t buf_deregister_ops + uint64_t read_bytes + uint64_t write_bytes + uint64_t read_bw_bytes_per_sec + uint64_t write_bw_bytes_per_sec + uint64_t read_lat_avg_us + uint64_t write_lat_avg_us + uint64_t read_ops_per_sec + uint64_t write_ops_per_sec + uint64_t read_lat_sum_us + uint64_t write_lat_sum_us + CUfileOpCounter_t batch_submit_ops + CUfileOpCounter_t batch_complete_ops + CUfileOpCounter_t batch_setup_ops + CUfileOpCounter_t batch_cancel_ops + CUfileOpCounter_t batch_destroy_ops + CUfileOpCounter_t batch_enqueued_ops + CUfileOpCounter_t batch_posix_enqueued_ops + CUfileOpCounter_t batch_processed_ops + CUfileOpCounter_t batch_posix_processed_ops + CUfileOpCounter_t batch_nvfs_submit_ops + CUfileOpCounter_t batch_p2p_submit_ops + CUfileOpCounter_t batch_aio_submit_ops + CUfileOpCounter_t batch_iouring_submit_ops + CUfileOpCounter_t batch_mixed_io_submit_ops + CUfileOpCounter_t batch_total_submit_ops + uint64_t batch_read_bytes + uint64_t batch_write_bytes + uint64_t batch_read_bw_bytes + uint64_t batch_write_bw_bytes + uint64_t batch_submit_lat_avg_us + uint64_t batch_completion_lat_avg_us + uint64_t batch_submit_ops_per_sec + uint64_t batch_complete_ops_per_sec + uint64_t batch_submit_lat_sum_us + uint64_t batch_completion_lat_sum_us + uint64_t last_batch_read_bytes + uint64_t last_batch_write_bytes + CUfileOpCounter_t readv_ops + CUfileOpCounter_t writev_ops + uint64_t readv_bytes + uint64_t writev_bytes + uint64_t readv_bw_bytes_per_sec + uint64_t writev_bw_bytes_per_sec + uint64_t readv_lat_avg_us + uint64_t writev_lat_avg_us + uint64_t readv_ops_per_sec + uint64_t writev_ops_per_sec + uint64_t readv_lat_sum_us + uint64_t writev_lat_sum_us + +cdef extern from 'cufile.h': + ctypedef struct CUfileIOParams_t 'CUfileIOParams_t': + CUfileBatchMode_t mode + cuda_bindings_cufile__anon_pod2 u + CUfileHandle_t fh + CUfileOpcode_t opcode + void* cookie + +cdef extern from 'cufile.h': + ctypedef struct CUfileStatsLevel2_t 'CUfileStatsLevel2_t': + CUfileStatsLevel1_t basic + uint64_t read_size_kb_hist[32] + uint64_t write_size_kb_hist[32] + +cdef extern from 'cufile.h': + ctypedef struct CUfileStatsLevel3_t 'CUfileStatsLevel3_t': + CUfileStatsLevel2_t detailed + uint32_t num_gpus + CUfilePerGpuStats_t per_gpu_stats[16] + + +# Error-inspection macros from cufile.h (declared as functions so Cython +# emits calls that the C preprocessor expands). +cdef extern from 'cufile.h' nogil: + bint IS_CUDA_ERR(CUfileError_t status) + bint IS_CUFILE_ERR(CUfileOpError err) + + +cdef extern from *: + """ + // This is the missing piece we need to supply to help Cython & C++ compilers. + inline bool operator==(const CUfileError_t& lhs, const CUfileError_t& rhs) { + return (lhs.err == rhs.err) && (lhs.cu_err == rhs.cu_err); + } + static CUfileError_t CUFILE_LOADING_ERROR{(CUfileOpError)-1, (CUresult)-1}; + """ + const CUfileError_t CUFILE_LOADING_ERROR + ctypedef void* CUstream "CUstream" + + const char* cufileop_status_error(CUfileOpError) + + +############################################################################### +# Functions +############################################################################### + +cdef CUfileError_t cuFileHandleRegister(CUfileHandle_t* fh, CUfileDescr_t* descr) except?CUFILE_LOADING_ERROR nogil +cdef void cuFileHandleDeregister(CUfileHandle_t fh) except* nogil +cdef CUfileError_t cuFileBufRegister(const void* bufPtr_base, size_t length, int flags) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileBufDeregister(const void* bufPtr_base) except?CUFILE_LOADING_ERROR nogil +cdef ssize_t cuFileRead(CUfileHandle_t fh, void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil +cdef ssize_t cuFileWrite(CUfileHandle_t fh, const void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil +cdef CUfileError_t cuFileDriverOpen() except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileDriverClose() except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileDriverClose_v2() except?CUFILE_LOADING_ERROR nogil +cdef long cuFileUseCount() except* nogil +cdef CUfileError_t cuFileDriverGetProperties(CUfileDrvProps_t* props) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileDriverSetPollMode(_cyb_bool poll, size_t poll_threshold_size) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileDriverSetMaxDirectIOSize(size_t max_direct_io_size) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileDriverSetMaxCacheSize(size_t max_cache_size) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileDriverSetMaxPinnedMemSize(size_t max_pinned_size) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileBatchIOSetUp(CUfileBatchHandle_t* batch_idp, unsigned nr) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileBatchIOSubmit(CUfileBatchHandle_t batch_idp, unsigned nr, CUfileIOParams_t* iocbp, unsigned int flags) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileBatchIOGetStatus(CUfileBatchHandle_t batch_idp, unsigned min_nr, unsigned* nr, CUfileIOEvents_t* iocbp, timespec* timeout) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileBatchIOCancel(CUfileBatchHandle_t batch_idp) except?CUFILE_LOADING_ERROR nogil +cdef void cuFileBatchIODestroy(CUfileBatchHandle_t batch_idp) except* nogil +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?CUFILE_LOADING_ERROR nogil +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?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileStreamRegister(CUstream stream, unsigned flags) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileStreamDeregister(CUstream stream) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileGetVersion(int* version) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileGetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t* value) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileGetParameterBool(CUFileBoolConfigParameter_t param, _cyb_bool* value) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileGetParameterString(CUFileStringConfigParameter_t param, char* desc_str, int len) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileSetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t value) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileSetParameterBool(CUFileBoolConfigParameter_t param, _cyb_bool value) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileSetParameterString(CUFileStringConfigParameter_t param, const char* desc_str) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileGetParameterMinMaxValue(CUFileSizeTConfigParameter_t param, size_t* min_value, size_t* max_value) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileSetStatsLevel(int level) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileGetStatsLevel(int* level) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileStatsStart() except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileStatsStop() except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileStatsReset() except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileGetStatsL1(CUfileStatsLevel1_t* stats) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileGetStatsL2(CUfileStatsLevel2_t* stats) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileGetStatsL3(CUfileStatsLevel3_t* stats) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileGetBARSizeInKB(int gpuIndex, size_t* barSize) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileSetParameterPosixPoolSlabArray(const size_t* size_values, const size_t* count_values, int len) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileGetParameterPosixPoolSlabArray(size_t* size_values, size_t* count_values, int len) except?CUFILE_LOADING_ERROR nogil +cdef ssize_t cuFileReadv(CUfileHandle_t fh, const CUfileIOVec_t* iov, size_t iovcnt, off_t file_offset, unsigned flags) except* nogil +cdef ssize_t cuFileWritev(CUfileHandle_t fh, const CUfileIOVec_t* iov, size_t iovcnt, off_t file_offset, unsigned flags) except* nogil diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/cydriver.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/cydriver.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..68ee7eedf47546aeb587bfc82be635e1eb8d361e --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/cydriver.cpython-312-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49ed7f29ca0792c0821c360f9bc018e4855237ce01419bf54ac1744d8208ec52 +size 171104 diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/cydriver.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/cydriver.pxd new file mode 100644 index 0000000000000000000000000000000000000000..db2e3f3bdb4096a24c5fedd82f50fafbc1bb9c3c --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/cydriver.pxd @@ -0,0 +1,3878 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=26d9c23bcf10595e40a03f65b7b7491e2fa5d7161458b6183c53353665bf6f52 + + +# <<<< PREAMBLE CONTENT >>>> + +from libc.stdint cimport ( + uint32_t, + uint64_t, +) + + +# <<<< END OF PREAMBLE CONTENT >>>> + +from libc.stdint cimport uint32_t, uint64_t + + +# Overridden types from _extras.h + +# GL +ctypedef unsigned int GLenum +ctypedef unsigned int GLuint + +# EGL +ctypedef void *EGLImageKHR +ctypedef void *EGLStreamKHR +ctypedef unsigned int EGLint +ctypedef void *EGLSyncKHR + +# VDPAU +ctypedef uint32_t VdpDevice +ctypedef unsigned long long VdpGetProcAddress +ctypedef uint32_t VdpVideoSurface +ctypedef uint32_t VdpOutputSurface + + +# ENUMS +cdef extern from 'cuda.h': + ctypedef enum CUipcMem_flags_enum: + CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS + ctypedef CUipcMem_flags_enum CUipcMem_flags + +cdef extern from 'cuda.h': + ctypedef enum CUmemAttach_flags_enum: + CU_MEM_ATTACH_GLOBAL + CU_MEM_ATTACH_HOST + CU_MEM_ATTACH_SINGLE + ctypedef CUmemAttach_flags_enum CUmemAttach_flags + +cdef extern from 'cuda.h': + ctypedef enum CUctx_flags_enum: + CU_CTX_SCHED_AUTO + CU_CTX_SCHED_SPIN + CU_CTX_SCHED_YIELD + CU_CTX_SCHED_BLOCKING_SYNC + CU_CTX_BLOCKING_SYNC + CU_CTX_SCHED_MASK + CU_CTX_MAP_HOST + CU_CTX_LMEM_RESIZE_TO_MAX + CU_CTX_COREDUMP_ENABLE + CU_CTX_USER_COREDUMP_ENABLE + CU_CTX_SYNC_MEMOPS + CU_CTX_FLAGS_MASK + ctypedef CUctx_flags_enum CUctx_flags + +cdef extern from 'cuda.h': + ctypedef enum CUevent_sched_flags_enum: + CU_EVENT_SCHED_AUTO + CU_EVENT_SCHED_SPIN + CU_EVENT_SCHED_YIELD + CU_EVENT_SCHED_BLOCKING_SYNC + ctypedef CUevent_sched_flags_enum CUevent_sched_flags + +cdef extern from 'cuda.h': + ctypedef enum cl_event_flags_enum: + NVCL_EVENT_SCHED_AUTO + NVCL_EVENT_SCHED_SPIN + NVCL_EVENT_SCHED_YIELD + NVCL_EVENT_SCHED_BLOCKING_SYNC + ctypedef cl_event_flags_enum cl_event_flags + +cdef extern from 'cuda.h': + ctypedef enum cl_context_flags_enum: + NVCL_CTX_SCHED_AUTO + NVCL_CTX_SCHED_SPIN + NVCL_CTX_SCHED_YIELD + NVCL_CTX_SCHED_BLOCKING_SYNC + ctypedef cl_context_flags_enum cl_context_flags + +cdef extern from 'cuda.h': + ctypedef enum CUstream_flags_enum: + CU_STREAM_DEFAULT + CU_STREAM_NON_BLOCKING + ctypedef CUstream_flags_enum CUstream_flags + +cdef extern from 'cuda.h': + ctypedef enum CUevent_flags_enum: + CU_EVENT_DEFAULT + CU_EVENT_BLOCKING_SYNC + CU_EVENT_DISABLE_TIMING + CU_EVENT_INTERPROCESS + ctypedef CUevent_flags_enum CUevent_flags + +cdef extern from 'cuda.h': + ctypedef enum CUevent_record_flags_enum: + CU_EVENT_RECORD_DEFAULT + CU_EVENT_RECORD_EXTERNAL + ctypedef CUevent_record_flags_enum CUevent_record_flags + +cdef extern from 'cuda.h': + ctypedef enum CUevent_wait_flags_enum: + CU_EVENT_WAIT_DEFAULT + CU_EVENT_WAIT_EXTERNAL + ctypedef CUevent_wait_flags_enum CUevent_wait_flags + +cdef extern from 'cuda.h': + ctypedef enum CUstreamWaitValue_flags_enum: + CU_STREAM_WAIT_VALUE_GEQ + CU_STREAM_WAIT_VALUE_EQ + CU_STREAM_WAIT_VALUE_AND + CU_STREAM_WAIT_VALUE_NOR + CU_STREAM_WAIT_VALUE_FLUSH + ctypedef CUstreamWaitValue_flags_enum CUstreamWaitValue_flags + +cdef extern from 'cuda.h': + ctypedef enum CUstreamWriteValue_flags_enum: + CU_STREAM_WRITE_VALUE_DEFAULT + CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER + ctypedef CUstreamWriteValue_flags_enum CUstreamWriteValue_flags + +cdef extern from 'cuda.h': + ctypedef enum CUstreamBatchMemOpType_enum: + CU_STREAM_MEM_OP_WAIT_VALUE_32 + CU_STREAM_MEM_OP_WRITE_VALUE_32 + CU_STREAM_MEM_OP_WAIT_VALUE_64 + CU_STREAM_MEM_OP_WRITE_VALUE_64 + CU_STREAM_MEM_OP_BARRIER + CU_STREAM_MEM_OP_ATOMIC_REDUCTION + CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES + ctypedef CUstreamBatchMemOpType_enum CUstreamBatchMemOpType + +cdef extern from 'cuda.h': + ctypedef enum CUstreamMemoryBarrier_flags_enum: + CU_STREAM_MEMORY_BARRIER_TYPE_SYS + CU_STREAM_MEMORY_BARRIER_TYPE_GPU + ctypedef CUstreamMemoryBarrier_flags_enum CUstreamMemoryBarrier_flags + +cdef extern from 'cuda.h': + ctypedef enum CUoccupancy_flags_enum: + CU_OCCUPANCY_DEFAULT + CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE + ctypedef CUoccupancy_flags_enum CUoccupancy_flags + +cdef extern from 'cuda.h': + ctypedef enum CUstreamUpdateCaptureDependencies_flags_enum: + CU_STREAM_ADD_CAPTURE_DEPENDENCIES + CU_STREAM_SET_CAPTURE_DEPENDENCIES + ctypedef CUstreamUpdateCaptureDependencies_flags_enum CUstreamUpdateCaptureDependencies_flags + +cdef extern from 'cuda.h': + ctypedef enum CUasyncNotificationType_enum: + CU_ASYNC_NOTIFICATION_TYPE_OVER_BUDGET + ctypedef CUasyncNotificationType_enum CUasyncNotificationType + +cdef extern from 'cuda.h': + ctypedef enum CUarray_format_enum: + CU_AD_FORMAT_UNSIGNED_INT8 + CU_AD_FORMAT_UNSIGNED_INT16 + CU_AD_FORMAT_UNSIGNED_INT32 + CU_AD_FORMAT_SIGNED_INT8 + CU_AD_FORMAT_SIGNED_INT16 + CU_AD_FORMAT_SIGNED_INT32 + CU_AD_FORMAT_HALF + CU_AD_FORMAT_FLOAT + CU_AD_FORMAT_NV12 + CU_AD_FORMAT_UNORM_INT8X1 + CU_AD_FORMAT_UNORM_INT8X2 + CU_AD_FORMAT_UNORM_INT8X4 + CU_AD_FORMAT_UNORM_INT16X1 + CU_AD_FORMAT_UNORM_INT16X2 + CU_AD_FORMAT_UNORM_INT16X4 + CU_AD_FORMAT_SNORM_INT8X1 + CU_AD_FORMAT_SNORM_INT8X2 + CU_AD_FORMAT_SNORM_INT8X4 + CU_AD_FORMAT_SNORM_INT16X1 + CU_AD_FORMAT_SNORM_INT16X2 + CU_AD_FORMAT_SNORM_INT16X4 + CU_AD_FORMAT_BC1_UNORM + CU_AD_FORMAT_BC1_UNORM_SRGB + CU_AD_FORMAT_BC2_UNORM + CU_AD_FORMAT_BC2_UNORM_SRGB + CU_AD_FORMAT_BC3_UNORM + CU_AD_FORMAT_BC3_UNORM_SRGB + CU_AD_FORMAT_BC4_UNORM + CU_AD_FORMAT_BC4_SNORM + CU_AD_FORMAT_BC5_UNORM + CU_AD_FORMAT_BC5_SNORM + CU_AD_FORMAT_BC6H_UF16 + CU_AD_FORMAT_BC6H_SF16 + CU_AD_FORMAT_BC7_UNORM + CU_AD_FORMAT_BC7_UNORM_SRGB + CU_AD_FORMAT_P010 + CU_AD_FORMAT_P016 + CU_AD_FORMAT_NV16 + CU_AD_FORMAT_P210 + CU_AD_FORMAT_P216 + CU_AD_FORMAT_YUY2 + CU_AD_FORMAT_Y210 + CU_AD_FORMAT_Y216 + CU_AD_FORMAT_AYUV + CU_AD_FORMAT_Y410 + CU_AD_FORMAT_Y416 + CU_AD_FORMAT_Y444_PLANAR8 + CU_AD_FORMAT_Y444_PLANAR10 + CU_AD_FORMAT_YUV444_8bit_SemiPlanar + CU_AD_FORMAT_YUV444_16bit_SemiPlanar + CU_AD_FORMAT_UNORM_INT_101010_2 + CU_AD_FORMAT_UINT8_PACKED_422 + CU_AD_FORMAT_UINT8_PACKED_444 + CU_AD_FORMAT_UINT8_SEMIPLANAR_420 + CU_AD_FORMAT_UINT16_SEMIPLANAR_420 + CU_AD_FORMAT_UINT8_SEMIPLANAR_422 + CU_AD_FORMAT_UINT16_SEMIPLANAR_422 + CU_AD_FORMAT_UINT8_SEMIPLANAR_444 + CU_AD_FORMAT_UINT16_SEMIPLANAR_444 + CU_AD_FORMAT_UINT8_PLANAR_420 + CU_AD_FORMAT_UINT16_PLANAR_420 + CU_AD_FORMAT_UINT8_PLANAR_422 + CU_AD_FORMAT_UINT16_PLANAR_422 + CU_AD_FORMAT_UINT8_PLANAR_444 + CU_AD_FORMAT_UINT16_PLANAR_444 + CU_AD_FORMAT_MAX + ctypedef CUarray_format_enum CUarray_format + +cdef extern from 'cuda.h': + ctypedef enum CUaddress_mode_enum: + CU_TR_ADDRESS_MODE_WRAP + CU_TR_ADDRESS_MODE_CLAMP + CU_TR_ADDRESS_MODE_MIRROR + CU_TR_ADDRESS_MODE_BORDER + ctypedef CUaddress_mode_enum CUaddress_mode + +cdef extern from 'cuda.h': + ctypedef enum CUfilter_mode_enum: + CU_TR_FILTER_MODE_POINT + CU_TR_FILTER_MODE_LINEAR + ctypedef CUfilter_mode_enum CUfilter_mode + +cdef extern from 'cuda.h': + ctypedef enum CUdevice_attribute_enum: + CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK + CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X + CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y + CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z + CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X + CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y + CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z + CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK + CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK + CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY + CU_DEVICE_ATTRIBUTE_WARP_SIZE + CU_DEVICE_ATTRIBUTE_MAX_PITCH + CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK + CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK + CU_DEVICE_ATTRIBUTE_CLOCK_RATE + CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT + CU_DEVICE_ATTRIBUTE_GPU_OVERLAP + CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT + CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT + CU_DEVICE_ATTRIBUTE_INTEGRATED + CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY + CU_DEVICE_ATTRIBUTE_COMPUTE_MODE + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES + CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT + CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS + CU_DEVICE_ATTRIBUTE_ECC_ENABLED + CU_DEVICE_ATTRIBUTE_PCI_BUS_ID + CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID + CU_DEVICE_ATTRIBUTE_TCC_DRIVER + CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE + CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH + CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE + CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR + CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT + CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS + CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GATHER + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE + CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID + CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT + CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR + CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH + CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED + CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED + CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED + CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR + CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR + CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY + CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD + CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID + CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED + CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO + CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS + CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS + CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED + CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM + CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS_V1 + CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS_V1 + CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR_V1 + CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH + CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH + CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN + CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES + CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED + CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES + CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST + CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDRESS_MANAGEMENT_SUPPORTED + CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED + CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR_SUPPORTED + CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_HANDLE_SUPPORTED + CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_KMT_HANDLE_SUPPORTED + CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR + CU_DEVICE_ATTRIBUTE_GENERIC_COMPRESSION_SUPPORTED + CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE + CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE + CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_CUDA_VMM_SUPPORTED + CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK + CU_DEVICE_ATTRIBUTE_SPARSE_CUDA_ARRAY_SUPPORTED + CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED + CU_DEVICE_ATTRIBUTE_TIMELINE_SEMAPHORE_INTEROP_SUPPORTED + CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED + CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_SUPPORTED + CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS + CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WRITES_ORDERING + CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPPORTED_HANDLE_TYPES + CU_DEVICE_ATTRIBUTE_CLUSTER_LAUNCH + CU_DEVICE_ATTRIBUTE_DEFERRED_MAPPING_CUDA_ARRAY_SUPPORTED + CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS + CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR + CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPPORTED + CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED + CU_DEVICE_ATTRIBUTE_MEM_SYNC_DOMAIN_COUNT + CU_DEVICE_ATTRIBUTE_TENSOR_MAP_ACCESS_SUPPORTED + CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_FABRIC_SUPPORTED + CU_DEVICE_ATTRIBUTE_UNIFIED_FUNCTION_POINTERS + CU_DEVICE_ATTRIBUTE_NUMA_CONFIG + CU_DEVICE_ATTRIBUTE_NUMA_ID + CU_DEVICE_ATTRIBUTE_MULTICAST_SUPPORTED + CU_DEVICE_ATTRIBUTE_MPS_ENABLED + CU_DEVICE_ATTRIBUTE_HOST_NUMA_ID + CU_DEVICE_ATTRIBUTE_D3D12_CIG_SUPPORTED + CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_ALGORITHM_MASK + CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_MAXIMUM_LENGTH + CU_DEVICE_ATTRIBUTE_VULKAN_CIG_SUPPORTED + CU_DEVICE_ATTRIBUTE_GPU_PCI_DEVICE_ID + CU_DEVICE_ATTRIBUTE_GPU_PCI_SUBSYSTEM_ID + CU_DEVICE_ATTRIBUTE_HOST_NUMA_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED + CU_DEVICE_ATTRIBUTE_HOST_NUMA_MEMORY_POOLS_SUPPORTED + CU_DEVICE_ATTRIBUTE_HOST_NUMA_MULTINODE_IPC_SUPPORTED + CU_DEVICE_ATTRIBUTE_HOST_MEMORY_POOLS_SUPPORTED + CU_DEVICE_ATTRIBUTE_HOST_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED + CU_DEVICE_ATTRIBUTE_HOST_ALLOC_DMA_BUF_SUPPORTED + CU_DEVICE_ATTRIBUTE_ONLY_PARTIAL_HOST_NATIVE_ATOMIC_SUPPORTED + CU_DEVICE_ATTRIBUTE_ATOMIC_REDUCTION_SUPPORTED + CU_DEVICE_ATTRIBUTE_LOCALITY_DOMAIN_COUNT + CU_DEVICE_ATTRIBUTE_MAX_OVERSIZED_SHARED_MEMORY_PER_BLOCK + CU_DEVICE_ATTRIBUTE_D3D12_CIG_STREAMS_SUPPORTED + CU_DEVICE_ATTRIBUTE_DMA_BUF_MMAP_SUPPORTED + CU_DEVICE_ATTRIBUTE_LOGICAL_ENDPOINT_UNICAST_SUPPORTED + CU_DEVICE_ATTRIBUTE_LOGICAL_ENDPOINT_MULTICAST_SUPPORTED + CU_DEVICE_ATTRIBUTE_LOGICAL_ENDPOINT_COUNTED_OPS_SUPPORTED + CU_DEVICE_ATTRIBUTE_LOGICAL_ENDPOINT_UNICAST_ACCESS_ON_OWNER_DEVICE_SUPPORTED + CU_DEVICE_ATTRIBUTE_LOCALITY_DOMAIN_MULTIPROCESSOR_COUNT + CU_DEVICE_ATTRIBUTE_LOGICAL_ENDPOINT_SUPPORTED_HANDLE_TYPES + CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_LOCALIZED_MEMORY_SUPPORTED + CU_DEVICE_ATTRIBUTE_MAX + ctypedef CUdevice_attribute_enum CUdevice_attribute + +cdef extern from 'cuda.h': + ctypedef enum CUpointer_attribute_enum: + CU_POINTER_ATTRIBUTE_CONTEXT + CU_POINTER_ATTRIBUTE_MEMORY_TYPE + CU_POINTER_ATTRIBUTE_DEVICE_POINTER + CU_POINTER_ATTRIBUTE_HOST_POINTER + CU_POINTER_ATTRIBUTE_P2P_TOKENS + CU_POINTER_ATTRIBUTE_SYNC_MEMOPS + CU_POINTER_ATTRIBUTE_BUFFER_ID + CU_POINTER_ATTRIBUTE_IS_MANAGED + CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL + CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE + CU_POINTER_ATTRIBUTE_RANGE_START_ADDR + CU_POINTER_ATTRIBUTE_RANGE_SIZE + CU_POINTER_ATTRIBUTE_MAPPED + CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES + CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE + CU_POINTER_ATTRIBUTE_ACCESS_FLAGS + CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE + CU_POINTER_ATTRIBUTE_MAPPING_SIZE + CU_POINTER_ATTRIBUTE_MAPPING_BASE_ADDR + CU_POINTER_ATTRIBUTE_MEMORY_BLOCK_ID + CU_POINTER_ATTRIBUTE_IS_HW_DECOMPRESS_CAPABLE + CU_POINTER_ATTRIBUTE_LOCALITY_DOMAIN_ORDINAL + ctypedef CUpointer_attribute_enum CUpointer_attribute + +cdef extern from 'cuda.h': + ctypedef enum CUfunction_attribute_enum: + CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK + CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES + CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES + CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES + CU_FUNC_ATTRIBUTE_NUM_REGS + CU_FUNC_ATTRIBUTE_PTX_VERSION + CU_FUNC_ATTRIBUTE_BINARY_VERSION + CU_FUNC_ATTRIBUTE_CACHE_MODE_CA + CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES + CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT + CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_MUST_BE_SET + CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH + CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT + CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH + CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED + CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE + CU_FUNC_ATTRIBUTE_DEVICE_NODE_UPDATE_SUPPORTED + CU_FUNC_ATTRIBUTE_SHARED_MEMORY_MODE + CU_FUNC_ATTRIBUTE_MAX + ctypedef CUfunction_attribute_enum CUfunction_attribute + +cdef extern from 'cuda.h': + ctypedef enum CUfunc_cache_enum: + CU_FUNC_CACHE_PREFER_NONE + CU_FUNC_CACHE_PREFER_SHARED + CU_FUNC_CACHE_PREFER_L1 + CU_FUNC_CACHE_PREFER_EQUAL + ctypedef CUfunc_cache_enum CUfunc_cache + +cdef extern from 'cuda.h': + ctypedef enum CUsharedconfig_enum: + CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE + CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE + CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE + ctypedef CUsharedconfig_enum CUsharedconfig + +cdef extern from 'cuda.h': + ctypedef enum CUshared_carveout_enum: + CU_SHAREDMEM_CARVEOUT_DEFAULT + CU_SHAREDMEM_CARVEOUT_MAX_SHARED + CU_SHAREDMEM_CARVEOUT_MAX_L1 + ctypedef CUshared_carveout_enum CUshared_carveout + +cdef extern from 'cuda.h': + ctypedef enum CUmemorytype_enum: + CU_MEMORYTYPE_HOST + CU_MEMORYTYPE_DEVICE + CU_MEMORYTYPE_ARRAY + CU_MEMORYTYPE_UNIFIED + ctypedef CUmemorytype_enum CUmemorytype + +cdef extern from 'cuda.h': + ctypedef enum CUcomputemode_enum: + CU_COMPUTEMODE_DEFAULT + CU_COMPUTEMODE_PROHIBITED + CU_COMPUTEMODE_EXCLUSIVE_PROCESS + ctypedef CUcomputemode_enum CUcomputemode + +cdef extern from 'cuda.h': + ctypedef enum CUmem_advise_enum: + CU_MEM_ADVISE_SET_READ_MOSTLY + CU_MEM_ADVISE_UNSET_READ_MOSTLY + CU_MEM_ADVISE_SET_PREFERRED_LOCATION + CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION + CU_MEM_ADVISE_SET_ACCESSED_BY + CU_MEM_ADVISE_UNSET_ACCESSED_BY + ctypedef CUmem_advise_enum CUmem_advise + +cdef extern from 'cuda.h': + ctypedef enum CUmem_range_attribute_enum: + CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY + CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION + CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY + CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION + CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_TYPE + CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_ID + CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_TYPE + CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_ID + ctypedef CUmem_range_attribute_enum CUmem_range_attribute + +cdef extern from 'cuda.h': + ctypedef enum CUjit_option_enum: + CU_JIT_MAX_REGISTERS + CU_JIT_THREADS_PER_BLOCK + CU_JIT_WALL_TIME + CU_JIT_INFO_LOG_BUFFER + CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES + CU_JIT_ERROR_LOG_BUFFER + CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES + CU_JIT_OPTIMIZATION_LEVEL + CU_JIT_TARGET_FROM_CUCONTEXT + CU_JIT_TARGET + CU_JIT_FALLBACK_STRATEGY + CU_JIT_GENERATE_DEBUG_INFO + CU_JIT_LOG_VERBOSE + CU_JIT_GENERATE_LINE_INFO + CU_JIT_CACHE_MODE + CU_JIT_NEW_SM3X_OPT + CU_JIT_FAST_COMPILE + CU_JIT_GLOBAL_SYMBOL_NAMES + CU_JIT_GLOBAL_SYMBOL_ADDRESSES + CU_JIT_GLOBAL_SYMBOL_COUNT + CU_JIT_LTO + CU_JIT_FTZ + CU_JIT_PREC_DIV + CU_JIT_PREC_SQRT + CU_JIT_FMA + CU_JIT_REFERENCED_KERNEL_NAMES + CU_JIT_REFERENCED_KERNEL_COUNT + CU_JIT_REFERENCED_VARIABLE_NAMES + CU_JIT_REFERENCED_VARIABLE_COUNT + CU_JIT_OPTIMIZE_UNUSED_DEVICE_VARIABLES + CU_JIT_POSITION_INDEPENDENT_CODE + CU_JIT_MIN_CTA_PER_SM + CU_JIT_MAX_THREADS_PER_BLOCK + CU_JIT_OVERRIDE_DIRECTIVE_VALUES + CU_JIT_SPLIT_COMPILE + CU_JIT_BINARY_LOADER_THREAD_COUNT + CU_JIT_NUM_OPTIONS + ctypedef CUjit_option_enum CUjit_option + +cdef extern from 'cuda.h': + ctypedef enum CUjit_target_enum: + CU_TARGET_COMPUTE_30 + CU_TARGET_COMPUTE_32 + CU_TARGET_COMPUTE_35 + CU_TARGET_COMPUTE_37 + CU_TARGET_COMPUTE_50 + CU_TARGET_COMPUTE_52 + CU_TARGET_COMPUTE_53 + CU_TARGET_COMPUTE_60 + CU_TARGET_COMPUTE_61 + CU_TARGET_COMPUTE_62 + CU_TARGET_COMPUTE_70 + CU_TARGET_COMPUTE_72 + CU_TARGET_COMPUTE_75 + CU_TARGET_COMPUTE_80 + CU_TARGET_COMPUTE_86 + CU_TARGET_COMPUTE_87 + CU_TARGET_COMPUTE_89 + CU_TARGET_COMPUTE_90 + CU_TARGET_COMPUTE_100 + CU_TARGET_COMPUTE_110 + CU_TARGET_COMPUTE_103 + CU_TARGET_COMPUTE_107 + CU_TARGET_COMPUTE_120 + CU_TARGET_COMPUTE_121 + CU_TARGET_COMPUTE_90A + CU_TARGET_COMPUTE_100A + CU_TARGET_COMPUTE_110A + CU_TARGET_COMPUTE_103A + CU_TARGET_COMPUTE_107A + CU_TARGET_COMPUTE_120A + CU_TARGET_COMPUTE_121A + CU_TARGET_COMPUTE_100F + CU_TARGET_COMPUTE_110F + CU_TARGET_COMPUTE_103F + CU_TARGET_COMPUTE_107F + CU_TARGET_COMPUTE_120F + CU_TARGET_COMPUTE_121F + CU_TARGET_COMPUTE_101 + CU_TARGET_COMPUTE_101A + CU_TARGET_COMPUTE_101F + ctypedef CUjit_target_enum CUjit_target + +cdef extern from 'cuda.h': + ctypedef enum CUjit_fallback_enum: + CU_PREFER_PTX + CU_PREFER_BINARY + ctypedef CUjit_fallback_enum CUjit_fallback + +cdef extern from 'cuda.h': + ctypedef enum CUjit_cacheMode_enum: + CU_JIT_CACHE_OPTION_NONE + CU_JIT_CACHE_OPTION_CG + CU_JIT_CACHE_OPTION_CA + ctypedef CUjit_cacheMode_enum CUjit_cacheMode + +cdef extern from 'cuda.h': + ctypedef enum CUjitInputType_enum: + CU_JIT_INPUT_CUBIN + CU_JIT_INPUT_PTX + CU_JIT_INPUT_FATBINARY + CU_JIT_INPUT_OBJECT + CU_JIT_INPUT_LIBRARY + CU_JIT_INPUT_NVVM + CU_JIT_NUM_INPUT_TYPES + ctypedef CUjitInputType_enum CUjitInputType + +cdef extern from 'cuda.h': + ctypedef enum CUgraphicsRegisterFlags_enum: + CU_GRAPHICS_REGISTER_FLAGS_NONE + CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY + CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD + CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST + CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER + ctypedef CUgraphicsRegisterFlags_enum CUgraphicsRegisterFlags + +cdef extern from 'cuda.h': + ctypedef enum CUgraphicsMapResourceFlags_enum: + CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE + CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY + CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD + ctypedef CUgraphicsMapResourceFlags_enum CUgraphicsMapResourceFlags + +cdef extern from 'cuda.h': + ctypedef enum CUarray_cubemap_face_enum: + CU_CUBEMAP_FACE_POSITIVE_X + CU_CUBEMAP_FACE_NEGATIVE_X + CU_CUBEMAP_FACE_POSITIVE_Y + CU_CUBEMAP_FACE_NEGATIVE_Y + CU_CUBEMAP_FACE_POSITIVE_Z + CU_CUBEMAP_FACE_NEGATIVE_Z + ctypedef CUarray_cubemap_face_enum CUarray_cubemap_face + +cdef extern from 'cuda.h': + ctypedef enum CUlimit_enum: + CU_LIMIT_STACK_SIZE + CU_LIMIT_PRINTF_FIFO_SIZE + CU_LIMIT_MALLOC_HEAP_SIZE + CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH + CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT + CU_LIMIT_MAX_L2_FETCH_GRANULARITY + CU_LIMIT_PERSISTING_L2_CACHE_SIZE + CU_LIMIT_SHMEM_SIZE + CU_LIMIT_CIG_ENABLED + CU_LIMIT_CIG_SHMEM_FALLBACK_ENABLED + CU_LIMIT_PER_BLOCK_MEMORY_SIZE + CU_LIMIT_MAX + ctypedef CUlimit_enum CUlimit + +cdef extern from 'cuda.h': + ctypedef enum CUresourcetype_enum: + CU_RESOURCE_TYPE_ARRAY + CU_RESOURCE_TYPE_MIPMAPPED_ARRAY + CU_RESOURCE_TYPE_LINEAR + CU_RESOURCE_TYPE_PITCH2D + ctypedef CUresourcetype_enum CUresourcetype + +cdef extern from 'cuda.h': + ctypedef enum CUaccessProperty_enum: + CU_ACCESS_PROPERTY_NORMAL + CU_ACCESS_PROPERTY_STREAMING + CU_ACCESS_PROPERTY_PERSISTING + ctypedef CUaccessProperty_enum CUaccessProperty + +cdef extern from 'cuda.h': + ctypedef enum CUgraphConditionalNodeType_enum: + CU_GRAPH_COND_TYPE_IF + CU_GRAPH_COND_TYPE_WHILE + CU_GRAPH_COND_TYPE_SWITCH + ctypedef CUgraphConditionalNodeType_enum CUgraphConditionalNodeType + +cdef extern from 'cuda.h': + ctypedef enum CUgraphNodeType_enum: + CU_GRAPH_NODE_TYPE_KERNEL + CU_GRAPH_NODE_TYPE_MEMCPY + CU_GRAPH_NODE_TYPE_MEMSET + CU_GRAPH_NODE_TYPE_HOST + CU_GRAPH_NODE_TYPE_GRAPH + CU_GRAPH_NODE_TYPE_EMPTY + CU_GRAPH_NODE_TYPE_WAIT_EVENT + CU_GRAPH_NODE_TYPE_EVENT_RECORD + CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL + CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAIT + CU_GRAPH_NODE_TYPE_MEM_ALLOC + CU_GRAPH_NODE_TYPE_MEM_FREE + CU_GRAPH_NODE_TYPE_BATCH_MEM_OP + CU_GRAPH_NODE_TYPE_CONDITIONAL + CU_GRAPH_NODE_TYPE_RESERVED_16 + ctypedef CUgraphNodeType_enum CUgraphNodeType + +cdef extern from 'cuda.h': + ctypedef enum CUgraphDependencyType_enum: + CU_GRAPH_DEPENDENCY_TYPE_DEFAULT + CU_GRAPH_DEPENDENCY_TYPE_PROGRAMMATIC + ctypedef CUgraphDependencyType_enum CUgraphDependencyType + +cdef extern from 'cuda.h': + ctypedef enum CUgraphInstantiateResult_enum: + CUDA_GRAPH_INSTANTIATE_SUCCESS + CUDA_GRAPH_INSTANTIATE_ERROR + CUDA_GRAPH_INSTANTIATE_INVALID_STRUCTURE + CUDA_GRAPH_INSTANTIATE_NODE_OPERATION_NOT_SUPPORTED + CUDA_GRAPH_INSTANTIATE_MULTIPLE_CTXS_NOT_SUPPORTED + CUDA_GRAPH_INSTANTIATE_CONDITIONAL_HANDLE_UNUSED + ctypedef CUgraphInstantiateResult_enum CUgraphInstantiateResult + +cdef extern from 'cuda.h': + ctypedef enum CUsynchronizationPolicy_enum: + CU_SYNC_POLICY_AUTO + CU_SYNC_POLICY_SPIN + CU_SYNC_POLICY_YIELD + CU_SYNC_POLICY_BLOCKING_SYNC + ctypedef CUsynchronizationPolicy_enum CUsynchronizationPolicy + +cdef extern from 'cuda.h': + ctypedef enum CUclusterSchedulingPolicy_enum: + CU_CLUSTER_SCHEDULING_POLICY_DEFAULT + CU_CLUSTER_SCHEDULING_POLICY_SPREAD + CU_CLUSTER_SCHEDULING_POLICY_LOAD_BALANCING + CU_CLUSTER_SCHEDULING_POLICY_RUBIN_DSMEM_LOCALITY + ctypedef CUclusterSchedulingPolicy_enum CUclusterSchedulingPolicy + +cdef extern from 'cuda.h': + ctypedef enum CUlaunchMemSyncDomain_enum: + CU_LAUNCH_MEM_SYNC_DOMAIN_DEFAULT + CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE + ctypedef CUlaunchMemSyncDomain_enum CUlaunchMemSyncDomain + +cdef extern from 'cuda.h': + ctypedef enum CUlaunchAttributeID_enum: + CU_LAUNCH_ATTRIBUTE_IGNORE + CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW + CU_LAUNCH_ATTRIBUTE_COOPERATIVE + CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY + CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION + CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT + CU_LAUNCH_ATTRIBUTE_PRIORITY + CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP + CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION + CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT + CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE + CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT + CU_LAUNCH_ATTRIBUTE_NVLINK_UTIL_CENTRIC_SCHEDULING + CU_LAUNCH_ATTRIBUTE_PORTABLE_CLUSTER_SIZE_MODE + CU_LAUNCH_ATTRIBUTE_SHARED_MEMORY_MODE + ctypedef CUlaunchAttributeID_enum CUlaunchAttributeID + +cdef extern from 'cuda.h': + ctypedef enum CUstreamCaptureStatus_enum: + CU_STREAM_CAPTURE_STATUS_NONE + CU_STREAM_CAPTURE_STATUS_ACTIVE + CU_STREAM_CAPTURE_STATUS_INVALIDATED + ctypedef CUstreamCaptureStatus_enum CUstreamCaptureStatus + +cdef extern from 'cuda.h': + ctypedef enum CUstreamCaptureMode_enum: + CU_STREAM_CAPTURE_MODE_GLOBAL + CU_STREAM_CAPTURE_MODE_THREAD_LOCAL + CU_STREAM_CAPTURE_MODE_RELAXED + ctypedef CUstreamCaptureMode_enum CUstreamCaptureMode + +cdef extern from 'cuda.h': + ctypedef enum CUdriverProcAddress_flags_enum: + CU_GET_PROC_ADDRESS_DEFAULT + CU_GET_PROC_ADDRESS_LEGACY_STREAM + CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM + ctypedef CUdriverProcAddress_flags_enum CUdriverProcAddress_flags + +cdef extern from 'cuda.h': + ctypedef enum CUdriverProcAddressQueryResult_enum: + CU_GET_PROC_ADDRESS_SUCCESS + CU_GET_PROC_ADDRESS_SYMBOL_NOT_FOUND + CU_GET_PROC_ADDRESS_VERSION_NOT_SUFFICIENT + ctypedef CUdriverProcAddressQueryResult_enum CUdriverProcAddressQueryResult + +cdef extern from 'cuda.h': + ctypedef enum CUexecAffinityType_enum: + CU_EXEC_AFFINITY_TYPE_SM_COUNT + CU_EXEC_AFFINITY_TYPE_MAX + ctypedef CUexecAffinityType_enum CUexecAffinityType + +cdef extern from 'cuda.h': + ctypedef enum CUcigDataType_enum: + CIG_DATA_TYPE_D3D12_COMMAND_QUEUE + CIG_DATA_TYPE_NV_BLOB + ctypedef CUcigDataType_enum CUcigDataType + +cdef extern from 'cuda.h': + ctypedef enum CUlibraryOption_enum: + CU_LIBRARY_HOST_UNIVERSAL_FUNCTION_AND_DATA_TABLE + CU_LIBRARY_BINARY_IS_PRESERVED + CU_LIBRARY_NUM_OPTIONS + ctypedef CUlibraryOption_enum CUlibraryOption + +cdef extern from 'cuda.h': + ctypedef enum cudaError_enum: + CUDA_SUCCESS + CUDA_ERROR_INVALID_VALUE + CUDA_ERROR_OUT_OF_MEMORY + CUDA_ERROR_NOT_INITIALIZED + CUDA_ERROR_DEINITIALIZED + CUDA_ERROR_PROFILER_DISABLED + CUDA_ERROR_PROFILER_NOT_INITIALIZED + CUDA_ERROR_PROFILER_ALREADY_STARTED + CUDA_ERROR_PROFILER_ALREADY_STOPPED + CUDA_ERROR_STUB_LIBRARY + CUDA_ERROR_CALL_REQUIRES_NEWER_DRIVER + CUDA_ERROR_DEVICE_UNAVAILABLE + CUDA_ERROR_MULTICAST_RESOURCE_FULL + CUDA_ERROR_NO_DEVICE + CUDA_ERROR_INVALID_DEVICE + CUDA_ERROR_DEVICE_NOT_LICENSED + CUDA_ERROR_INVALID_IMAGE + CUDA_ERROR_INVALID_CONTEXT + CUDA_ERROR_CONTEXT_ALREADY_CURRENT + CUDA_ERROR_MAP_FAILED + CUDA_ERROR_UNMAP_FAILED + CUDA_ERROR_ARRAY_IS_MAPPED + CUDA_ERROR_ALREADY_MAPPED + CUDA_ERROR_NO_BINARY_FOR_GPU + CUDA_ERROR_ALREADY_ACQUIRED + CUDA_ERROR_NOT_MAPPED + CUDA_ERROR_NOT_MAPPED_AS_ARRAY + CUDA_ERROR_NOT_MAPPED_AS_POINTER + CUDA_ERROR_ECC_UNCORRECTABLE + CUDA_ERROR_UNSUPPORTED_LIMIT + CUDA_ERROR_CONTEXT_ALREADY_IN_USE + CUDA_ERROR_PEER_ACCESS_UNSUPPORTED + CUDA_ERROR_INVALID_PTX + CUDA_ERROR_INVALID_GRAPHICS_CONTEXT + CUDA_ERROR_NVLINK_UNCORRECTABLE + CUDA_ERROR_JIT_COMPILER_NOT_FOUND + CUDA_ERROR_UNSUPPORTED_PTX_VERSION + CUDA_ERROR_JIT_COMPILATION_DISABLED + CUDA_ERROR_UNSUPPORTED_EXEC_AFFINITY + CUDA_ERROR_UNSUPPORTED_DEVSIDE_SYNC + CUDA_ERROR_CONTAINED + CUDA_ERROR_INSUFFICIENT_LOADER_VERSION + CUDA_ERROR_INVALID_SOURCE + CUDA_ERROR_FILE_NOT_FOUND + CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND + CUDA_ERROR_SHARED_OBJECT_INIT_FAILED + CUDA_ERROR_OPERATING_SYSTEM + CUDA_ERROR_INVALID_HANDLE + CUDA_ERROR_ILLEGAL_STATE + CUDA_ERROR_LOSSY_QUERY + CUDA_ERROR_NOT_FOUND + CUDA_ERROR_NOT_READY + CUDA_ERROR_ILLEGAL_ADDRESS + CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES + CUDA_ERROR_LAUNCH_TIMEOUT + CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING + CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED + CUDA_ERROR_PEER_ACCESS_NOT_ENABLED + CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE + CUDA_ERROR_CONTEXT_IS_DESTROYED + CUDA_ERROR_ASSERT + CUDA_ERROR_TOO_MANY_PEERS + CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED + CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED + CUDA_ERROR_HARDWARE_STACK_ERROR + CUDA_ERROR_ILLEGAL_INSTRUCTION + CUDA_ERROR_MISALIGNED_ADDRESS + CUDA_ERROR_INVALID_ADDRESS_SPACE + CUDA_ERROR_INVALID_PC + CUDA_ERROR_LAUNCH_FAILED + CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE + CUDA_ERROR_TENSOR_MEMORY_LEAK + CUDA_ERROR_NOT_PERMITTED + CUDA_ERROR_NOT_SUPPORTED + CUDA_ERROR_SYSTEM_NOT_READY + CUDA_ERROR_SYSTEM_DRIVER_MISMATCH + CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE + CUDA_ERROR_MPS_CONNECTION_FAILED + CUDA_ERROR_MPS_RPC_FAILURE + CUDA_ERROR_MPS_SERVER_NOT_READY + CUDA_ERROR_MPS_MAX_CLIENTS_REACHED + CUDA_ERROR_MPS_MAX_CONNECTIONS_REACHED + CUDA_ERROR_MPS_CLIENT_TERMINATED + CUDA_ERROR_CDP_NOT_SUPPORTED + CUDA_ERROR_CDP_VERSION_MISMATCH + CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED + CUDA_ERROR_STREAM_CAPTURE_INVALIDATED + CUDA_ERROR_STREAM_CAPTURE_MERGE + CUDA_ERROR_STREAM_CAPTURE_UNMATCHED + CUDA_ERROR_STREAM_CAPTURE_UNJOINED + CUDA_ERROR_STREAM_CAPTURE_ISOLATION + CUDA_ERROR_STREAM_CAPTURE_IMPLICIT + CUDA_ERROR_CAPTURED_EVENT + CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD + CUDA_ERROR_TIMEOUT + CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE + CUDA_ERROR_EXTERNAL_DEVICE + CUDA_ERROR_INVALID_CLUSTER_SIZE + CUDA_ERROR_FUNCTION_NOT_LOADED + CUDA_ERROR_INVALID_RESOURCE_TYPE + CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION + CUDA_ERROR_KEY_ROTATION + CUDA_ERROR_STREAM_DETACHED + CUDA_ERROR_GRAPH_RECAPTURE_FAILURE + CUDA_ERROR_FABRIC_NOT_READY + CUDA_ERROR_UNKNOWN + ctypedef cudaError_enum CUresult + +cdef extern from 'cuda.h': + ctypedef enum CUdevice_P2PAttribute_enum: + CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK + CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED + CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED + CU_DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED + CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED + CU_DEVICE_P2P_ATTRIBUTE_ONLY_PARTIAL_NATIVE_ATOMIC_SUPPORTED + ctypedef CUdevice_P2PAttribute_enum CUdevice_P2PAttribute + +cdef extern from 'cuda.h': + ctypedef enum CUresourceViewFormat_enum: + CU_RES_VIEW_FORMAT_NONE + CU_RES_VIEW_FORMAT_UINT_1X8 + CU_RES_VIEW_FORMAT_UINT_2X8 + CU_RES_VIEW_FORMAT_UINT_4X8 + CU_RES_VIEW_FORMAT_SINT_1X8 + CU_RES_VIEW_FORMAT_SINT_2X8 + CU_RES_VIEW_FORMAT_SINT_4X8 + CU_RES_VIEW_FORMAT_UINT_1X16 + CU_RES_VIEW_FORMAT_UINT_2X16 + CU_RES_VIEW_FORMAT_UINT_4X16 + CU_RES_VIEW_FORMAT_SINT_1X16 + CU_RES_VIEW_FORMAT_SINT_2X16 + CU_RES_VIEW_FORMAT_SINT_4X16 + CU_RES_VIEW_FORMAT_UINT_1X32 + CU_RES_VIEW_FORMAT_UINT_2X32 + CU_RES_VIEW_FORMAT_UINT_4X32 + CU_RES_VIEW_FORMAT_SINT_1X32 + CU_RES_VIEW_FORMAT_SINT_2X32 + CU_RES_VIEW_FORMAT_SINT_4X32 + CU_RES_VIEW_FORMAT_FLOAT_1X16 + CU_RES_VIEW_FORMAT_FLOAT_2X16 + CU_RES_VIEW_FORMAT_FLOAT_4X16 + CU_RES_VIEW_FORMAT_FLOAT_1X32 + CU_RES_VIEW_FORMAT_FLOAT_2X32 + CU_RES_VIEW_FORMAT_FLOAT_4X32 + CU_RES_VIEW_FORMAT_UNSIGNED_BC1 + CU_RES_VIEW_FORMAT_UNSIGNED_BC2 + CU_RES_VIEW_FORMAT_UNSIGNED_BC3 + CU_RES_VIEW_FORMAT_UNSIGNED_BC4 + CU_RES_VIEW_FORMAT_SIGNED_BC4 + CU_RES_VIEW_FORMAT_UNSIGNED_BC5 + CU_RES_VIEW_FORMAT_SIGNED_BC5 + CU_RES_VIEW_FORMAT_UNSIGNED_BC6H + CU_RES_VIEW_FORMAT_SIGNED_BC6H + CU_RES_VIEW_FORMAT_UNSIGNED_BC7 + ctypedef CUresourceViewFormat_enum CUresourceViewFormat + +cdef extern from 'cuda.h': + ctypedef enum CUtensorMapDataType_enum: + CU_TENSOR_MAP_DATA_TYPE_UINT8 + CU_TENSOR_MAP_DATA_TYPE_UINT16 + CU_TENSOR_MAP_DATA_TYPE_UINT32 + CU_TENSOR_MAP_DATA_TYPE_INT32 + CU_TENSOR_MAP_DATA_TYPE_UINT64 + CU_TENSOR_MAP_DATA_TYPE_INT64 + CU_TENSOR_MAP_DATA_TYPE_FLOAT16 + CU_TENSOR_MAP_DATA_TYPE_FLOAT32 + CU_TENSOR_MAP_DATA_TYPE_FLOAT64 + CU_TENSOR_MAP_DATA_TYPE_BFLOAT16 + CU_TENSOR_MAP_DATA_TYPE_FLOAT32_FTZ + CU_TENSOR_MAP_DATA_TYPE_TFLOAT32 + CU_TENSOR_MAP_DATA_TYPE_TFLOAT32_FTZ + CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN8B + CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B + CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B + ctypedef CUtensorMapDataType_enum CUtensorMapDataType + +cdef extern from 'cuda.h': + ctypedef enum CUtensorMapInterleave_enum: + CU_TENSOR_MAP_INTERLEAVE_NONE + CU_TENSOR_MAP_INTERLEAVE_16B + CU_TENSOR_MAP_INTERLEAVE_32B + ctypedef CUtensorMapInterleave_enum CUtensorMapInterleave + +cdef extern from 'cuda.h': + ctypedef enum CUtensorMapSwizzle_enum: + CU_TENSOR_MAP_SWIZZLE_NONE + CU_TENSOR_MAP_SWIZZLE_32B + CU_TENSOR_MAP_SWIZZLE_64B + CU_TENSOR_MAP_SWIZZLE_128B + CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B + CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B_FLIP_8B + CU_TENSOR_MAP_SWIZZLE_128B_ATOM_64B + ctypedef CUtensorMapSwizzle_enum CUtensorMapSwizzle + +cdef extern from 'cuda.h': + ctypedef enum CUtensorMapL2promotion_enum: + CU_TENSOR_MAP_L2_PROMOTION_NONE + CU_TENSOR_MAP_L2_PROMOTION_L2_64B + CU_TENSOR_MAP_L2_PROMOTION_L2_128B + CU_TENSOR_MAP_L2_PROMOTION_L2_256B + ctypedef CUtensorMapL2promotion_enum CUtensorMapL2promotion + +cdef extern from 'cuda.h': + ctypedef enum CUtensorMapFloatOOBfill_enum: + CU_TENSOR_MAP_FLOAT_OOB_FILL_NONE + CU_TENSOR_MAP_FLOAT_OOB_FILL_NAN_REQUEST_ZERO_FMA + ctypedef CUtensorMapFloatOOBfill_enum CUtensorMapFloatOOBfill + +cdef extern from 'cuda.h': + ctypedef enum CUtensorMapIm2ColWideMode_enum: + CU_TENSOR_MAP_IM2COL_WIDE_MODE_W + CU_TENSOR_MAP_IM2COL_WIDE_MODE_W128 + ctypedef CUtensorMapIm2ColWideMode_enum CUtensorMapIm2ColWideMode + +cdef extern from 'cuda.h': + ctypedef enum CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum: + CU_POINTER_ATTRIBUTE_ACCESS_FLAG_NONE + CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READ + CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READWRITE + ctypedef CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS + +cdef extern from 'cuda.h': + ctypedef enum CUexternalMemoryHandleType_enum: + CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD + CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32 + CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT + CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP + CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE + CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE + CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT + CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF + CU_EXTERNAL_MEMORY_HANDLE_TYPE_DMABUF_FD + ctypedef CUexternalMemoryHandleType_enum CUexternalMemoryHandleType + +cdef extern from 'cuda.h': + ctypedef enum CUexternalSemaphoreHandleType_enum: + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32 + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32 + ctypedef CUexternalSemaphoreHandleType_enum CUexternalSemaphoreHandleType + +cdef extern from 'cuda.h': + ctypedef enum CUmemAllocationHandleType_enum: + CU_MEM_HANDLE_TYPE_NONE + CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR + CU_MEM_HANDLE_TYPE_WIN32 + CU_MEM_HANDLE_TYPE_WIN32_KMT + CU_MEM_HANDLE_TYPE_FABRIC + CU_MEM_HANDLE_TYPE_MAX + ctypedef CUmemAllocationHandleType_enum CUmemAllocationHandleType + +cdef extern from 'cuda.h': + ctypedef enum CUmemAccess_flags_enum: + CU_MEM_ACCESS_FLAGS_PROT_NONE + CU_MEM_ACCESS_FLAGS_PROT_READ + CU_MEM_ACCESS_FLAGS_PROT_READWRITE + CU_MEM_ACCESS_FLAGS_PROT_MAX + ctypedef CUmemAccess_flags_enum CUmemAccess_flags + +cdef extern from 'cuda.h': + ctypedef enum CUmemLocationType_enum: + CU_MEM_LOCATION_TYPE_INVALID + CU_MEM_LOCATION_TYPE_NONE + CU_MEM_LOCATION_TYPE_DEVICE + CU_MEM_LOCATION_TYPE_HOST + CU_MEM_LOCATION_TYPE_HOST_NUMA + CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT + CU_MEM_LOCATION_TYPE_INVISIBLE + CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN + CU_MEM_LOCATION_TYPE_MAX + ctypedef CUmemLocationType_enum CUmemLocationType + +cdef extern from 'cuda.h': + ctypedef enum CUmemAllocationType_enum: + CU_MEM_ALLOCATION_TYPE_INVALID + CU_MEM_ALLOCATION_TYPE_PINNED + CU_MEM_ALLOCATION_TYPE_MANAGED + CU_MEM_ALLOCATION_TYPE_MAX + ctypedef CUmemAllocationType_enum CUmemAllocationType + +cdef extern from 'cuda.h': + ctypedef enum CUmemAllocationGranularity_flags_enum: + CU_MEM_ALLOC_GRANULARITY_MINIMUM + CU_MEM_ALLOC_GRANULARITY_RECOMMENDED + ctypedef CUmemAllocationGranularity_flags_enum CUmemAllocationGranularity_flags + +cdef extern from 'cuda.h': + ctypedef enum CUmemRangeHandleType_enum: + CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF_FD + CU_MEM_RANGE_HANDLE_TYPE_MAX + ctypedef CUmemRangeHandleType_enum CUmemRangeHandleType + +cdef extern from 'cuda.h': + ctypedef enum CUmemRangeFlags_enum: + CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE + ctypedef CUmemRangeFlags_enum CUmemRangeFlags + +cdef extern from 'cuda.h': + ctypedef enum CUarraySparseSubresourceType_enum: + CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL + CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL + ctypedef CUarraySparseSubresourceType_enum CUarraySparseSubresourceType + +cdef extern from 'cuda.h': + ctypedef enum CUmemOperationType_enum: + CU_MEM_OPERATION_TYPE_MAP + CU_MEM_OPERATION_TYPE_UNMAP + ctypedef CUmemOperationType_enum CUmemOperationType + +cdef extern from 'cuda.h': + ctypedef enum CUmemHandleType_enum: + CU_MEM_HANDLE_TYPE_GENERIC + ctypedef CUmemHandleType_enum CUmemHandleType + +cdef extern from 'cuda.h': + ctypedef enum CUmemAllocationCompType_enum: + CU_MEM_ALLOCATION_COMP_NONE + CU_MEM_ALLOCATION_COMP_GENERIC + ctypedef CUmemAllocationCompType_enum CUmemAllocationCompType + +cdef extern from 'cuda.h': + ctypedef enum CUmulticastGranularity_flags_enum: + CU_MULTICAST_GRANULARITY_MINIMUM + CU_MULTICAST_GRANULARITY_RECOMMENDED + ctypedef CUmulticastGranularity_flags_enum CUmulticastGranularity_flags + +cdef extern from 'cuda.h': + ctypedef enum CUgraphExecUpdateResult_enum: + CU_GRAPH_EXEC_UPDATE_SUCCESS + CU_GRAPH_EXEC_UPDATE_ERROR + CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED + CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED + CU_GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED + CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED + CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED + CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE + CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED + ctypedef CUgraphExecUpdateResult_enum CUgraphExecUpdateResult + +cdef extern from 'cuda.h': + ctypedef enum CUmemPool_attribute_enum: + CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES + CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC + CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES + CU_MEMPOOL_ATTR_RELEASE_THRESHOLD + CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT + CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH + CU_MEMPOOL_ATTR_USED_MEM_CURRENT + CU_MEMPOOL_ATTR_USED_MEM_HIGH + CU_MEMPOOL_ATTR_ALLOCATION_TYPE + CU_MEMPOOL_ATTR_EXPORT_HANDLE_TYPES + CU_MEMPOOL_ATTR_LOCATION_ID + CU_MEMPOOL_ATTR_LOCATION_TYPE + CU_MEMPOOL_ATTR_MAX_POOL_SIZE + CU_MEMPOOL_ATTR_HW_DECOMPRESS_ENABLED + CU_MEMPOOL_ATTR_LOCALITY_DOMAIN_ID + ctypedef CUmemPool_attribute_enum CUmemPool_attribute + +cdef extern from 'cuda.h': + ctypedef enum CUmemcpyFlags_enum: + CU_MEMCPY_FLAG_DEFAULT + CU_MEMCPY_FLAG_PREFER_OVERLAP_WITH_COMPUTE + ctypedef CUmemcpyFlags_enum CUmemcpyFlags + +cdef extern from 'cuda.h': + ctypedef enum CUmemcpySrcAccessOrder_enum: + CU_MEMCPY_SRC_ACCESS_ORDER_INVALID + CU_MEMCPY_SRC_ACCESS_ORDER_STREAM + CU_MEMCPY_SRC_ACCESS_ORDER_DURING_API_CALL + CU_MEMCPY_SRC_ACCESS_ORDER_ANY + CU_MEMCPY_SRC_ACCESS_ORDER_MAX + ctypedef CUmemcpySrcAccessOrder_enum CUmemcpySrcAccessOrder + +cdef extern from 'cuda.h': + ctypedef enum CUmemcpy3DOperandType_enum: + CU_MEMCPY_OPERAND_TYPE_POINTER + CU_MEMCPY_OPERAND_TYPE_ARRAY + CU_MEMCPY_OPERAND_TYPE_MAX + ctypedef CUmemcpy3DOperandType_enum CUmemcpy3DOperandType + +cdef extern from 'cuda.h': + ctypedef enum CUgraphMem_attribute_enum: + CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT + CU_GRAPH_MEM_ATTR_USED_MEM_HIGH + CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT + CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH + ctypedef CUgraphMem_attribute_enum CUgraphMem_attribute + +cdef extern from 'cuda.h': + ctypedef enum CUgraphChildGraphNodeOwnership_enum: + CU_GRAPH_CHILD_GRAPH_OWNERSHIP_CLONE + CU_GRAPH_CHILD_GRAPH_OWNERSHIP_MOVE + CU_GRAPH_CHILD_GRAPH_OWNERSHIP_INVALID + ctypedef CUgraphChildGraphNodeOwnership_enum CUgraphChildGraphNodeOwnership + +cdef extern from 'cuda.h': + ctypedef enum CUflushGPUDirectRDMAWritesOptions_enum: + CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_HOST + CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS + ctypedef CUflushGPUDirectRDMAWritesOptions_enum CUflushGPUDirectRDMAWritesOptions + +cdef extern from 'cuda.h': + ctypedef enum CUGPUDirectRDMAWritesOrdering_enum: + CU_GPU_DIRECT_RDMA_WRITES_ORDERING_NONE + CU_GPU_DIRECT_RDMA_WRITES_ORDERING_OWNER + CU_GPU_DIRECT_RDMA_WRITES_ORDERING_ALL_DEVICES + ctypedef CUGPUDirectRDMAWritesOrdering_enum CUGPUDirectRDMAWritesOrdering + +cdef extern from 'cuda.h': + ctypedef enum CUflushGPUDirectRDMAWritesScope_enum: + CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_OWNER + CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_ALL_DEVICES + ctypedef CUflushGPUDirectRDMAWritesScope_enum CUflushGPUDirectRDMAWritesScope + +cdef extern from 'cuda.h': + ctypedef enum CUflushGPUDirectRDMAWritesTarget_enum: + CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TARGET_CURRENT_CTX + ctypedef CUflushGPUDirectRDMAWritesTarget_enum CUflushGPUDirectRDMAWritesTarget + +cdef extern from 'cuda.h': + ctypedef enum CUgraphDebugDot_flags_enum: + CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE + CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME_TYPES + CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_PARAMS + CU_GRAPH_DEBUG_DOT_FLAGS_MEMCPY_NODE_PARAMS + CU_GRAPH_DEBUG_DOT_FLAGS_MEMSET_NODE_PARAMS + CU_GRAPH_DEBUG_DOT_FLAGS_HOST_NODE_PARAMS + CU_GRAPH_DEBUG_DOT_FLAGS_EVENT_NODE_PARAMS + CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_SIGNAL_NODE_PARAMS + CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_WAIT_NODE_PARAMS + CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_ATTRIBUTES + CU_GRAPH_DEBUG_DOT_FLAGS_HANDLES + CU_GRAPH_DEBUG_DOT_FLAGS_MEM_ALLOC_NODE_PARAMS + CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FREE_NODE_PARAMS + CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_MEM_OP_NODE_PARAMS + CU_GRAPH_DEBUG_DOT_FLAGS_EXTRA_TOPO_INFO + CU_GRAPH_DEBUG_DOT_FLAGS_CONDITIONAL_NODE_PARAMS + ctypedef CUgraphDebugDot_flags_enum CUgraphDebugDot_flags + +cdef extern from 'cuda.h': + ctypedef enum CUuserObject_flags_enum: + CU_USER_OBJECT_NO_DESTRUCTOR_SYNC + ctypedef CUuserObject_flags_enum CUuserObject_flags + +cdef extern from 'cuda.h': + ctypedef enum CUuserObjectRetain_flags_enum: + CU_GRAPH_USER_OBJECT_MOVE + ctypedef CUuserObjectRetain_flags_enum CUuserObjectRetain_flags + +cdef extern from 'cuda.h': + ctypedef enum CUgraphInstantiate_flags_enum: + CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH + CUDA_GRAPH_INSTANTIATE_FLAG_UPLOAD + CUDA_GRAPH_INSTANTIATE_FLAG_DEVICE_LAUNCH + CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY + ctypedef CUgraphInstantiate_flags_enum CUgraphInstantiate_flags + +cdef extern from 'cuda.h': + ctypedef enum CUdeviceNumaConfig_enum: + CU_DEVICE_NUMA_CONFIG_NONE + CU_DEVICE_NUMA_CONFIG_NUMA_NODE + ctypedef CUdeviceNumaConfig_enum CUdeviceNumaConfig + +cdef extern from 'cuda.h': + ctypedef enum CUprocessState_enum: + CU_PROCESS_STATE_RUNNING + CU_PROCESS_STATE_LOCKED + CU_PROCESS_STATE_CHECKPOINTED + CU_PROCESS_STATE_FAILED + CU_PROCESS_STATE_CHECKPOINTING + CU_PROCESS_STATE_RESTORING + ctypedef CUprocessState_enum CUprocessState + +cdef extern from 'cuda.h': + ctypedef enum CUmoduleLoadingMode_enum: + CU_MODULE_EAGER_LOADING + CU_MODULE_LAZY_LOADING + ctypedef CUmoduleLoadingMode_enum CUmoduleLoadingMode + +cdef extern from 'cuda.h': + ctypedef enum CUmemDecompressAlgorithm_enum: + CU_MEM_DECOMPRESS_UNSUPPORTED + CU_MEM_DECOMPRESS_ALGORITHM_DEFLATE + CU_MEM_DECOMPRESS_ALGORITHM_SNAPPY + CU_MEM_DECOMPRESS_ALGORITHM_LZ4 + ctypedef CUmemDecompressAlgorithm_enum CUmemDecompressAlgorithm + +cdef extern from 'cuda.h': + ctypedef enum CUfunctionLoadingState_enum: + CU_FUNCTION_LOADING_STATE_UNLOADED + CU_FUNCTION_LOADING_STATE_LOADED + CU_FUNCTION_LOADING_STATE_MAX + ctypedef CUfunctionLoadingState_enum CUfunctionLoadingState + +cdef extern from 'cuda.h': + ctypedef enum CUcoredumpSettings_enum: + CU_COREDUMP_ENABLE_ON_EXCEPTION + CU_COREDUMP_TRIGGER_HOST + CU_COREDUMP_LIGHTWEIGHT + CU_COREDUMP_ENABLE_USER_TRIGGER + CU_COREDUMP_FILE + CU_COREDUMP_PIPE + CU_COREDUMP_GENERATION_FLAGS + CU_COREDUMP_MAX + ctypedef CUcoredumpSettings_enum CUcoredumpSettings + +cdef extern from 'cuda.h': + ctypedef enum CUCoredumpGenerationFlags: + CU_COREDUMP_DEFAULT_FLAGS + CU_COREDUMP_SKIP_NONRELOCATED_ELF_IMAGES + CU_COREDUMP_SKIP_GLOBAL_MEMORY + CU_COREDUMP_SKIP_SHARED_MEMORY + CU_COREDUMP_SKIP_LOCAL_MEMORY + CU_COREDUMP_SKIP_ABORT + CU_COREDUMP_SKIP_CONSTBANK_MEMORY + CU_COREDUMP_GZIP_COMPRESS + CU_COREDUMP_FAULTED_CONTEXTS_ONLY + CU_COREDUMP_NO_ERRBAR_AT_EXIT + CU_COREDUMP_LOG_ONLY + CU_COREDUMP_LIGHTWEIGHT_FLAGS + +cdef extern from 'cuda.h': + ctypedef enum CUgreenCtxCreate_flags "CUgreenCtxCreate_flags": + CU_GREEN_CTX_NONE + CU_GREEN_CTX_DEFAULT_STREAM + +cdef extern from 'cuda.h': + ctypedef enum CUdevResourceType "CUdevResourceType": + CU_DEV_RESOURCE_TYPE_INVALID + CU_DEV_RESOURCE_TYPE_SM + CU_DEV_RESOURCE_TYPE_WORKQUEUE_CONFIG + CU_DEV_RESOURCE_TYPE_WORKQUEUE + +cdef extern from 'cuda.h': + ctypedef enum CUlogLevel_enum: + CU_LOG_LEVEL_ERROR + CU_LOG_LEVEL_WARNING + ctypedef CUlogLevel_enum CUlogLevel + +ctypedef enum CUeglFrameType_enum "CUeglFrameType_enum": + CU_EGL_FRAME_TYPE_ARRAY "CU_EGL_FRAME_TYPE_ARRAY" = 0 + CU_EGL_FRAME_TYPE_PITCH "CU_EGL_FRAME_TYPE_PITCH" = 1 +ctypedef CUeglFrameType_enum CUeglFrameType "CUeglFrameType" + +ctypedef enum CUeglResourceLocationFlags_enum "CUeglResourceLocationFlags_enum": + CU_EGL_RESOURCE_LOCATION_SYSMEM "CU_EGL_RESOURCE_LOCATION_SYSMEM" = 0x00 + CU_EGL_RESOURCE_LOCATION_VIDMEM "CU_EGL_RESOURCE_LOCATION_VIDMEM" = 0x01 +ctypedef CUeglResourceLocationFlags_enum CUeglResourceLocationFlags "CUeglResourceLocationFlags" + +ctypedef enum CUeglColorFormat_enum "CUeglColorFormat_enum": + CU_EGL_COLOR_FORMAT_YUV420_PLANAR "CU_EGL_COLOR_FORMAT_YUV420_PLANAR" = 0x00 + CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR "CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR" = 0x01 + CU_EGL_COLOR_FORMAT_YUV422_PLANAR "CU_EGL_COLOR_FORMAT_YUV422_PLANAR" = 0x02 + CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR "CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR" = 0x03 + CU_EGL_COLOR_FORMAT_RGB "CU_EGL_COLOR_FORMAT_RGB" = 0x04 + CU_EGL_COLOR_FORMAT_BGR "CU_EGL_COLOR_FORMAT_BGR" = 0x05 + CU_EGL_COLOR_FORMAT_ARGB "CU_EGL_COLOR_FORMAT_ARGB" = 0x06 + CU_EGL_COLOR_FORMAT_RGBA "CU_EGL_COLOR_FORMAT_RGBA" = 0x07 + CU_EGL_COLOR_FORMAT_L "CU_EGL_COLOR_FORMAT_L" = 0x08 + CU_EGL_COLOR_FORMAT_R "CU_EGL_COLOR_FORMAT_R" = 0x09 + CU_EGL_COLOR_FORMAT_YUV444_PLANAR "CU_EGL_COLOR_FORMAT_YUV444_PLANAR" = 0x0A + CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR "CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR" = 0x0B + CU_EGL_COLOR_FORMAT_YUYV_422 "CU_EGL_COLOR_FORMAT_YUYV_422" = 0x0C + CU_EGL_COLOR_FORMAT_UYVY_422 "CU_EGL_COLOR_FORMAT_UYVY_422" = 0x0D + CU_EGL_COLOR_FORMAT_ABGR "CU_EGL_COLOR_FORMAT_ABGR" = 0x0E + CU_EGL_COLOR_FORMAT_BGRA "CU_EGL_COLOR_FORMAT_BGRA" = 0x0F + CU_EGL_COLOR_FORMAT_A "CU_EGL_COLOR_FORMAT_A" = 0x10 + CU_EGL_COLOR_FORMAT_RG "CU_EGL_COLOR_FORMAT_RG" = 0x11 + CU_EGL_COLOR_FORMAT_AYUV "CU_EGL_COLOR_FORMAT_AYUV" = 0x12 + CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR "CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR" = 0x13 + CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR "CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR" = 0x14 + CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR "CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR" = 0x15 + CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR "CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR" = 0x16 + CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR "CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR" = 0x17 + CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR "CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR" = 0x18 + CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR "CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR" = 0x19 + CU_EGL_COLOR_FORMAT_VYUY_ER "CU_EGL_COLOR_FORMAT_VYUY_ER" = 0x1A + CU_EGL_COLOR_FORMAT_UYVY_ER "CU_EGL_COLOR_FORMAT_UYVY_ER" = 0x1B + CU_EGL_COLOR_FORMAT_YUYV_ER "CU_EGL_COLOR_FORMAT_YUYV_ER" = 0x1C + CU_EGL_COLOR_FORMAT_YVYU_ER "CU_EGL_COLOR_FORMAT_YVYU_ER" = 0x1D + CU_EGL_COLOR_FORMAT_YUV_ER "CU_EGL_COLOR_FORMAT_YUV_ER" = 0x1E + CU_EGL_COLOR_FORMAT_YUVA_ER "CU_EGL_COLOR_FORMAT_YUVA_ER" = 0x1F + CU_EGL_COLOR_FORMAT_AYUV_ER "CU_EGL_COLOR_FORMAT_AYUV_ER" = 0x20 + CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER "CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER" = 0x21 + CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER "CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER" = 0x22 + CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER "CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER" = 0x23 + CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER "CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER" = 0x24 + CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER "CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER" = 0x25 + CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER "CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER" = 0x26 + CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER "CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER" = 0x27 + CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER "CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER" = 0x28 + CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER "CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER" = 0x29 + CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER "CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER" = 0x2A + CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER "CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER" = 0x2B + CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER "CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER" = 0x2C + CU_EGL_COLOR_FORMAT_BAYER_RGGB "CU_EGL_COLOR_FORMAT_BAYER_RGGB" = 0x2D + CU_EGL_COLOR_FORMAT_BAYER_BGGR "CU_EGL_COLOR_FORMAT_BAYER_BGGR" = 0x2E + CU_EGL_COLOR_FORMAT_BAYER_GRBG "CU_EGL_COLOR_FORMAT_BAYER_GRBG" = 0x2F + CU_EGL_COLOR_FORMAT_BAYER_GBRG "CU_EGL_COLOR_FORMAT_BAYER_GBRG" = 0x30 + CU_EGL_COLOR_FORMAT_BAYER10_RGGB "CU_EGL_COLOR_FORMAT_BAYER10_RGGB" = 0x31 + CU_EGL_COLOR_FORMAT_BAYER10_BGGR "CU_EGL_COLOR_FORMAT_BAYER10_BGGR" = 0x32 + CU_EGL_COLOR_FORMAT_BAYER10_GRBG "CU_EGL_COLOR_FORMAT_BAYER10_GRBG" = 0x33 + CU_EGL_COLOR_FORMAT_BAYER10_GBRG "CU_EGL_COLOR_FORMAT_BAYER10_GBRG" = 0x34 + CU_EGL_COLOR_FORMAT_BAYER12_RGGB "CU_EGL_COLOR_FORMAT_BAYER12_RGGB" = 0x35 + CU_EGL_COLOR_FORMAT_BAYER12_BGGR "CU_EGL_COLOR_FORMAT_BAYER12_BGGR" = 0x36 + CU_EGL_COLOR_FORMAT_BAYER12_GRBG "CU_EGL_COLOR_FORMAT_BAYER12_GRBG" = 0x37 + CU_EGL_COLOR_FORMAT_BAYER12_GBRG "CU_EGL_COLOR_FORMAT_BAYER12_GBRG" = 0x38 + CU_EGL_COLOR_FORMAT_BAYER14_RGGB "CU_EGL_COLOR_FORMAT_BAYER14_RGGB" = 0x39 + CU_EGL_COLOR_FORMAT_BAYER14_BGGR "CU_EGL_COLOR_FORMAT_BAYER14_BGGR" = 0x3A + CU_EGL_COLOR_FORMAT_BAYER14_GRBG "CU_EGL_COLOR_FORMAT_BAYER14_GRBG" = 0x3B + CU_EGL_COLOR_FORMAT_BAYER14_GBRG "CU_EGL_COLOR_FORMAT_BAYER14_GBRG" = 0x3C + CU_EGL_COLOR_FORMAT_BAYER20_RGGB "CU_EGL_COLOR_FORMAT_BAYER20_RGGB" = 0x3D + CU_EGL_COLOR_FORMAT_BAYER20_BGGR "CU_EGL_COLOR_FORMAT_BAYER20_BGGR" = 0x3E + CU_EGL_COLOR_FORMAT_BAYER20_GRBG "CU_EGL_COLOR_FORMAT_BAYER20_GRBG" = 0x3F + CU_EGL_COLOR_FORMAT_BAYER20_GBRG "CU_EGL_COLOR_FORMAT_BAYER20_GBRG" = 0x40 + CU_EGL_COLOR_FORMAT_YVU444_PLANAR "CU_EGL_COLOR_FORMAT_YVU444_PLANAR" = 0x41 + CU_EGL_COLOR_FORMAT_YVU422_PLANAR "CU_EGL_COLOR_FORMAT_YVU422_PLANAR" = 0x42 + CU_EGL_COLOR_FORMAT_YVU420_PLANAR "CU_EGL_COLOR_FORMAT_YVU420_PLANAR" = 0x43 + CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB "CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB" = 0x44 + CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR "CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR" = 0x45 + CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG "CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG" = 0x46 + CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG "CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG" = 0x47 + CU_EGL_COLOR_FORMAT_BAYER_BCCR "CU_EGL_COLOR_FORMAT_BAYER_BCCR" = 0x48 + CU_EGL_COLOR_FORMAT_BAYER_RCCB "CU_EGL_COLOR_FORMAT_BAYER_RCCB" = 0x49 + CU_EGL_COLOR_FORMAT_BAYER_CRBC "CU_EGL_COLOR_FORMAT_BAYER_CRBC" = 0x4A + CU_EGL_COLOR_FORMAT_BAYER_CBRC "CU_EGL_COLOR_FORMAT_BAYER_CBRC" = 0x4B + CU_EGL_COLOR_FORMAT_BAYER10_CCCC "CU_EGL_COLOR_FORMAT_BAYER10_CCCC" = 0x4C + CU_EGL_COLOR_FORMAT_BAYER12_BCCR "CU_EGL_COLOR_FORMAT_BAYER12_BCCR" = 0x4D + CU_EGL_COLOR_FORMAT_BAYER12_RCCB "CU_EGL_COLOR_FORMAT_BAYER12_RCCB" = 0x4E + CU_EGL_COLOR_FORMAT_BAYER12_CRBC "CU_EGL_COLOR_FORMAT_BAYER12_CRBC" = 0x4F + CU_EGL_COLOR_FORMAT_BAYER12_CBRC "CU_EGL_COLOR_FORMAT_BAYER12_CBRC" = 0x50 + CU_EGL_COLOR_FORMAT_BAYER12_CCCC "CU_EGL_COLOR_FORMAT_BAYER12_CCCC" = 0x51 + CU_EGL_COLOR_FORMAT_Y "CU_EGL_COLOR_FORMAT_Y" = 0x52 + CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 "CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020" = 0x53 + CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 "CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020" = 0x54 + CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 "CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020" = 0x55 + CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 "CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020" = 0x56 + CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 "CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709" = 0x57 + CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 "CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709" = 0x58 + CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 "CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709" = 0x59 + CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709 "CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709" = 0x5A + CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 "CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709" = 0x5B + CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 "CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020" = 0x5C + CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 "CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020" = 0x5D + CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR "CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR" = 0x5E + CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709 "CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709" = 0x5F + CU_EGL_COLOR_FORMAT_Y_ER "CU_EGL_COLOR_FORMAT_Y_ER" = 0x60 + CU_EGL_COLOR_FORMAT_Y_709_ER "CU_EGL_COLOR_FORMAT_Y_709_ER" = 0x61 + CU_EGL_COLOR_FORMAT_Y10_ER "CU_EGL_COLOR_FORMAT_Y10_ER" = 0x62 + CU_EGL_COLOR_FORMAT_Y10_709_ER "CU_EGL_COLOR_FORMAT_Y10_709_ER" = 0x63 + CU_EGL_COLOR_FORMAT_Y12_ER "CU_EGL_COLOR_FORMAT_Y12_ER" = 0x64 + CU_EGL_COLOR_FORMAT_Y12_709_ER "CU_EGL_COLOR_FORMAT_Y12_709_ER" = 0x65 + CU_EGL_COLOR_FORMAT_YUVA "CU_EGL_COLOR_FORMAT_YUVA" = 0x66 + CU_EGL_COLOR_FORMAT_YUV "CU_EGL_COLOR_FORMAT_YUV" = 0x67 + CU_EGL_COLOR_FORMAT_YVYU "CU_EGL_COLOR_FORMAT_YVYU" = 0x68 + CU_EGL_COLOR_FORMAT_VYUY "CU_EGL_COLOR_FORMAT_VYUY" = 0x69 + CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER "CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER" = 0x6A + CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER "CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER" = 0x6B + CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER "CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER" = 0x6C + CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER "CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER" = 0x6D + CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER "CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER" = 0x6E + CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER "CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER" = 0x6F + CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER "CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER" = 0x70 + CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER "CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER" = 0x71 + CU_EGL_COLOR_FORMAT_UYVY_709 "CU_EGL_COLOR_FORMAT_UYVY_709" = 0x72 + CU_EGL_COLOR_FORMAT_UYVY_709_ER "CU_EGL_COLOR_FORMAT_UYVY_709_ER" = 0x73 + CU_EGL_COLOR_FORMAT_UYVY_2020 "CU_EGL_COLOR_FORMAT_UYVY_2020" = 0x74 + CU_EGL_COLOR_FORMAT_MAX "CU_EGL_COLOR_FORMAT_MAX" +ctypedef CUeglColorFormat_enum CUeglColorFormat "CUeglColorFormat" + +ctypedef enum CUGLmap_flags_enum "CUGLmap_flags_enum": + CU_GL_MAP_RESOURCE_FLAGS_NONE "CU_GL_MAP_RESOURCE_FLAGS_NONE" = 0x00 + CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY "CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY" = 0x01 + CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD "CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD" = 0x02 +ctypedef CUGLmap_flags_enum CUGLmap_flags "CUGLmap_flags" + +ctypedef enum CUoutput_mode_enum "CUoutput_mode_enum": + CU_OUT_KEY_VALUE_PAIR "CU_OUT_KEY_VALUE_PAIR" = 0x00 + CU_OUT_CSV "CU_OUT_CSV" = 0x01 +ctypedef CUoutput_mode_enum CUoutput_mode "CUoutput_mode" + +cdef extern from 'cuda.h': + ctypedef enum CUatomicOperation_enum: + CU_ATOMIC_OPERATION_INTEGER_ADD + CU_ATOMIC_OPERATION_INTEGER_MIN + CU_ATOMIC_OPERATION_INTEGER_MAX + CU_ATOMIC_OPERATION_INTEGER_INCREMENT + CU_ATOMIC_OPERATION_INTEGER_DECREMENT + CU_ATOMIC_OPERATION_AND + CU_ATOMIC_OPERATION_OR + CU_ATOMIC_OPERATION_XOR + CU_ATOMIC_OPERATION_EXCHANGE + CU_ATOMIC_OPERATION_CAS + CU_ATOMIC_OPERATION_FLOAT_ADD + CU_ATOMIC_OPERATION_FLOAT_MIN + CU_ATOMIC_OPERATION_FLOAT_MAX + CU_ATOMIC_OPERATION_MAX + ctypedef CUatomicOperation_enum CUatomicOperation + +cdef extern from 'cuda.h': + ctypedef enum CUatomicOperationCapability_enum: + CU_ATOMIC_CAPABILITY_SIGNED + CU_ATOMIC_CAPABILITY_UNSIGNED + CU_ATOMIC_CAPABILITY_REDUCTION + CU_ATOMIC_CAPABILITY_SCALAR_32 + CU_ATOMIC_CAPABILITY_SCALAR_64 + CU_ATOMIC_CAPABILITY_SCALAR_128 + CU_ATOMIC_CAPABILITY_VECTOR_32x4 + ctypedef CUatomicOperationCapability_enum CUatomicOperationCapability + +cdef extern from 'cuda.h': + ctypedef enum CUstreamAtomicReductionOpType_enum: + CU_STREAM_ATOMIC_REDUCTION_OP_OR + CU_STREAM_ATOMIC_REDUCTION_OP_AND + CU_STREAM_ATOMIC_REDUCTION_OP_ADD + ctypedef CUstreamAtomicReductionOpType_enum CUstreamAtomicReductionOpType + +cdef extern from 'cuda.h': + ctypedef enum CUstreamAtomicReductionDataType_enum: + CU_STREAM_ATOMIC_REDUCTION_UNSIGNED_32 + CU_STREAM_ATOMIC_REDUCTION_UNSIGNED_64 + ctypedef CUstreamAtomicReductionDataType_enum CUstreamAtomicReductionDataType + +cdef extern from 'cuda.h': + ctypedef enum CUdevSmResourceGroup_flags "CUdevSmResourceGroup_flags": + CU_DEV_SM_RESOURCE_GROUP_DEFAULT + CU_DEV_SM_RESOURCE_GROUP_BACKFILL + CU_DEV_SM_RESOURCE_GROUP_LOCALITY_DOMAIN_ID + +cdef extern from 'cuda.h': + ctypedef enum CUdevSmResourceSplitByCount_flags "CUdevSmResourceSplitByCount_flags": + CU_DEV_SM_RESOURCE_SPLIT_IGNORE_SM_COSCHEDULING + CU_DEV_SM_RESOURCE_SPLIT_MAX_POTENTIAL_CLUSTER_SIZE + +cdef extern from 'cuda.h': + ctypedef enum CUdevWorkqueueConfigScope "CUdevWorkqueueConfigScope": + CU_WORKQUEUE_SCOPE_DEVICE_CTX + CU_WORKQUEUE_SCOPE_GREEN_CTX_BALANCED + +cdef extern from 'cuda.h': + ctypedef enum CUhostTaskSyncMode_enum: + CU_HOST_TASK_BLOCKING + CU_HOST_TASK_SPINWAIT + ctypedef CUhostTaskSyncMode_enum CUhostTaskSyncMode + +cdef extern from 'cuda.h': + ctypedef enum CUlaunchAttributePortableClusterMode_enum: + CU_LAUNCH_PORTABLE_CLUSTER_MODE_DEFAULT + CU_LAUNCH_PORTABLE_CLUSTER_MODE_REQUIRE_PORTABLE + CU_LAUNCH_PORTABLE_CLUSTER_MODE_ALLOW_NON_PORTABLE + ctypedef CUlaunchAttributePortableClusterMode_enum CUlaunchAttributePortableClusterMode + +cdef extern from 'cuda.h': + ctypedef enum CUsharedMemoryMode_enum: + CU_SHARED_MEMORY_MODE_DEFAULT + CU_SHARED_MEMORY_MODE_REQUIRE_PORTABLE + CU_SHARED_MEMORY_MODE_ALLOW_NON_PORTABLE + CU_SHARED_MEMORY_MODE_ALLOW_OVERSIZED_SHARED_MEMORY + CU_SHARED_MEMORY_MODE_PREFER_OVERSIZED_SHARED_MEMORY + ctypedef CUsharedMemoryMode_enum CUsharedMemoryMode + +cdef extern from 'cuda.h': + ctypedef enum CUstreamCigDataType_enum: + STREAM_CIG_DATA_TYPE_D3D12_COMMAND_LIST + ctypedef CUstreamCigDataType_enum CUstreamCigDataType + +cdef extern from 'cuda.h': + ctypedef enum CUlogicalEndpointIpcHandleType_enum: + CU_LOGICAL_ENDPOINT_IPC_HANDLE_TYPE_NONE + CU_LOGICAL_ENDPOINT_IPC_HANDLE_TYPE_FABRIC + ctypedef CUlogicalEndpointIpcHandleType_enum CUlogicalEndpointIpcHandleType + +cdef extern from 'cuda.h': + ctypedef enum CUlogicalEndpointType_enum: + CU_LOGICAL_ENDPOINT_TYPE_INVALID + CU_LOGICAL_ENDPOINT_TYPE_UNICAST + CU_LOGICAL_ENDPOINT_TYPE_MULTICAST + ctypedef CUlogicalEndpointType_enum CUlogicalEndpointType + +cdef extern from 'cuda.h': + ctypedef enum CUlogicalEndpointFlag_enum: + CU_LOGICAL_ENDPOINT_FLAG_NONE + CU_LOGICAL_ENDPOINT_FLAG_COUNTED_OPS + ctypedef CUlogicalEndpointFlag_enum CUlogicalEndpointFlag + +cdef extern from 'cuda.h': + ctypedef enum CUgraphRecaptureStatus_enum: + CU_GRAPH_RECAPTURE_ELIGIBLE_FOR_UPDATE + CU_GRAPH_RECAPTURE_INELIGIBLE_FOR_UPDATE + CU_GRAPH_RECAPTURE_ERROR + ctypedef CUgraphRecaptureStatus_enum CUgraphRecaptureStatus + +cdef extern from 'cuda.h': + ctypedef enum CUcliqueType_enum: + CU_CLIQUE_TYPE_UNICAST_POINTER + CU_CLIQUE_TYPE_MULTICAST_POINTER + CU_CLIQUE_TYPE_UNICAST_LOGICAL_ENDPOINT + CU_CLIQUE_TYPE_MULTICAST_LOGICAL_ENDPOINT + ctypedef CUcliqueType_enum CUcliqueType +cdef enum: _CURESULT_INTERNAL_LOADING_ERROR = CUresult.CUDA_ERROR_NOT_FOUND +cdef enum: CUDA_VERSION = 13040 + + +# TYPES +cdef extern from 'cuda.h': + ctypedef uint32_t cuuint32_t 'cuuint32_t' + + +cdef extern from 'cuda.h': + ctypedef uint64_t cuuint64_t 'cuuint64_t' + + +cdef extern from 'cuda.h': + ctypedef unsigned long long CUdeviceptr_v2 'CUdeviceptr_v2' + + +cdef extern from 'cuda.h': + ctypedef int CUdevice_v1 'CUdevice_v1' + + +cdef extern from 'cuda.h': + ctypedef unsigned long long CUtexObject_v1 'CUtexObject_v1' + + +cdef extern from 'cuda.h': + ctypedef unsigned long long CUsurfObject_v1 'CUsurfObject_v1' + + +cdef extern from 'cuda.h': + cdef struct CUmemFabricHandle_st: + unsigned char data[64] + ctypedef CUmemFabricHandle_st CUmemFabricHandle_v1 + +cdef extern from 'cuda.h': + cdef struct CUipcEventHandle_st: + char reserved[64] + ctypedef CUipcEventHandle_st CUipcEventHandle_v1 + +cdef extern from 'cuda.h': + cdef struct CUipcMemHandle_st: + char reserved[64] + ctypedef CUipcMemHandle_st CUipcMemHandle_v1 + +cdef extern from 'cuda.h': + cdef struct CUdevprop_st: + int maxThreadsPerBlock + int maxThreadsDim[3] + int maxGridSize[3] + int sharedMemPerBlock + int totalConstantMemory + int SIMDWidth + int memPitch + int regsPerBlock + int clockRate + int textureAlign + ctypedef CUdevprop_st CUdevprop_v1 + +cdef extern from 'cuda.h': + cdef struct CUaccessPolicyWindow_st: + void* base_ptr + size_t num_bytes + float hitRatio + CUaccessProperty hitProp + CUaccessProperty missProp + ctypedef CUaccessPolicyWindow_st CUaccessPolicyWindow_v1 + +cdef extern from 'cuda.h': + ctypedef CUlaunchAttributeID CUkernelNodeAttrID 'CUkernelNodeAttrID' + + +cdef extern from 'cuda.h': + ctypedef CUlaunchAttributeID CUstreamAttrID 'CUstreamAttrID' + + +cdef extern from 'cuda.h': + cdef struct CUexecAffinitySmCount_st: + unsigned int val + ctypedef CUexecAffinitySmCount_st CUexecAffinitySmCount_v1 + +cdef extern from 'cuda.h': + cdef struct CUDA_ARRAY_DESCRIPTOR_st: + size_t Width + size_t Height + CUarray_format Format + unsigned int NumChannels + ctypedef CUDA_ARRAY_DESCRIPTOR_st CUDA_ARRAY_DESCRIPTOR_v2 + +cdef extern from 'cuda.h': + cdef struct CUDA_ARRAY3D_DESCRIPTOR_st: + size_t Width + size_t Height + size_t Depth + CUarray_format Format + unsigned int NumChannels + unsigned int Flags + ctypedef CUDA_ARRAY3D_DESCRIPTOR_st CUDA_ARRAY3D_DESCRIPTOR_v2 + +cdef extern from 'cuda.h': + cdef struct CUDA_ARRAY_MEMORY_REQUIREMENTS_st: + size_t size + size_t alignment + unsigned int reserved[4] + ctypedef CUDA_ARRAY_MEMORY_REQUIREMENTS_st CUDA_ARRAY_MEMORY_REQUIREMENTS_v1 + +cdef extern from 'cuda.h': + cdef struct CUDA_TEXTURE_DESC_st: + CUaddress_mode addressMode[3] + CUfilter_mode filterMode + unsigned int flags + unsigned int maxAnisotropy + CUfilter_mode mipmapFilterMode + float mipmapLevelBias + float minMipmapLevelClamp + float maxMipmapLevelClamp + float borderColor[4] + int reserved[12] + ctypedef CUDA_TEXTURE_DESC_st CUDA_TEXTURE_DESC_v1 + +cdef extern from 'cuda.h': + cdef struct CUDA_RESOURCE_VIEW_DESC_st: + CUresourceViewFormat format + size_t width + size_t height + size_t depth + unsigned int firstMipmapLevel + unsigned int lastMipmapLevel + unsigned int firstLayer + unsigned int lastLayer + unsigned int reserved[16] + ctypedef CUDA_RESOURCE_VIEW_DESC_st CUDA_RESOURCE_VIEW_DESC_v1 + +cdef extern from 'cuda.h': + cdef struct CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st: + unsigned long long p2pToken + unsigned int vaSpaceToken + ctypedef CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1 + +cdef extern from 'cuda.h': + cdef struct CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st: + unsigned long long offset + unsigned long long size + unsigned int flags + unsigned int reserved[16] + ctypedef CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1 + +cdef extern from 'cuda.h': + ctypedef unsigned long long CUmemGenericAllocationHandle_v1 'CUmemGenericAllocationHandle_v1' + + +cdef extern from 'cuda.h': + cdef struct CUmulticastObjectProp_st: + unsigned int numDevices + size_t size + unsigned long long handleTypes + unsigned long long flags + ctypedef CUmulticastObjectProp_st CUmulticastObjectProp_v1 + +cdef extern from 'cuda.h': + cdef struct CUmemPoolPtrExportData_st: + unsigned char reserved[64] + ctypedef CUmemPoolPtrExportData_st CUmemPoolPtrExportData_v1 + +cdef extern from 'cuda.h': + cdef struct CUoffset3D_st: + size_t x + size_t y + size_t z + ctypedef CUoffset3D_st CUoffset3D_v1 + +cdef extern from 'cuda.h': + cdef struct CUextent3D_st: + size_t width + size_t height + size_t depth + ctypedef CUextent3D_st CUextent3D_v1 + +cdef extern from 'cuda.h': + ctypedef unsigned int CUlogIterator 'CUlogIterator' + + +cdef extern from 'cuda.h': + ctypedef struct CUctx_st: + pass + ctypedef CUctx_st* CUcontext 'CUcontext' + + +cdef extern from 'cuda.h': + ctypedef struct CUmod_st: + pass + ctypedef CUmod_st* CUmodule 'CUmodule' + + +cdef extern from 'cuda.h': + ctypedef struct CUfunc_st: + pass + ctypedef CUfunc_st* CUfunction 'CUfunction' + + +cdef extern from 'cuda.h': + ctypedef struct CUlib_st: + pass + ctypedef CUlib_st* CUlibrary 'CUlibrary' + + +cdef extern from 'cuda.h': + ctypedef struct CUkern_st: + pass + ctypedef CUkern_st* CUkernel 'CUkernel' + + +cdef extern from 'cuda.h': + ctypedef struct CUarray_st: + pass + ctypedef CUarray_st* CUarray 'CUarray' + + +cdef extern from 'cuda.h': + ctypedef struct CUmipmappedArray_st: + pass + ctypedef CUmipmappedArray_st* CUmipmappedArray 'CUmipmappedArray' + + +cdef extern from 'cuda.h': + ctypedef struct CUtexref_st: + pass + ctypedef CUtexref_st* CUtexref 'CUtexref' + + +cdef extern from 'cuda.h': + ctypedef struct CUsurfref_st: + pass + ctypedef CUsurfref_st* CUsurfref 'CUsurfref' + + +cdef extern from 'cuda.h': + ctypedef struct CUevent_st: + pass + ctypedef CUevent_st* CUevent 'CUevent' + + +cdef extern from 'cuda.h': + ctypedef struct CUstream_st: + pass + ctypedef CUstream_st* CUstream 'CUstream' + + +cdef extern from 'cuda.h': + ctypedef struct CUgraphicsResource_st: + pass + ctypedef CUgraphicsResource_st* CUgraphicsResource 'CUgraphicsResource' + + +cdef extern from 'cuda.h': + ctypedef struct CUextMemory_st: + pass + ctypedef CUextMemory_st* CUexternalMemory 'CUexternalMemory' + + +cdef extern from 'cuda.h': + ctypedef struct CUextSemaphore_st: + pass + ctypedef CUextSemaphore_st* CUexternalSemaphore 'CUexternalSemaphore' + + +cdef extern from 'cuda.h': + ctypedef struct CUgraph_st: + pass + ctypedef CUgraph_st* CUgraph 'CUgraph' + + +cdef extern from 'cuda.h': + ctypedef struct CUgraphNode_st: + pass + ctypedef CUgraphNode_st* CUgraphNode 'CUgraphNode' + + +cdef extern from 'cuda.h': + ctypedef struct CUgraphExec_st: + pass + ctypedef CUgraphExec_st* CUgraphExec 'CUgraphExec' + + +cdef extern from 'cuda.h': + ctypedef struct CUmemPoolHandle_st: + pass + ctypedef CUmemPoolHandle_st* CUmemoryPool 'CUmemoryPool' + + +cdef extern from 'cuda.h': + ctypedef struct CUuserObject_st: + pass + ctypedef CUuserObject_st* CUuserObject 'CUuserObject' + + +cdef extern from 'cuda.h': + ctypedef struct CUgraphDeviceUpdatableNode_st: + pass + ctypedef CUgraphDeviceUpdatableNode_st* CUgraphDeviceNode 'CUgraphDeviceNode' + + +cdef extern from 'cuda.h': + ctypedef struct CUasyncCallbackEntry_st: + pass + ctypedef CUasyncCallbackEntry_st* CUasyncCallbackHandle 'CUasyncCallbackHandle' + + +cdef extern from 'cuda.h': + ctypedef struct CUgreenCtx_st: + pass + ctypedef CUgreenCtx_st* CUgreenCtx 'CUgreenCtx' + + +cdef extern from 'cuda.h': + ctypedef struct CUlinkState_st: + pass + ctypedef CUlinkState_st* CUlinkState 'CUlinkState' + + +cdef extern from 'cuda.h': + ctypedef struct CUdevResourceDesc_st: + pass + ctypedef CUdevResourceDesc_st* CUdevResourceDesc 'CUdevResourceDesc' + + +cdef extern from 'cuda.h': + ctypedef struct CUlogsCallbackEntry_st: + pass + ctypedef CUlogsCallbackEntry_st* CUlogsCallbackHandle 'CUlogsCallbackHandle' + + +cdef extern from 'cuda.h': + ctypedef struct CUcoredumpCallbackEntry_st: + pass + ctypedef CUcoredumpCallbackEntry_st* CUcoredumpCallbackHandle 'CUcoredumpCallbackHandle' + + +cdef extern from 'cuda.h': + ctypedef struct CUIcheckpointOperation_st: + pass + ctypedef CUIcheckpointOperation_st* CUcheckpointOperationHandle 'CUcheckpointOperationHandle' + + +cdef extern from 'cuda.h': + cdef struct CUuuid_st: + char bytes[16] + ctypedef CUuuid_st CUuuid + +cdef extern from 'cuda.h': + ctypedef struct CUstreamMemOpFlushRemoteWritesParams_st 'CUstreamMemOpFlushRemoteWritesParams_st': + CUstreamBatchMemOpType operation + unsigned int flags + +cdef extern from 'cuda.h': + ctypedef struct CUstreamMemOpMemoryBarrierParams_st 'CUstreamMemOpMemoryBarrierParams_st': + CUstreamBatchMemOpType operation + unsigned int flags + +cdef struct cuda_bindings_driver__anon_pod3: + unsigned long long bytesOverBudget + +cdef extern from 'cuda.h': + ctypedef void (*CUhostFn 'CUhostFn')( + void* userData + ) + + +cdef extern from 'cuda.h': + cdef struct CUgraphEdgeData_st: + unsigned char from_port + unsigned char to_port + unsigned char type + unsigned char reserved[5] + ctypedef CUgraphEdgeData_st CUgraphEdgeData + +cdef extern from 'cuda.h': + cdef struct CUlaunchMemSyncDomainMap_st: + unsigned char default_ + unsigned char remote + ctypedef CUlaunchMemSyncDomainMap_st CUlaunchMemSyncDomainMap + +cdef struct cuda_bindings_driver__anon_pod5: + unsigned int x + unsigned int y + unsigned int z + +cdef struct cuda_bindings_driver__anon_pod8: + unsigned int x + unsigned int y + unsigned int z + +cdef extern from 'cuda.h': + cdef struct CUctxCigParam_st: + CUcigDataType sharedDataType + void* sharedData + ctypedef CUctxCigParam_st CUctxCigParam + +cdef extern from 'cuda.h': + cdef struct CUlibraryHostUniversalFunctionAndDataTable_st: + void* functionTable + size_t functionWindowSize + void* dataTable + size_t dataWindowSize + ctypedef CUlibraryHostUniversalFunctionAndDataTable_st CUlibraryHostUniversalFunctionAndDataTable + +cdef struct cuda_bindings_driver__anon_pod11: + unsigned int width + unsigned int height + unsigned int depth + +cdef struct cuda_bindings_driver__anon_pod17: + int reserved[32] + +cdef struct cuda_bindings_driver__anon_pod19: + void* handle + void* name + +cdef struct cuda_bindings_driver__anon_pod21: + void* handle + void* name + +cdef struct cuda_bindings_driver__anon_pod23: + unsigned long long value + +cdef union cuda_bindings_driver__anon_pod24: + void* fence + unsigned long long reserved + +cdef struct cuda_bindings_driver__anon_pod25: + unsigned long long key + +cdef struct cuda_bindings_driver__anon_pod27: + unsigned long long value + +cdef union cuda_bindings_driver__anon_pod28: + void* fence + unsigned long long reserved + +cdef struct cuda_bindings_driver__anon_pod29: + unsigned long long key + unsigned int timeoutMs + +cdef struct cuda_bindings_driver__anon_pod34: + unsigned int level + unsigned int layer + unsigned int offsetX + unsigned int offsetY + unsigned int offsetZ + unsigned int extentWidth + unsigned int extentHeight + unsigned int extentDepth + +cdef struct cuda_bindings_driver__anon_pod35: + unsigned int layer + unsigned long long offset + unsigned long long size + +cdef struct cuda_bindings_driver__anon_pod38: + unsigned char deviceId + unsigned char localityDomainId + +cdef struct cuda_bindings_driver__anon_pod39: + unsigned char compressionType + unsigned char gpuDirectRDMACapable + unsigned short usage + unsigned char reserved[4] + +cdef extern from 'cuda.h': + cdef struct CUdevSmResource_st: + unsigned int smCount + unsigned int minSmPartitionSize + unsigned int smCoscheduledAlignment + unsigned int flags + unsigned int localityDomainId + ctypedef CUdevSmResource_st CUdevSmResource + +cdef extern from 'cuda.h': + cdef struct CUdevWorkqueueResource_st: + unsigned char reserved[40] + ctypedef CUdevWorkqueueResource_st CUdevWorkqueueResource + +cdef extern from 'cuda.h': + cdef struct CU_DEV_SM_RESOURCE_GROUP_PARAMS_st: + unsigned int smCount + unsigned int coscheduledSmCount + unsigned int preferredCoscheduledSmCount + unsigned int flags + unsigned int localityDomainId + unsigned int reserved[11] + ctypedef CU_DEV_SM_RESOURCE_GROUP_PARAMS_st CU_DEV_SM_RESOURCE_GROUP_PARAMS + +cdef extern from 'cuda.h': + cdef struct CUstreamCigParam_st: + CUstreamCigDataType streamSharedDataType + void* streamSharedData + ctypedef CUstreamCigParam_st CUstreamCigParam + +cdef extern from 'cuda.h': + cdef struct CUlogicalEndpointFabricHandle_st: + unsigned char data[64] + ctypedef CUlogicalEndpointFabricHandle_st CUlogicalEndpointFabricHandle + +cdef struct cuda_bindings_driver__anon_pod48: + unsigned int numDevices + +cdef extern from 'cuda.h': + cdef struct CUcliqueInfo_st: + CUcliqueType type + unsigned int id + ctypedef CUcliqueInfo_st CUcliqueInfo + +cdef extern from 'cuda.h': + ctypedef size_t (*CUoccupancyB2DSize 'CUoccupancyB2DSize')( + int blockSize + ) + + +cdef extern from 'cuda.h': + ctypedef void (*CUlogsCallback 'CUlogsCallback')( + void* data, + CUlogLevel logLevel, + char* message, + size_t length + ) + + +cdef extern from 'cuda.h': + ctypedef cuuint32_t CUlogicalEndpointId 'CUlogicalEndpointId' + + +cdef extern from 'cuda.h': + cdef struct CUmemDecompressParams_st: + size_t srcNumBytes + size_t dstNumBytes + cuuint32_t* dstActBytes + void* src + void* dst + CUmemDecompressAlgorithm algo + unsigned char padding[20] + ctypedef CUmemDecompressParams_st CUmemDecompressParams + +cdef extern from 'cuda.h': + ctypedef cuuint64_t CUgraphConditionalHandle 'CUgraphConditionalHandle' + + +cdef extern from 'cuda.h': + cdef struct CUtensorMap_st: + cuuint64_t opaque[16] + ctypedef CUtensorMap_st CUtensorMap + +cdef extern from 'cuda.h': + cdef struct CUcheckpointLockArgs_st: + unsigned int timeoutMs + unsigned int reserved0 + cuuint64_t reserved1[7] + ctypedef CUcheckpointLockArgs_st CUcheckpointLockArgs + +cdef extern from 'cuda.h': + cdef struct CUcheckpointUnlockArgs_st: + cuuint64_t reserved[8] + ctypedef CUcheckpointUnlockArgs_st CUcheckpointUnlockArgs + +cdef extern from 'cuda.h': + ctypedef CUdeviceptr_v2 CUdeviceptr 'CUdeviceptr' + + +cdef extern from 'cuda.h': + ctypedef CUdevice_v1 CUdevice 'CUdevice' + + +cdef extern from 'cuda.h': + ctypedef CUtexObject_v1 CUtexObject 'CUtexObject' + + +cdef extern from 'cuda.h': + ctypedef CUsurfObject_v1 CUsurfObject 'CUsurfObject' + + +cdef extern from 'cuda.h': + ctypedef CUmemFabricHandle_v1 CUmemFabricHandle 'CUmemFabricHandle' + + +cdef extern from 'cuda.h': + ctypedef CUipcEventHandle_v1 CUipcEventHandle 'CUipcEventHandle' + + +cdef extern from 'cuda.h': + ctypedef CUipcMemHandle_v1 CUipcMemHandle 'CUipcMemHandle' + + +cdef extern from 'cuda.h': + ctypedef CUdevprop_v1 CUdevprop 'CUdevprop' + + +cdef extern from 'cuda.h': + ctypedef CUaccessPolicyWindow_v1 CUaccessPolicyWindow 'CUaccessPolicyWindow' + + +cdef extern from 'cuda.h': + ctypedef CUexecAffinitySmCount_v1 CUexecAffinitySmCount 'CUexecAffinitySmCount' + + +cdef extern from 'cuda.h': + ctypedef CUDA_ARRAY_DESCRIPTOR_v2 CUDA_ARRAY_DESCRIPTOR 'CUDA_ARRAY_DESCRIPTOR' + + +cdef extern from 'cuda.h': + ctypedef CUDA_ARRAY3D_DESCRIPTOR_v2 CUDA_ARRAY3D_DESCRIPTOR 'CUDA_ARRAY3D_DESCRIPTOR' + + +cdef extern from 'cuda.h': + ctypedef CUDA_ARRAY_MEMORY_REQUIREMENTS_v1 CUDA_ARRAY_MEMORY_REQUIREMENTS 'CUDA_ARRAY_MEMORY_REQUIREMENTS' + + +cdef extern from 'cuda.h': + ctypedef CUDA_TEXTURE_DESC_v1 CUDA_TEXTURE_DESC 'CUDA_TEXTURE_DESC' + + +cdef extern from 'cuda.h': + ctypedef CUDA_RESOURCE_VIEW_DESC_v1 CUDA_RESOURCE_VIEW_DESC 'CUDA_RESOURCE_VIEW_DESC' + + +cdef extern from 'cuda.h': + ctypedef CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1 CUDA_POINTER_ATTRIBUTE_P2P_TOKENS 'CUDA_POINTER_ATTRIBUTE_P2P_TOKENS' + + +cdef extern from 'cuda.h': + ctypedef CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1 CUDA_EXTERNAL_MEMORY_BUFFER_DESC 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC' + + +cdef extern from 'cuda.h': + ctypedef CUmemGenericAllocationHandle_v1 CUmemGenericAllocationHandle 'CUmemGenericAllocationHandle' + + +cdef extern from 'cuda.h': + ctypedef CUmulticastObjectProp_v1 CUmulticastObjectProp 'CUmulticastObjectProp' + + +cdef extern from 'cuda.h': + ctypedef CUmemPoolPtrExportData_v1 CUmemPoolPtrExportData 'CUmemPoolPtrExportData' + + +cdef extern from 'cuda.h': + ctypedef CUoffset3D_v1 CUoffset3D 'CUoffset3D' + + +cdef extern from 'cuda.h': + ctypedef CUextent3D_v1 CUextent3D 'CUextent3D' + + +cdef extern from 'cuda.h': + cdef struct CUDA_KERNEL_NODE_PARAMS_st: + CUfunction func + unsigned int gridDimX + unsigned int gridDimY + unsigned int gridDimZ + unsigned int blockDimX + unsigned int blockDimY + unsigned int blockDimZ + unsigned int sharedMemBytes + void** kernelParams + void** extra + ctypedef CUDA_KERNEL_NODE_PARAMS_st CUDA_KERNEL_NODE_PARAMS_v1 + +cdef extern from 'cuda.h': + cdef struct CUDA_KERNEL_NODE_PARAMS_v2_st: + CUfunction func + unsigned int gridDimX + unsigned int gridDimY + unsigned int gridDimZ + unsigned int blockDimX + unsigned int blockDimY + unsigned int blockDimZ + unsigned int sharedMemBytes + void** kernelParams + void** extra + CUkernel kern + CUcontext ctx + ctypedef CUDA_KERNEL_NODE_PARAMS_v2_st CUDA_KERNEL_NODE_PARAMS_v2 + +cdef extern from 'cuda.h': + cdef struct CUDA_KERNEL_NODE_PARAMS_v3_st: + CUfunction func + unsigned int gridDimX + unsigned int gridDimY + unsigned int gridDimZ + unsigned int blockDimX + unsigned int blockDimY + unsigned int blockDimZ + unsigned int sharedMemBytes + void** kernelParams + void** extra + CUkernel kern + CUcontext ctx + ctypedef CUDA_KERNEL_NODE_PARAMS_v3_st CUDA_KERNEL_NODE_PARAMS_v3 + +cdef struct cuda_bindings_driver__anon_pod13: + CUarray hArray + +cdef struct cuda_bindings_driver__anon_pod14: + CUmipmappedArray hMipmappedArray + +cdef union cuda_bindings_driver__anon_pod32: + CUmipmappedArray mipmap + CUarray array + +cdef struct cuda_bindings_driver__anon_pod6: + CUevent event + int flags + int triggerAtBlockStart + +cdef struct cuda_bindings_driver__anon_pod7: + CUevent event + int flags + +cdef extern from 'cuda.h': + cdef struct CUDA_EVENT_WAIT_NODE_PARAMS_st: + CUevent event + ctypedef CUDA_EVENT_WAIT_NODE_PARAMS_st CUDA_EVENT_WAIT_NODE_PARAMS + +cdef extern from 'cuda.h': + cdef struct CUDA_LAUNCH_PARAMS_st: + CUfunction function + unsigned int gridDimX + unsigned int gridDimY + unsigned int gridDimZ + unsigned int blockDimX + unsigned int blockDimY + unsigned int blockDimZ + unsigned int sharedMemBytes + CUstream hStream + void** kernelParams + ctypedef CUDA_LAUNCH_PARAMS_st CUDA_LAUNCH_PARAMS_v1 + +cdef extern from 'cuda.h': + ctypedef void (*CUstreamCallback 'CUstreamCallback')( + CUstream hStream, + CUresult status, + void* userData + ) + + +cdef extern from 'cuda.h': + cdef struct CUDA_CHILD_GRAPH_NODE_PARAMS_st: + CUgraph graph + CUgraphChildGraphNodeOwnership ownership + ctypedef CUDA_CHILD_GRAPH_NODE_PARAMS_st CUDA_CHILD_GRAPH_NODE_PARAMS + +cdef extern from 'cuda.h': + cdef struct CUDA_GRAPH_INSTANTIATE_PARAMS_st: + cuuint64_t flags + CUstream hUploadStream + CUgraphNode hErrNode_out + CUgraphInstantiateResult result_out + ctypedef CUDA_GRAPH_INSTANTIATE_PARAMS_st CUDA_GRAPH_INSTANTIATE_PARAMS + +cdef extern from 'cuda.h': + cdef struct CUgraphExecUpdateResultInfo_st: + CUgraphExecUpdateResult result + CUgraphNode errorNode + CUgraphNode errorFromNode + ctypedef CUgraphExecUpdateResultInfo_st CUgraphExecUpdateResultInfo_v1 + +cdef struct cuda_bindings_driver__anon_pod9: + int deviceUpdatable + CUgraphDeviceNode devNode + +cdef extern from 'cuda.h': + cdef struct CUcheckpointGpuPair_st: + CUuuid oldUuid + CUuuid newUuid + ctypedef CUcheckpointGpuPair_st CUcheckpointGpuPair + +cdef union cuda_bindings_driver__anon_pod2: + cuda_bindings_driver__anon_pod3 overBudget + +cdef extern from 'cuda.h': + cdef struct CUDA_HOST_NODE_PARAMS_st: + CUhostFn fn + void* userData + ctypedef CUDA_HOST_NODE_PARAMS_st CUDA_HOST_NODE_PARAMS_v1 + +cdef extern from 'cuda.h': + cdef struct CUDA_ARRAY_SPARSE_PROPERTIES_st: + cuda_bindings_driver__anon_pod11 tileExtent + unsigned int miptailFirstLevel + unsigned long long miptailSize + unsigned int flags + unsigned int reserved[4] + ctypedef CUDA_ARRAY_SPARSE_PROPERTIES_st CUDA_ARRAY_SPARSE_PROPERTIES_v1 + +cdef union cuda_bindings_driver__anon_pod18: + int fd + cuda_bindings_driver__anon_pod19 win32 + void* nvSciBufObject + +cdef union cuda_bindings_driver__anon_pod20: + int fd + cuda_bindings_driver__anon_pod21 win32 + void* nvSciSyncObj + +cdef struct cuda_bindings_driver__anon_pod22: + cuda_bindings_driver__anon_pod23 fence + cuda_bindings_driver__anon_pod24 nvSciSync + cuda_bindings_driver__anon_pod25 keyedMutex + unsigned int reserved[12] + +cdef struct cuda_bindings_driver__anon_pod26: + cuda_bindings_driver__anon_pod27 fence + cuda_bindings_driver__anon_pod28 nvSciSync + cuda_bindings_driver__anon_pod29 keyedMutex + unsigned int reserved[10] + +cdef union cuda_bindings_driver__anon_pod33: + cuda_bindings_driver__anon_pod34 sparseLevel + cuda_bindings_driver__anon_pod35 miptail + +cdef extern from 'cuda.h': + cdef struct CUstreamCigCaptureParams_st: + CUstreamCigParam* streamCigParams + ctypedef CUstreamCigCaptureParams_st CUstreamCigCaptureParams + +cdef extern from 'cuda.h': + ctypedef struct CUDA_CONDITIONAL_NODE_PARAMS 'CUDA_CONDITIONAL_NODE_PARAMS': + CUgraphConditionalHandle handle + CUgraphConditionalNodeType type + unsigned int size + CUgraph* phGraph_out + CUcontext ctx + +cdef extern from 'cuda.h': + ctypedef struct CUstreamMemOpWaitValueParams_st 'CUstreamMemOpWaitValueParams_st': + CUstreamBatchMemOpType operation + CUdeviceptr address + cuuint32_t value + cuuint64_t value64 + unsigned int flags + CUdeviceptr alias + +cdef extern from 'cuda.h': + ctypedef struct CUstreamMemOpWriteValueParams_st 'CUstreamMemOpWriteValueParams_st': + CUstreamBatchMemOpType operation + CUdeviceptr address + cuuint32_t value + cuuint64_t value64 + unsigned int flags + CUdeviceptr alias + +cdef extern from 'cuda.h': + ctypedef struct CUstreamMemOpAtomicReductionParams_st 'CUstreamMemOpAtomicReductionParams_st': + CUstreamBatchMemOpType operation + unsigned int flags + CUstreamAtomicReductionOpType reductionOp + CUstreamAtomicReductionDataType dataType + CUdeviceptr address + cuuint64_t value + CUdeviceptr alias + +cdef extern from 'cuda.h': + cdef struct CUDA_MEMSET_NODE_PARAMS_st: + CUdeviceptr dst + size_t pitch + unsigned int value + unsigned int elementSize + size_t width + size_t height + ctypedef CUDA_MEMSET_NODE_PARAMS_st CUDA_MEMSET_NODE_PARAMS_v1 + +cdef extern from 'cuda.h': + cdef struct CUDA_MEMSET_NODE_PARAMS_v2_st: + CUdeviceptr dst + size_t pitch + unsigned int value + unsigned int elementSize + size_t width + size_t height + CUcontext ctx + ctypedef CUDA_MEMSET_NODE_PARAMS_v2_st CUDA_MEMSET_NODE_PARAMS_v2 + +cdef extern from 'cuda.h': + cdef struct CUDA_MEMCPY2D_st: + size_t srcXInBytes + size_t srcY + CUmemorytype srcMemoryType + void* srcHost + CUdeviceptr srcDevice + CUarray srcArray + size_t srcPitch + size_t dstXInBytes + size_t dstY + CUmemorytype dstMemoryType + void* dstHost + CUdeviceptr dstDevice + CUarray dstArray + size_t dstPitch + size_t WidthInBytes + size_t Height + ctypedef CUDA_MEMCPY2D_st CUDA_MEMCPY2D_v2 + +cdef extern from 'cuda.h': + cdef struct CUDA_MEMCPY3D_st: + size_t srcXInBytes + size_t srcY + size_t srcZ + size_t srcLOD + CUmemorytype srcMemoryType + void* srcHost + CUdeviceptr srcDevice + CUarray srcArray + void* reserved0 + size_t srcPitch + size_t srcHeight + size_t dstXInBytes + size_t dstY + size_t dstZ + size_t dstLOD + CUmemorytype dstMemoryType + void* dstHost + CUdeviceptr dstDevice + CUarray dstArray + void* reserved1 + size_t dstPitch + size_t dstHeight + size_t WidthInBytes + size_t Height + size_t Depth + ctypedef CUDA_MEMCPY3D_st CUDA_MEMCPY3D_v2 + +cdef extern from 'cuda.h': + cdef struct CUDA_MEMCPY3D_PEER_st: + size_t srcXInBytes + size_t srcY + size_t srcZ + size_t srcLOD + CUmemorytype srcMemoryType + void* srcHost + CUdeviceptr srcDevice + CUarray srcArray + CUcontext srcContext + size_t srcPitch + size_t srcHeight + size_t dstXInBytes + size_t dstY + size_t dstZ + size_t dstLOD + CUmemorytype dstMemoryType + void* dstHost + CUdeviceptr dstDevice + CUarray dstArray + CUcontext dstContext + size_t dstPitch + size_t dstHeight + size_t WidthInBytes + size_t Height + size_t Depth + ctypedef CUDA_MEMCPY3D_PEER_st CUDA_MEMCPY3D_PEER_v1 + +cdef struct cuda_bindings_driver__anon_pod15: + CUdeviceptr devPtr + CUarray_format format + unsigned int numChannels + size_t sizeInBytes + +cdef struct cuda_bindings_driver__anon_pod16: + CUdeviceptr devPtr + CUarray_format format + unsigned int numChannels + size_t width + size_t height + size_t pitchInBytes + +cdef extern from 'cuda.h': + cdef struct CUDA_MEM_FREE_NODE_PARAMS_st: + CUdeviceptr dptr + ctypedef CUDA_MEM_FREE_NODE_PARAMS_st CUDA_MEM_FREE_NODE_PARAMS + +cdef extern from 'cuda.h': + cdef struct CUcheckpointCustomStoragePerDeviceData_st: + CUdeviceptr devPtr + size_t size + CUstream stream + ctypedef CUcheckpointCustomStoragePerDeviceData_st CUcheckpointCustomStoragePerDeviceData + +cdef extern from 'cuda.h': + cdef struct CUdevWorkqueueConfigResource_st: + CUdevice device + unsigned int wqConcurrencyLimit + CUdevWorkqueueConfigScope sharingScope + ctypedef CUdevWorkqueueConfigResource_st CUdevWorkqueueConfigResource + +cdef struct cuda_bindings_driver__anon_pod47: + CUdevice device + +cdef extern from 'cuda.h': + ctypedef void (*CUcoredumpStatusCallback 'CUcoredumpStatusCallback')( + void* userData, + int pid, + CUdevice dev + ) + + +cdef union cuda_bindings_driver__anon_pod10: + CUexecAffinitySmCount smCount + +cdef extern from 'cuda.h': + cdef struct CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st: + unsigned long long offset + CUDA_ARRAY3D_DESCRIPTOR arrayDesc + unsigned int numLevels + unsigned int reserved[16] + ctypedef CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1 + +cdef union cuda_bindings_driver__anon_pod36: + CUmemGenericAllocationHandle memHandle + +cdef struct cuda_bindings_driver__anon_pod42: + CUarray array + CUoffset3D offset + +cdef extern from 'cuda.h': + ctypedef CUDA_KERNEL_NODE_PARAMS_v2 CUDA_KERNEL_NODE_PARAMS 'CUDA_KERNEL_NODE_PARAMS' + + +cdef extern from 'cuda.h': + ctypedef CUDA_LAUNCH_PARAMS_v1 CUDA_LAUNCH_PARAMS 'CUDA_LAUNCH_PARAMS' + + +cdef extern from 'cuda.h': + ctypedef CUgraphExecUpdateResultInfo_v1 CUgraphExecUpdateResultInfo 'CUgraphExecUpdateResultInfo' + + +cdef extern from 'cuda.h': + cdef union CUlaunchAttributeValue_union: + char pad[64] + CUaccessPolicyWindow accessPolicyWindow + int cooperative + CUsynchronizationPolicy syncPolicy + cuda_bindings_driver__anon_pod5 clusterDim + CUclusterSchedulingPolicy clusterSchedulingPolicyPreference + int programmaticStreamSerializationAllowed + cuda_bindings_driver__anon_pod6 programmaticEvent + cuda_bindings_driver__anon_pod7 launchCompletionEvent + int priority + CUlaunchMemSyncDomainMap memSyncDomainMap + CUlaunchMemSyncDomain memSyncDomain + cuda_bindings_driver__anon_pod8 preferredClusterDim + cuda_bindings_driver__anon_pod9 deviceUpdatableKernelNode + unsigned int sharedMemCarveout + unsigned int nvlinkUtilCentricScheduling + CUlaunchAttributePortableClusterMode portableClusterSizeMode + CUsharedMemoryMode sharedMemoryMode + ctypedef CUlaunchAttributeValue_union CUlaunchAttributeValue + +cdef extern from 'cuda.h': + cdef struct CUDA_HOST_NODE_PARAMS_v2_st: + CUhostFn fn + void* userData + unsigned int syncMode + CUcontext ctx + CUgreenCtx gCtx + ctypedef CUDA_HOST_NODE_PARAMS_v2_st CUDA_HOST_NODE_PARAMS_v2 + +cdef extern from 'cuda.h': + cdef struct CUDA_EVENT_RECORD_NODE_PARAMS_st: + CUevent event + CUcontext ctx + CUgreenCtx gCtx + ctypedef CUDA_EVENT_RECORD_NODE_PARAMS_st CUDA_EVENT_RECORD_NODE_PARAMS + +cdef extern from 'cuda.h': + cdef struct CUasyncNotificationInfo_st: + CUasyncNotificationType type + cuda_bindings_driver__anon_pod2 info + ctypedef CUasyncNotificationInfo_st CUasyncNotificationInfo + +cdef extern from 'cuda.h': + ctypedef CUDA_HOST_NODE_PARAMS_v1 CUDA_HOST_NODE_PARAMS 'CUDA_HOST_NODE_PARAMS' + + +cdef extern from 'cuda.h': + ctypedef CUDA_ARRAY_SPARSE_PROPERTIES_v1 CUDA_ARRAY_SPARSE_PROPERTIES 'CUDA_ARRAY_SPARSE_PROPERTIES' + + +cdef extern from 'cuda.h': + cdef struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st: + CUexternalMemoryHandleType type + cuda_bindings_driver__anon_pod18 handle + unsigned long long size + unsigned int flags + unsigned int reserved[16] + ctypedef CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1 + +cdef extern from 'cuda.h': + cdef struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st: + CUexternalSemaphoreHandleType type + cuda_bindings_driver__anon_pod20 handle + unsigned int flags + unsigned int reserved[16] + ctypedef CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1 + +cdef extern from 'cuda.h': + cdef struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st: + cuda_bindings_driver__anon_pod22 params + unsigned int flags + unsigned int reserved[16] + ctypedef CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1 + +cdef extern from 'cuda.h': + cdef struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st: + cuda_bindings_driver__anon_pod26 params + unsigned int flags + unsigned int reserved[16] + ctypedef CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1 + +cdef extern from 'cuda.h': + cdef struct CUmemLocation_st: + CUmemLocationType type + int id + cuda_bindings_driver__anon_pod38 localized + ctypedef CUmemLocation_st CUmemLocation_v1 + +cdef extern from 'cuda.h': + cdef union CUstreamBatchMemOpParams_union: + CUstreamBatchMemOpType operation + CUstreamMemOpWaitValueParams_st waitValue + CUstreamMemOpWriteValueParams_st writeValue + CUstreamMemOpFlushRemoteWritesParams_st flushRemoteWrites + CUstreamMemOpMemoryBarrierParams_st memoryBarrier + CUstreamMemOpAtomicReductionParams_st atomicReduction + cuuint64_t pad[6] + ctypedef CUstreamBatchMemOpParams_union CUstreamBatchMemOpParams_v1 + +cdef extern from 'cuda.h': + ctypedef CUDA_MEMSET_NODE_PARAMS_v1 CUDA_MEMSET_NODE_PARAMS 'CUDA_MEMSET_NODE_PARAMS' + + +cdef extern from 'cuda.h': + ctypedef CUDA_MEMCPY2D_v2 CUDA_MEMCPY2D 'CUDA_MEMCPY2D' + + +cdef extern from 'cuda.h': + ctypedef CUDA_MEMCPY3D_v2 CUDA_MEMCPY3D 'CUDA_MEMCPY3D' + + +cdef extern from 'cuda.h': + ctypedef CUDA_MEMCPY3D_PEER_v1 CUDA_MEMCPY3D_PEER 'CUDA_MEMCPY3D_PEER' + + +cdef union cuda_bindings_driver__anon_pod12: + cuda_bindings_driver__anon_pod13 array + cuda_bindings_driver__anon_pod14 mipmap + cuda_bindings_driver__anon_pod15 linear + cuda_bindings_driver__anon_pod16 pitch2D + cuda_bindings_driver__anon_pod17 reserved + +cdef extern from 'cuda.h': + cdef struct CUcheckpointCustomStorageInfo_st: + CUcheckpointOperationHandle handle + CUcheckpointCustomStoragePerDeviceData* perDeviceData + unsigned int deviceCount + ctypedef CUcheckpointCustomStorageInfo_st CUcheckpointCustomStorageInfo + +cdef extern from 'cuda.h': + cdef struct CUexecAffinityParam_st: + CUexecAffinityType type + cuda_bindings_driver__anon_pod10 param + ctypedef CUexecAffinityParam_st CUexecAffinityParam_v1 + +cdef extern from 'cuda.h': + ctypedef CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1 CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC' + + +cdef extern from 'cuda.h': + cdef struct CUarrayMapInfo_st: + CUresourcetype resourceType + cuda_bindings_driver__anon_pod32 resource + CUarraySparseSubresourceType subresourceType + cuda_bindings_driver__anon_pod33 subresource + CUmemOperationType memOperationType + CUmemHandleType memHandleType + cuda_bindings_driver__anon_pod36 memHandle + unsigned long long offset + unsigned int deviceBitMask + unsigned int flags + unsigned int reserved[2] + ctypedef CUarrayMapInfo_st CUarrayMapInfo_v1 + +cdef extern from 'cuda.h': + ctypedef CUlaunchAttributeValue CUkernelNodeAttrValue_v1 'CUkernelNodeAttrValue_v1' + + +cdef extern from 'cuda.h': + ctypedef CUlaunchAttributeValue CUstreamAttrValue_v1 'CUstreamAttrValue_v1' + + +cdef extern from 'cuda.h': + cdef struct CUlaunchAttribute_st: + CUlaunchAttributeID id + CUlaunchAttributeValue value + ctypedef CUlaunchAttribute_st CUlaunchAttribute + +cdef extern from 'cuda.h': + ctypedef void (*CUasyncCallback 'CUasyncCallback')( + CUasyncNotificationInfo* info, + void* userData, + CUasyncCallbackHandle callback + ) + + +cdef extern from 'cuda.h': + ctypedef CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1 CUDA_EXTERNAL_MEMORY_HANDLE_DESC 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC' + + +cdef extern from 'cuda.h': + ctypedef CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1 CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC' + + +cdef extern from 'cuda.h': + ctypedef CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1 CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS' + + +cdef extern from 'cuda.h': + ctypedef CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1 CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS' + + +cdef extern from 'cuda.h': + ctypedef CUmemLocation_v1 CUmemLocation 'CUmemLocation' + + +cdef extern from 'cuda.h': + ctypedef CUstreamBatchMemOpParams_v1 CUstreamBatchMemOpParams 'CUstreamBatchMemOpParams' + + +cdef extern from 'cuda.h': + cdef struct CUDA_MEMCPY_NODE_PARAMS_st: + int flags + int reserved + CUcontext copyCtx + CUDA_MEMCPY3D copyParams + ctypedef CUDA_MEMCPY_NODE_PARAMS_st CUDA_MEMCPY_NODE_PARAMS + +cdef extern from 'cuda.h': + cdef struct CUDA_RESOURCE_DESC_st: + CUresourcetype resType + cuda_bindings_driver__anon_pod12 res + unsigned int flags + ctypedef CUDA_RESOURCE_DESC_st CUDA_RESOURCE_DESC_v1 + +cdef extern from 'cuda.h': + cdef struct CUcheckpointCheckpointArgs_st: + CUcheckpointCustomStorageInfo** customStorageInfo_out + char reserved[56] + ctypedef CUcheckpointCheckpointArgs_st CUcheckpointCheckpointArgs + +cdef extern from 'cuda.h': + cdef struct CUcheckpointRestoreArgs_st: + CUcheckpointGpuPair* gpuPairs + unsigned int gpuPairsCount + unsigned int padding0 + CUcheckpointCustomStorageInfo** customStorageInfo_out + char reserved[40] + ctypedef CUcheckpointRestoreArgs_st CUcheckpointRestoreArgs + +cdef extern from 'cuda.h': + cdef struct CUdevResource_st: + CUdevResourceType type + unsigned char _internal_padding[92] + CUdevSmResource sm + CUdevWorkqueueConfigResource wqConfig + CUdevWorkqueueResource wq + unsigned char _oversize[40] + CUdevResource_st* nextResource + ctypedef CUdevResource_st CUdevResource_v1 + +cdef extern from 'cuda.h': + cdef struct CUlogicalEndpointProp_struct: + CUlogicalEndpointType type + cuda_bindings_driver__anon_pod47 unicast + cuda_bindings_driver__anon_pod48 multicast + unsigned long long size + unsigned int ipcHandleTypes + unsigned int flags + ctypedef CUlogicalEndpointProp_struct CUlogicalEndpointProp + +cdef extern from 'cuda.h': + ctypedef CUexecAffinityParam_v1 CUexecAffinityParam 'CUexecAffinityParam' + + +cdef extern from 'cuda.h': + ctypedef CUarrayMapInfo_v1 CUarrayMapInfo 'CUarrayMapInfo' + + +cdef extern from 'cuda.h': + ctypedef CUkernelNodeAttrValue_v1 CUkernelNodeAttrValue 'CUkernelNodeAttrValue' + + +cdef extern from 'cuda.h': + ctypedef CUstreamAttrValue_v1 CUstreamAttrValue 'CUstreamAttrValue' + + +cdef extern from 'cuda.h': + cdef struct CUlaunchConfig_st: + unsigned int gridDimX + unsigned int gridDimY + unsigned int gridDimZ + unsigned int blockDimX + unsigned int blockDimY + unsigned int blockDimZ + unsigned int sharedMemBytes + CUstream hStream + CUlaunchAttribute* attrs + unsigned int numAttrs + ctypedef CUlaunchConfig_st CUlaunchConfig + +cdef extern from 'cuda.h': + cdef struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st: + CUexternalSemaphore* extSemArray + CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray + unsigned int numExtSems + ctypedef CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1 + +cdef extern from 'cuda.h': + cdef struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st: + CUexternalSemaphore* extSemArray + CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray + unsigned int numExtSems + CUcontext ctx + CUgreenCtx gCtx + ctypedef CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2 + +cdef extern from 'cuda.h': + cdef struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_st: + CUexternalSemaphore* extSemArray + CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray + unsigned int numExtSems + ctypedef CUDA_EXT_SEM_WAIT_NODE_PARAMS_st CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1 + +cdef extern from 'cuda.h': + cdef struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st: + CUexternalSemaphore* extSemArray + CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray + unsigned int numExtSems + CUcontext ctx + CUgreenCtx gCtx + ctypedef CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2 + +cdef extern from 'cuda.h': + cdef struct CUmemAllocationProp_st: + CUmemAllocationType type + CUmemAllocationHandleType requestedHandleTypes + CUmemLocation location + void* win32HandleMetaData + cuda_bindings_driver__anon_pod39 allocFlags + ctypedef CUmemAllocationProp_st CUmemAllocationProp_v1 + +cdef extern from 'cuda.h': + cdef struct CUmemAccessDesc_st: + CUmemLocation location + CUmemAccess_flags flags + ctypedef CUmemAccessDesc_st CUmemAccessDesc_v1 + +cdef extern from 'cuda.h': + cdef struct CUmemPoolProps_st: + CUmemAllocationType allocType + CUmemAllocationHandleType handleTypes + CUmemLocation location + void* win32SecurityAttributes + size_t maxSize + unsigned short usage + unsigned char gpuDirectRDMACapable + unsigned char reserved[53] + ctypedef CUmemPoolProps_st CUmemPoolProps_v1 + +cdef extern from 'cuda.h': + cdef struct CUmemcpyAttributes_st: + CUmemcpySrcAccessOrder srcAccessOrder + CUmemLocation srcLocHint + CUmemLocation dstLocHint + unsigned int flags + ctypedef CUmemcpyAttributes_st CUmemcpyAttributes_v1 + +cdef struct cuda_bindings_driver__anon_pod41: + CUdeviceptr ptr + size_t rowLength + size_t layerHeight + CUmemLocation locHint + +cdef extern from 'cuda.h': + cdef struct CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st: + CUcontext ctx + unsigned int count + CUstreamBatchMemOpParams* paramArray + unsigned int flags + ctypedef CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st CUDA_BATCH_MEM_OP_NODE_PARAMS_v1 + +cdef extern from 'cuda.h': + cdef struct CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st: + CUcontext ctx + unsigned int count + CUstreamBatchMemOpParams* paramArray + unsigned int flags + ctypedef CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st CUDA_BATCH_MEM_OP_NODE_PARAMS_v2 + +cdef extern from 'cuda.h': + ctypedef CUDA_RESOURCE_DESC_v1 CUDA_RESOURCE_DESC 'CUDA_RESOURCE_DESC' + + +cdef extern from 'cuda.h': + ctypedef CUdevResource_v1 CUdevResource 'CUdevResource' + + +cdef extern from 'cuda.h': + cdef struct CUctxCreateParams_st: + CUexecAffinityParam* execAffinityParams + int numExecAffinityParams + CUctxCigParam* cigParams + ctypedef CUctxCreateParams_st CUctxCreateParams + +cdef extern from 'cuda.h': + ctypedef CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1 CUDA_EXT_SEM_SIGNAL_NODE_PARAMS 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS' + + +cdef extern from 'cuda.h': + ctypedef CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1 CUDA_EXT_SEM_WAIT_NODE_PARAMS 'CUDA_EXT_SEM_WAIT_NODE_PARAMS' + + +cdef extern from 'cuda.h': + ctypedef CUmemAllocationProp_v1 CUmemAllocationProp 'CUmemAllocationProp' + + +cdef extern from 'cuda.h': + ctypedef CUmemAccessDesc_v1 CUmemAccessDesc 'CUmemAccessDesc' + + +cdef extern from 'cuda.h': + ctypedef CUmemPoolProps_v1 CUmemPoolProps 'CUmemPoolProps' + + +cdef extern from 'cuda.h': + ctypedef CUmemcpyAttributes_v1 CUmemcpyAttributes 'CUmemcpyAttributes' + + +cdef union cuda_bindings_driver__anon_pod40: + cuda_bindings_driver__anon_pod41 ptr + cuda_bindings_driver__anon_pod42 array + +cdef extern from 'cuda.h': + ctypedef CUDA_BATCH_MEM_OP_NODE_PARAMS_v1 CUDA_BATCH_MEM_OP_NODE_PARAMS 'CUDA_BATCH_MEM_OP_NODE_PARAMS' + + +cdef extern from 'cuda.h': + cdef struct CUDA_MEM_ALLOC_NODE_PARAMS_v1_st: + CUmemPoolProps poolProps + CUmemAccessDesc* accessDescs + size_t accessDescCount + size_t bytesize + CUdeviceptr dptr + ctypedef CUDA_MEM_ALLOC_NODE_PARAMS_v1_st CUDA_MEM_ALLOC_NODE_PARAMS_v1 + +cdef extern from 'cuda.h': + cdef struct CUDA_MEM_ALLOC_NODE_PARAMS_v2_st: + CUmemPoolProps poolProps + CUmemAccessDesc* accessDescs + size_t accessDescCount + size_t bytesize + CUdeviceptr dptr + ctypedef CUDA_MEM_ALLOC_NODE_PARAMS_v2_st CUDA_MEM_ALLOC_NODE_PARAMS_v2 + +cdef extern from 'cuda.h': + cdef struct CUmemcpy3DOperand_st: + CUmemcpy3DOperandType type + cuda_bindings_driver__anon_pod40 op + ctypedef CUmemcpy3DOperand_st CUmemcpy3DOperand_v1 + +cdef extern from 'cuda.h': + ctypedef CUDA_MEM_ALLOC_NODE_PARAMS_v1 CUDA_MEM_ALLOC_NODE_PARAMS 'CUDA_MEM_ALLOC_NODE_PARAMS' + + +cdef extern from 'cuda.h': + ctypedef CUmemcpy3DOperand_v1 CUmemcpy3DOperand 'CUmemcpy3DOperand' + + +cdef extern from 'cuda.h': + cdef struct CUgraphNodeParams_st: + CUgraphNodeType type + int reserved0[3] + long long reserved1[29] + CUDA_KERNEL_NODE_PARAMS_v3 kernel + CUDA_MEMCPY_NODE_PARAMS memcpy + CUDA_MEMSET_NODE_PARAMS_v2 memset + CUDA_HOST_NODE_PARAMS_v2 host + CUDA_CHILD_GRAPH_NODE_PARAMS graph + CUDA_EVENT_WAIT_NODE_PARAMS eventWait + CUDA_EVENT_RECORD_NODE_PARAMS eventRecord + CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2 extSemSignal + CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2 extSemWait + CUDA_MEM_ALLOC_NODE_PARAMS_v2 alloc + CUDA_MEM_FREE_NODE_PARAMS free + CUDA_BATCH_MEM_OP_NODE_PARAMS_v2 memOp + CUDA_CONDITIONAL_NODE_PARAMS conditional + char asBytes[232] + long long reserved2 + ctypedef CUgraphNodeParams_st CUgraphNodeParams + +cdef extern from 'cuda.h': + cdef struct CUDA_MEMCPY3D_BATCH_OP_st: + CUmemcpy3DOperand src + CUmemcpy3DOperand dst + CUextent3D extent + CUmemcpySrcAccessOrder srcAccessOrder + unsigned int flags + ctypedef CUDA_MEMCPY3D_BATCH_OP_st CUDA_MEMCPY3D_BATCH_OP_v1 + +cdef extern from 'cuda.h': + ctypedef CUresult (*CUgraphRecaptureCallback 'CUgraphRecaptureCallback')( + void* data, + CUgraphNode node, + const CUgraphNodeParams* originalParams, + const CUgraphNodeParams* recaptureParams, + CUgraphRecaptureStatus status + ) + + +cdef extern from 'cuda.h': + ctypedef CUDA_MEMCPY3D_BATCH_OP_v1 CUDA_MEMCPY3D_BATCH_OP 'CUDA_MEMCPY3D_BATCH_OP' + + + +# Defining the types here in this way is not necessary to work, but we need to +# define them as 'cdef extern from ""' to be ABI-backward-compatible with the +# old cython-gen based bindings. +cdef extern from "": + cdef struct CUeglStreamConnection_st: + pass +ctypedef CUeglStreamConnection_st* CUeglStreamConnection + +cdef union anon_union16: + CUarray pArray[3] + void* pPitch[3] + +cdef struct CUeglFrame_st: + anon_union16 frame + unsigned int width + unsigned int height + unsigned int depth + unsigned int pitch + unsigned int planeCount + unsigned int numChannels + CUeglFrameType frameType + CUeglColorFormat eglColorFormat + CUarray_format cuFormat + +ctypedef CUeglFrame_st CUeglFrame_v1 + +ctypedef CUeglFrame_v1 CUeglFrame + +cdef enum CUGLDeviceList_enum: + CU_GL_DEVICE_LIST_ALL = 1 + CU_GL_DEVICE_LIST_CURRENT_FRAME = 2 + CU_GL_DEVICE_LIST_NEXT_FRAME = 3 + +ctypedef CUGLDeviceList_enum CUGLDeviceList + + +# FUNCS +cdef CUresult cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGetErrorName(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuInit(unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDriverGetVersion(int* driverVersion) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceGet(CUdevice* device, int ordinal) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceGetCount(int* count) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceGetName(char* name, int len, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceTotalMem(size_t* bytes, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format format, unsigned numChannels, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType type, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDevicePrimaryCtxRelease(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDevicePrimaryCtxSetFlags(CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDevicePrimaryCtxReset(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxCreate_v2(CUcontext* pctx, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxCreate(CUcontext* pctx, CUctxCreateParams* ctxCreateParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxDestroy(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxPushCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxPopCurrent(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxSetCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxGetCurrent(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxGetDevice(CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxGetFlags(unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxSetFlags(unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxGetId(CUcontext ctx, unsigned long long* ctxId) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxSynchronize() except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxSetLimit(CUlimit limit, size_t value) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxGetLimit(size_t* pvalue, CUlimit limit) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxGetCacheConfig(CUfunc_cache* pconfig) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxSetCacheConfig(CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxResetPersistingL2Cache() except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType type) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxRecordEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxWaitEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxAttach(CUcontext* pctx, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxDetach(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxSetSharedMemConfig(CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuModuleLoad(CUmodule* module, const char* fname) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuModuleLoadData(CUmodule* module, const void* image) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuModuleUnload(CUmodule hmod) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuModuleGetFunctionCount(unsigned int* count, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuModuleEnumerateFunctions(CUfunction* functions, unsigned int numFunctions, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuModuleGetGlobal(CUdeviceptr* dptr, size_t* bytes, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLinkCreate(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLinkAddData(CUlinkState state, CUjitInputType type, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLinkAddFile(CUlinkState state, CUjitInputType type, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLinkDestroy(CUlinkState state) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLibraryLoadData(CUlibrary* library, const void* code, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLibraryLoadFromFile(CUlibrary* library, const char* fileName, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLibraryUnload(CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLibraryGetKernel(CUkernel* pKernel, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLibraryGetKernelCount(unsigned int* count, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLibraryEnumerateKernels(CUkernel* kernels, unsigned int numKernels, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLibraryGetModule(CUmodule* pMod, CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuKernelGetFunction(CUfunction* pFunc, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuKernelGetLibrary(CUlibrary* pLib, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLibraryGetGlobal(CUdeviceptr* dptr, size_t* bytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLibraryGetManaged(CUdeviceptr* dptr, size_t* bytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLibraryGetUnifiedFunction(void** fptr, CUlibrary library, const char* symbol) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuKernelGetAttribute(int* pi, CUfunction_attribute attrib, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuKernelSetAttribute(CUfunction_attribute attrib, int val, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuKernelSetCacheConfig(CUkernel kernel, CUfunc_cache config, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuKernelGetName(const char** name, CUkernel hfunc) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuKernelGetParamInfo(CUkernel kernel, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemGetInfo(size_t* free, size_t* total) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemAlloc(CUdeviceptr* dptr, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemAllocPitch(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemFree(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemGetAddressRange(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemAllocHost(void** pp, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemFreeHost(void* p) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemHostGetDevicePointer(CUdeviceptr* pdptr, void* p, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemHostGetFlags(unsigned int* pFlags, void* p) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceRegisterAsyncNotification(CUdevice device, CUasyncCallback callbackFunc, void* userData, CUasyncCallbackHandle* callback) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceUnregisterAsyncNotification(CUdevice device, CUasyncCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceGetPCIBusId(char* pciBusId, int len, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuIpcOpenMemHandle(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuIpcCloseMemHandle(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemHostRegister(void* p, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemHostUnregister(void* p) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemcpyHtoD(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemcpyDtoH(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemcpyDtoD(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemcpyDtoA(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemcpyAtoD(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemcpyHtoA(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemcpyAtoH(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemcpyAtoA(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemcpy2D(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemcpy2DUnaligned(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemcpy3D(const CUDA_MEMCPY3D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemcpyHtoDAsync(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemcpyDtoHAsync(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemcpyDtoDAsync(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemcpyHtoAAsync(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemcpyAtoHAsync(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemcpy2DAsync(const CUDA_MEMCPY2D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemcpy3DAsync(const CUDA_MEMCPY3D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemsetD8(CUdeviceptr dstDevice, unsigned char uc, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemsetD16(CUdeviceptr dstDevice, unsigned short us, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemsetD32(CUdeviceptr dstDevice, unsigned int ui, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemsetD2D8(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemsetD2D16(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemsetD2D32(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemsetD2D8Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemsetD2D16Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemsetD2D32Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuArrayCreate(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuArrayGetDescriptor(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuArrayDestroy(CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuArray3DCreate(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuArray3DGetDescriptor(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemBatchDecompressAsync(CUmemDecompressParams* paramsArray, size_t count, unsigned int flags, size_t* errorIndex, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemAddressFree(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemRelease(CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemUnmap(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemPoolDestroy(CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMulticastCreate(CUmemGenericAllocationHandle* mcHandle, const CUmulticastObjectProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMulticastAddDevice(CUmemGenericAllocationHandle mcHandle, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMulticastBindMem(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUmemGenericAllocationHandle memHandle, size_t memOffset, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMulticastBindAddr(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUdeviceptr memptr, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMulticastUnbind(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMulticastGetGranularity(size_t* granularity, const CUmulticastObjectProp* prop, CUmulticastGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUmemLocation location, unsigned int flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUmemLocation location) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamCreate(CUstream* phStream, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamGetDevice(CUstream hStream, CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamGetId(CUstream hStream, unsigned long long* streamId) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamGetCtx(CUstream hStream, CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamGetCtx_v2(CUstream hStream, CUcontext* pCtx, CUgreenCtx* pGreenCtx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamBeginCapture(CUstream hStream, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamBeginCaptureToGraph(CUstream hStream, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamGetCaptureInfo_v2(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamGetCaptureInfo(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, const CUgraphEdgeData** edgeData_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamQuery(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamSynchronize(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamDestroy(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamCopyAttributes(CUstream dst, CUstream src) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuEventCreate(CUevent* phEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuEventRecord(CUevent hEvent, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuEventQuery(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuEventSynchronize(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuEventDestroy(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDestroyExternalMemory(CUexternalMemory extMem) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDestroyExternalSemaphore(CUexternalSemaphore extSem) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamWaitValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamWaitValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamWriteValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamBatchMemOp(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuFuncGetName(const char** name, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuFuncGetParamInfo(CUfunction func, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuFuncIsLoaded(CUfunctionLoadingState* state, CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuFuncLoad(CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLaunchKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLaunchCooperativeKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void** kernelParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuFuncSetSharedSize(CUfunction hfunc, unsigned int bytes) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuParamSetSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuParamSeti(CUfunction hfunc, int offset, unsigned int value) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuParamSetf(CUfunction hfunc, int offset, float value) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLaunch(CUfunction f) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLaunchGrid(CUfunction f, int grid_width, int grid_height) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphCreate(CUgraph* phGraph, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphAddKernelNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphKernelNodeGetParams(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphKernelNodeSetParams(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphAddMemsetNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphAddHostNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphAddExternalSemaphoresSignalNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphAddExternalSemaphoresWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphAddBatchMemOpNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphAddMemAllocNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceGraphMemTrim(CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* type) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, CUgraphEdgeData* edgeData, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, CUgraphEdgeData* edgeData, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, CUgraphEdgeData* edgeData, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphDestroyNode(CUgraphNode hNode) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphInstantiate(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphInstantiateWithParams(CUgraphExec* phGraphExec, CUgraph hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS* instantiateParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphExecGetFlags(CUgraphExec hGraphExec, cuuint64_t* flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphExecKernelNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphExecDestroy(CUgraphExec hGraphExec) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphDestroy(CUgraph hGraph) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphExecUpdate(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphExecUpdateResultInfo* resultInfo) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuUserObjectRetain(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuUserObjectRelease(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphAddNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphNodeSetParams(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphExecNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphConditionalHandleCreate(CUgraphConditionalHandle* pHandle_out, CUgraph hGraph, CUcontext ctx, unsigned int defaultLaunchValue, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuOccupancyMaxPotentialBlockSizeWithFlags(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexRefSetAddress(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t bytes) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexRefSetAddress2D(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexRefGetAddress(CUdeviceptr* pdptr, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexRefCreate(CUtexref* pTexRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexRefDestroy(CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexObjectDestroy(CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuSurfObjectDestroy(CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTensorMapEncodeTiled(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, const cuuint32_t* boxDim, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTensorMapEncodeIm2col(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, const int* pixelBoxLowerCorner, const int* pixelBoxUpperCorner, cuuint32_t channelsPerPixel, cuuint32_t pixelsPerColumn, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTensorMapEncodeIm2colWide(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, int pixelBoxLowerCornerWidth, int pixelBoxUpperCornerWidth, cuuint32_t channelsPerPixel, cuuint32_t pixelsPerColumn, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapIm2ColWideMode mode, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxDisablePeerAccess(CUcontext peerContext) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphicsUnregisterResource(CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphicsResourceGetMappedPointer(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphicsResourceSetMapFlags(CUgraphicsResource resource, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGetProcAddress(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags, CUdriverProcAddressQueryResult* symbolStatus) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCoredumpGetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCoredumpGetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCoredumpSetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCoredumpSetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGreenCtxCreate(CUgreenCtx* phCtx, CUdevResourceDesc desc, CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGreenCtxDestroy(CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxFromGreenCtx(CUcontext* pContext, CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceGetDevResource(CUdevice device, CUdevResource* resource, CUdevResourceType type) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxGetDevResource(CUcontext hCtx, CUdevResource* resource, CUdevResourceType type) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGreenCtxGetDevResource(CUgreenCtx hCtx, CUdevResource* resource, CUdevResourceType type) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDevSmResourceSplitByCount(CUdevResource* result, unsigned int* nbGroups, const CUdevResource* input, CUdevResource* remainder, unsigned int flags, unsigned int minCount) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDevResourceGenerateDesc(CUdevResourceDesc* phDesc, CUdevResource* resources, unsigned int nbResources) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGreenCtxRecordEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGreenCtxWaitEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamGetGreenCtx(CUstream hStream, CUgreenCtx* phCtx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGreenCtxStreamCreate(CUstream* phStream, CUgreenCtx greenCtx, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLogsRegisterCallback(CUlogsCallback callbackFunc, void* userData, CUlogsCallbackHandle* callback_out) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLogsUnregisterCallback(CUlogsCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLogsCurrent(CUlogIterator* iterator_out, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLogsDumpToFile(CUlogIterator* iterator, const char* pathToFile, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLogsDumpToMemory(CUlogIterator* iterator, char* buffer, size_t* size, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCheckpointProcessGetRestoreThreadId(int pid, int* tid) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCheckpointProcessGetState(int pid, CUprocessState* state) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCheckpointProcessLock(int pid, CUcheckpointLockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCheckpointProcessCheckpoint(int pid, CUcheckpointCheckpointArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCheckpointProcessRestore(int pid, CUcheckpointRestoreArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCheckpointProcessUnlock(int pid, CUcheckpointUnlockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGLGetDevices(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGLCtxCreate(CUcontext* pCtx, unsigned int Flags, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGLInit() except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGLRegisterBufferObject(GLuint buffer) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGLMapBufferObject(CUdeviceptr* dptr, size_t* size, GLuint buffer) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGLUnmapBufferObject(GLuint buffer) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGLUnregisterBufferObject(GLuint buffer) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGLSetBufferObjectMapFlags(GLuint buffer, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGLMapBufferObjectAsync(CUdeviceptr* dptr, size_t* size, GLuint buffer, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGLUnmapBufferObjectAsync(GLuint buffer, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuProfilerInitialize(const char* configFile, const char* outputFile, CUoutput_mode outputMode) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuProfilerStop() except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuVDPAUCtxCreate(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceGetHostAtomicCapabilities(unsigned int* capabilities, const CUatomicOperation* operations, unsigned int count, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxGetDevice_v2(CUdevice* device, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxSynchronize_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemcpyBatchAsync(CUdeviceptr* dsts, CUdeviceptr* srcs, size_t* sizes, size_t count, CUmemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemcpy3DBatchAsync(size_t numOps, CUDA_MEMCPY3D_BATCH_OP* opList, unsigned long long flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemGetDefaultMemPool(CUmemoryPool* pool_out, CUmemLocation* location, CUmemAllocationType type) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemGetMemPool(CUmemoryPool* pool, CUmemLocation* location, CUmemAllocationType type) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemSetMemPool(CUmemLocation* location, CUmemAllocationType type, CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemPrefetchBatchAsync(CUdeviceptr* dptrs, size_t* sizes, size_t count, CUmemLocation* prefetchLocs, size_t* prefetchLocIdxs, size_t numPrefetchLocs, unsigned long long flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemDiscardBatchAsync(CUdeviceptr* dptrs, size_t* sizes, size_t count, unsigned long long flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemDiscardAndPrefetchBatchAsync(CUdeviceptr* dptrs, size_t* sizes, size_t count, CUmemLocation* prefetchLocs, size_t* prefetchLocIdxs, size_t numPrefetchLocs, unsigned long long flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceGetP2PAtomicCapabilities(unsigned int* capabilities, const CUatomicOperation* operations, unsigned int count, CUdevice srcDevice, CUdevice dstDevice) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGreenCtxGetId(CUgreenCtx greenCtx, unsigned long long* greenCtxId) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMulticastBindMem_v2(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, CUmemGenericAllocationHandle memHandle, size_t memOffset, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMulticastBindAddr_v2(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, CUdeviceptr memptr, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphNodeGetContainingGraph(CUgraphNode hNode, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphNodeGetLocalId(CUgraphNode hNode, unsigned int* nodeId) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphNodeGetToolsId(CUgraphNode hNode, unsigned long long* toolsNodeId) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphGetId(CUgraph hGraph, unsigned int* graphId) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphExecGetId(CUgraphExec hGraphExec, unsigned int* graphId) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDevSmResourceSplit(CUdevResource* result, unsigned int nbGroups, const CUdevResource* input, CUdevResource* remainder, unsigned int flags, CU_DEV_SM_RESOURCE_GROUP_PARAMS* groupParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamGetDevResource(CUstream hStream, CUdevResource* resource, CUdevResourceType type) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuKernelGetParamCount(CUkernel kernel, size_t* paramCount) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemcpyWithAttributesAsync(CUdeviceptr dst, CUdeviceptr src, size_t size, CUmemcpyAttributes* attr, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemcpy3DWithAttributesAsync(CUDA_MEMCPY3D_BATCH_OP* op, unsigned long long flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamBeginCaptureToCig(CUstream hStream, CUstreamCigCaptureParams* streamCigCaptureParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamEndCaptureToCig(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuFuncGetParamCount(CUfunction func, size_t* paramCount) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLaunchHostFunc_v2(CUstream hStream, CUhostFn fn, void* userData, unsigned int syncMode) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphNodeGetParams(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCoredumpRegisterStartCallback(CUcoredumpStatusCallback callback, void* userData, CUcoredumpCallbackHandle* callbackOut) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCoredumpRegisterCompleteCallback(CUcoredumpStatusCallback callback, void* userData, CUcoredumpCallbackHandle* callbackOut) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCoredumpDeregisterStartCallback(CUcoredumpCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCoredumpDeregisterCompleteCallback(CUcoredumpCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLogicalEndpointIdReserve(CUlogicalEndpointId* baseLeId, cuuint32_t count) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLogicalEndpointIdRelease(CUlogicalEndpointId baseLeId, cuuint32_t count) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLogicalEndpointCreate(CUlogicalEndpointId leId, const CUlogicalEndpointProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLogicalEndpointAddDevice(CUlogicalEndpointId leId, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLogicalEndpointDestroy(CUlogicalEndpointId leId) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLogicalEndpointBindAddr(CUlogicalEndpointId leId, CUdevice dev, cuuint64_t offset, void* ptr, cuuint64_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLogicalEndpointBindMem(CUlogicalEndpointId leId, CUdevice dev, cuuint64_t offset, CUmemGenericAllocationHandle memHandle, cuuint64_t memOffset, cuuint64_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLogicalEndpointUnbind(CUlogicalEndpointId leId, CUdevice dev, cuuint64_t offset, cuuint64_t size) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLogicalEndpointExport(void* handle, CUlogicalEndpointId leId, CUlogicalEndpointIpcHandleType handleType) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLogicalEndpointImport(CUlogicalEndpointId leId, const void* handle, CUlogicalEndpointIpcHandleType handleType) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLogicalEndpointGetLimits(cuuint64_t* bindAlignment, cuuint64_t* maxSize, const CUlogicalEndpointProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuLogicalEndpointQuery(CUlogicalEndpointId leId, cuuint32_t count, int* queryStatus) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamBeginRecaptureToGraph(CUstream hStream, CUstreamCaptureMode mode, CUgraph hGraph, CUgraphRecaptureCallback callbackFunc, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceGetFabricClusterUuid(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceGetCliqueCount(size_t* count, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceGetCliqueInfo(CUcliqueInfo* cliqueInfo, size_t* count, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemGetLocationInfo(CUdeviceptr ptr, size_t size, size_t summaryGranularity, size_t samplingGranularity, CUmemLocation* location_out) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphAddNode_v3(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphNodeSetParams_v2(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCheckpointOperationComplete(CUcheckpointOperationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil + + +# TODO: Extract these defines somehow? + +cdef enum: CU_IPC_HANDLE_SIZE = 64 + +cdef enum: CU_STREAM_LEGACY = 1 + +cdef enum: CU_STREAM_PER_THREAD = 2 + +cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536 + +cdef enum: CU_COMPUTE_FAMILY_TARGET_BASE = 131072 + +cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1 + +cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 + +cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 + +cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 + +cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 + +cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 + +cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 + +cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 + +cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 + +cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 + +cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 + +cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 + +cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 + +cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 + +cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 + +cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 + +cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8 + +cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 + +cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 + +cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1 + +cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2 + +cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4 + +cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1 + +cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2 + +cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4 + +cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8 + +cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 + +cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16 + +cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1 + +cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 + +cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 + +cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1 + +cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2 + +cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 + +cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 + +cdef enum: CU_MEM_CREATE_USAGE_GPU_DIRECT_RDMA_OVER_PCIE = 4 + +cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 + +cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 + +cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 + +cdef enum: CUDA_ARRAY3D_LAYERED = 1 + +cdef enum: CUDA_ARRAY3D_2DARRAY = 1 + +cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2 + +cdef enum: CUDA_ARRAY3D_CUBEMAP = 4 + +cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8 + +cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16 + +cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 + +cdef enum: CUDA_ARRAY3D_SPARSE = 64 + +cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128 + +cdef enum: CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 256 + +cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1 + +cdef enum: CU_TRSF_READ_AS_INTEGER = 1 + +cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2 + +cdef enum: CU_TRSF_SRGB = 16 + +cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 + +cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64 + +cdef enum: CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 + +cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0 + +cdef enum: CU_LAUNCH_PARAM_END = 0 + +cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 + +cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1 + +cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 + +cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2 + +cdef enum: CU_PARAM_TR_DEFAULT = -1 + +cdef enum: CU_DEVICE_CPU = -1 + +cdef enum: CU_DEVICE_INVALID = -2 + +cdef enum: MAX_PLANES = 3 + +cdef enum: CUDA_EGL_INFINITE_TIMEOUT = 4294967295 + +cdef enum: RESOURCE_ABI_VERSION = 1 + +cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 42 diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/cynvfatbin.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/cynvfatbin.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..ddf742ff4e87a0bdd100eed2d9592e433f684399 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/bindings/cynvfatbin.cpython-312-x86_64-linux-gnu.so differ diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/cynvfatbin.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/cynvfatbin.pxd new file mode 100644 index 0000000000000000000000000000000000000000..b61707a47c88091604e867a490d998dcb99278e4 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/cynvfatbin.pxd @@ -0,0 +1,56 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This code was automatically generated across versions from 12.4.1 to 13.4.1. Do not modify it directly. + + + +############################################################################### +# Types (structs, enums, ...) +############################################################################### + +# enums +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=4eaac7021af14308210cbd9dd8bf938f0b09d395ef079368750627da493fa06e +ctypedef enum nvFatbinResult "nvFatbinResult": + NVFATBIN_SUCCESS "NVFATBIN_SUCCESS" = 0 + NVFATBIN_ERROR_INTERNAL "NVFATBIN_ERROR_INTERNAL" + NVFATBIN_ERROR_ELF_ARCH_MISMATCH "NVFATBIN_ERROR_ELF_ARCH_MISMATCH" + NVFATBIN_ERROR_ELF_SIZE_MISMATCH "NVFATBIN_ERROR_ELF_SIZE_MISMATCH" + NVFATBIN_ERROR_MISSING_PTX_VERSION "NVFATBIN_ERROR_MISSING_PTX_VERSION" + NVFATBIN_ERROR_NULL_POINTER "NVFATBIN_ERROR_NULL_POINTER" + NVFATBIN_ERROR_COMPRESSION_FAILED "NVFATBIN_ERROR_COMPRESSION_FAILED" + NVFATBIN_ERROR_COMPRESSED_SIZE_EXCEEDED "NVFATBIN_ERROR_COMPRESSED_SIZE_EXCEEDED" + NVFATBIN_ERROR_UNRECOGNIZED_OPTION "NVFATBIN_ERROR_UNRECOGNIZED_OPTION" + NVFATBIN_ERROR_INVALID_ARCH "NVFATBIN_ERROR_INVALID_ARCH" + NVFATBIN_ERROR_INVALID_NVVM "NVFATBIN_ERROR_INVALID_NVVM" + NVFATBIN_ERROR_EMPTY_INPUT "NVFATBIN_ERROR_EMPTY_INPUT" + NVFATBIN_ERROR_MISSING_PTX_ARCH "NVFATBIN_ERROR_MISSING_PTX_ARCH" + NVFATBIN_ERROR_PTX_ARCH_MISMATCH "NVFATBIN_ERROR_PTX_ARCH_MISMATCH" + NVFATBIN_ERROR_MISSING_FATBIN "NVFATBIN_ERROR_MISSING_FATBIN" + NVFATBIN_ERROR_INVALID_INDEX "NVFATBIN_ERROR_INVALID_INDEX" + NVFATBIN_ERROR_IDENTIFIER_REUSE "NVFATBIN_ERROR_IDENTIFIER_REUSE" + NVFATBIN_ERROR_INTERNAL_PTX_OPTION "NVFATBIN_ERROR_INTERNAL_PTX_OPTION" + _NVFATBINRESULT_INTERNAL_LOADING_ERROR "_NVFATBINRESULT_INTERNAL_LOADING_ERROR" = -42 + + +# types +ctypedef void* nvFatbinHandle 'nvFatbinHandle' + + +############################################################################### +# Functions +############################################################################### + +cdef const char* nvFatbinGetErrorString(nvFatbinResult result) except?NULL nogil +cdef nvFatbinResult nvFatbinCreate(nvFatbinHandle* handle_indirect, const char** options, size_t optionsCount) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvFatbinResult nvFatbinDestroy(nvFatbinHandle* handle_indirect) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvFatbinResult nvFatbinAddPTX(nvFatbinHandle handle, const char* code, size_t size, const char* arch, const char* identifier, const char* optionsCmdLine) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvFatbinResult nvFatbinAddCubin(nvFatbinHandle handle, const void* code, size_t size, const char* arch, const char* identifier) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvFatbinResult nvFatbinAddLTOIR(nvFatbinHandle handle, const void* code, size_t size, const char* arch, const char* identifier, const char* optionsCmdLine) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvFatbinResult nvFatbinSize(nvFatbinHandle handle, size_t* size) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvFatbinResult nvFatbinGet(nvFatbinHandle handle, void* buffer) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvFatbinResult nvFatbinVersion(unsigned int* major, unsigned int* minor) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvFatbinResult nvFatbinAddIndex(nvFatbinHandle handle, const void* code, size_t size, const char* identifier) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvFatbinResult nvFatbinAddReloc(nvFatbinHandle handle, const void* code, size_t size) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvFatbinResult nvFatbinAddTileIR(nvFatbinHandle handle, const void* code, size_t size, const char* identifier, const char* optionsCmdLine) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/cynvjitlink.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/cynvjitlink.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..dd71efe1c091abc75c194232a7871387c9e6814d Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/bindings/cynvjitlink.cpython-312-x86_64-linux-gnu.so differ diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/cynvjitlink.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/cynvjitlink.pxd new file mode 100644 index 0000000000000000000000000000000000000000..1c240342c91a8e4731f486eb58f04aa2ee2f2053 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/cynvjitlink.pxd @@ -0,0 +1,80 @@ +# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This code was automatically generated across versions from 12.0.1 to 13.4.1. Do not modify it directly. + + + +############################################################################### +# Types (structs, enums, ...) +############################################################################### + +# enums +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=7bd3a5876758225a37a98b496a1423047d3a446a4a0956ebc11b17f0abe2128a + +# <<<< PREAMBLE CONTENT >>>> + +from libc.stdint cimport uint32_t + + +# <<<< END OF PREAMBLE CONTENT >>>> + +ctypedef enum nvJitLinkResult "nvJitLinkResult": + NVJITLINK_SUCCESS "NVJITLINK_SUCCESS" = 0 + NVJITLINK_ERROR_UNRECOGNIZED_OPTION "NVJITLINK_ERROR_UNRECOGNIZED_OPTION" + NVJITLINK_ERROR_MISSING_ARCH "NVJITLINK_ERROR_MISSING_ARCH" + NVJITLINK_ERROR_INVALID_INPUT "NVJITLINK_ERROR_INVALID_INPUT" + NVJITLINK_ERROR_PTX_COMPILE "NVJITLINK_ERROR_PTX_COMPILE" + NVJITLINK_ERROR_NVVM_COMPILE "NVJITLINK_ERROR_NVVM_COMPILE" + NVJITLINK_ERROR_INTERNAL "NVJITLINK_ERROR_INTERNAL" + NVJITLINK_ERROR_THREADPOOL "NVJITLINK_ERROR_THREADPOOL" + NVJITLINK_ERROR_UNRECOGNIZED_INPUT "NVJITLINK_ERROR_UNRECOGNIZED_INPUT" + NVJITLINK_ERROR_FINALIZE "NVJITLINK_ERROR_FINALIZE" + NVJITLINK_ERROR_NULL_INPUT "NVJITLINK_ERROR_NULL_INPUT" + NVJITLINK_ERROR_INCOMPATIBLE_OPTIONS "NVJITLINK_ERROR_INCOMPATIBLE_OPTIONS" + NVJITLINK_ERROR_INCORRECT_INPUT_TYPE "NVJITLINK_ERROR_INCORRECT_INPUT_TYPE" + NVJITLINK_ERROR_ARCH_MISMATCH "NVJITLINK_ERROR_ARCH_MISMATCH" + NVJITLINK_ERROR_OUTDATED_LIBRARY "NVJITLINK_ERROR_OUTDATED_LIBRARY" + NVJITLINK_ERROR_MISSING_FATBIN "NVJITLINK_ERROR_MISSING_FATBIN" + NVJITLINK_ERROR_UNRECOGNIZED_ARCH "NVJITLINK_ERROR_UNRECOGNIZED_ARCH" + NVJITLINK_ERROR_UNSUPPORTED_ARCH "NVJITLINK_ERROR_UNSUPPORTED_ARCH" + NVJITLINK_ERROR_LTO_NOT_ENABLED "NVJITLINK_ERROR_LTO_NOT_ENABLED" + _NVJITLINKRESULT_INTERNAL_LOADING_ERROR "_NVJITLINKRESULT_INTERNAL_LOADING_ERROR" = -42 + +ctypedef enum nvJitLinkInputType "nvJitLinkInputType": + NVJITLINK_INPUT_NONE "NVJITLINK_INPUT_NONE" = 0 + NVJITLINK_INPUT_CUBIN "NVJITLINK_INPUT_CUBIN" = 1 + NVJITLINK_INPUT_PTX "NVJITLINK_INPUT_PTX" + NVJITLINK_INPUT_LTOIR "NVJITLINK_INPUT_LTOIR" + NVJITLINK_INPUT_FATBIN "NVJITLINK_INPUT_FATBIN" + NVJITLINK_INPUT_OBJECT "NVJITLINK_INPUT_OBJECT" + NVJITLINK_INPUT_LIBRARY "NVJITLINK_INPUT_LIBRARY" + NVJITLINK_INPUT_INDEX "NVJITLINK_INPUT_INDEX" + NVJITLINK_INPUT_ANY "NVJITLINK_INPUT_ANY" = 10 + + +# types +ctypedef void* nvJitLinkHandle 'nvJitLinkHandle' + + +############################################################################### +# Functions +############################################################################### + +cdef nvJitLinkResult nvJitLinkCreate(nvJitLinkHandle* handle, uint32_t numOptions, const char** options) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult nvJitLinkDestroy(nvJitLinkHandle* handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult nvJitLinkAddData(nvJitLinkHandle handle, nvJitLinkInputType inputType, const void* data, size_t size, const char* name) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult nvJitLinkAddFile(nvJitLinkHandle handle, nvJitLinkInputType inputType, const char* fileName) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult nvJitLinkComplete(nvJitLinkHandle handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult nvJitLinkGetLinkedCubinSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult nvJitLinkGetLinkedCubin(nvJitLinkHandle handle, void* cubin) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult nvJitLinkGetLinkedPtxSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult nvJitLinkGetLinkedPtx(nvJitLinkHandle handle, char* ptx) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult nvJitLinkGetErrorLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult nvJitLinkGetErrorLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult nvJitLinkGetInfoLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult nvJitLinkGetInfoLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult nvJitLinkVersion(unsigned int* major, unsigned int* minor) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult nvJitLinkGetLinkedLTOIRSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult nvJitLinkGetLinkedLTOIR(nvJitLinkHandle handle, void* ltoir) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/cynvml.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/cynvml.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..6f195811246eefad3fe0bd8d5d94fa6cdc0a5006 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/cynvml.cpython-312-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e8e8891eca7eb6816aa522204715a6e28de1ed5a34aea318014d04f0034447ac +size 127648 diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/cynvml.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/cynvml.pxd new file mode 100644 index 0000000000000000000000000000000000000000..780241c5a3acba139a9bc75af9abd7786e980ff2 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/cynvml.pxd @@ -0,0 +1,2752 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This code was automatically generated across versions from 12.9.1 to 13.4.1. Do not modify it directly. + + + +############################################################################### +# Types (structs, enums, ...) +############################################################################### + +# enums +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=60a5b20aeb8f2f1b807c72675995ed6bf5943e58f3b9ab24933f51d4a7246f6f +ctypedef enum nvmlBridgeChipType_t "nvmlBridgeChipType_t": + NVML_BRIDGE_CHIP_PLX "NVML_BRIDGE_CHIP_PLX" = 0 + NVML_BRIDGE_CHIP_BRO4 "NVML_BRIDGE_CHIP_BRO4" = 1 + +ctypedef enum nvmlNvLinkUtilizationCountUnits_t "nvmlNvLinkUtilizationCountUnits_t": + NVML_NVLINK_COUNTER_UNIT_CYCLES "NVML_NVLINK_COUNTER_UNIT_CYCLES" = 0 + NVML_NVLINK_COUNTER_UNIT_PACKETS "NVML_NVLINK_COUNTER_UNIT_PACKETS" = 1 + NVML_NVLINK_COUNTER_UNIT_BYTES "NVML_NVLINK_COUNTER_UNIT_BYTES" = 2 + NVML_NVLINK_COUNTER_UNIT_RESERVED "NVML_NVLINK_COUNTER_UNIT_RESERVED" = 3 + NVML_NVLINK_COUNTER_UNIT_COUNT "NVML_NVLINK_COUNTER_UNIT_COUNT" + +ctypedef enum nvmlNvLinkUtilizationCountPktTypes_t "nvmlNvLinkUtilizationCountPktTypes_t": + NVML_NVLINK_COUNTER_PKTFILTER_NOP "NVML_NVLINK_COUNTER_PKTFILTER_NOP" = 0x1 + NVML_NVLINK_COUNTER_PKTFILTER_READ "NVML_NVLINK_COUNTER_PKTFILTER_READ" = 0x2 + NVML_NVLINK_COUNTER_PKTFILTER_WRITE "NVML_NVLINK_COUNTER_PKTFILTER_WRITE" = 0x4 + NVML_NVLINK_COUNTER_PKTFILTER_RATOM "NVML_NVLINK_COUNTER_PKTFILTER_RATOM" = 0x8 + NVML_NVLINK_COUNTER_PKTFILTER_NRATOM "NVML_NVLINK_COUNTER_PKTFILTER_NRATOM" = 0x10 + NVML_NVLINK_COUNTER_PKTFILTER_FLUSH "NVML_NVLINK_COUNTER_PKTFILTER_FLUSH" = 0x20 + NVML_NVLINK_COUNTER_PKTFILTER_RESPDATA "NVML_NVLINK_COUNTER_PKTFILTER_RESPDATA" = 0x40 + NVML_NVLINK_COUNTER_PKTFILTER_RESPNODATA "NVML_NVLINK_COUNTER_PKTFILTER_RESPNODATA" = 0x80 + NVML_NVLINK_COUNTER_PKTFILTER_ALL "NVML_NVLINK_COUNTER_PKTFILTER_ALL" = 0xFF + +ctypedef enum nvmlNvLinkCapability_t "nvmlNvLinkCapability_t": + NVML_NVLINK_CAP_P2P_SUPPORTED "NVML_NVLINK_CAP_P2P_SUPPORTED" = 0 + NVML_NVLINK_CAP_SYSMEM_ACCESS "NVML_NVLINK_CAP_SYSMEM_ACCESS" = 1 + NVML_NVLINK_CAP_P2P_ATOMICS "NVML_NVLINK_CAP_P2P_ATOMICS" = 2 + NVML_NVLINK_CAP_SYSMEM_ATOMICS "NVML_NVLINK_CAP_SYSMEM_ATOMICS" = 3 + NVML_NVLINK_CAP_SLI_BRIDGE "NVML_NVLINK_CAP_SLI_BRIDGE" = 4 + NVML_NVLINK_CAP_VALID "NVML_NVLINK_CAP_VALID" = 5 + NVML_NVLINK_CAP_COUNT "NVML_NVLINK_CAP_COUNT" + +ctypedef enum nvmlNvLinkErrorCounter_t "nvmlNvLinkErrorCounter_t": + NVML_NVLINK_ERROR_DL_REPLAY "NVML_NVLINK_ERROR_DL_REPLAY" = 0 + NVML_NVLINK_ERROR_DL_RECOVERY "NVML_NVLINK_ERROR_DL_RECOVERY" = 1 + NVML_NVLINK_ERROR_DL_CRC_FLIT "NVML_NVLINK_ERROR_DL_CRC_FLIT" = 2 + NVML_NVLINK_ERROR_DL_CRC_DATA "NVML_NVLINK_ERROR_DL_CRC_DATA" = 3 + NVML_NVLINK_ERROR_DL_ECC_DATA "NVML_NVLINK_ERROR_DL_ECC_DATA" = 4 + NVML_NVLINK_ERROR_COUNT "NVML_NVLINK_ERROR_COUNT" + +ctypedef enum nvmlIntNvLinkDeviceType_t "nvmlIntNvLinkDeviceType_t": + NVML_NVLINK_DEVICE_TYPE_GPU "NVML_NVLINK_DEVICE_TYPE_GPU" = 0x00 + NVML_NVLINK_DEVICE_TYPE_IBMNPU "NVML_NVLINK_DEVICE_TYPE_IBMNPU" = 0x01 + NVML_NVLINK_DEVICE_TYPE_SWITCH "NVML_NVLINK_DEVICE_TYPE_SWITCH" = 0x02 + NVML_NVLINK_DEVICE_TYPE_UNKNOWN "NVML_NVLINK_DEVICE_TYPE_UNKNOWN" = 0xFF + +ctypedef enum nvmlGpuTopologyLevel_t "nvmlGpuTopologyLevel_t": + NVML_TOPOLOGY_INTERNAL "NVML_TOPOLOGY_INTERNAL" = 0 + NVML_TOPOLOGY_SINGLE "NVML_TOPOLOGY_SINGLE" = 10 + NVML_TOPOLOGY_MULTIPLE "NVML_TOPOLOGY_MULTIPLE" = 20 + NVML_TOPOLOGY_HOSTBRIDGE "NVML_TOPOLOGY_HOSTBRIDGE" = 30 + NVML_TOPOLOGY_NODE "NVML_TOPOLOGY_NODE" = 40 + NVML_TOPOLOGY_SYSTEM "NVML_TOPOLOGY_SYSTEM" = 50 + +ctypedef enum nvmlGpuP2PStatus_t "nvmlGpuP2PStatus_t": + NVML_P2P_STATUS_OK "NVML_P2P_STATUS_OK" = 0 + NVML_P2P_STATUS_CHIPSET_NOT_SUPPORED "NVML_P2P_STATUS_CHIPSET_NOT_SUPPORED" + NVML_P2P_STATUS_CHIPSET_NOT_SUPPORTED "NVML_P2P_STATUS_CHIPSET_NOT_SUPPORTED" = NVML_P2P_STATUS_CHIPSET_NOT_SUPPORED + NVML_P2P_STATUS_GPU_NOT_SUPPORTED "NVML_P2P_STATUS_GPU_NOT_SUPPORTED" + NVML_P2P_STATUS_IOH_TOPOLOGY_NOT_SUPPORTED "NVML_P2P_STATUS_IOH_TOPOLOGY_NOT_SUPPORTED" + NVML_P2P_STATUS_DISABLED_BY_REGKEY "NVML_P2P_STATUS_DISABLED_BY_REGKEY" + NVML_P2P_STATUS_NOT_SUPPORTED "NVML_P2P_STATUS_NOT_SUPPORTED" + NVML_P2P_STATUS_UNKNOWN "NVML_P2P_STATUS_UNKNOWN" + +ctypedef enum nvmlGpuP2PCapsIndex_t "nvmlGpuP2PCapsIndex_t": + NVML_P2P_CAPS_INDEX_READ "NVML_P2P_CAPS_INDEX_READ" = 0 + NVML_P2P_CAPS_INDEX_WRITE "NVML_P2P_CAPS_INDEX_WRITE" = 1 + NVML_P2P_CAPS_INDEX_NVLINK "NVML_P2P_CAPS_INDEX_NVLINK" = 2 + NVML_P2P_CAPS_INDEX_ATOMICS "NVML_P2P_CAPS_INDEX_ATOMICS" = 3 + NVML_P2P_CAPS_INDEX_PCI "NVML_P2P_CAPS_INDEX_PCI" = 4 + NVML_P2P_CAPS_INDEX_PROP "NVML_P2P_CAPS_INDEX_PROP" = NVML_P2P_CAPS_INDEX_PCI + NVML_P2P_CAPS_INDEX_UNKNOWN "NVML_P2P_CAPS_INDEX_UNKNOWN" = 5 + +ctypedef enum nvmlSamplingType_t "nvmlSamplingType_t": + NVML_TOTAL_POWER_SAMPLES "NVML_TOTAL_POWER_SAMPLES" = 0 + NVML_GPU_UTILIZATION_SAMPLES "NVML_GPU_UTILIZATION_SAMPLES" = 1 + NVML_MEMORY_UTILIZATION_SAMPLES "NVML_MEMORY_UTILIZATION_SAMPLES" = 2 + NVML_ENC_UTILIZATION_SAMPLES "NVML_ENC_UTILIZATION_SAMPLES" = 3 + NVML_DEC_UTILIZATION_SAMPLES "NVML_DEC_UTILIZATION_SAMPLES" = 4 + NVML_PROCESSOR_CLK_SAMPLES "NVML_PROCESSOR_CLK_SAMPLES" = 5 + NVML_MEMORY_CLK_SAMPLES "NVML_MEMORY_CLK_SAMPLES" = 6 + NVML_MODULE_POWER_SAMPLES "NVML_MODULE_POWER_SAMPLES" = 7 + NVML_JPG_UTILIZATION_SAMPLES "NVML_JPG_UTILIZATION_SAMPLES" = 8 + NVML_OFA_UTILIZATION_SAMPLES "NVML_OFA_UTILIZATION_SAMPLES" = 9 + NVML_SAMPLINGTYPE_COUNT "NVML_SAMPLINGTYPE_COUNT" + +ctypedef enum nvmlPcieUtilCounter_t "nvmlPcieUtilCounter_t": + NVML_PCIE_UTIL_TX_BYTES "NVML_PCIE_UTIL_TX_BYTES" = 0 + NVML_PCIE_UTIL_RX_BYTES "NVML_PCIE_UTIL_RX_BYTES" = 1 + NVML_PCIE_UTIL_COUNT "NVML_PCIE_UTIL_COUNT" + +ctypedef enum nvmlValueType_t "nvmlValueType_t": + NVML_VALUE_TYPE_DOUBLE "NVML_VALUE_TYPE_DOUBLE" = 0 + NVML_VALUE_TYPE_UNSIGNED_INT "NVML_VALUE_TYPE_UNSIGNED_INT" = 1 + NVML_VALUE_TYPE_UNSIGNED_LONG "NVML_VALUE_TYPE_UNSIGNED_LONG" = 2 + NVML_VALUE_TYPE_UNSIGNED_LONG_LONG "NVML_VALUE_TYPE_UNSIGNED_LONG_LONG" = 3 + NVML_VALUE_TYPE_SIGNED_LONG_LONG "NVML_VALUE_TYPE_SIGNED_LONG_LONG" = 4 + NVML_VALUE_TYPE_SIGNED_INT "NVML_VALUE_TYPE_SIGNED_INT" = 5 + NVML_VALUE_TYPE_UNSIGNED_SHORT "NVML_VALUE_TYPE_UNSIGNED_SHORT" = 6 + NVML_VALUE_TYPE_COUNT "NVML_VALUE_TYPE_COUNT" + +ctypedef enum nvmlPerfPolicyType_t "nvmlPerfPolicyType_t": + NVML_PERF_POLICY_POWER "NVML_PERF_POLICY_POWER" = 0 + NVML_PERF_POLICY_THERMAL "NVML_PERF_POLICY_THERMAL" = 1 + NVML_PERF_POLICY_SYNC_BOOST "NVML_PERF_POLICY_SYNC_BOOST" = 2 + NVML_PERF_POLICY_BOARD_LIMIT "NVML_PERF_POLICY_BOARD_LIMIT" = 3 + NVML_PERF_POLICY_LOW_UTILIZATION "NVML_PERF_POLICY_LOW_UTILIZATION" = 4 + NVML_PERF_POLICY_RELIABILITY "NVML_PERF_POLICY_RELIABILITY" = 5 + NVML_PERF_POLICY_TOTAL_APP_CLOCKS "NVML_PERF_POLICY_TOTAL_APP_CLOCKS" = 10 + NVML_PERF_POLICY_TOTAL_BASE_CLOCKS "NVML_PERF_POLICY_TOTAL_BASE_CLOCKS" = 11 + NVML_PERF_POLICY_COUNT "NVML_PERF_POLICY_COUNT" + +ctypedef enum nvmlThermalTarget_t "nvmlThermalTarget_t": + NVML_THERMAL_TARGET_NONE "NVML_THERMAL_TARGET_NONE" = 0 + NVML_THERMAL_TARGET_GPU "NVML_THERMAL_TARGET_GPU" = 1 + NVML_THERMAL_TARGET_MEMORY "NVML_THERMAL_TARGET_MEMORY" = 2 + NVML_THERMAL_TARGET_POWER_SUPPLY "NVML_THERMAL_TARGET_POWER_SUPPLY" = 4 + NVML_THERMAL_TARGET_BOARD "NVML_THERMAL_TARGET_BOARD" = 8 + NVML_THERMAL_TARGET_VCD_BOARD "NVML_THERMAL_TARGET_VCD_BOARD" = 9 + NVML_THERMAL_TARGET_VCD_INLET "NVML_THERMAL_TARGET_VCD_INLET" = 10 + NVML_THERMAL_TARGET_VCD_OUTLET "NVML_THERMAL_TARGET_VCD_OUTLET" = 11 + NVML_THERMAL_TARGET_ALL "NVML_THERMAL_TARGET_ALL" = 15 + NVML_THERMAL_TARGET_UNKNOWN "NVML_THERMAL_TARGET_UNKNOWN" = -(1) + +ctypedef enum nvmlThermalController_t "nvmlThermalController_t": + NVML_THERMAL_CONTROLLER_NONE "NVML_THERMAL_CONTROLLER_NONE" = 0 + NVML_THERMAL_CONTROLLER_GPU_INTERNAL "NVML_THERMAL_CONTROLLER_GPU_INTERNAL" + NVML_THERMAL_CONTROLLER_ADM1032 "NVML_THERMAL_CONTROLLER_ADM1032" + NVML_THERMAL_CONTROLLER_ADT7461 "NVML_THERMAL_CONTROLLER_ADT7461" + NVML_THERMAL_CONTROLLER_MAX6649 "NVML_THERMAL_CONTROLLER_MAX6649" + NVML_THERMAL_CONTROLLER_MAX1617 "NVML_THERMAL_CONTROLLER_MAX1617" + NVML_THERMAL_CONTROLLER_LM99 "NVML_THERMAL_CONTROLLER_LM99" + NVML_THERMAL_CONTROLLER_LM89 "NVML_THERMAL_CONTROLLER_LM89" + NVML_THERMAL_CONTROLLER_LM64 "NVML_THERMAL_CONTROLLER_LM64" + NVML_THERMAL_CONTROLLER_G781 "NVML_THERMAL_CONTROLLER_G781" + NVML_THERMAL_CONTROLLER_ADT7473 "NVML_THERMAL_CONTROLLER_ADT7473" + NVML_THERMAL_CONTROLLER_SBMAX6649 "NVML_THERMAL_CONTROLLER_SBMAX6649" + NVML_THERMAL_CONTROLLER_VBIOSEVT "NVML_THERMAL_CONTROLLER_VBIOSEVT" + NVML_THERMAL_CONTROLLER_OS "NVML_THERMAL_CONTROLLER_OS" + NVML_THERMAL_CONTROLLER_NVSYSCON_CANOAS "NVML_THERMAL_CONTROLLER_NVSYSCON_CANOAS" + NVML_THERMAL_CONTROLLER_NVSYSCON_E551 "NVML_THERMAL_CONTROLLER_NVSYSCON_E551" + NVML_THERMAL_CONTROLLER_MAX6649R "NVML_THERMAL_CONTROLLER_MAX6649R" + NVML_THERMAL_CONTROLLER_ADT7473S "NVML_THERMAL_CONTROLLER_ADT7473S" + NVML_THERMAL_CONTROLLER_UNKNOWN "NVML_THERMAL_CONTROLLER_UNKNOWN" = -(1) + +ctypedef enum nvmlCoolerControl_t "nvmlCoolerControl_t": + NVML_THERMAL_COOLER_SIGNAL_NONE "NVML_THERMAL_COOLER_SIGNAL_NONE" = 0 + NVML_THERMAL_COOLER_SIGNAL_TOGGLE "NVML_THERMAL_COOLER_SIGNAL_TOGGLE" = 1 + NVML_THERMAL_COOLER_SIGNAL_VARIABLE "NVML_THERMAL_COOLER_SIGNAL_VARIABLE" = 2 + NVML_THERMAL_COOLER_SIGNAL_COUNT "NVML_THERMAL_COOLER_SIGNAL_COUNT" + +ctypedef enum nvmlCoolerTarget_t "nvmlCoolerTarget_t": + NVML_THERMAL_COOLER_TARGET_NONE "NVML_THERMAL_COOLER_TARGET_NONE" = (1 << 0) + NVML_THERMAL_COOLER_TARGET_GPU "NVML_THERMAL_COOLER_TARGET_GPU" = (1 << 1) + NVML_THERMAL_COOLER_TARGET_MEMORY "NVML_THERMAL_COOLER_TARGET_MEMORY" = (1 << 2) + NVML_THERMAL_COOLER_TARGET_POWER_SUPPLY "NVML_THERMAL_COOLER_TARGET_POWER_SUPPLY" = (1 << 3) + NVML_THERMAL_COOLER_TARGET_GPU_RELATED "NVML_THERMAL_COOLER_TARGET_GPU_RELATED" = ((NVML_THERMAL_COOLER_TARGET_GPU | NVML_THERMAL_COOLER_TARGET_MEMORY) | NVML_THERMAL_COOLER_TARGET_POWER_SUPPLY) + +ctypedef enum nvmlUUIDType_t "nvmlUUIDType_t": + NVML_UUID_TYPE_NONE "NVML_UUID_TYPE_NONE" = 0 + NVML_UUID_TYPE_ASCII "NVML_UUID_TYPE_ASCII" = 1 + NVML_UUID_TYPE_BINARY "NVML_UUID_TYPE_BINARY" = 2 + +ctypedef enum nvmlEnableState_t "nvmlEnableState_t": + NVML_FEATURE_DISABLED "NVML_FEATURE_DISABLED" = 0 + NVML_FEATURE_ENABLED "NVML_FEATURE_ENABLED" = 1 + +ctypedef enum nvmlBrandType_t "nvmlBrandType_t": + NVML_BRAND_UNKNOWN "NVML_BRAND_UNKNOWN" = 0 + NVML_BRAND_QUADRO "NVML_BRAND_QUADRO" = 1 + NVML_BRAND_TESLA "NVML_BRAND_TESLA" = 2 + NVML_BRAND_NVS "NVML_BRAND_NVS" = 3 + NVML_BRAND_GRID "NVML_BRAND_GRID" = 4 + NVML_BRAND_GEFORCE "NVML_BRAND_GEFORCE" = 5 + NVML_BRAND_TITAN "NVML_BRAND_TITAN" = 6 + NVML_BRAND_NVIDIA_VAPPS "NVML_BRAND_NVIDIA_VAPPS" = 7 + NVML_BRAND_NVIDIA_VPC "NVML_BRAND_NVIDIA_VPC" = 8 + NVML_BRAND_NVIDIA_VCS "NVML_BRAND_NVIDIA_VCS" = 9 + NVML_BRAND_NVIDIA_VWS "NVML_BRAND_NVIDIA_VWS" = 10 + NVML_BRAND_NVIDIA_CLOUD_GAMING "NVML_BRAND_NVIDIA_CLOUD_GAMING" = 11 + NVML_BRAND_NVIDIA_VGAMING "NVML_BRAND_NVIDIA_VGAMING" = NVML_BRAND_NVIDIA_CLOUD_GAMING + NVML_BRAND_QUADRO_RTX "NVML_BRAND_QUADRO_RTX" = 12 + NVML_BRAND_NVIDIA_RTX "NVML_BRAND_NVIDIA_RTX" = 13 + NVML_BRAND_NVIDIA "NVML_BRAND_NVIDIA" = 14 + NVML_BRAND_GEFORCE_RTX "NVML_BRAND_GEFORCE_RTX" = 15 + NVML_BRAND_TITAN_RTX "NVML_BRAND_TITAN_RTX" = 16 + NVML_BRAND_NVIDIA_DLA "NVML_BRAND_NVIDIA_DLA" = 17 + NVML_BRAND_NVIDIA_VGAMEDEV "NVML_BRAND_NVIDIA_VGAMEDEV" = 18 + NVML_BRAND_NVIDIA_NPU "NVML_BRAND_NVIDIA_NPU" = 19 + NVML_BRAND_COUNT "NVML_BRAND_COUNT" = 20 + +ctypedef enum nvmlTemperatureThresholds_t "nvmlTemperatureThresholds_t": + NVML_TEMPERATURE_THRESHOLD_SHUTDOWN "NVML_TEMPERATURE_THRESHOLD_SHUTDOWN" = 0 + NVML_TEMPERATURE_THRESHOLD_SLOWDOWN "NVML_TEMPERATURE_THRESHOLD_SLOWDOWN" = 1 + NVML_TEMPERATURE_THRESHOLD_MEM_MAX "NVML_TEMPERATURE_THRESHOLD_MEM_MAX" = 2 + NVML_TEMPERATURE_THRESHOLD_GPU_MAX "NVML_TEMPERATURE_THRESHOLD_GPU_MAX" = 3 + NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_MIN "NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_MIN" = 4 + NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_CURR "NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_CURR" = 5 + NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_MAX "NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_MAX" = 6 + NVML_TEMPERATURE_THRESHOLD_GPS_CURR "NVML_TEMPERATURE_THRESHOLD_GPS_CURR" = 7 + NVML_TEMPERATURE_THRESHOLD_COUNT "NVML_TEMPERATURE_THRESHOLD_COUNT" + +ctypedef enum nvmlTemperatureSensors_t "nvmlTemperatureSensors_t": + NVML_TEMPERATURE_GPU "NVML_TEMPERATURE_GPU" = 0 + NVML_TEMPERATURE_GPU_MAX "NVML_TEMPERATURE_GPU_MAX" = 1 + NVML_TEMPERATURE_COUNT "NVML_TEMPERATURE_COUNT" + +ctypedef enum nvmlComputeMode_t "nvmlComputeMode_t": + NVML_COMPUTEMODE_DEFAULT "NVML_COMPUTEMODE_DEFAULT" = 0 + NVML_COMPUTEMODE_EXCLUSIVE_THREAD "NVML_COMPUTEMODE_EXCLUSIVE_THREAD" = 1 + NVML_COMPUTEMODE_PROHIBITED "NVML_COMPUTEMODE_PROHIBITED" = 2 + NVML_COMPUTEMODE_EXCLUSIVE_PROCESS "NVML_COMPUTEMODE_EXCLUSIVE_PROCESS" = 3 + NVML_COMPUTEMODE_COUNT "NVML_COMPUTEMODE_COUNT" + +ctypedef enum nvmlMemoryErrorType_t "nvmlMemoryErrorType_t": + NVML_MEMORY_ERROR_TYPE_CORRECTED "NVML_MEMORY_ERROR_TYPE_CORRECTED" = 0 + NVML_MEMORY_ERROR_TYPE_UNCORRECTED "NVML_MEMORY_ERROR_TYPE_UNCORRECTED" = 1 + NVML_MEMORY_ERROR_TYPE_COUNT "NVML_MEMORY_ERROR_TYPE_COUNT" + +ctypedef enum nvmlNvlinkVersion_t "nvmlNvlinkVersion_t": + NVML_NVLINK_VERSION_INVALID "NVML_NVLINK_VERSION_INVALID" = 0 + NVML_NVLINK_VERSION_1_0 "NVML_NVLINK_VERSION_1_0" = 1 + NVML_NVLINK_VERSION_2_0 "NVML_NVLINK_VERSION_2_0" = 2 + NVML_NVLINK_VERSION_2_2 "NVML_NVLINK_VERSION_2_2" = 3 + NVML_NVLINK_VERSION_3_0 "NVML_NVLINK_VERSION_3_0" = 4 + NVML_NVLINK_VERSION_3_1 "NVML_NVLINK_VERSION_3_1" = 5 + NVML_NVLINK_VERSION_4_0 "NVML_NVLINK_VERSION_4_0" = 6 + NVML_NVLINK_VERSION_5_0 "NVML_NVLINK_VERSION_5_0" = 7 + NVML_NVLINK_VERSION_6_0 "NVML_NVLINK_VERSION_6_0" = 8 + +ctypedef enum nvmlEccCounterType_t "nvmlEccCounterType_t": + NVML_VOLATILE_ECC "NVML_VOLATILE_ECC" = 0 + NVML_AGGREGATE_ECC "NVML_AGGREGATE_ECC" = 1 + NVML_ECC_COUNTER_TYPE_COUNT "NVML_ECC_COUNTER_TYPE_COUNT" + +ctypedef enum nvmlClockType_t "nvmlClockType_t": + NVML_CLOCK_GRAPHICS "NVML_CLOCK_GRAPHICS" = 0 + NVML_CLOCK_SM "NVML_CLOCK_SM" = 1 + NVML_CLOCK_MEM "NVML_CLOCK_MEM" = 2 + NVML_CLOCK_VIDEO "NVML_CLOCK_VIDEO" = 3 + NVML_CLOCK_COUNT "NVML_CLOCK_COUNT" + +ctypedef enum nvmlClockId_t "nvmlClockId_t": + NVML_CLOCK_ID_CURRENT "NVML_CLOCK_ID_CURRENT" = 0 + NVML_CLOCK_ID_APP_CLOCK_TARGET "NVML_CLOCK_ID_APP_CLOCK_TARGET" = 1 + NVML_CLOCK_ID_APP_CLOCK_DEFAULT "NVML_CLOCK_ID_APP_CLOCK_DEFAULT" = 2 + NVML_CLOCK_ID_CUSTOMER_BOOST_MAX "NVML_CLOCK_ID_CUSTOMER_BOOST_MAX" = 3 + NVML_CLOCK_ID_COUNT "NVML_CLOCK_ID_COUNT" + +ctypedef enum nvmlDriverModel_t "nvmlDriverModel_t": + NVML_DRIVER_WDDM "NVML_DRIVER_WDDM" = 0 + NVML_DRIVER_WDM "NVML_DRIVER_WDM" = 1 + NVML_DRIVER_MCDM "NVML_DRIVER_MCDM" = 2 + +ctypedef enum nvmlPstates_t "nvmlPstates_t": + NVML_PSTATE_0 "NVML_PSTATE_0" = 0 + NVML_PSTATE_1 "NVML_PSTATE_1" = 1 + NVML_PSTATE_2 "NVML_PSTATE_2" = 2 + NVML_PSTATE_3 "NVML_PSTATE_3" = 3 + NVML_PSTATE_4 "NVML_PSTATE_4" = 4 + NVML_PSTATE_5 "NVML_PSTATE_5" = 5 + NVML_PSTATE_6 "NVML_PSTATE_6" = 6 + NVML_PSTATE_7 "NVML_PSTATE_7" = 7 + NVML_PSTATE_8 "NVML_PSTATE_8" = 8 + NVML_PSTATE_9 "NVML_PSTATE_9" = 9 + NVML_PSTATE_10 "NVML_PSTATE_10" = 10 + NVML_PSTATE_11 "NVML_PSTATE_11" = 11 + NVML_PSTATE_12 "NVML_PSTATE_12" = 12 + NVML_PSTATE_13 "NVML_PSTATE_13" = 13 + NVML_PSTATE_14 "NVML_PSTATE_14" = 14 + NVML_PSTATE_15 "NVML_PSTATE_15" = 15 + NVML_PSTATE_UNKNOWN "NVML_PSTATE_UNKNOWN" = 32 + +ctypedef enum nvmlGpuOperationMode_t "nvmlGpuOperationMode_t": + NVML_GOM_ALL_ON "NVML_GOM_ALL_ON" = 0 + NVML_GOM_COMPUTE "NVML_GOM_COMPUTE" = 1 + NVML_GOM_LOW_DP "NVML_GOM_LOW_DP" = 2 + +ctypedef enum nvmlInforomObject_t "nvmlInforomObject_t": + NVML_INFOROM_OEM "NVML_INFOROM_OEM" = 0 + NVML_INFOROM_ECC "NVML_INFOROM_ECC" = 1 + NVML_INFOROM_POWER "NVML_INFOROM_POWER" = 2 + NVML_INFOROM_DEN "NVML_INFOROM_DEN" = 3 + NVML_INFOROM_COUNT "NVML_INFOROM_COUNT" + +ctypedef enum nvmlReturn_t "nvmlReturn_t": + NVML_SUCCESS "NVML_SUCCESS" = 0 + NVML_ERROR_UNINITIALIZED "NVML_ERROR_UNINITIALIZED" = 1 + NVML_ERROR_INVALID_ARGUMENT "NVML_ERROR_INVALID_ARGUMENT" = 2 + NVML_ERROR_NOT_SUPPORTED "NVML_ERROR_NOT_SUPPORTED" = 3 + NVML_ERROR_NO_PERMISSION "NVML_ERROR_NO_PERMISSION" = 4 + NVML_ERROR_ALREADY_INITIALIZED "NVML_ERROR_ALREADY_INITIALIZED" = 5 + NVML_ERROR_NOT_FOUND "NVML_ERROR_NOT_FOUND" = 6 + NVML_ERROR_INSUFFICIENT_SIZE "NVML_ERROR_INSUFFICIENT_SIZE" = 7 + NVML_ERROR_INSUFFICIENT_POWER "NVML_ERROR_INSUFFICIENT_POWER" = 8 + NVML_ERROR_DRIVER_NOT_LOADED "NVML_ERROR_DRIVER_NOT_LOADED" = 9 + NVML_ERROR_TIMEOUT "NVML_ERROR_TIMEOUT" = 10 + NVML_ERROR_IRQ_ISSUE "NVML_ERROR_IRQ_ISSUE" = 11 + NVML_ERROR_LIBRARY_NOT_FOUND "NVML_ERROR_LIBRARY_NOT_FOUND" = 12 + NVML_ERROR_FUNCTION_NOT_FOUND "NVML_ERROR_FUNCTION_NOT_FOUND" = 13 + NVML_ERROR_CORRUPTED_INFOROM "NVML_ERROR_CORRUPTED_INFOROM" = 14 + NVML_ERROR_GPU_IS_LOST "NVML_ERROR_GPU_IS_LOST" = 15 + NVML_ERROR_RESET_REQUIRED "NVML_ERROR_RESET_REQUIRED" = 16 + NVML_ERROR_OPERATING_SYSTEM "NVML_ERROR_OPERATING_SYSTEM" = 17 + NVML_ERROR_LIB_RM_VERSION_MISMATCH "NVML_ERROR_LIB_RM_VERSION_MISMATCH" = 18 + NVML_ERROR_IN_USE "NVML_ERROR_IN_USE" = 19 + NVML_ERROR_MEMORY "NVML_ERROR_MEMORY" = 20 + NVML_ERROR_NO_DATA "NVML_ERROR_NO_DATA" = 21 + NVML_ERROR_VGPU_ECC_NOT_SUPPORTED "NVML_ERROR_VGPU_ECC_NOT_SUPPORTED" = 22 + NVML_ERROR_INSUFFICIENT_RESOURCES "NVML_ERROR_INSUFFICIENT_RESOURCES" = 23 + NVML_ERROR_FREQ_NOT_SUPPORTED "NVML_ERROR_FREQ_NOT_SUPPORTED" = 24 + NVML_ERROR_ARGUMENT_VERSION_MISMATCH "NVML_ERROR_ARGUMENT_VERSION_MISMATCH" = 25 + NVML_ERROR_DEPRECATED "NVML_ERROR_DEPRECATED" = 26 + NVML_ERROR_NOT_READY "NVML_ERROR_NOT_READY" = 27 + NVML_ERROR_GPU_NOT_FOUND "NVML_ERROR_GPU_NOT_FOUND" = 28 + NVML_ERROR_INVALID_STATE "NVML_ERROR_INVALID_STATE" = 29 + NVML_ERROR_RESET_TYPE_NOT_SUPPORTED "NVML_ERROR_RESET_TYPE_NOT_SUPPORTED" = 30 + NVML_ERROR_UNKNOWN "NVML_ERROR_UNKNOWN" = 999 + _NVMLRETURN_T_INTERNAL_LOADING_ERROR "_NVMLRETURN_T_INTERNAL_LOADING_ERROR" = -42 + +ctypedef enum nvmlMemoryLocation_t "nvmlMemoryLocation_t": + NVML_MEMORY_LOCATION_L1_CACHE "NVML_MEMORY_LOCATION_L1_CACHE" = 0 + NVML_MEMORY_LOCATION_L2_CACHE "NVML_MEMORY_LOCATION_L2_CACHE" = 1 + NVML_MEMORY_LOCATION_DRAM "NVML_MEMORY_LOCATION_DRAM" = 2 + NVML_MEMORY_LOCATION_DEVICE_MEMORY "NVML_MEMORY_LOCATION_DEVICE_MEMORY" = 2 + NVML_MEMORY_LOCATION_REGISTER_FILE "NVML_MEMORY_LOCATION_REGISTER_FILE" = 3 + NVML_MEMORY_LOCATION_TEXTURE_MEMORY "NVML_MEMORY_LOCATION_TEXTURE_MEMORY" = 4 + NVML_MEMORY_LOCATION_TEXTURE_SHM "NVML_MEMORY_LOCATION_TEXTURE_SHM" = 5 + NVML_MEMORY_LOCATION_CBU "NVML_MEMORY_LOCATION_CBU" = 6 + NVML_MEMORY_LOCATION_SRAM "NVML_MEMORY_LOCATION_SRAM" = 7 + NVML_MEMORY_LOCATION_COUNT "NVML_MEMORY_LOCATION_COUNT" + +ctypedef enum nvmlPageRetirementCause_t "nvmlPageRetirementCause_t": + NVML_PAGE_RETIREMENT_CAUSE_MULTIPLE_SINGLE_BIT_ECC_ERRORS "NVML_PAGE_RETIREMENT_CAUSE_MULTIPLE_SINGLE_BIT_ECC_ERRORS" = 0 + NVML_PAGE_RETIREMENT_CAUSE_DOUBLE_BIT_ECC_ERROR "NVML_PAGE_RETIREMENT_CAUSE_DOUBLE_BIT_ECC_ERROR" = 1 + NVML_PAGE_RETIREMENT_CAUSE_COUNT "NVML_PAGE_RETIREMENT_CAUSE_COUNT" + +ctypedef enum nvmlRestrictedAPI_t "nvmlRestrictedAPI_t": + NVML_RESTRICTED_API_SET_APPLICATION_CLOCKS "NVML_RESTRICTED_API_SET_APPLICATION_CLOCKS" = 0 + NVML_RESTRICTED_API_SET_AUTO_BOOSTED_CLOCKS "NVML_RESTRICTED_API_SET_AUTO_BOOSTED_CLOCKS" = 1 + NVML_RESTRICTED_API_COUNT "NVML_RESTRICTED_API_COUNT" + +ctypedef enum nvmlGpuUtilizationDomainId_t "nvmlGpuUtilizationDomainId_t": + NVML_GPU_UTILIZATION_DOMAIN_GPU "NVML_GPU_UTILIZATION_DOMAIN_GPU" = 0 + NVML_GPU_UTILIZATION_DOMAIN_FB "NVML_GPU_UTILIZATION_DOMAIN_FB" = 1 + NVML_GPU_UTILIZATION_DOMAIN_VID "NVML_GPU_UTILIZATION_DOMAIN_VID" = 2 + NVML_GPU_UTILIZATION_DOMAIN_BUS "NVML_GPU_UTILIZATION_DOMAIN_BUS" = 3 + +ctypedef enum nvmlGpuVirtualizationMode_t "nvmlGpuVirtualizationMode_t": + NVML_GPU_VIRTUALIZATION_MODE_NONE "NVML_GPU_VIRTUALIZATION_MODE_NONE" = 0 + NVML_GPU_VIRTUALIZATION_MODE_PASSTHROUGH "NVML_GPU_VIRTUALIZATION_MODE_PASSTHROUGH" = 1 + NVML_GPU_VIRTUALIZATION_MODE_VGPU "NVML_GPU_VIRTUALIZATION_MODE_VGPU" = 2 + NVML_GPU_VIRTUALIZATION_MODE_HOST_VGPU "NVML_GPU_VIRTUALIZATION_MODE_HOST_VGPU" = 3 + NVML_GPU_VIRTUALIZATION_MODE_HOST_VSGA "NVML_GPU_VIRTUALIZATION_MODE_HOST_VSGA" = 4 + +ctypedef enum nvmlHostVgpuMode_t "nvmlHostVgpuMode_t": + NVML_HOST_VGPU_MODE_NON_SRIOV "NVML_HOST_VGPU_MODE_NON_SRIOV" = 0 + NVML_HOST_VGPU_MODE_SRIOV "NVML_HOST_VGPU_MODE_SRIOV" = 1 + +ctypedef enum nvmlVgpuVmIdType_t "nvmlVgpuVmIdType_t": + NVML_VGPU_VM_ID_DOMAIN_ID "NVML_VGPU_VM_ID_DOMAIN_ID" = 0 + NVML_VGPU_VM_ID_UUID "NVML_VGPU_VM_ID_UUID" = 1 + +ctypedef enum nvmlVgpuGuestInfoState_t "nvmlVgpuGuestInfoState_t": + NVML_VGPU_INSTANCE_GUEST_INFO_STATE_UNINITIALIZED "NVML_VGPU_INSTANCE_GUEST_INFO_STATE_UNINITIALIZED" = 0 + NVML_VGPU_INSTANCE_GUEST_INFO_STATE_INITIALIZED "NVML_VGPU_INSTANCE_GUEST_INFO_STATE_INITIALIZED" = 1 + +ctypedef enum nvmlGridLicenseFeatureCode_t "nvmlGridLicenseFeatureCode_t": + NVML_GRID_LICENSE_FEATURE_CODE_UNKNOWN "NVML_GRID_LICENSE_FEATURE_CODE_UNKNOWN" = 0 + NVML_GRID_LICENSE_FEATURE_CODE_VGPU "NVML_GRID_LICENSE_FEATURE_CODE_VGPU" = 1 + NVML_GRID_LICENSE_FEATURE_CODE_NVIDIA_RTX "NVML_GRID_LICENSE_FEATURE_CODE_NVIDIA_RTX" = 2 + NVML_GRID_LICENSE_FEATURE_CODE_VWORKSTATION "NVML_GRID_LICENSE_FEATURE_CODE_VWORKSTATION" = NVML_GRID_LICENSE_FEATURE_CODE_NVIDIA_RTX + NVML_GRID_LICENSE_FEATURE_CODE_GAMING "NVML_GRID_LICENSE_FEATURE_CODE_GAMING" = 3 + NVML_GRID_LICENSE_FEATURE_CODE_COMPUTE "NVML_GRID_LICENSE_FEATURE_CODE_COMPUTE" = 4 + NVML_GRID_LICENSE_FEATURE_CODE_VGAMEDEV "NVML_GRID_LICENSE_FEATURE_CODE_VGAMEDEV" = 5 + +ctypedef enum nvmlVgpuCapability_t "nvmlVgpuCapability_t": + NVML_VGPU_CAP_NVLINK_P2P "NVML_VGPU_CAP_NVLINK_P2P" = 0 + NVML_VGPU_CAP_GPUDIRECT "NVML_VGPU_CAP_GPUDIRECT" = 1 + NVML_VGPU_CAP_MULTI_VGPU_EXCLUSIVE "NVML_VGPU_CAP_MULTI_VGPU_EXCLUSIVE" = 2 + NVML_VGPU_CAP_EXCLUSIVE_TYPE "NVML_VGPU_CAP_EXCLUSIVE_TYPE" = 3 + NVML_VGPU_CAP_EXCLUSIVE_SIZE "NVML_VGPU_CAP_EXCLUSIVE_SIZE" = 4 + NVML_VGPU_CAP_COUNT "NVML_VGPU_CAP_COUNT" + +ctypedef enum nvmlVgpuDriverCapability_t "nvmlVgpuDriverCapability_t": + NVML_VGPU_DRIVER_CAP_HETEROGENEOUS_MULTI_VGPU "NVML_VGPU_DRIVER_CAP_HETEROGENEOUS_MULTI_VGPU" = 0 + NVML_VGPU_DRIVER_CAP_WARM_UPDATE "NVML_VGPU_DRIVER_CAP_WARM_UPDATE" = 1 + NVML_VGPU_DRIVER_CAP_COUNT "NVML_VGPU_DRIVER_CAP_COUNT" + +ctypedef enum nvmlDeviceVgpuCapability_t "nvmlDeviceVgpuCapability_t": + NVML_DEVICE_VGPU_CAP_FRACTIONAL_MULTI_VGPU "NVML_DEVICE_VGPU_CAP_FRACTIONAL_MULTI_VGPU" = 0 + NVML_DEVICE_VGPU_CAP_HETEROGENEOUS_TIMESLICE_PROFILES "NVML_DEVICE_VGPU_CAP_HETEROGENEOUS_TIMESLICE_PROFILES" = 1 + NVML_DEVICE_VGPU_CAP_HETEROGENEOUS_TIMESLICE_SIZES "NVML_DEVICE_VGPU_CAP_HETEROGENEOUS_TIMESLICE_SIZES" = 2 + NVML_DEVICE_VGPU_CAP_READ_DEVICE_BUFFER_BW "NVML_DEVICE_VGPU_CAP_READ_DEVICE_BUFFER_BW" = 3 + NVML_DEVICE_VGPU_CAP_WRITE_DEVICE_BUFFER_BW "NVML_DEVICE_VGPU_CAP_WRITE_DEVICE_BUFFER_BW" = 4 + NVML_DEVICE_VGPU_CAP_DEVICE_STREAMING "NVML_DEVICE_VGPU_CAP_DEVICE_STREAMING" = 5 + NVML_DEVICE_VGPU_CAP_MINI_QUARTER_GPU "NVML_DEVICE_VGPU_CAP_MINI_QUARTER_GPU" = 6 + NVML_DEVICE_VGPU_CAP_COMPUTE_MEDIA_ENGINE_GPU "NVML_DEVICE_VGPU_CAP_COMPUTE_MEDIA_ENGINE_GPU" = 7 + NVML_DEVICE_VGPU_CAP_WARM_UPDATE "NVML_DEVICE_VGPU_CAP_WARM_UPDATE" = 8 + NVML_DEVICE_VGPU_CAP_HOMOGENEOUS_PLACEMENTS "NVML_DEVICE_VGPU_CAP_HOMOGENEOUS_PLACEMENTS" = 9 + NVML_DEVICE_VGPU_CAP_MIG_TIMESLICING_SUPPORTED "NVML_DEVICE_VGPU_CAP_MIG_TIMESLICING_SUPPORTED" = 10 + NVML_DEVICE_VGPU_CAP_MIG_TIMESLICING_ENABLED "NVML_DEVICE_VGPU_CAP_MIG_TIMESLICING_ENABLED" = 11 + NVML_DEVICE_VGPU_CAP_COUNT "NVML_DEVICE_VGPU_CAP_COUNT" + +ctypedef enum nvmlDeviceGpuRecoveryAction_t "nvmlDeviceGpuRecoveryAction_t": + NVML_GPU_RECOVERY_ACTION_NONE "NVML_GPU_RECOVERY_ACTION_NONE" = 0 + NVML_GPU_RECOVERY_ACTION_GPU_RESET "NVML_GPU_RECOVERY_ACTION_GPU_RESET" = 1 + NVML_GPU_RECOVERY_ACTION_NODE_REBOOT "NVML_GPU_RECOVERY_ACTION_NODE_REBOOT" = 2 + NVML_GPU_RECOVERY_ACTION_DRAIN_P2P "NVML_GPU_RECOVERY_ACTION_DRAIN_P2P" = 3 + NVML_GPU_RECOVERY_ACTION_DRAIN_AND_RESET "NVML_GPU_RECOVERY_ACTION_DRAIN_AND_RESET" = 4 + NVML_GPU_RECOVERY_ACTION_RECOVER_IMEX_DOMAIN "NVML_GPU_RECOVERY_ACTION_RECOVER_IMEX_DOMAIN" = 5 + NVML_GPU_RECOVERY_ACTION_BUS_RESET "NVML_GPU_RECOVERY_ACTION_BUS_RESET" = 6 + NVML_GPU_RECOVERY_ACTION_SYSTEM_REBOOT "NVML_GPU_RECOVERY_ACTION_SYSTEM_REBOOT" = 7 + +ctypedef enum nvmlFanState_t "nvmlFanState_t": + NVML_FAN_NORMAL "NVML_FAN_NORMAL" = 0 + NVML_FAN_FAILED "NVML_FAN_FAILED" = 1 + +ctypedef enum nvmlLedColor_t "nvmlLedColor_t": + NVML_LED_COLOR_GREEN "NVML_LED_COLOR_GREEN" = 0 + NVML_LED_COLOR_AMBER "NVML_LED_COLOR_AMBER" = 1 + +ctypedef enum nvmlEncoderType_t "nvmlEncoderType_t": + NVML_ENCODER_QUERY_H264 "NVML_ENCODER_QUERY_H264" = 0x00 + NVML_ENCODER_QUERY_HEVC "NVML_ENCODER_QUERY_HEVC" = 0x01 + NVML_ENCODER_QUERY_AV1 "NVML_ENCODER_QUERY_AV1" = 0x02 + NVML_ENCODER_QUERY_UNKNOWN "NVML_ENCODER_QUERY_UNKNOWN" = 0xFF + +ctypedef enum nvmlFBCSessionType_t "nvmlFBCSessionType_t": + NVML_FBC_SESSION_TYPE_UNKNOWN "NVML_FBC_SESSION_TYPE_UNKNOWN" = 0 + NVML_FBC_SESSION_TYPE_TOSYS "NVML_FBC_SESSION_TYPE_TOSYS" + NVML_FBC_SESSION_TYPE_CUDA "NVML_FBC_SESSION_TYPE_CUDA" + NVML_FBC_SESSION_TYPE_VID "NVML_FBC_SESSION_TYPE_VID" + NVML_FBC_SESSION_TYPE_HWENC "NVML_FBC_SESSION_TYPE_HWENC" + +ctypedef enum nvmlDetachGpuState_t "nvmlDetachGpuState_t": + NVML_DETACH_GPU_KEEP "NVML_DETACH_GPU_KEEP" = 0 + NVML_DETACH_GPU_REMOVE "NVML_DETACH_GPU_REMOVE" + +ctypedef enum nvmlPcieLinkState_t "nvmlPcieLinkState_t": + NVML_PCIE_LINK_KEEP "NVML_PCIE_LINK_KEEP" = 0 + NVML_PCIE_LINK_SHUT_DOWN "NVML_PCIE_LINK_SHUT_DOWN" + +ctypedef enum nvmlClockLimitId_t "nvmlClockLimitId_t": + NVML_CLOCK_LIMIT_ID_RANGE_START "NVML_CLOCK_LIMIT_ID_RANGE_START" = 0xffffff00 + NVML_CLOCK_LIMIT_ID_TDP "NVML_CLOCK_LIMIT_ID_TDP" + NVML_CLOCK_LIMIT_ID_UNLIMITED "NVML_CLOCK_LIMIT_ID_UNLIMITED" + +ctypedef enum nvmlVgpuVmCompatibility_t "nvmlVgpuVmCompatibility_t": + NVML_VGPU_VM_COMPATIBILITY_NONE "NVML_VGPU_VM_COMPATIBILITY_NONE" = 0x0 + NVML_VGPU_VM_COMPATIBILITY_COLD "NVML_VGPU_VM_COMPATIBILITY_COLD" = 0x1 + NVML_VGPU_VM_COMPATIBILITY_HIBERNATE "NVML_VGPU_VM_COMPATIBILITY_HIBERNATE" = 0x2 + NVML_VGPU_VM_COMPATIBILITY_SLEEP "NVML_VGPU_VM_COMPATIBILITY_SLEEP" = 0x4 + NVML_VGPU_VM_COMPATIBILITY_LIVE "NVML_VGPU_VM_COMPATIBILITY_LIVE" = 0x8 + +ctypedef enum nvmlVgpuPgpuCompatibilityLimitCode_t "nvmlVgpuPgpuCompatibilityLimitCode_t": + NVML_VGPU_COMPATIBILITY_LIMIT_NONE "NVML_VGPU_COMPATIBILITY_LIMIT_NONE" = 0x0 + NVML_VGPU_COMPATIBILITY_LIMIT_HOST_DRIVER "NVML_VGPU_COMPATIBILITY_LIMIT_HOST_DRIVER" = 0x1 + NVML_VGPU_COMPATIBILITY_LIMIT_GUEST_DRIVER "NVML_VGPU_COMPATIBILITY_LIMIT_GUEST_DRIVER" = 0x2 + NVML_VGPU_COMPATIBILITY_LIMIT_GPU "NVML_VGPU_COMPATIBILITY_LIMIT_GPU" = 0x4 + NVML_VGPU_COMPATIBILITY_LIMIT_OTHER "NVML_VGPU_COMPATIBILITY_LIMIT_OTHER" = 0x80000000 + +ctypedef enum nvmlGpmMetricId_t "nvmlGpmMetricId_t": + NVML_GPM_METRIC_GRAPHICS_UTIL "NVML_GPM_METRIC_GRAPHICS_UTIL" = 1 + NVML_GPM_METRIC_SM_UTIL "NVML_GPM_METRIC_SM_UTIL" = 2 + NVML_GPM_METRIC_SM_OCCUPANCY "NVML_GPM_METRIC_SM_OCCUPANCY" = 3 + NVML_GPM_METRIC_INTEGER_UTIL "NVML_GPM_METRIC_INTEGER_UTIL" = 4 + NVML_GPM_METRIC_ANY_TENSOR_UTIL "NVML_GPM_METRIC_ANY_TENSOR_UTIL" = 5 + NVML_GPM_METRIC_DFMA_TENSOR_UTIL "NVML_GPM_METRIC_DFMA_TENSOR_UTIL" = 6 + NVML_GPM_METRIC_HMMA_TENSOR_UTIL "NVML_GPM_METRIC_HMMA_TENSOR_UTIL" = 7 + NVML_GPM_METRIC_DMMA_TENSOR_UTIL "NVML_GPM_METRIC_DMMA_TENSOR_UTIL" = 8 + NVML_GPM_METRIC_IMMA_TENSOR_UTIL "NVML_GPM_METRIC_IMMA_TENSOR_UTIL" = 9 + NVML_GPM_METRIC_DRAM_BW_UTIL "NVML_GPM_METRIC_DRAM_BW_UTIL" = 10 + NVML_GPM_METRIC_FP64_UTIL "NVML_GPM_METRIC_FP64_UTIL" = 11 + NVML_GPM_METRIC_FP32_UTIL "NVML_GPM_METRIC_FP32_UTIL" = 12 + NVML_GPM_METRIC_FP16_UTIL "NVML_GPM_METRIC_FP16_UTIL" = 13 + NVML_GPM_METRIC_PCIE_TX_PER_SEC "NVML_GPM_METRIC_PCIE_TX_PER_SEC" = 20 + NVML_GPM_METRIC_PCIE_RX_PER_SEC "NVML_GPM_METRIC_PCIE_RX_PER_SEC" = 21 + NVML_GPM_METRIC_NVDEC_0_UTIL "NVML_GPM_METRIC_NVDEC_0_UTIL" = 30 + NVML_GPM_METRIC_NVDEC_1_UTIL "NVML_GPM_METRIC_NVDEC_1_UTIL" = 31 + NVML_GPM_METRIC_NVDEC_2_UTIL "NVML_GPM_METRIC_NVDEC_2_UTIL" = 32 + NVML_GPM_METRIC_NVDEC_3_UTIL "NVML_GPM_METRIC_NVDEC_3_UTIL" = 33 + NVML_GPM_METRIC_NVDEC_4_UTIL "NVML_GPM_METRIC_NVDEC_4_UTIL" = 34 + NVML_GPM_METRIC_NVDEC_5_UTIL "NVML_GPM_METRIC_NVDEC_5_UTIL" = 35 + NVML_GPM_METRIC_NVDEC_6_UTIL "NVML_GPM_METRIC_NVDEC_6_UTIL" = 36 + NVML_GPM_METRIC_NVDEC_7_UTIL "NVML_GPM_METRIC_NVDEC_7_UTIL" = 37 + NVML_GPM_METRIC_NVJPG_0_UTIL "NVML_GPM_METRIC_NVJPG_0_UTIL" = 40 + NVML_GPM_METRIC_NVJPG_1_UTIL "NVML_GPM_METRIC_NVJPG_1_UTIL" = 41 + NVML_GPM_METRIC_NVJPG_2_UTIL "NVML_GPM_METRIC_NVJPG_2_UTIL" = 42 + NVML_GPM_METRIC_NVJPG_3_UTIL "NVML_GPM_METRIC_NVJPG_3_UTIL" = 43 + NVML_GPM_METRIC_NVJPG_4_UTIL "NVML_GPM_METRIC_NVJPG_4_UTIL" = 44 + NVML_GPM_METRIC_NVJPG_5_UTIL "NVML_GPM_METRIC_NVJPG_5_UTIL" = 45 + NVML_GPM_METRIC_NVJPG_6_UTIL "NVML_GPM_METRIC_NVJPG_6_UTIL" = 46 + NVML_GPM_METRIC_NVJPG_7_UTIL "NVML_GPM_METRIC_NVJPG_7_UTIL" = 47 + NVML_GPM_METRIC_NVOFA_0_UTIL "NVML_GPM_METRIC_NVOFA_0_UTIL" = 50 + NVML_GPM_METRIC_NVOFA_1_UTIL "NVML_GPM_METRIC_NVOFA_1_UTIL" = 51 + NVML_GPM_METRIC_NVLINK_TOTAL_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_TOTAL_RX_PER_SEC" = 60 + NVML_GPM_METRIC_NVLINK_TOTAL_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_TOTAL_TX_PER_SEC" = 61 + NVML_GPM_METRIC_NVLINK_L0_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L0_RX_PER_SEC" = 62 + NVML_GPM_METRIC_NVLINK_L0_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L0_TX_PER_SEC" = 63 + NVML_GPM_METRIC_NVLINK_L1_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L1_RX_PER_SEC" = 64 + NVML_GPM_METRIC_NVLINK_L1_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L1_TX_PER_SEC" = 65 + NVML_GPM_METRIC_NVLINK_L2_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L2_RX_PER_SEC" = 66 + NVML_GPM_METRIC_NVLINK_L2_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L2_TX_PER_SEC" = 67 + NVML_GPM_METRIC_NVLINK_L3_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L3_RX_PER_SEC" = 68 + NVML_GPM_METRIC_NVLINK_L3_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L3_TX_PER_SEC" = 69 + NVML_GPM_METRIC_NVLINK_L4_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L4_RX_PER_SEC" = 70 + NVML_GPM_METRIC_NVLINK_L4_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L4_TX_PER_SEC" = 71 + NVML_GPM_METRIC_NVLINK_L5_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L5_RX_PER_SEC" = 72 + NVML_GPM_METRIC_NVLINK_L5_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L5_TX_PER_SEC" = 73 + NVML_GPM_METRIC_NVLINK_L6_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L6_RX_PER_SEC" = 74 + NVML_GPM_METRIC_NVLINK_L6_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L6_TX_PER_SEC" = 75 + NVML_GPM_METRIC_NVLINK_L7_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L7_RX_PER_SEC" = 76 + NVML_GPM_METRIC_NVLINK_L7_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L7_TX_PER_SEC" = 77 + NVML_GPM_METRIC_NVLINK_L8_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L8_RX_PER_SEC" = 78 + NVML_GPM_METRIC_NVLINK_L8_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L8_TX_PER_SEC" = 79 + NVML_GPM_METRIC_NVLINK_L9_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L9_RX_PER_SEC" = 80 + NVML_GPM_METRIC_NVLINK_L9_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L9_TX_PER_SEC" = 81 + NVML_GPM_METRIC_NVLINK_L10_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L10_RX_PER_SEC" = 82 + NVML_GPM_METRIC_NVLINK_L10_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L10_TX_PER_SEC" = 83 + NVML_GPM_METRIC_NVLINK_L11_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L11_RX_PER_SEC" = 84 + NVML_GPM_METRIC_NVLINK_L11_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L11_TX_PER_SEC" = 85 + NVML_GPM_METRIC_NVLINK_L12_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L12_RX_PER_SEC" = 86 + NVML_GPM_METRIC_NVLINK_L12_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L12_TX_PER_SEC" = 87 + NVML_GPM_METRIC_NVLINK_L13_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L13_RX_PER_SEC" = 88 + NVML_GPM_METRIC_NVLINK_L13_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L13_TX_PER_SEC" = 89 + NVML_GPM_METRIC_NVLINK_L14_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L14_RX_PER_SEC" = 90 + NVML_GPM_METRIC_NVLINK_L14_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L14_TX_PER_SEC" = 91 + NVML_GPM_METRIC_NVLINK_L15_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L15_RX_PER_SEC" = 92 + NVML_GPM_METRIC_NVLINK_L15_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L15_TX_PER_SEC" = 93 + NVML_GPM_METRIC_NVLINK_L16_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L16_RX_PER_SEC" = 94 + NVML_GPM_METRIC_NVLINK_L16_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L16_TX_PER_SEC" = 95 + NVML_GPM_METRIC_NVLINK_L17_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L17_RX_PER_SEC" = 96 + NVML_GPM_METRIC_NVLINK_L17_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L17_TX_PER_SEC" = 97 + NVML_GPM_METRIC_C2C_TOTAL_TX_PER_SEC "NVML_GPM_METRIC_C2C_TOTAL_TX_PER_SEC" = 100 + NVML_GPM_METRIC_C2C_TOTAL_RX_PER_SEC "NVML_GPM_METRIC_C2C_TOTAL_RX_PER_SEC" = 101 + NVML_GPM_METRIC_C2C_DATA_TX_PER_SEC "NVML_GPM_METRIC_C2C_DATA_TX_PER_SEC" = 102 + NVML_GPM_METRIC_C2C_DATA_RX_PER_SEC "NVML_GPM_METRIC_C2C_DATA_RX_PER_SEC" = 103 + NVML_GPM_METRIC_C2C_LINK0_TOTAL_TX_PER_SEC "NVML_GPM_METRIC_C2C_LINK0_TOTAL_TX_PER_SEC" = 104 + NVML_GPM_METRIC_C2C_LINK0_TOTAL_RX_PER_SEC "NVML_GPM_METRIC_C2C_LINK0_TOTAL_RX_PER_SEC" = 105 + NVML_GPM_METRIC_C2C_LINK0_DATA_TX_PER_SEC "NVML_GPM_METRIC_C2C_LINK0_DATA_TX_PER_SEC" = 106 + NVML_GPM_METRIC_C2C_LINK0_DATA_RX_PER_SEC "NVML_GPM_METRIC_C2C_LINK0_DATA_RX_PER_SEC" = 107 + NVML_GPM_METRIC_C2C_LINK1_TOTAL_TX_PER_SEC "NVML_GPM_METRIC_C2C_LINK1_TOTAL_TX_PER_SEC" = 108 + NVML_GPM_METRIC_C2C_LINK1_TOTAL_RX_PER_SEC "NVML_GPM_METRIC_C2C_LINK1_TOTAL_RX_PER_SEC" = 109 + NVML_GPM_METRIC_C2C_LINK1_DATA_TX_PER_SEC "NVML_GPM_METRIC_C2C_LINK1_DATA_TX_PER_SEC" = 110 + NVML_GPM_METRIC_C2C_LINK1_DATA_RX_PER_SEC "NVML_GPM_METRIC_C2C_LINK1_DATA_RX_PER_SEC" = 111 + NVML_GPM_METRIC_C2C_LINK2_TOTAL_TX_PER_SEC "NVML_GPM_METRIC_C2C_LINK2_TOTAL_TX_PER_SEC" = 112 + NVML_GPM_METRIC_C2C_LINK2_TOTAL_RX_PER_SEC "NVML_GPM_METRIC_C2C_LINK2_TOTAL_RX_PER_SEC" = 113 + NVML_GPM_METRIC_C2C_LINK2_DATA_TX_PER_SEC "NVML_GPM_METRIC_C2C_LINK2_DATA_TX_PER_SEC" = 114 + NVML_GPM_METRIC_C2C_LINK2_DATA_RX_PER_SEC "NVML_GPM_METRIC_C2C_LINK2_DATA_RX_PER_SEC" = 115 + NVML_GPM_METRIC_C2C_LINK3_TOTAL_TX_PER_SEC "NVML_GPM_METRIC_C2C_LINK3_TOTAL_TX_PER_SEC" = 116 + NVML_GPM_METRIC_C2C_LINK3_TOTAL_RX_PER_SEC "NVML_GPM_METRIC_C2C_LINK3_TOTAL_RX_PER_SEC" = 117 + NVML_GPM_METRIC_C2C_LINK3_DATA_TX_PER_SEC "NVML_GPM_METRIC_C2C_LINK3_DATA_TX_PER_SEC" = 118 + NVML_GPM_METRIC_C2C_LINK3_DATA_RX_PER_SEC "NVML_GPM_METRIC_C2C_LINK3_DATA_RX_PER_SEC" = 119 + NVML_GPM_METRIC_C2C_LINK4_TOTAL_TX_PER_SEC "NVML_GPM_METRIC_C2C_LINK4_TOTAL_TX_PER_SEC" = 120 + NVML_GPM_METRIC_C2C_LINK4_TOTAL_RX_PER_SEC "NVML_GPM_METRIC_C2C_LINK4_TOTAL_RX_PER_SEC" = 121 + NVML_GPM_METRIC_C2C_LINK4_DATA_TX_PER_SEC "NVML_GPM_METRIC_C2C_LINK4_DATA_TX_PER_SEC" = 122 + NVML_GPM_METRIC_C2C_LINK4_DATA_RX_PER_SEC "NVML_GPM_METRIC_C2C_LINK4_DATA_RX_PER_SEC" = 123 + NVML_GPM_METRIC_C2C_LINK5_TOTAL_TX_PER_SEC "NVML_GPM_METRIC_C2C_LINK5_TOTAL_TX_PER_SEC" = 124 + NVML_GPM_METRIC_C2C_LINK5_TOTAL_RX_PER_SEC "NVML_GPM_METRIC_C2C_LINK5_TOTAL_RX_PER_SEC" = 125 + NVML_GPM_METRIC_C2C_LINK5_DATA_TX_PER_SEC "NVML_GPM_METRIC_C2C_LINK5_DATA_TX_PER_SEC" = 126 + NVML_GPM_METRIC_C2C_LINK5_DATA_RX_PER_SEC "NVML_GPM_METRIC_C2C_LINK5_DATA_RX_PER_SEC" = 127 + NVML_GPM_METRIC_C2C_LINK6_TOTAL_TX_PER_SEC "NVML_GPM_METRIC_C2C_LINK6_TOTAL_TX_PER_SEC" = 128 + NVML_GPM_METRIC_C2C_LINK6_TOTAL_RX_PER_SEC "NVML_GPM_METRIC_C2C_LINK6_TOTAL_RX_PER_SEC" = 129 + NVML_GPM_METRIC_C2C_LINK6_DATA_TX_PER_SEC "NVML_GPM_METRIC_C2C_LINK6_DATA_TX_PER_SEC" = 130 + NVML_GPM_METRIC_C2C_LINK6_DATA_RX_PER_SEC "NVML_GPM_METRIC_C2C_LINK6_DATA_RX_PER_SEC" = 131 + NVML_GPM_METRIC_C2C_LINK7_TOTAL_TX_PER_SEC "NVML_GPM_METRIC_C2C_LINK7_TOTAL_TX_PER_SEC" = 132 + NVML_GPM_METRIC_C2C_LINK7_TOTAL_RX_PER_SEC "NVML_GPM_METRIC_C2C_LINK7_TOTAL_RX_PER_SEC" = 133 + NVML_GPM_METRIC_C2C_LINK7_DATA_TX_PER_SEC "NVML_GPM_METRIC_C2C_LINK7_DATA_TX_PER_SEC" = 134 + NVML_GPM_METRIC_C2C_LINK7_DATA_RX_PER_SEC "NVML_GPM_METRIC_C2C_LINK7_DATA_RX_PER_SEC" = 135 + NVML_GPM_METRIC_C2C_LINK8_TOTAL_TX_PER_SEC "NVML_GPM_METRIC_C2C_LINK8_TOTAL_TX_PER_SEC" = 136 + NVML_GPM_METRIC_C2C_LINK8_TOTAL_RX_PER_SEC "NVML_GPM_METRIC_C2C_LINK8_TOTAL_RX_PER_SEC" = 137 + NVML_GPM_METRIC_C2C_LINK8_DATA_TX_PER_SEC "NVML_GPM_METRIC_C2C_LINK8_DATA_TX_PER_SEC" = 138 + NVML_GPM_METRIC_C2C_LINK8_DATA_RX_PER_SEC "NVML_GPM_METRIC_C2C_LINK8_DATA_RX_PER_SEC" = 139 + NVML_GPM_METRIC_C2C_LINK9_TOTAL_TX_PER_SEC "NVML_GPM_METRIC_C2C_LINK9_TOTAL_TX_PER_SEC" = 140 + NVML_GPM_METRIC_C2C_LINK9_TOTAL_RX_PER_SEC "NVML_GPM_METRIC_C2C_LINK9_TOTAL_RX_PER_SEC" = 141 + NVML_GPM_METRIC_C2C_LINK9_DATA_TX_PER_SEC "NVML_GPM_METRIC_C2C_LINK9_DATA_TX_PER_SEC" = 142 + NVML_GPM_METRIC_C2C_LINK9_DATA_RX_PER_SEC "NVML_GPM_METRIC_C2C_LINK9_DATA_RX_PER_SEC" = 143 + NVML_GPM_METRIC_C2C_LINK10_TOTAL_TX_PER_SEC "NVML_GPM_METRIC_C2C_LINK10_TOTAL_TX_PER_SEC" = 144 + NVML_GPM_METRIC_C2C_LINK10_TOTAL_RX_PER_SEC "NVML_GPM_METRIC_C2C_LINK10_TOTAL_RX_PER_SEC" = 145 + NVML_GPM_METRIC_C2C_LINK10_DATA_TX_PER_SEC "NVML_GPM_METRIC_C2C_LINK10_DATA_TX_PER_SEC" = 146 + NVML_GPM_METRIC_C2C_LINK10_DATA_RX_PER_SEC "NVML_GPM_METRIC_C2C_LINK10_DATA_RX_PER_SEC" = 147 + NVML_GPM_METRIC_C2C_LINK11_TOTAL_TX_PER_SEC "NVML_GPM_METRIC_C2C_LINK11_TOTAL_TX_PER_SEC" = 148 + NVML_GPM_METRIC_C2C_LINK11_TOTAL_RX_PER_SEC "NVML_GPM_METRIC_C2C_LINK11_TOTAL_RX_PER_SEC" = 149 + NVML_GPM_METRIC_C2C_LINK11_DATA_TX_PER_SEC "NVML_GPM_METRIC_C2C_LINK11_DATA_TX_PER_SEC" = 150 + NVML_GPM_METRIC_C2C_LINK11_DATA_RX_PER_SEC "NVML_GPM_METRIC_C2C_LINK11_DATA_RX_PER_SEC" = 151 + NVML_GPM_METRIC_C2C_LINK12_TOTAL_TX_PER_SEC "NVML_GPM_METRIC_C2C_LINK12_TOTAL_TX_PER_SEC" = 152 + NVML_GPM_METRIC_C2C_LINK12_TOTAL_RX_PER_SEC "NVML_GPM_METRIC_C2C_LINK12_TOTAL_RX_PER_SEC" = 153 + NVML_GPM_METRIC_C2C_LINK12_DATA_TX_PER_SEC "NVML_GPM_METRIC_C2C_LINK12_DATA_TX_PER_SEC" = 154 + NVML_GPM_METRIC_C2C_LINK12_DATA_RX_PER_SEC "NVML_GPM_METRIC_C2C_LINK12_DATA_RX_PER_SEC" = 155 + NVML_GPM_METRIC_C2C_LINK13_TOTAL_TX_PER_SEC "NVML_GPM_METRIC_C2C_LINK13_TOTAL_TX_PER_SEC" = 156 + NVML_GPM_METRIC_C2C_LINK13_TOTAL_RX_PER_SEC "NVML_GPM_METRIC_C2C_LINK13_TOTAL_RX_PER_SEC" = 157 + NVML_GPM_METRIC_C2C_LINK13_DATA_TX_PER_SEC "NVML_GPM_METRIC_C2C_LINK13_DATA_TX_PER_SEC" = 158 + NVML_GPM_METRIC_C2C_LINK13_DATA_RX_PER_SEC "NVML_GPM_METRIC_C2C_LINK13_DATA_RX_PER_SEC" = 159 + NVML_GPM_METRIC_HOSTMEM_CACHE_HIT "NVML_GPM_METRIC_HOSTMEM_CACHE_HIT" = 160 + NVML_GPM_METRIC_HOSTMEM_CACHE_MISS "NVML_GPM_METRIC_HOSTMEM_CACHE_MISS" = 161 + NVML_GPM_METRIC_PEERMEM_CACHE_HIT "NVML_GPM_METRIC_PEERMEM_CACHE_HIT" = 162 + NVML_GPM_METRIC_PEERMEM_CACHE_MISS "NVML_GPM_METRIC_PEERMEM_CACHE_MISS" = 163 + NVML_GPM_METRIC_DRAM_CACHE_HIT "NVML_GPM_METRIC_DRAM_CACHE_HIT" = 164 + NVML_GPM_METRIC_DRAM_CACHE_MISS "NVML_GPM_METRIC_DRAM_CACHE_MISS" = 165 + NVML_GPM_METRIC_NVENC_0_UTIL "NVML_GPM_METRIC_NVENC_0_UTIL" = 166 + NVML_GPM_METRIC_NVENC_1_UTIL "NVML_GPM_METRIC_NVENC_1_UTIL" = 167 + NVML_GPM_METRIC_NVENC_2_UTIL "NVML_GPM_METRIC_NVENC_2_UTIL" = 168 + NVML_GPM_METRIC_NVENC_3_UTIL "NVML_GPM_METRIC_NVENC_3_UTIL" = 169 + NVML_GPM_METRIC_GR0_CTXSW_CYCLES_ELAPSED "NVML_GPM_METRIC_GR0_CTXSW_CYCLES_ELAPSED" = 170 + NVML_GPM_METRIC_GR0_CTXSW_CYCLES_ACTIVE "NVML_GPM_METRIC_GR0_CTXSW_CYCLES_ACTIVE" = 171 + NVML_GPM_METRIC_GR0_CTXSW_REQUESTS "NVML_GPM_METRIC_GR0_CTXSW_REQUESTS" = 172 + NVML_GPM_METRIC_GR0_CTXSW_CYCLES_PER_REQ "NVML_GPM_METRIC_GR0_CTXSW_CYCLES_PER_REQ" = 173 + NVML_GPM_METRIC_GR0_CTXSW_ACTIVE_PCT "NVML_GPM_METRIC_GR0_CTXSW_ACTIVE_PCT" = 174 + NVML_GPM_METRIC_GR1_CTXSW_CYCLES_ELAPSED "NVML_GPM_METRIC_GR1_CTXSW_CYCLES_ELAPSED" = 175 + NVML_GPM_METRIC_GR1_CTXSW_CYCLES_ACTIVE "NVML_GPM_METRIC_GR1_CTXSW_CYCLES_ACTIVE" = 176 + NVML_GPM_METRIC_GR1_CTXSW_REQUESTS "NVML_GPM_METRIC_GR1_CTXSW_REQUESTS" = 177 + NVML_GPM_METRIC_GR1_CTXSW_CYCLES_PER_REQ "NVML_GPM_METRIC_GR1_CTXSW_CYCLES_PER_REQ" = 178 + NVML_GPM_METRIC_GR1_CTXSW_ACTIVE_PCT "NVML_GPM_METRIC_GR1_CTXSW_ACTIVE_PCT" = 179 + NVML_GPM_METRIC_GR2_CTXSW_CYCLES_ELAPSED "NVML_GPM_METRIC_GR2_CTXSW_CYCLES_ELAPSED" = 180 + NVML_GPM_METRIC_GR2_CTXSW_CYCLES_ACTIVE "NVML_GPM_METRIC_GR2_CTXSW_CYCLES_ACTIVE" = 181 + NVML_GPM_METRIC_GR2_CTXSW_REQUESTS "NVML_GPM_METRIC_GR2_CTXSW_REQUESTS" = 182 + NVML_GPM_METRIC_GR2_CTXSW_CYCLES_PER_REQ "NVML_GPM_METRIC_GR2_CTXSW_CYCLES_PER_REQ" = 183 + NVML_GPM_METRIC_GR2_CTXSW_ACTIVE_PCT "NVML_GPM_METRIC_GR2_CTXSW_ACTIVE_PCT" = 184 + NVML_GPM_METRIC_GR3_CTXSW_CYCLES_ELAPSED "NVML_GPM_METRIC_GR3_CTXSW_CYCLES_ELAPSED" = 185 + NVML_GPM_METRIC_GR3_CTXSW_CYCLES_ACTIVE "NVML_GPM_METRIC_GR3_CTXSW_CYCLES_ACTIVE" = 186 + NVML_GPM_METRIC_GR3_CTXSW_REQUESTS "NVML_GPM_METRIC_GR3_CTXSW_REQUESTS" = 187 + NVML_GPM_METRIC_GR3_CTXSW_CYCLES_PER_REQ "NVML_GPM_METRIC_GR3_CTXSW_CYCLES_PER_REQ" = 188 + NVML_GPM_METRIC_GR3_CTXSW_ACTIVE_PCT "NVML_GPM_METRIC_GR3_CTXSW_ACTIVE_PCT" = 189 + NVML_GPM_METRIC_GR4_CTXSW_CYCLES_ELAPSED "NVML_GPM_METRIC_GR4_CTXSW_CYCLES_ELAPSED" = 190 + NVML_GPM_METRIC_GR4_CTXSW_CYCLES_ACTIVE "NVML_GPM_METRIC_GR4_CTXSW_CYCLES_ACTIVE" = 191 + NVML_GPM_METRIC_GR4_CTXSW_REQUESTS "NVML_GPM_METRIC_GR4_CTXSW_REQUESTS" = 192 + NVML_GPM_METRIC_GR4_CTXSW_CYCLES_PER_REQ "NVML_GPM_METRIC_GR4_CTXSW_CYCLES_PER_REQ" = 193 + NVML_GPM_METRIC_GR4_CTXSW_ACTIVE_PCT "NVML_GPM_METRIC_GR4_CTXSW_ACTIVE_PCT" = 194 + NVML_GPM_METRIC_GR5_CTXSW_CYCLES_ELAPSED "NVML_GPM_METRIC_GR5_CTXSW_CYCLES_ELAPSED" = 195 + NVML_GPM_METRIC_GR5_CTXSW_CYCLES_ACTIVE "NVML_GPM_METRIC_GR5_CTXSW_CYCLES_ACTIVE" = 196 + NVML_GPM_METRIC_GR5_CTXSW_REQUESTS "NVML_GPM_METRIC_GR5_CTXSW_REQUESTS" = 197 + NVML_GPM_METRIC_GR5_CTXSW_CYCLES_PER_REQ "NVML_GPM_METRIC_GR5_CTXSW_CYCLES_PER_REQ" = 198 + NVML_GPM_METRIC_GR5_CTXSW_ACTIVE_PCT "NVML_GPM_METRIC_GR5_CTXSW_ACTIVE_PCT" = 199 + NVML_GPM_METRIC_GR6_CTXSW_CYCLES_ELAPSED "NVML_GPM_METRIC_GR6_CTXSW_CYCLES_ELAPSED" = 200 + NVML_GPM_METRIC_GR6_CTXSW_CYCLES_ACTIVE "NVML_GPM_METRIC_GR6_CTXSW_CYCLES_ACTIVE" = 201 + NVML_GPM_METRIC_GR6_CTXSW_REQUESTS "NVML_GPM_METRIC_GR6_CTXSW_REQUESTS" = 202 + NVML_GPM_METRIC_GR6_CTXSW_CYCLES_PER_REQ "NVML_GPM_METRIC_GR6_CTXSW_CYCLES_PER_REQ" = 203 + NVML_GPM_METRIC_GR6_CTXSW_ACTIVE_PCT "NVML_GPM_METRIC_GR6_CTXSW_ACTIVE_PCT" = 204 + NVML_GPM_METRIC_GR7_CTXSW_CYCLES_ELAPSED "NVML_GPM_METRIC_GR7_CTXSW_CYCLES_ELAPSED" = 205 + NVML_GPM_METRIC_GR7_CTXSW_CYCLES_ACTIVE "NVML_GPM_METRIC_GR7_CTXSW_CYCLES_ACTIVE" = 206 + NVML_GPM_METRIC_GR7_CTXSW_REQUESTS "NVML_GPM_METRIC_GR7_CTXSW_REQUESTS" = 207 + NVML_GPM_METRIC_GR7_CTXSW_CYCLES_PER_REQ "NVML_GPM_METRIC_GR7_CTXSW_CYCLES_PER_REQ" = 208 + NVML_GPM_METRIC_GR7_CTXSW_ACTIVE_PCT "NVML_GPM_METRIC_GR7_CTXSW_ACTIVE_PCT" = 209 + NVML_GPM_METRIC_NVLINK_L18_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L18_RX_PER_SEC" = 212 + NVML_GPM_METRIC_NVLINK_L18_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L18_TX_PER_SEC" = 213 + NVML_GPM_METRIC_NVLINK_L19_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L19_RX_PER_SEC" = 214 + NVML_GPM_METRIC_NVLINK_L19_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L19_TX_PER_SEC" = 215 + NVML_GPM_METRIC_NVLINK_L20_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L20_RX_PER_SEC" = 216 + NVML_GPM_METRIC_NVLINK_L20_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L20_TX_PER_SEC" = 217 + NVML_GPM_METRIC_NVLINK_L21_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L21_RX_PER_SEC" = 218 + NVML_GPM_METRIC_NVLINK_L21_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L21_TX_PER_SEC" = 219 + NVML_GPM_METRIC_NVLINK_L22_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L22_RX_PER_SEC" = 220 + NVML_GPM_METRIC_NVLINK_L22_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L22_TX_PER_SEC" = 221 + NVML_GPM_METRIC_NVLINK_L23_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L23_RX_PER_SEC" = 222 + NVML_GPM_METRIC_NVLINK_L23_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L23_TX_PER_SEC" = 223 + NVML_GPM_METRIC_NVLINK_L24_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L24_RX_PER_SEC" = 224 + NVML_GPM_METRIC_NVLINK_L24_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L24_TX_PER_SEC" = 225 + NVML_GPM_METRIC_NVLINK_L25_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L25_RX_PER_SEC" = 226 + NVML_GPM_METRIC_NVLINK_L25_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L25_TX_PER_SEC" = 227 + NVML_GPM_METRIC_NVLINK_L26_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L26_RX_PER_SEC" = 228 + NVML_GPM_METRIC_NVLINK_L26_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L26_TX_PER_SEC" = 229 + NVML_GPM_METRIC_NVLINK_L27_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L27_RX_PER_SEC" = 230 + NVML_GPM_METRIC_NVLINK_L27_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L27_TX_PER_SEC" = 231 + NVML_GPM_METRIC_NVLINK_L28_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L28_RX_PER_SEC" = 232 + NVML_GPM_METRIC_NVLINK_L28_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L28_TX_PER_SEC" = 233 + NVML_GPM_METRIC_NVLINK_L29_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L29_RX_PER_SEC" = 234 + NVML_GPM_METRIC_NVLINK_L29_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L29_TX_PER_SEC" = 235 + NVML_GPM_METRIC_NVLINK_L30_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L30_RX_PER_SEC" = 236 + NVML_GPM_METRIC_NVLINK_L30_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L30_TX_PER_SEC" = 237 + NVML_GPM_METRIC_NVLINK_L31_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L31_RX_PER_SEC" = 238 + NVML_GPM_METRIC_NVLINK_L31_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L31_TX_PER_SEC" = 239 + NVML_GPM_METRIC_NVLINK_L32_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L32_RX_PER_SEC" = 240 + NVML_GPM_METRIC_NVLINK_L32_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L32_TX_PER_SEC" = 241 + NVML_GPM_METRIC_NVLINK_L33_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L33_RX_PER_SEC" = 242 + NVML_GPM_METRIC_NVLINK_L33_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L33_TX_PER_SEC" = 243 + NVML_GPM_METRIC_NVLINK_L34_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L34_RX_PER_SEC" = 244 + NVML_GPM_METRIC_NVLINK_L34_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L34_TX_PER_SEC" = 245 + NVML_GPM_METRIC_NVLINK_L35_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L35_RX_PER_SEC" = 246 + NVML_GPM_METRIC_NVLINK_L35_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L35_TX_PER_SEC" = 247 + NVML_GPM_METRIC_SM_CYCLES_ELAPSED "NVML_GPM_METRIC_SM_CYCLES_ELAPSED" = 248 + NVML_GPM_METRIC_SM_CYCLES_ACTIVE "NVML_GPM_METRIC_SM_CYCLES_ACTIVE" = 249 + NVML_GPM_METRIC_MMA_CYCLES_ACTIVE "NVML_GPM_METRIC_MMA_CYCLES_ACTIVE" = 250 + NVML_GPM_METRIC_DMMA_CYCLES_ACTIVE "NVML_GPM_METRIC_DMMA_CYCLES_ACTIVE" = 251 + NVML_GPM_METRIC_HMMA_CYCLES_ACTIVE "NVML_GPM_METRIC_HMMA_CYCLES_ACTIVE" = 252 + NVML_GPM_METRIC_IMMA_CYCLES_ACTIVE "NVML_GPM_METRIC_IMMA_CYCLES_ACTIVE" = 253 + NVML_GPM_METRIC_DFMA_CYCLES_ACTIVE "NVML_GPM_METRIC_DFMA_CYCLES_ACTIVE" = 254 + NVML_GPM_METRIC_PCIE_TX "NVML_GPM_METRIC_PCIE_TX" = 255 + NVML_GPM_METRIC_PCIE_RX "NVML_GPM_METRIC_PCIE_RX" = 256 + NVML_GPM_METRIC_INTEGER_CYCLES_ACTIVE "NVML_GPM_METRIC_INTEGER_CYCLES_ACTIVE" = 257 + NVML_GPM_METRIC_FP64_CYCLES_ACTIVE "NVML_GPM_METRIC_FP64_CYCLES_ACTIVE" = 258 + NVML_GPM_METRIC_FP32_CYCLES_ACTIVE "NVML_GPM_METRIC_FP32_CYCLES_ACTIVE" = 259 + NVML_GPM_METRIC_FP16_CYCLES_ACTIVE "NVML_GPM_METRIC_FP16_CYCLES_ACTIVE" = 260 + NVML_GPM_METRIC_NVLINK_L0_RX "NVML_GPM_METRIC_NVLINK_L0_RX" = 261 + NVML_GPM_METRIC_NVLINK_L0_TX "NVML_GPM_METRIC_NVLINK_L0_TX" = 262 + NVML_GPM_METRIC_NVLINK_L1_RX "NVML_GPM_METRIC_NVLINK_L1_RX" = 263 + NVML_GPM_METRIC_NVLINK_L1_TX "NVML_GPM_METRIC_NVLINK_L1_TX" = 264 + NVML_GPM_METRIC_NVLINK_L2_RX "NVML_GPM_METRIC_NVLINK_L2_RX" = 265 + NVML_GPM_METRIC_NVLINK_L2_TX "NVML_GPM_METRIC_NVLINK_L2_TX" = 266 + NVML_GPM_METRIC_NVLINK_L3_RX "NVML_GPM_METRIC_NVLINK_L3_RX" = 267 + NVML_GPM_METRIC_NVLINK_L3_TX "NVML_GPM_METRIC_NVLINK_L3_TX" = 268 + NVML_GPM_METRIC_NVLINK_L4_RX "NVML_GPM_METRIC_NVLINK_L4_RX" = 269 + NVML_GPM_METRIC_NVLINK_L4_TX "NVML_GPM_METRIC_NVLINK_L4_TX" = 270 + NVML_GPM_METRIC_NVLINK_L5_RX "NVML_GPM_METRIC_NVLINK_L5_RX" = 271 + NVML_GPM_METRIC_NVLINK_L5_TX "NVML_GPM_METRIC_NVLINK_L5_TX" = 272 + NVML_GPM_METRIC_NVLINK_L6_RX "NVML_GPM_METRIC_NVLINK_L6_RX" = 273 + NVML_GPM_METRIC_NVLINK_L6_TX "NVML_GPM_METRIC_NVLINK_L6_TX" = 274 + NVML_GPM_METRIC_NVLINK_L7_RX "NVML_GPM_METRIC_NVLINK_L7_RX" = 275 + NVML_GPM_METRIC_NVLINK_L7_TX "NVML_GPM_METRIC_NVLINK_L7_TX" = 276 + NVML_GPM_METRIC_NVLINK_L8_RX "NVML_GPM_METRIC_NVLINK_L8_RX" = 277 + NVML_GPM_METRIC_NVLINK_L8_TX "NVML_GPM_METRIC_NVLINK_L8_TX" = 278 + NVML_GPM_METRIC_NVLINK_L9_RX "NVML_GPM_METRIC_NVLINK_L9_RX" = 279 + NVML_GPM_METRIC_NVLINK_L9_TX "NVML_GPM_METRIC_NVLINK_L9_TX" = 280 + NVML_GPM_METRIC_NVLINK_L10_RX "NVML_GPM_METRIC_NVLINK_L10_RX" = 281 + NVML_GPM_METRIC_NVLINK_L10_TX "NVML_GPM_METRIC_NVLINK_L10_TX" = 282 + NVML_GPM_METRIC_NVLINK_L11_RX "NVML_GPM_METRIC_NVLINK_L11_RX" = 283 + NVML_GPM_METRIC_NVLINK_L11_TX "NVML_GPM_METRIC_NVLINK_L11_TX" = 284 + NVML_GPM_METRIC_NVLINK_L12_RX "NVML_GPM_METRIC_NVLINK_L12_RX" = 285 + NVML_GPM_METRIC_NVLINK_L12_TX "NVML_GPM_METRIC_NVLINK_L12_TX" = 286 + NVML_GPM_METRIC_NVLINK_L13_RX "NVML_GPM_METRIC_NVLINK_L13_RX" = 287 + NVML_GPM_METRIC_NVLINK_L13_TX "NVML_GPM_METRIC_NVLINK_L13_TX" = 288 + NVML_GPM_METRIC_NVLINK_L14_RX "NVML_GPM_METRIC_NVLINK_L14_RX" = 289 + NVML_GPM_METRIC_NVLINK_L14_TX "NVML_GPM_METRIC_NVLINK_L14_TX" = 290 + NVML_GPM_METRIC_NVLINK_L15_RX "NVML_GPM_METRIC_NVLINK_L15_RX" = 291 + NVML_GPM_METRIC_NVLINK_L15_TX "NVML_GPM_METRIC_NVLINK_L15_TX" = 292 + NVML_GPM_METRIC_NVLINK_L16_RX "NVML_GPM_METRIC_NVLINK_L16_RX" = 293 + NVML_GPM_METRIC_NVLINK_L16_TX "NVML_GPM_METRIC_NVLINK_L16_TX" = 294 + NVML_GPM_METRIC_NVLINK_L17_RX "NVML_GPM_METRIC_NVLINK_L17_RX" = 295 + NVML_GPM_METRIC_NVLINK_L17_TX "NVML_GPM_METRIC_NVLINK_L17_TX" = 296 + NVML_GPM_METRIC_NVLINK_L18_RX "NVML_GPM_METRIC_NVLINK_L18_RX" = 297 + NVML_GPM_METRIC_NVLINK_L18_TX "NVML_GPM_METRIC_NVLINK_L18_TX" = 298 + NVML_GPM_METRIC_NVLINK_L19_RX "NVML_GPM_METRIC_NVLINK_L19_RX" = 299 + NVML_GPM_METRIC_NVLINK_L19_TX "NVML_GPM_METRIC_NVLINK_L19_TX" = 300 + NVML_GPM_METRIC_NVLINK_L20_RX "NVML_GPM_METRIC_NVLINK_L20_RX" = 301 + NVML_GPM_METRIC_NVLINK_L20_TX "NVML_GPM_METRIC_NVLINK_L20_TX" = 302 + NVML_GPM_METRIC_NVLINK_L21_RX "NVML_GPM_METRIC_NVLINK_L21_RX" = 303 + NVML_GPM_METRIC_NVLINK_L21_TX "NVML_GPM_METRIC_NVLINK_L21_TX" = 304 + NVML_GPM_METRIC_NVLINK_L22_RX "NVML_GPM_METRIC_NVLINK_L22_RX" = 305 + NVML_GPM_METRIC_NVLINK_L22_TX "NVML_GPM_METRIC_NVLINK_L22_TX" = 306 + NVML_GPM_METRIC_NVLINK_L23_RX "NVML_GPM_METRIC_NVLINK_L23_RX" = 307 + NVML_GPM_METRIC_NVLINK_L23_TX "NVML_GPM_METRIC_NVLINK_L23_TX" = 308 + NVML_GPM_METRIC_NVLINK_L24_RX "NVML_GPM_METRIC_NVLINK_L24_RX" = 309 + NVML_GPM_METRIC_NVLINK_L24_TX "NVML_GPM_METRIC_NVLINK_L24_TX" = 310 + NVML_GPM_METRIC_NVLINK_L25_RX "NVML_GPM_METRIC_NVLINK_L25_RX" = 311 + NVML_GPM_METRIC_NVLINK_L25_TX "NVML_GPM_METRIC_NVLINK_L25_TX" = 312 + NVML_GPM_METRIC_NVLINK_L26_RX "NVML_GPM_METRIC_NVLINK_L26_RX" = 313 + NVML_GPM_METRIC_NVLINK_L26_TX "NVML_GPM_METRIC_NVLINK_L26_TX" = 314 + NVML_GPM_METRIC_NVLINK_L27_RX "NVML_GPM_METRIC_NVLINK_L27_RX" = 315 + NVML_GPM_METRIC_NVLINK_L27_TX "NVML_GPM_METRIC_NVLINK_L27_TX" = 316 + NVML_GPM_METRIC_NVLINK_L28_RX "NVML_GPM_METRIC_NVLINK_L28_RX" = 317 + NVML_GPM_METRIC_NVLINK_L28_TX "NVML_GPM_METRIC_NVLINK_L28_TX" = 318 + NVML_GPM_METRIC_NVLINK_L29_RX "NVML_GPM_METRIC_NVLINK_L29_RX" = 319 + NVML_GPM_METRIC_NVLINK_L29_TX "NVML_GPM_METRIC_NVLINK_L29_TX" = 320 + NVML_GPM_METRIC_NVLINK_L30_RX "NVML_GPM_METRIC_NVLINK_L30_RX" = 321 + NVML_GPM_METRIC_NVLINK_L30_TX "NVML_GPM_METRIC_NVLINK_L30_TX" = 322 + NVML_GPM_METRIC_NVLINK_L31_RX "NVML_GPM_METRIC_NVLINK_L31_RX" = 323 + NVML_GPM_METRIC_NVLINK_L31_TX "NVML_GPM_METRIC_NVLINK_L31_TX" = 324 + NVML_GPM_METRIC_NVLINK_L32_RX "NVML_GPM_METRIC_NVLINK_L32_RX" = 325 + NVML_GPM_METRIC_NVLINK_L32_TX "NVML_GPM_METRIC_NVLINK_L32_TX" = 326 + NVML_GPM_METRIC_NVLINK_L33_RX "NVML_GPM_METRIC_NVLINK_L33_RX" = 327 + NVML_GPM_METRIC_NVLINK_L33_TX "NVML_GPM_METRIC_NVLINK_L33_TX" = 328 + NVML_GPM_METRIC_NVLINK_L34_RX "NVML_GPM_METRIC_NVLINK_L34_RX" = 329 + NVML_GPM_METRIC_NVLINK_L34_TX "NVML_GPM_METRIC_NVLINK_L34_TX" = 330 + NVML_GPM_METRIC_NVLINK_L35_RX "NVML_GPM_METRIC_NVLINK_L35_RX" = 331 + NVML_GPM_METRIC_NVLINK_L35_TX "NVML_GPM_METRIC_NVLINK_L35_TX" = 332 + NVML_GPM_METRIC_NVLINK_L36_RX "NVML_GPM_METRIC_NVLINK_L36_RX" = 333 + NVML_GPM_METRIC_NVLINK_L36_TX "NVML_GPM_METRIC_NVLINK_L36_TX" = 334 + NVML_GPM_METRIC_NVLINK_L37_RX "NVML_GPM_METRIC_NVLINK_L37_RX" = 335 + NVML_GPM_METRIC_NVLINK_L37_TX "NVML_GPM_METRIC_NVLINK_L37_TX" = 336 + NVML_GPM_METRIC_NVLINK_L38_RX "NVML_GPM_METRIC_NVLINK_L38_RX" = 337 + NVML_GPM_METRIC_NVLINK_L38_TX "NVML_GPM_METRIC_NVLINK_L38_TX" = 338 + NVML_GPM_METRIC_NVLINK_L39_RX "NVML_GPM_METRIC_NVLINK_L39_RX" = 339 + NVML_GPM_METRIC_NVLINK_L39_TX "NVML_GPM_METRIC_NVLINK_L39_TX" = 340 + NVML_GPM_METRIC_NVLINK_L40_RX "NVML_GPM_METRIC_NVLINK_L40_RX" = 341 + NVML_GPM_METRIC_NVLINK_L40_TX "NVML_GPM_METRIC_NVLINK_L40_TX" = 342 + NVML_GPM_METRIC_NVLINK_L41_RX "NVML_GPM_METRIC_NVLINK_L41_RX" = 343 + NVML_GPM_METRIC_NVLINK_L41_TX "NVML_GPM_METRIC_NVLINK_L41_TX" = 344 + NVML_GPM_METRIC_NVLINK_L42_RX "NVML_GPM_METRIC_NVLINK_L42_RX" = 345 + NVML_GPM_METRIC_NVLINK_L42_TX "NVML_GPM_METRIC_NVLINK_L42_TX" = 346 + NVML_GPM_METRIC_NVLINK_L43_RX "NVML_GPM_METRIC_NVLINK_L43_RX" = 347 + NVML_GPM_METRIC_NVLINK_L43_TX "NVML_GPM_METRIC_NVLINK_L43_TX" = 348 + NVML_GPM_METRIC_NVLINK_L44_RX "NVML_GPM_METRIC_NVLINK_L44_RX" = 349 + NVML_GPM_METRIC_NVLINK_L44_TX "NVML_GPM_METRIC_NVLINK_L44_TX" = 350 + NVML_GPM_METRIC_NVLINK_L45_RX "NVML_GPM_METRIC_NVLINK_L45_RX" = 351 + NVML_GPM_METRIC_NVLINK_L45_TX "NVML_GPM_METRIC_NVLINK_L45_TX" = 352 + NVML_GPM_METRIC_NVLINK_L46_RX "NVML_GPM_METRIC_NVLINK_L46_RX" = 353 + NVML_GPM_METRIC_NVLINK_L46_TX "NVML_GPM_METRIC_NVLINK_L46_TX" = 354 + NVML_GPM_METRIC_NVLINK_L47_RX "NVML_GPM_METRIC_NVLINK_L47_RX" = 355 + NVML_GPM_METRIC_NVLINK_L47_TX "NVML_GPM_METRIC_NVLINK_L47_TX" = 356 + NVML_GPM_METRIC_NVLINK_L48_RX "NVML_GPM_METRIC_NVLINK_L48_RX" = 357 + NVML_GPM_METRIC_NVLINK_L48_TX "NVML_GPM_METRIC_NVLINK_L48_TX" = 358 + NVML_GPM_METRIC_NVLINK_L49_RX "NVML_GPM_METRIC_NVLINK_L49_RX" = 359 + NVML_GPM_METRIC_NVLINK_L49_TX "NVML_GPM_METRIC_NVLINK_L49_TX" = 360 + NVML_GPM_METRIC_NVLINK_L50_RX "NVML_GPM_METRIC_NVLINK_L50_RX" = 361 + NVML_GPM_METRIC_NVLINK_L50_TX "NVML_GPM_METRIC_NVLINK_L50_TX" = 362 + NVML_GPM_METRIC_NVLINK_L51_RX "NVML_GPM_METRIC_NVLINK_L51_RX" = 363 + NVML_GPM_METRIC_NVLINK_L51_TX "NVML_GPM_METRIC_NVLINK_L51_TX" = 364 + NVML_GPM_METRIC_NVLINK_L52_RX "NVML_GPM_METRIC_NVLINK_L52_RX" = 365 + NVML_GPM_METRIC_NVLINK_L52_TX "NVML_GPM_METRIC_NVLINK_L52_TX" = 366 + NVML_GPM_METRIC_NVLINK_L53_RX "NVML_GPM_METRIC_NVLINK_L53_RX" = 367 + NVML_GPM_METRIC_NVLINK_L53_TX "NVML_GPM_METRIC_NVLINK_L53_TX" = 368 + NVML_GPM_METRIC_NVLINK_L54_RX "NVML_GPM_METRIC_NVLINK_L54_RX" = 369 + NVML_GPM_METRIC_NVLINK_L54_TX "NVML_GPM_METRIC_NVLINK_L54_TX" = 370 + NVML_GPM_METRIC_NVLINK_L55_RX "NVML_GPM_METRIC_NVLINK_L55_RX" = 371 + NVML_GPM_METRIC_NVLINK_L55_TX "NVML_GPM_METRIC_NVLINK_L55_TX" = 372 + NVML_GPM_METRIC_NVLINK_L56_RX "NVML_GPM_METRIC_NVLINK_L56_RX" = 373 + NVML_GPM_METRIC_NVLINK_L56_TX "NVML_GPM_METRIC_NVLINK_L56_TX" = 374 + NVML_GPM_METRIC_NVLINK_L57_RX "NVML_GPM_METRIC_NVLINK_L57_RX" = 375 + NVML_GPM_METRIC_NVLINK_L57_TX "NVML_GPM_METRIC_NVLINK_L57_TX" = 376 + NVML_GPM_METRIC_NVLINK_L58_RX "NVML_GPM_METRIC_NVLINK_L58_RX" = 377 + NVML_GPM_METRIC_NVLINK_L58_TX "NVML_GPM_METRIC_NVLINK_L58_TX" = 378 + NVML_GPM_METRIC_NVLINK_L59_RX "NVML_GPM_METRIC_NVLINK_L59_RX" = 379 + NVML_GPM_METRIC_NVLINK_L59_TX "NVML_GPM_METRIC_NVLINK_L59_TX" = 380 + NVML_GPM_METRIC_NVLINK_L60_RX "NVML_GPM_METRIC_NVLINK_L60_RX" = 381 + NVML_GPM_METRIC_NVLINK_L60_TX "NVML_GPM_METRIC_NVLINK_L60_TX" = 382 + NVML_GPM_METRIC_NVLINK_L61_RX "NVML_GPM_METRIC_NVLINK_L61_RX" = 383 + NVML_GPM_METRIC_NVLINK_L61_TX "NVML_GPM_METRIC_NVLINK_L61_TX" = 384 + NVML_GPM_METRIC_NVLINK_L62_RX "NVML_GPM_METRIC_NVLINK_L62_RX" = 385 + NVML_GPM_METRIC_NVLINK_L62_TX "NVML_GPM_METRIC_NVLINK_L62_TX" = 386 + NVML_GPM_METRIC_NVLINK_L63_RX "NVML_GPM_METRIC_NVLINK_L63_RX" = 387 + NVML_GPM_METRIC_NVLINK_L63_TX "NVML_GPM_METRIC_NVLINK_L63_TX" = 388 + NVML_GPM_METRIC_NVLINK_L64_RX "NVML_GPM_METRIC_NVLINK_L64_RX" = 389 + NVML_GPM_METRIC_NVLINK_L64_TX "NVML_GPM_METRIC_NVLINK_L64_TX" = 390 + NVML_GPM_METRIC_NVLINK_L65_RX "NVML_GPM_METRIC_NVLINK_L65_RX" = 391 + NVML_GPM_METRIC_NVLINK_L65_TX "NVML_GPM_METRIC_NVLINK_L65_TX" = 392 + NVML_GPM_METRIC_NVLINK_L66_RX "NVML_GPM_METRIC_NVLINK_L66_RX" = 393 + NVML_GPM_METRIC_NVLINK_L66_TX "NVML_GPM_METRIC_NVLINK_L66_TX" = 394 + NVML_GPM_METRIC_NVLINK_L67_RX "NVML_GPM_METRIC_NVLINK_L67_RX" = 395 + NVML_GPM_METRIC_NVLINK_L67_TX "NVML_GPM_METRIC_NVLINK_L67_TX" = 396 + NVML_GPM_METRIC_NVLINK_L68_RX "NVML_GPM_METRIC_NVLINK_L68_RX" = 397 + NVML_GPM_METRIC_NVLINK_L68_TX "NVML_GPM_METRIC_NVLINK_L68_TX" = 398 + NVML_GPM_METRIC_NVLINK_L69_RX "NVML_GPM_METRIC_NVLINK_L69_RX" = 399 + NVML_GPM_METRIC_NVLINK_L69_TX "NVML_GPM_METRIC_NVLINK_L69_TX" = 400 + NVML_GPM_METRIC_NVLINK_L70_RX "NVML_GPM_METRIC_NVLINK_L70_RX" = 401 + NVML_GPM_METRIC_NVLINK_L70_TX "NVML_GPM_METRIC_NVLINK_L70_TX" = 402 + NVML_GPM_METRIC_NVLINK_L71_RX "NVML_GPM_METRIC_NVLINK_L71_RX" = 403 + NVML_GPM_METRIC_NVLINK_L71_TX "NVML_GPM_METRIC_NVLINK_L71_TX" = 404 + NVML_GPM_METRIC_NVLINK_L36_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L36_RX_PER_SEC" = 405 + NVML_GPM_METRIC_NVLINK_L36_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L36_TX_PER_SEC" = 406 + NVML_GPM_METRIC_NVLINK_L37_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L37_RX_PER_SEC" = 407 + NVML_GPM_METRIC_NVLINK_L37_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L37_TX_PER_SEC" = 408 + NVML_GPM_METRIC_NVLINK_L38_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L38_RX_PER_SEC" = 409 + NVML_GPM_METRIC_NVLINK_L38_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L38_TX_PER_SEC" = 410 + NVML_GPM_METRIC_NVLINK_L39_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L39_RX_PER_SEC" = 411 + NVML_GPM_METRIC_NVLINK_L39_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L39_TX_PER_SEC" = 412 + NVML_GPM_METRIC_NVLINK_L40_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L40_RX_PER_SEC" = 413 + NVML_GPM_METRIC_NVLINK_L40_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L40_TX_PER_SEC" = 414 + NVML_GPM_METRIC_NVLINK_L41_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L41_RX_PER_SEC" = 415 + NVML_GPM_METRIC_NVLINK_L41_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L41_TX_PER_SEC" = 416 + NVML_GPM_METRIC_NVLINK_L42_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L42_RX_PER_SEC" = 417 + NVML_GPM_METRIC_NVLINK_L42_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L42_TX_PER_SEC" = 418 + NVML_GPM_METRIC_NVLINK_L43_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L43_RX_PER_SEC" = 419 + NVML_GPM_METRIC_NVLINK_L43_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L43_TX_PER_SEC" = 420 + NVML_GPM_METRIC_NVLINK_L44_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L44_RX_PER_SEC" = 421 + NVML_GPM_METRIC_NVLINK_L44_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L44_TX_PER_SEC" = 422 + NVML_GPM_METRIC_NVLINK_L45_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L45_RX_PER_SEC" = 423 + NVML_GPM_METRIC_NVLINK_L45_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L45_TX_PER_SEC" = 424 + NVML_GPM_METRIC_NVLINK_L46_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L46_RX_PER_SEC" = 425 + NVML_GPM_METRIC_NVLINK_L46_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L46_TX_PER_SEC" = 426 + NVML_GPM_METRIC_NVLINK_L47_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L47_RX_PER_SEC" = 427 + NVML_GPM_METRIC_NVLINK_L47_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L47_TX_PER_SEC" = 428 + NVML_GPM_METRIC_NVLINK_L48_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L48_RX_PER_SEC" = 429 + NVML_GPM_METRIC_NVLINK_L48_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L48_TX_PER_SEC" = 430 + NVML_GPM_METRIC_NVLINK_L49_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L49_RX_PER_SEC" = 431 + NVML_GPM_METRIC_NVLINK_L49_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L49_TX_PER_SEC" = 432 + NVML_GPM_METRIC_NVLINK_L50_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L50_RX_PER_SEC" = 433 + NVML_GPM_METRIC_NVLINK_L50_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L50_TX_PER_SEC" = 434 + NVML_GPM_METRIC_NVLINK_L51_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L51_RX_PER_SEC" = 435 + NVML_GPM_METRIC_NVLINK_L51_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L51_TX_PER_SEC" = 436 + NVML_GPM_METRIC_NVLINK_L52_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L52_RX_PER_SEC" = 437 + NVML_GPM_METRIC_NVLINK_L52_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L52_TX_PER_SEC" = 438 + NVML_GPM_METRIC_NVLINK_L53_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L53_RX_PER_SEC" = 439 + NVML_GPM_METRIC_NVLINK_L53_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L53_TX_PER_SEC" = 440 + NVML_GPM_METRIC_NVLINK_L54_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L54_RX_PER_SEC" = 441 + NVML_GPM_METRIC_NVLINK_L54_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L54_TX_PER_SEC" = 442 + NVML_GPM_METRIC_NVLINK_L55_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L55_RX_PER_SEC" = 443 + NVML_GPM_METRIC_NVLINK_L55_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L55_TX_PER_SEC" = 444 + NVML_GPM_METRIC_NVLINK_L56_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L56_RX_PER_SEC" = 445 + NVML_GPM_METRIC_NVLINK_L56_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L56_TX_PER_SEC" = 446 + NVML_GPM_METRIC_NVLINK_L57_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L57_RX_PER_SEC" = 447 + NVML_GPM_METRIC_NVLINK_L57_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L57_TX_PER_SEC" = 448 + NVML_GPM_METRIC_NVLINK_L58_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L58_RX_PER_SEC" = 449 + NVML_GPM_METRIC_NVLINK_L58_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L58_TX_PER_SEC" = 450 + NVML_GPM_METRIC_NVLINK_L59_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L59_RX_PER_SEC" = 451 + NVML_GPM_METRIC_NVLINK_L59_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L59_TX_PER_SEC" = 452 + NVML_GPM_METRIC_NVLINK_L60_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L60_RX_PER_SEC" = 453 + NVML_GPM_METRIC_NVLINK_L60_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L60_TX_PER_SEC" = 454 + NVML_GPM_METRIC_NVLINK_L61_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L61_RX_PER_SEC" = 455 + NVML_GPM_METRIC_NVLINK_L61_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L61_TX_PER_SEC" = 456 + NVML_GPM_METRIC_NVLINK_L62_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L62_RX_PER_SEC" = 457 + NVML_GPM_METRIC_NVLINK_L62_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L62_TX_PER_SEC" = 458 + NVML_GPM_METRIC_NVLINK_L63_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L63_RX_PER_SEC" = 459 + NVML_GPM_METRIC_NVLINK_L63_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L63_TX_PER_SEC" = 460 + NVML_GPM_METRIC_NVLINK_L64_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L64_RX_PER_SEC" = 461 + NVML_GPM_METRIC_NVLINK_L64_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L64_TX_PER_SEC" = 462 + NVML_GPM_METRIC_NVLINK_L65_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L65_RX_PER_SEC" = 463 + NVML_GPM_METRIC_NVLINK_L65_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L65_TX_PER_SEC" = 464 + NVML_GPM_METRIC_NVLINK_L66_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L66_RX_PER_SEC" = 465 + NVML_GPM_METRIC_NVLINK_L66_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L66_TX_PER_SEC" = 466 + NVML_GPM_METRIC_NVLINK_L67_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L67_RX_PER_SEC" = 467 + NVML_GPM_METRIC_NVLINK_L67_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L67_TX_PER_SEC" = 468 + NVML_GPM_METRIC_NVLINK_L68_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L68_RX_PER_SEC" = 469 + NVML_GPM_METRIC_NVLINK_L68_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L68_TX_PER_SEC" = 470 + NVML_GPM_METRIC_NVLINK_L69_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L69_RX_PER_SEC" = 471 + NVML_GPM_METRIC_NVLINK_L69_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L69_TX_PER_SEC" = 472 + NVML_GPM_METRIC_NVLINK_L70_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L70_RX_PER_SEC" = 473 + NVML_GPM_METRIC_NVLINK_L70_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L70_TX_PER_SEC" = 474 + NVML_GPM_METRIC_NVLINK_L71_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L71_RX_PER_SEC" = 475 + NVML_GPM_METRIC_NVLINK_L71_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L71_TX_PER_SEC" = 476 + NVML_GPM_METRIC_MAX "NVML_GPM_METRIC_MAX" = 477 + +ctypedef enum nvmlPowerProfileType_t "nvmlPowerProfileType_t": + NVML_POWER_PROFILE_MAX_P "NVML_POWER_PROFILE_MAX_P" = 0 + NVML_POWER_PROFILE_MAX_Q "NVML_POWER_PROFILE_MAX_Q" = 1 + NVML_POWER_PROFILE_COMPUTE "NVML_POWER_PROFILE_COMPUTE" = 2 + NVML_POWER_PROFILE_MEMORY_BOUND "NVML_POWER_PROFILE_MEMORY_BOUND" = 3 + NVML_POWER_PROFILE_NETWORK "NVML_POWER_PROFILE_NETWORK" = 4 + NVML_POWER_PROFILE_BALANCED "NVML_POWER_PROFILE_BALANCED" = 5 + NVML_POWER_PROFILE_LLM_INFERENCE "NVML_POWER_PROFILE_LLM_INFERENCE" = 6 + NVML_POWER_PROFILE_LLM_TRAINING "NVML_POWER_PROFILE_LLM_TRAINING" = 7 + NVML_POWER_PROFILE_RBM "NVML_POWER_PROFILE_RBM" = 8 + NVML_POWER_PROFILE_DCPCIE "NVML_POWER_PROFILE_DCPCIE" = 9 + NVML_POWER_PROFILE_HMMA_SPARSE "NVML_POWER_PROFILE_HMMA_SPARSE" = 10 + NVML_POWER_PROFILE_HMMA_DENSE "NVML_POWER_PROFILE_HMMA_DENSE" = 11 + NVML_POWER_PROFILE_SYNC_BALANCED "NVML_POWER_PROFILE_SYNC_BALANCED" = 12 + NVML_POWER_PROFILE_HPC "NVML_POWER_PROFILE_HPC" = 13 + NVML_POWER_PROFILE_MIG "NVML_POWER_PROFILE_MIG" = 14 + NVML_POWER_PROFILE_MAX_Q_1 "NVML_POWER_PROFILE_MAX_Q_1" = 15 + NVML_POWER_PROFILE_NETWORK_BOUND "NVML_POWER_PROFILE_NETWORK_BOUND" = 16 + NVML_POWER_PROFILE_HIGH_THROUGHPUT_INFERENCE "NVML_POWER_PROFILE_HIGH_THROUGHPUT_INFERENCE" = 17 + NVML_POWER_PROFILE_MEDIUM_THROUGHPUT_INFERENCE "NVML_POWER_PROFILE_MEDIUM_THROUGHPUT_INFERENCE" = 18 + NVML_POWER_PROFILE_LOW_LATENCY_INFERENCE "NVML_POWER_PROFILE_LOW_LATENCY_INFERENCE" = 19 + NVML_POWER_PROFILE_TRAINING "NVML_POWER_PROFILE_TRAINING" = 20 + NVML_POWER_PROFILE_INFERENCE "NVML_POWER_PROFILE_INFERENCE" = 21 + NVML_POWER_PROFILE_MAX_Q_2 "NVML_POWER_PROFILE_MAX_Q_2" = 22 + NVML_POWER_PROFILE_MAX_Q_3 "NVML_POWER_PROFILE_MAX_Q_3" = 23 + NVML_POWER_PROFILE_LOW_PRIORITY_BACKGROUND "NVML_POWER_PROFILE_LOW_PRIORITY_BACKGROUND" = 24 + NVML_POWER_PROFILE_MAX "NVML_POWER_PROFILE_MAX" = 25 + +ctypedef enum nvmlDeviceAddressingModeType_t "nvmlDeviceAddressingModeType_t": + NVML_DEVICE_ADDRESSING_MODE_NONE "NVML_DEVICE_ADDRESSING_MODE_NONE" = 0 + NVML_DEVICE_ADDRESSING_MODE_HMM "NVML_DEVICE_ADDRESSING_MODE_HMM" = 1 + NVML_DEVICE_ADDRESSING_MODE_ATS "NVML_DEVICE_ADDRESSING_MODE_ATS" = 2 + +ctypedef enum nvmlPRMCounterId_t "nvmlPRMCounterId_t": + NVML_PRM_COUNTER_ID_NONE "NVML_PRM_COUNTER_ID_NONE" = 0 + NVML_PRM_COUNTER_ID_PPCNT_PHYSICAL_LAYER_CTRS_LINK_DOWN_EVENTS "NVML_PRM_COUNTER_ID_PPCNT_PHYSICAL_LAYER_CTRS_LINK_DOWN_EVENTS" = 1 + NVML_PRM_COUNTER_ID_PPCNT_PHYSICAL_LAYER_CTRS_SUCCESSFUL_RECOVERY_EVENTS "NVML_PRM_COUNTER_ID_PPCNT_PHYSICAL_LAYER_CTRS_SUCCESSFUL_RECOVERY_EVENTS" = 2 + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_EVENTS "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_EVENTS" = 101 + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_SINCE_LAST_RECOVERY "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_SINCE_LAST_RECOVERY" = 102 + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_BETWEEN_LAST_TWO_RECOVERIES "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_BETWEEN_LAST_TWO_RECOVERIES" = 103 + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_IN_LAST_HOST_SERDES_FEQ_RECOVERY "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_IN_LAST_HOST_SERDES_FEQ_RECOVERY" = 104 + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_TIME_IN_HOST_SERDES_FEQ_RECOVERY "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_TIME_IN_HOST_SERDES_FEQ_RECOVERY" = 105 + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_RECOVERY_COUNT "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_RECOVERY_COUNT" = 106 + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_SUCCESSFUL_RECOVERY_COUNT "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_SUCCESSFUL_RECOVERY_COUNT" = 107 + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_HOST_SERDES_FEQ_ATTEMPTS_COUNT "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_HOST_SERDES_FEQ_ATTEMPTS_COUNT" = 108 + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_STEP_ATTEMPTS "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_STEP_ATTEMPTS" = 109 + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_TIME "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_TIME" = 110 + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_TIME "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_TIME" = 111 + NVML_PRM_COUNTER_ID_PPCNT_PORTCOUNTERS_PORT_XMIT_WAIT "NVML_PRM_COUNTER_ID_PPCNT_PORTCOUNTERS_PORT_XMIT_WAIT" = 201 + NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODES "NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODES" = 301 + NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODE_ERR "NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODE_ERR" = 302 + NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_UNCORRECTABLE_CODE "NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_UNCORRECTABLE_CODE" = 303 + NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_CODES "NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_CODES" = 304 + NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_RETRY_CODES "NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_RETRY_CODES" = 305 + NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_RETRY_EVENTS "NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_RETRY_EVENTS" = 306 + NVML_PRM_COUNTER_ID_PPCNT_PLR_SYNC_EVENTS "NVML_PRM_COUNTER_ID_PPCNT_PLR_SYNC_EVENTS" = 307 + NVML_PRM_COUNTER_ID_PPRM_OPER_RECOVERY "NVML_PRM_COUNTER_ID_PPRM_OPER_RECOVERY" = 1001 + +ctypedef enum nvmlPowerProfileOperation_t "nvmlPowerProfileOperation_t": + NVML_POWER_PROFILE_OPERATION_CLEAR "NVML_POWER_PROFILE_OPERATION_CLEAR" = 0 + NVML_POWER_PROFILE_OPERATION_SET "NVML_POWER_PROFILE_OPERATION_SET" = 1 + NVML_POWER_PROFILE_OPERATION_SET_AND_OVERWRITE "NVML_POWER_PROFILE_OPERATION_SET_AND_OVERWRITE" = 2 + NVML_POWER_PROFILE_OPERATION_MAX "NVML_POWER_PROFILE_OPERATION_MAX" = 3 + +ctypedef enum nvmlProcessMode_t "nvmlProcessMode_t": + NVML_PROCESS_MODE_COMPUTE "NVML_PROCESS_MODE_COMPUTE" = 0 + NVML_PROCESS_MODE_GRAPHICS "NVML_PROCESS_MODE_GRAPHICS" = 1 + NVML_PROCESS_MODE_MPS "NVML_PROCESS_MODE_MPS" = 2 + NVML_PROCESS_MODE_ALL "NVML_PROCESS_MODE_ALL" = 3 + NVML_PROCESS_MODE_MAX "NVML_PROCESS_MODE_MAX" = (NVML_PROCESS_MODE_ALL + 1) + +ctypedef enum nvmlCPERType_t "nvmlCPERType_t": + NVML_CPER_ACCESS_TYPE_GPU "NVML_CPER_ACCESS_TYPE_GPU" = (1 << 0) + +ctypedef enum nvmlGpuOperationalEventLogLevel_t "nvmlGpuOperationalEventLogLevel_t": + NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ALL "NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ALL" = 0 + NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_TELEMETRY "NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_TELEMETRY" = 10 + NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_DIAG "NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_DIAG" = 20 + NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_NOTICE "NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_NOTICE" = 30 + NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_WARNING "NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_WARNING" = 40 + NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ERROR "NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ERROR" = 50 + +ctypedef enum nvmlOperationalEventSeverity_t "nvmlOperationalEventSeverity_t": + NVML_OPERATIONAL_EVENT_SEVERITY_ALL "NVML_OPERATIONAL_EVENT_SEVERITY_ALL" = 0 + NVML_OPERATIONAL_EVENT_SEVERITY_INFORMATIONAL "NVML_OPERATIONAL_EVENT_SEVERITY_INFORMATIONAL" = 10 + NVML_OPERATIONAL_EVENT_SEVERITY_CORRECTED "NVML_OPERATIONAL_EVENT_SEVERITY_CORRECTED" = 20 + NVML_OPERATIONAL_EVENT_SEVERITY_RECOVERABLE "NVML_OPERATIONAL_EVENT_SEVERITY_RECOVERABLE" = 30 + NVML_OPERATIONAL_EVENT_SEVERITY_FATAL "NVML_OPERATIONAL_EVENT_SEVERITY_FATAL" = 40 + +ctypedef enum nvmlEventDataType_t "nvmlEventDataType_t": + NVML_EVENT_DATA_TYPE_NVML_EVENT "NVML_EVENT_DATA_TYPE_NVML_EVENT" = 0 + NVML_EVENT_DATA_TYPE_GPU_OPERATIONAL_EVENT "NVML_EVENT_DATA_TYPE_GPU_OPERATIONAL_EVENT" = 1 + +ctypedef enum nvmlGpuOperationalEventContextType_t "nvmlGpuOperationalEventContextType_t": + NVML_GPU_OPERATIONAL_EVENT_CONTEXT_TYPE_UNKNOWN "NVML_GPU_OPERATIONAL_EVENT_CONTEXT_TYPE_UNKNOWN" = 0 + NVML_GPU_OPERATIONAL_EVENT_CONTEXT_TYPE_LEGACY_XID "NVML_GPU_OPERATIONAL_EVENT_CONTEXT_TYPE_LEGACY_XID" = 1 + +ctypedef enum nvmlNvlinkTelemetrySampleType_t "nvmlNvlinkTelemetrySampleType_t": + NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_TX "NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_TX" = 0 + NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_RX "NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_RX" = 1 + NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_COUNT "NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_COUNT" = 2 + + +# types +ctypedef struct nvmlPciInfoExt_v1_t 'nvmlPciInfoExt_v1_t': + unsigned int version + unsigned int domain + unsigned int bus + unsigned int device + unsigned int pciDeviceId + unsigned int pciSubSystemId + unsigned int baseClass + unsigned int subClass + char busId[32] + +ctypedef struct nvmlCoolerInfo_v1_t 'nvmlCoolerInfo_v1_t': + unsigned int version + unsigned int index + nvmlCoolerControl_t signalType + nvmlCoolerTarget_t target + +ctypedef struct nvmlDramEncryptionInfo_v1_t 'nvmlDramEncryptionInfo_v1_t': + unsigned int version + nvmlEnableState_t encryptionState + +ctypedef struct nvmlMarginTemperature_v1_t 'nvmlMarginTemperature_v1_t': + unsigned int version + int marginTemperature + +ctypedef struct nvmlClockOffset_v1_t 'nvmlClockOffset_v1_t': + unsigned int version + nvmlClockType_t type + nvmlPstates_t pstate + int clockOffsetMHz + int minClockOffsetMHz + int maxClockOffsetMHz + +ctypedef struct nvmlFanSpeedInfo_v1_t 'nvmlFanSpeedInfo_v1_t': + unsigned int version + unsigned int fan + unsigned int speed + +ctypedef struct nvmlDevicePerfModes_v1_t 'nvmlDevicePerfModes_v1_t': + unsigned int version + char str[2048] + +ctypedef struct nvmlDeviceCurrentClockFreqs_v1_t 'nvmlDeviceCurrentClockFreqs_v1_t': + unsigned int version + char str[2048] + +ctypedef struct nvmlEccSramErrorStatus_v1_t 'nvmlEccSramErrorStatus_v1_t': + unsigned int version + unsigned long long aggregateUncParity + unsigned long long aggregateUncSecDed + unsigned long long aggregateCor + unsigned long long volatileUncParity + unsigned long long volatileUncSecDed + unsigned long long volatileCor + unsigned long long aggregateUncBucketL2 + unsigned long long aggregateUncBucketSm + unsigned long long aggregateUncBucketPcie + unsigned long long aggregateUncBucketMcu + unsigned long long aggregateUncBucketOther + unsigned int bThresholdExceeded + +ctypedef struct nvmlPlatformInfo_v2_t 'nvmlPlatformInfo_v2_t': + unsigned int version + unsigned char ibGuid[16] + unsigned char chassisSerialNumber[16] + unsigned char slotNumber + unsigned char trayIndex + unsigned char hostId + unsigned char peerType + unsigned char moduleId + +ctypedef unsigned int nvmlDeviceArchitecture_t 'nvmlDeviceArchitecture_t' + +ctypedef unsigned int nvmlBusType_t 'nvmlBusType_t' + +ctypedef unsigned int nvmlFanControlPolicy_t 'nvmlFanControlPolicy_t' + +ctypedef unsigned int nvmlPowerSource_t 'nvmlPowerSource_t' + +ctypedef unsigned char nvmlPowerScopeType_t 'nvmlPowerScopeType_t' + +ctypedef unsigned int nvmlVgpuTypeId_t 'nvmlVgpuTypeId_t' + +ctypedef unsigned int nvmlVgpuInstance_t 'nvmlVgpuInstance_t' + +ctypedef struct nvmlVgpuHeterogeneousMode_v1_t 'nvmlVgpuHeterogeneousMode_v1_t': + unsigned int version + unsigned int mode + +ctypedef struct nvmlVgpuPlacementId_v1_t 'nvmlVgpuPlacementId_v1_t': + unsigned int version + unsigned int placementId + +ctypedef struct nvmlVgpuPlacementList_v2_t 'nvmlVgpuPlacementList_v2_t': + unsigned int version + unsigned int placementSize + unsigned int count + unsigned int* placementIds + unsigned int mode + +ctypedef struct nvmlVgpuTypeBar1Info_v1_t 'nvmlVgpuTypeBar1Info_v1_t': + unsigned int version + unsigned long long bar1Size + +ctypedef struct nvmlVgpuRuntimeState_v1_t 'nvmlVgpuRuntimeState_v1_t': + unsigned int version + unsigned long long size + +ctypedef struct nvmlSystemConfComputeSettings_v1_t 'nvmlSystemConfComputeSettings_v1_t': + unsigned int version + unsigned int environment + unsigned int ccFeature + unsigned int devToolsMode + unsigned int multiGpuMode + +ctypedef struct nvmlConfComputeSetKeyRotationThresholdInfo_v1_t 'nvmlConfComputeSetKeyRotationThresholdInfo_v1_t': + unsigned int version + unsigned long long maxAttackerAdvantage + +ctypedef struct nvmlConfComputeGetKeyRotationThresholdInfo_v1_t 'nvmlConfComputeGetKeyRotationThresholdInfo_v1_t': + unsigned int version + unsigned long long attackerAdvantage + +ctypedef unsigned char nvmlGpuFabricState_t 'nvmlGpuFabricState_t' + +ctypedef struct nvmlSystemDriverBranchInfo_v1_t 'nvmlSystemDriverBranchInfo_v1_t': + unsigned int version + char branch[80] + +ctypedef unsigned int nvmlAffinityScope_t 'nvmlAffinityScope_t' + +ctypedef struct nvmlTemperature_v1_t 'nvmlTemperature_v1_t': + unsigned int version + nvmlTemperatureSensors_t sensorType + int temperature + +ctypedef struct nvmlNvlinkSupportedBwModes_v1_t 'nvmlNvlinkSupportedBwModes_v1_t': + unsigned int version + unsigned char bwModes[23] + unsigned char totalBwModes + +ctypedef struct nvmlNvlinkGetBwMode_v1_t 'nvmlNvlinkGetBwMode_v1_t': + unsigned int version + unsigned int bIsBest + unsigned char bwMode + +ctypedef struct nvmlNvlinkSetBwMode_v1_t 'nvmlNvlinkSetBwMode_v1_t': + unsigned int version + unsigned int bSetBest + unsigned char bwMode + +ctypedef struct nvmlDeviceCapabilities_v1_t 'nvmlDeviceCapabilities_v1_t': + unsigned int version + unsigned int capMask + +ctypedef struct nvmlPowerSmoothingProfile_v1_t 'nvmlPowerSmoothingProfile_v1_t': + unsigned int version + unsigned int profileId + unsigned int paramId + double value + +ctypedef struct nvmlPowerSmoothingState_v1_t 'nvmlPowerSmoothingState_v1_t': + unsigned int version + nvmlEnableState_t state + +ctypedef struct nvmlDeviceAddressingMode_v1_t 'nvmlDeviceAddressingMode_v1_t': + unsigned int version + unsigned int value + +ctypedef struct nvmlRepairStatus_v1_t 'nvmlRepairStatus_v1_t': + unsigned int version + unsigned int bChannelRepairPending + unsigned int bTpcRepairPending + +ctypedef struct nvmlPdi_v1_t 'nvmlPdi_v1_t': + unsigned int version + unsigned long long value + +ctypedef unsigned long long nvmlCPERCursorHandle_t 'nvmlCPERCursorHandle_t' + +ctypedef void* nvmlDevice_t 'nvmlDevice_t' + +ctypedef void* nvmlGpuInstance_t 'nvmlGpuInstance_t' + +ctypedef void* nvmlUnit_t 'nvmlUnit_t' + +ctypedef void* nvmlEventSet_t 'nvmlEventSet_t' + +ctypedef void* nvmlSystemEventSet_t 'nvmlSystemEventSet_t' + +ctypedef void* nvmlComputeInstance_t 'nvmlComputeInstance_t' + +ctypedef void* nvmlGpmSample_t 'nvmlGpmSample_t' + +ctypedef struct nvmlPciInfo_t 'nvmlPciInfo_t': + char busIdLegacy[16] + unsigned int domain + unsigned int bus + unsigned int device + unsigned int pciDeviceId + unsigned int pciSubSystemId + char busId[32] + +ctypedef struct nvmlEccErrorCounts_t 'nvmlEccErrorCounts_t': + unsigned long long l1Cache + unsigned long long l2Cache + unsigned long long deviceMemory + unsigned long long registerFile + +ctypedef struct nvmlUtilization_t 'nvmlUtilization_t': + unsigned int gpu + unsigned int memory + +ctypedef struct nvmlMemory_t 'nvmlMemory_t': + unsigned long long total + unsigned long long free + unsigned long long used + +ctypedef struct nvmlMemory_v2_t 'nvmlMemory_v2_t': + unsigned int version + unsigned long long total + unsigned long long reserved + unsigned long long free + unsigned long long used + +ctypedef struct nvmlBAR1Memory_t 'nvmlBAR1Memory_t': + unsigned long long bar1Total + unsigned long long bar1Free + unsigned long long bar1Used + +ctypedef struct nvmlProcessInfo_v1_t 'nvmlProcessInfo_v1_t': + unsigned int pid + unsigned long long usedGpuMemory + +ctypedef struct nvmlProcessInfo_v2_t 'nvmlProcessInfo_v2_t': + unsigned int pid + unsigned long long usedGpuMemory + unsigned int gpuInstanceId + unsigned int computeInstanceId + +ctypedef struct nvmlProcessInfo_t 'nvmlProcessInfo_t': + unsigned int pid + unsigned long long usedGpuMemory + unsigned int gpuInstanceId + unsigned int computeInstanceId + +ctypedef struct nvmlProcessDetail_v1_t 'nvmlProcessDetail_v1_t': + unsigned int pid + unsigned long long usedGpuMemory + unsigned int gpuInstanceId + unsigned int computeInstanceId + unsigned long long usedGpuCcProtectedMemory + +ctypedef struct nvmlDeviceAttributes_t 'nvmlDeviceAttributes_t': + unsigned int multiprocessorCount + unsigned int sharedCopyEngineCount + unsigned int sharedDecoderCount + unsigned int sharedEncoderCount + unsigned int sharedJpegCount + unsigned int sharedOfaCount + unsigned int gpuInstanceSliceCount + unsigned int computeInstanceSliceCount + unsigned long long memorySizeMB + +ctypedef struct nvmlC2cModeInfo_v1_t 'nvmlC2cModeInfo_v1_t': + unsigned int isC2cEnabled + +ctypedef struct nvmlRowRemapperHistogramValues_t 'nvmlRowRemapperHistogramValues_t': + unsigned int max + unsigned int high + unsigned int partial + unsigned int low + unsigned int none + +ctypedef struct nvmlNvLinkUtilizationControl_t 'nvmlNvLinkUtilizationControl_t': + nvmlNvLinkUtilizationCountUnits_t units + nvmlNvLinkUtilizationCountPktTypes_t pktfilter + +ctypedef struct nvmlBridgeChipInfo_t 'nvmlBridgeChipInfo_t': + nvmlBridgeChipType_t type + unsigned int fwVersion + +ctypedef union nvmlValue_t 'nvmlValue_t': + double dVal + int siVal + unsigned int uiVal + unsigned long ulVal + unsigned long long ullVal + signed long long sllVal + unsigned short usVal + +ctypedef struct nvmlViolationTime_t 'nvmlViolationTime_t': + unsigned long long referenceTime + unsigned long long violationTime + +ctypedef struct cuda_bindings_nvml__anon_pod0: + nvmlThermalController_t controller + int defaultMinTemp + int defaultMaxTemp + int currentTemp + nvmlThermalTarget_t target + +ctypedef union nvmlUUIDValue_t 'nvmlUUIDValue_t': + char str[41] + unsigned char bytes[16] + +ctypedef struct nvmlClkMonFaultInfo_t 'nvmlClkMonFaultInfo_t': + unsigned int clkApiDomain + unsigned int clkDomainFaultMask + +ctypedef struct nvmlProcessUtilizationSample_t 'nvmlProcessUtilizationSample_t': + unsigned int pid + unsigned long long timeStamp + unsigned int smUtil + unsigned int memUtil + unsigned int encUtil + unsigned int decUtil + +ctypedef struct nvmlProcessUtilizationInfo_v1_t 'nvmlProcessUtilizationInfo_v1_t': + unsigned long long timeStamp + unsigned int pid + unsigned int smUtil + unsigned int memUtil + unsigned int encUtil + unsigned int decUtil + unsigned int jpgUtil + unsigned int ofaUtil + +ctypedef struct nvmlPlatformInfo_v1_t 'nvmlPlatformInfo_v1_t': + unsigned int version + unsigned char ibGuid[16] + unsigned char rackGuid[16] + unsigned char chassisPhysicalSlotNumber + unsigned char computeSlotIndex + unsigned char nodeIndex + unsigned char peerType + unsigned char moduleId + +ctypedef struct cuda_bindings_nvml__anon_pod1: + unsigned int bIsPresent + unsigned int percentage + unsigned int incThreshold + unsigned int decThreshold + +ctypedef struct nvmlVgpuPlacementList_v1_t 'nvmlVgpuPlacementList_v1_t': + unsigned int version + unsigned int placementSize + unsigned int count + unsigned int* placementIds + +ctypedef struct cuda_bindings_nvml__anon_pod2: + unsigned int avgFactor + unsigned int timeslice + +ctypedef struct cuda_bindings_nvml__anon_pod3: + unsigned int timeslice + +ctypedef struct nvmlVgpuSchedulerLogEntry_t 'nvmlVgpuSchedulerLogEntry_t': + unsigned long long timestamp + unsigned long long timeRunTotal + unsigned long long timeRun + unsigned int swRunlistId + unsigned long long targetTimeSlice + unsigned long long cumulativePreemptionTime + +ctypedef struct cuda_bindings_nvml__anon_pod4: + unsigned int avgFactor + unsigned int frequency + +ctypedef struct cuda_bindings_nvml__anon_pod5: + unsigned int timeslice + +ctypedef struct nvmlVgpuSchedulerCapabilities_t 'nvmlVgpuSchedulerCapabilities_t': + unsigned int supportedSchedulers[3] + unsigned int maxTimeslice + unsigned int minTimeslice + unsigned int isArrModeSupported + unsigned int maxFrequencyForARR + unsigned int minFrequencyForARR + unsigned int maxAvgFactorForARR + unsigned int minAvgFactorForARR + +ctypedef struct nvmlVgpuLicenseExpiry_t 'nvmlVgpuLicenseExpiry_t': + unsigned int year + unsigned short month + unsigned short day + unsigned short hour + unsigned short min + unsigned short sec + unsigned char status + +ctypedef struct nvmlGridLicenseExpiry_t 'nvmlGridLicenseExpiry_t': + unsigned int year + unsigned short month + unsigned short day + unsigned short hour + unsigned short min + unsigned short sec + unsigned char status + +ctypedef struct nvmlNvLinkPowerThres_t 'nvmlNvLinkPowerThres_t': + unsigned int lowPwrThreshold + +ctypedef struct nvmlHwbcEntry_t 'nvmlHwbcEntry_t': + unsigned int hwbcId + char firmwareVersion[32] + +ctypedef struct nvmlLedState_t 'nvmlLedState_t': + char cause[256] + nvmlLedColor_t color + +ctypedef struct nvmlUnitInfo_t 'nvmlUnitInfo_t': + char name[96] + char id[96] + char serial[96] + char firmwareVersion[96] + +ctypedef struct nvmlPSUInfo_t 'nvmlPSUInfo_t': + char state[256] + unsigned int current + unsigned int voltage + unsigned int power + +ctypedef struct nvmlUnitFanInfo_t 'nvmlUnitFanInfo_t': + unsigned int speed + nvmlFanState_t state + +ctypedef struct nvmlSystemEventData_v1_t 'nvmlSystemEventData_v1_t': + unsigned long long eventType + unsigned int gpuId + +ctypedef struct nvmlAccountingStats_t 'nvmlAccountingStats_t': + unsigned int gpuUtilization + unsigned int memoryUtilization + unsigned long long maxMemoryUsage + unsigned long long time + unsigned long long startTime + unsigned int isRunning + unsigned int reserved[5] + +ctypedef struct nvmlFBCStats_t 'nvmlFBCStats_t': + unsigned int sessionsCount + unsigned int averageFPS + unsigned int averageLatency + +ctypedef struct nvmlConfComputeSystemCaps_t 'nvmlConfComputeSystemCaps_t': + unsigned int cpuCaps + unsigned int gpusCaps + +ctypedef struct nvmlConfComputeSystemState_t 'nvmlConfComputeSystemState_t': + unsigned int environment + unsigned int ccFeature + unsigned int devToolsMode + +ctypedef struct nvmlConfComputeMemSizeInfo_t 'nvmlConfComputeMemSizeInfo_t': + unsigned long long protectedMemSizeKib + unsigned long long unprotectedMemSizeKib + +ctypedef struct nvmlConfComputeGpuCertificate_t 'nvmlConfComputeGpuCertificate_t': + unsigned int certChainSize + unsigned int attestationCertChainSize + unsigned char certChain[0x1000] + unsigned char attestationCertChain[0x1400] + +ctypedef struct nvmlConfComputeGpuAttestationReport_t 'nvmlConfComputeGpuAttestationReport_t': + unsigned int isCecAttestationReportPresent + unsigned int attestationReportSize + unsigned int cecAttestationReportSize + unsigned char nonce[0x20] + unsigned char attestationReport[0x2000] + unsigned char cecAttestationReport[0x1000] + +ctypedef struct nvmlVgpuVersion_t 'nvmlVgpuVersion_t': + unsigned int minVersion + unsigned int maxVersion + +ctypedef struct nvmlVgpuMetadata_t 'nvmlVgpuMetadata_t': + unsigned int version + unsigned int revision + nvmlVgpuGuestInfoState_t guestInfoState + char guestDriverVersion[80] + char hostDriverVersion[80] + unsigned int reserved[6] + unsigned int vgpuVirtualizationCaps + unsigned int guestVgpuVersion + unsigned int opaqueDataSize + char opaqueData[4] + +ctypedef struct nvmlVgpuPgpuCompatibility_t 'nvmlVgpuPgpuCompatibility_t': + nvmlVgpuVmCompatibility_t vgpuVmCompatibility + nvmlVgpuPgpuCompatibilityLimitCode_t compatibilityLimitCode + +ctypedef struct nvmlGpuInstancePlacement_t 'nvmlGpuInstancePlacement_t': + unsigned int start + unsigned int size + +ctypedef struct nvmlGpuInstanceProfileInfo_t 'nvmlGpuInstanceProfileInfo_t': + unsigned int id + unsigned int isP2pSupported + unsigned int sliceCount + unsigned int instanceCount + unsigned int multiprocessorCount + unsigned int copyEngineCount + unsigned int decoderCount + unsigned int encoderCount + unsigned int jpegCount + unsigned int ofaCount + unsigned long long memorySizeMB + +ctypedef struct nvmlGpuInstanceProfileInfo_v2_t 'nvmlGpuInstanceProfileInfo_v2_t': + unsigned int version + unsigned int id + unsigned int isP2pSupported + unsigned int sliceCount + unsigned int instanceCount + unsigned int multiprocessorCount + unsigned int copyEngineCount + unsigned int decoderCount + unsigned int encoderCount + unsigned int jpegCount + unsigned int ofaCount + unsigned long long memorySizeMB + char name[96] + +ctypedef struct nvmlGpuInstanceProfileInfo_v3_t 'nvmlGpuInstanceProfileInfo_v3_t': + unsigned int version + unsigned int id + unsigned int sliceCount + unsigned int instanceCount + unsigned int multiprocessorCount + unsigned int copyEngineCount + unsigned int decoderCount + unsigned int encoderCount + unsigned int jpegCount + unsigned int ofaCount + unsigned long long memorySizeMB + char name[96] + unsigned int capabilities + +ctypedef struct nvmlComputeInstancePlacement_t 'nvmlComputeInstancePlacement_t': + unsigned int start + unsigned int size + +ctypedef struct nvmlComputeInstanceProfileInfo_t 'nvmlComputeInstanceProfileInfo_t': + unsigned int id + unsigned int sliceCount + unsigned int instanceCount + unsigned int multiprocessorCount + unsigned int sharedCopyEngineCount + unsigned int sharedDecoderCount + unsigned int sharedEncoderCount + unsigned int sharedJpegCount + unsigned int sharedOfaCount + +ctypedef struct nvmlComputeInstanceProfileInfo_v2_t 'nvmlComputeInstanceProfileInfo_v2_t': + unsigned int version + unsigned int id + unsigned int sliceCount + unsigned int instanceCount + unsigned int multiprocessorCount + unsigned int sharedCopyEngineCount + unsigned int sharedDecoderCount + unsigned int sharedEncoderCount + unsigned int sharedJpegCount + unsigned int sharedOfaCount + char name[96] + +ctypedef struct nvmlComputeInstanceProfileInfo_v3_t 'nvmlComputeInstanceProfileInfo_v3_t': + unsigned int version + unsigned int id + unsigned int sliceCount + unsigned int instanceCount + unsigned int multiprocessorCount + unsigned int sharedCopyEngineCount + unsigned int sharedDecoderCount + unsigned int sharedEncoderCount + unsigned int sharedJpegCount + unsigned int sharedOfaCount + char name[96] + unsigned int capabilities + +ctypedef struct cuda_bindings_nvml__anon_pod6: + char* shortName + char* longName + char* unit + +ctypedef struct nvmlGpmSupport_t 'nvmlGpmSupport_t': + unsigned int version + unsigned int isSupportedDevice + +ctypedef struct nvmlMask255_t 'nvmlMask255_t': + unsigned int mask[8] + +ctypedef struct nvmlDevicePowerMizerModes_v1_t 'nvmlDevicePowerMizerModes_v1_t': + unsigned int currentMode + unsigned int mode + unsigned int supportedPowerMizerModes + +ctypedef struct nvmlHostname_v1_t 'nvmlHostname_v1_t': + char value[64] + +ctypedef struct nvmlEccSramUniqueUncorrectedErrorEntry_v1_t 'nvmlEccSramUniqueUncorrectedErrorEntry_v1_t': + unsigned int unit + unsigned int location + unsigned int sublocation + unsigned int extlocation + unsigned int address + unsigned int isParity + unsigned int count + +ctypedef struct nvmlNvLinkInfo_v1_t 'nvmlNvLinkInfo_v1_t': + unsigned int version + unsigned int isNvleEnabled + +ctypedef struct nvmlNvlinkFirmwareVersion_t 'nvmlNvlinkFirmwareVersion_t': + unsigned char ucodeType + unsigned int major + unsigned int minor + unsigned int subMinor + +ctypedef union cuda_bindings_nvml__anon_pod7: + unsigned char inData[496] + unsigned char outData[496] + +ctypedef struct nvmlUnrepairableMemoryStatus_v1_t 'nvmlUnrepairableMemoryStatus_v1_t': + unsigned int bUnrepairableMemory + +ctypedef struct nvmlRusdSettings_v1_t 'nvmlRusdSettings_v1_t': + unsigned int version + unsigned long long pollMask + +ctypedef struct nvmlPRMCounterInput_v1_t 'nvmlPRMCounterInput_v1_t': + unsigned int localPort + +ctypedef struct nvmlVgpuSchedulerStateInfo_v2_t 'nvmlVgpuSchedulerStateInfo_v2_t': + unsigned int engineId + unsigned int schedulerPolicy + unsigned int avgFactor + unsigned int timeslice + +ctypedef struct nvmlVgpuSchedulerLogEntry_v2_t 'nvmlVgpuSchedulerLogEntry_v2_t': + unsigned long long timestamp + unsigned long long timeRunTotal + unsigned long long timeRun + unsigned int swRunlistId + unsigned long long targetTimeSlice + unsigned long long cumulativePreemptionTime + unsigned int weight + +ctypedef struct nvmlVgpuSchedulerState_v2_t 'nvmlVgpuSchedulerState_v2_t': + unsigned int engineId + unsigned int schedulerPolicy + unsigned int avgFactor + unsigned int frequency + +ctypedef struct nvmlBBXTimeData_v1_t 'nvmlBBXTimeData_v1_t': + unsigned int timeRun + +ctypedef struct nvmlRemappedRowsInfo_v2_t 'nvmlRemappedRowsInfo_v2_t': + unsigned int corrActiveRemaps + unsigned int corrInactiveRemaps + unsigned int uncActiveRemaps + unsigned int uncInactiveRemaps + unsigned int bPending + unsigned int bFailureOccurred + +ctypedef struct nvmlAccountingStats_v2_t 'nvmlAccountingStats_v2_t': + unsigned int pid + unsigned int isRunning + unsigned int gpuUtilization + unsigned int memoryUtilization + unsigned long long maxMemoryUsage + unsigned int sampleCount + unsigned long long sumGpuUtil + unsigned long long sumFbUtil + unsigned long long time + unsigned long long startTime + +ctypedef struct nvmlSetMemoryLimits_v1_t 'nvmlSetMemoryLimits_v1_t': + char* nameSpace + unsigned long long softLimit + unsigned long long hardLimit + +ctypedef struct nvmlGetMemoryLimits_v1_t 'nvmlGetMemoryLimits_v1_t': + char* nameSpace + unsigned long long softLimit + unsigned long long hardLimit + unsigned long long currentUsed + +ctypedef struct nvmlPmgrPwrTuple_t 'nvmlPmgrPwrTuple_t': + unsigned int pwrmW + +ctypedef struct nvmlRailMetrics_t 'nvmlRailMetrics_t': + unsigned int freqkHz + unsigned long long utilPct + +ctypedef struct nvmlPwrModelMetricsDlppm1xPerf_t 'nvmlPwrModelMetricsDlppm1xPerf_t': + unsigned int perfms + +ctypedef struct nvmlPwrModelMetricsSamplePfpp1x_t 'nvmlPwrModelMetricsSamplePfpp1x_t': + unsigned int freqkHz[16] + unsigned int estTgpPwrmW + +ctypedef struct nvmlPwrModelOperatingPointPfpp1x_t 'nvmlPwrModelOperatingPointPfpp1x_t': + unsigned int freqkHz + unsigned int pwrmW + +ctypedef struct nvmlAdaptiveTgpModeInfo_v1_t 'nvmlAdaptiveTgpModeInfo_v1_t': + nvmlEnableState_t inBandEnableRequest + nvmlEnableState_t featureAllowedByAdmin + nvmlEnableState_t adminOverrideEnabled + nvmlEnableState_t enablementStatus + unsigned int adjustedLimitMw + +ctypedef struct nvmlEventSetGetContextCount_v1_t 'nvmlEventSetGetContextCount_v1_t': + unsigned int count + +ctypedef struct nvmlEventSetGetContextInfo_v1_t 'nvmlEventSetGetContextInfo_v1_t': + unsigned int index + unsigned int nvmlGpuOperationalEventContextType + unsigned int sourceEventContextType + unsigned int dataSize + unsigned short dataFormatVersion + +ctypedef struct nvmlEventSetGetContextData_v1_t 'nvmlEventSetGetContextData_v1_t': + void* data + unsigned int index + unsigned int dataSize + +ctypedef struct nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1_t 'nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1_t': + unsigned int index + unsigned int xidCode + +ctypedef struct nvmlGpuFabricClique_v1_t 'nvmlGpuFabricClique_v1_t': + unsigned char type + unsigned int id + +ctypedef struct nvmlGpuOperationalEventConfig_v1_t 'nvmlGpuOperationalEventConfig_v1_t': + char uuid[96] + unsigned int minLogLevel + unsigned int minSeverity + +ctypedef struct nvmlEventSetWait_v3_t 'nvmlEventSetWait_v3_t': + unsigned int timeoutMs + unsigned int dataType + char uuid[96] + char sourceModule[16] + unsigned long long eventType + unsigned long long eventData + unsigned long long groupCursor + unsigned long long instanceId + unsigned long long timestampUsec + unsigned long long traceId + unsigned int gpuInstanceId + unsigned int computeInstanceId + unsigned int severity + unsigned int categoryId + unsigned int moduleEventCode + unsigned int scope + unsigned int originator + unsigned int moduleInstance + unsigned int chipletId + unsigned int logLevel + unsigned int attributes + unsigned int groupCperSize + unsigned int groupAttributes + unsigned char groupSize + unsigned char groupIndex + +ctypedef struct nvmlNvlinkSetBwModeAsync_v1_t 'nvmlNvlinkSetBwModeAsync_v1_t': + unsigned int bSetBest + unsigned int bwMode + unsigned int asyncPollTimeoutMs + +ctypedef struct nvmlNvlinkTelemetrySample_v1_t 'nvmlNvlinkTelemetrySample_v1_t': + unsigned int linkId + unsigned int sampleType + unsigned int sampleCount + unsigned long long* samples + nvmlReturn_t nvmlReturn + +ctypedef struct nvmlEccBankRemapperHistogram_v1_t 'nvmlEccBankRemapperHistogram_v1_t': + unsigned int maxSpareGroupCount + unsigned int noSpareGroupCount + +ctypedef nvmlPciInfoExt_v1_t nvmlPciInfoExt_t 'nvmlPciInfoExt_t' + +ctypedef nvmlCoolerInfo_v1_t nvmlCoolerInfo_t 'nvmlCoolerInfo_t' + +ctypedef nvmlDramEncryptionInfo_v1_t nvmlDramEncryptionInfo_t 'nvmlDramEncryptionInfo_t' + +ctypedef nvmlMarginTemperature_v1_t nvmlMarginTemperature_t 'nvmlMarginTemperature_t' + +ctypedef nvmlClockOffset_v1_t nvmlClockOffset_t 'nvmlClockOffset_t' + +ctypedef nvmlFanSpeedInfo_v1_t nvmlFanSpeedInfo_t 'nvmlFanSpeedInfo_t' + +ctypedef nvmlDevicePerfModes_v1_t nvmlDevicePerfModes_t 'nvmlDevicePerfModes_t' + +ctypedef nvmlDeviceCurrentClockFreqs_v1_t nvmlDeviceCurrentClockFreqs_t 'nvmlDeviceCurrentClockFreqs_t' + +ctypedef nvmlEccSramErrorStatus_v1_t nvmlEccSramErrorStatus_t 'nvmlEccSramErrorStatus_t' + +ctypedef nvmlPlatformInfo_v2_t nvmlPlatformInfo_t 'nvmlPlatformInfo_t' + +ctypedef struct nvmlPowerValue_v2_t 'nvmlPowerValue_v2_t': + unsigned int version + nvmlPowerScopeType_t powerScope + unsigned int powerValueMw + +ctypedef struct nvmlVgpuTypeIdInfo_v1_t 'nvmlVgpuTypeIdInfo_v1_t': + unsigned int version + unsigned int vgpuCount + nvmlVgpuTypeId_t* vgpuTypeIds + +ctypedef struct nvmlVgpuTypeMaxInstance_v1_t 'nvmlVgpuTypeMaxInstance_v1_t': + unsigned int version + nvmlVgpuTypeId_t vgpuTypeId + unsigned int maxInstancePerGI + +ctypedef struct nvmlVgpuCreatablePlacementInfo_v1_t 'nvmlVgpuCreatablePlacementInfo_v1_t': + unsigned int version + nvmlVgpuTypeId_t vgpuTypeId + unsigned int count + unsigned int* placementIds + unsigned int placementSize + +ctypedef struct nvmlVgpuProcessUtilizationSample_t 'nvmlVgpuProcessUtilizationSample_t': + nvmlVgpuInstance_t vgpuInstance + unsigned int pid + char processName[64] + unsigned long long timeStamp + unsigned int smUtil + unsigned int memUtil + unsigned int encUtil + unsigned int decUtil + +ctypedef struct nvmlVgpuProcessUtilizationInfo_v1_t 'nvmlVgpuProcessUtilizationInfo_v1_t': + char processName[64] + unsigned long long timeStamp + nvmlVgpuInstance_t vgpuInstance + unsigned int pid + unsigned int smUtil + unsigned int memUtil + unsigned int encUtil + unsigned int decUtil + unsigned int jpgUtil + unsigned int ofaUtil + +ctypedef struct nvmlActiveVgpuInstanceInfo_v1_t 'nvmlActiveVgpuInstanceInfo_v1_t': + unsigned int version + unsigned int vgpuCount + nvmlVgpuInstance_t* vgpuInstances + +ctypedef struct nvmlEncoderSessionInfo_t 'nvmlEncoderSessionInfo_t': + unsigned int sessionId + unsigned int pid + nvmlVgpuInstance_t vgpuInstance + nvmlEncoderType_t codecType + unsigned int hResolution + unsigned int vResolution + unsigned int averageFps + unsigned int averageLatency + +ctypedef struct nvmlFBCSessionInfo_t 'nvmlFBCSessionInfo_t': + unsigned int sessionId + unsigned int pid + nvmlVgpuInstance_t vgpuInstance + unsigned int displayOrdinal + nvmlFBCSessionType_t sessionType + unsigned int sessionFlags + unsigned int hMaxResolution + unsigned int vMaxResolution + unsigned int hResolution + unsigned int vResolution + unsigned int averageFPS + unsigned int averageLatency + +ctypedef nvmlVgpuHeterogeneousMode_v1_t nvmlVgpuHeterogeneousMode_t 'nvmlVgpuHeterogeneousMode_t' + +ctypedef nvmlVgpuPlacementId_v1_t nvmlVgpuPlacementId_t 'nvmlVgpuPlacementId_t' + +ctypedef nvmlVgpuPlacementList_v2_t nvmlVgpuPlacementList_t 'nvmlVgpuPlacementList_t' + +ctypedef nvmlVgpuTypeBar1Info_v1_t nvmlVgpuTypeBar1Info_t 'nvmlVgpuTypeBar1Info_t' + +ctypedef nvmlVgpuRuntimeState_v1_t nvmlVgpuRuntimeState_t 'nvmlVgpuRuntimeState_t' + +ctypedef nvmlSystemConfComputeSettings_v1_t nvmlSystemConfComputeSettings_t 'nvmlSystemConfComputeSettings_t' + +ctypedef nvmlConfComputeSetKeyRotationThresholdInfo_v1_t nvmlConfComputeSetKeyRotationThresholdInfo_t 'nvmlConfComputeSetKeyRotationThresholdInfo_t' + +ctypedef nvmlConfComputeGetKeyRotationThresholdInfo_v1_t nvmlConfComputeGetKeyRotationThresholdInfo_t 'nvmlConfComputeGetKeyRotationThresholdInfo_t' + +ctypedef struct nvmlGpuFabricInfo_t 'nvmlGpuFabricInfo_t': + unsigned char clusterUuid[16] + nvmlReturn_t status + unsigned int cliqueId + nvmlGpuFabricState_t state + +ctypedef struct nvmlGpuFabricInfo_v2_t 'nvmlGpuFabricInfo_v2_t': + unsigned int version + unsigned char clusterUuid[16] + nvmlReturn_t status + unsigned int cliqueId + nvmlGpuFabricState_t state + unsigned int healthMask + +ctypedef struct nvmlGpuFabricInfo_v3_t 'nvmlGpuFabricInfo_v3_t': + unsigned int version + unsigned char clusterUuid[16] + nvmlReturn_t status + unsigned int cliqueId + nvmlGpuFabricState_t state + unsigned int healthMask + unsigned char healthSummary + +ctypedef nvmlSystemDriverBranchInfo_v1_t nvmlSystemDriverBranchInfo_t 'nvmlSystemDriverBranchInfo_t' + +ctypedef nvmlTemperature_v1_t nvmlTemperature_t 'nvmlTemperature_t' + +ctypedef nvmlNvlinkSupportedBwModes_v1_t nvmlNvlinkSupportedBwModes_t 'nvmlNvlinkSupportedBwModes_t' + +ctypedef nvmlNvlinkGetBwMode_v1_t nvmlNvlinkGetBwMode_t 'nvmlNvlinkGetBwMode_t' + +ctypedef nvmlNvlinkSetBwMode_v1_t nvmlNvlinkSetBwMode_t 'nvmlNvlinkSetBwMode_t' + +ctypedef nvmlDeviceCapabilities_v1_t nvmlDeviceCapabilities_t 'nvmlDeviceCapabilities_t' + +ctypedef nvmlPowerSmoothingProfile_v1_t nvmlPowerSmoothingProfile_t 'nvmlPowerSmoothingProfile_t' + +ctypedef nvmlPowerSmoothingState_v1_t nvmlPowerSmoothingState_t 'nvmlPowerSmoothingState_t' + +ctypedef nvmlDeviceAddressingMode_v1_t nvmlDeviceAddressingMode_t 'nvmlDeviceAddressingMode_t' + +ctypedef nvmlRepairStatus_v1_t nvmlRepairStatus_t 'nvmlRepairStatus_t' + +ctypedef nvmlPdi_v1_t nvmlPdi_t 'nvmlPdi_t' + +ctypedef struct nvmlCPERCursor_v1_t 'nvmlCPERCursor_v1_t': + unsigned int cperTypeMask + char uuid[80] + nvmlCPERCursorHandle_t handle + +ctypedef struct nvmlEventData_t 'nvmlEventData_t': + nvmlDevice_t device + unsigned long long eventType + unsigned long long eventData + unsigned int gpuInstanceId + unsigned int computeInstanceId + +ctypedef struct nvmlSystemEventSetCreateRequest_v1_t 'nvmlSystemEventSetCreateRequest_v1_t': + unsigned int version + nvmlSystemEventSet_t set + +ctypedef struct nvmlSystemEventSetFreeRequest_v1_t 'nvmlSystemEventSetFreeRequest_v1_t': + unsigned int version + nvmlSystemEventSet_t set + +ctypedef struct nvmlSystemRegisterEventRequest_v1_t 'nvmlSystemRegisterEventRequest_v1_t': + unsigned int version + unsigned long long eventTypes + nvmlSystemEventSet_t set + +ctypedef struct nvmlExcludedDeviceInfo_t 'nvmlExcludedDeviceInfo_t': + nvmlPciInfo_t pciInfo + char uuid[80] + +ctypedef struct nvmlProcessDetailList_v1_t 'nvmlProcessDetailList_v1_t': + unsigned int version + unsigned int mode + unsigned int numProcArrayEntries + nvmlProcessDetail_v1_t* procArray + +ctypedef struct nvmlBridgeChipHierarchy_t 'nvmlBridgeChipHierarchy_t': + unsigned char bridgeCount + nvmlBridgeChipInfo_t bridgeChipInfo[128] + +ctypedef struct nvmlSample_t 'nvmlSample_t': + unsigned long long timeStamp + nvmlValue_t sampleValue + +ctypedef struct nvmlVgpuInstanceUtilizationSample_t 'nvmlVgpuInstanceUtilizationSample_t': + nvmlVgpuInstance_t vgpuInstance + unsigned long long timeStamp + nvmlValue_t smUtil + nvmlValue_t memUtil + nvmlValue_t encUtil + nvmlValue_t decUtil + +ctypedef struct nvmlVgpuInstanceUtilizationInfo_v1_t 'nvmlVgpuInstanceUtilizationInfo_v1_t': + unsigned long long timeStamp + nvmlVgpuInstance_t vgpuInstance + nvmlValue_t smUtil + nvmlValue_t memUtil + nvmlValue_t encUtil + nvmlValue_t decUtil + nvmlValue_t jpgUtil + nvmlValue_t ofaUtil + +ctypedef struct nvmlFieldValue_t 'nvmlFieldValue_t': + unsigned int fieldId + unsigned int scopeId + long long timestamp + long long latencyUsec + nvmlValueType_t valueType + nvmlReturn_t nvmlReturn + nvmlValue_t value + +ctypedef struct nvmlPRMCounterValue_v1_t 'nvmlPRMCounterValue_v1_t': + nvmlReturn_t status + nvmlValueType_t outputType + nvmlValue_t outputValue + +ctypedef struct nvmlGpuThermalSettings_t 'nvmlGpuThermalSettings_t': + unsigned int count + cuda_bindings_nvml__anon_pod0 sensor[3] + +ctypedef struct nvmlUUID_v1_t 'nvmlUUID_v1_t': + unsigned int version + unsigned int type + nvmlUUIDValue_t value + +ctypedef struct nvmlClkMonStatus_t 'nvmlClkMonStatus_t': + unsigned int bGlobalStatus + unsigned int clkMonListSize + nvmlClkMonFaultInfo_t clkMonList[32] + +ctypedef struct nvmlProcessesUtilizationInfo_v1_t 'nvmlProcessesUtilizationInfo_v1_t': + unsigned int version + unsigned int processSamplesCount + unsigned long long lastSeenTimeStamp + nvmlProcessUtilizationInfo_v1_t* procUtilArray + +ctypedef struct nvmlGpuDynamicPstatesInfo_t 'nvmlGpuDynamicPstatesInfo_t': + unsigned int flags + cuda_bindings_nvml__anon_pod1 utilization[8] + +ctypedef union nvmlVgpuSchedulerParams_t 'nvmlVgpuSchedulerParams_t': + cuda_bindings_nvml__anon_pod2 vgpuSchedDataWithARR + cuda_bindings_nvml__anon_pod3 vgpuSchedData + +ctypedef union nvmlVgpuSchedulerSetParams_t 'nvmlVgpuSchedulerSetParams_t': + cuda_bindings_nvml__anon_pod4 vgpuSchedDataWithARR + cuda_bindings_nvml__anon_pod5 vgpuSchedData + +ctypedef struct nvmlVgpuLicenseInfo_t 'nvmlVgpuLicenseInfo_t': + unsigned char isLicensed + nvmlVgpuLicenseExpiry_t licenseExpiry + unsigned int currentState + +ctypedef struct nvmlGridLicensableFeature_t 'nvmlGridLicensableFeature_t': + nvmlGridLicenseFeatureCode_t featureCode + unsigned int featureState + char licenseInfo[128] + char productName[128] + unsigned int featureEnabled + nvmlGridLicenseExpiry_t licenseExpiry + +ctypedef struct nvmlUnitFanSpeeds_t 'nvmlUnitFanSpeeds_t': + nvmlUnitFanInfo_t fans[24] + unsigned int count + +ctypedef struct nvmlSystemEventSetWaitRequest_v1_t 'nvmlSystemEventSetWaitRequest_v1_t': + unsigned int version + unsigned int timeoutms + nvmlSystemEventSet_t set + nvmlSystemEventData_v1_t* data + unsigned int dataSize + unsigned int numEvent + +ctypedef struct nvmlVgpuPgpuMetadata_t 'nvmlVgpuPgpuMetadata_t': + unsigned int version + unsigned int revision + char hostDriverVersion[80] + unsigned int pgpuVirtualizationCaps + unsigned int reserved[5] + nvmlVgpuVersion_t hostSupportedVgpuRange + unsigned int opaqueDataSize + char opaqueData[4] + +ctypedef struct nvmlGpuInstanceInfo_t 'nvmlGpuInstanceInfo_t': + nvmlDevice_t device + unsigned int id + unsigned int profileId + nvmlGpuInstancePlacement_t placement + +ctypedef struct nvmlComputeInstanceInfo_t 'nvmlComputeInstanceInfo_t': + nvmlDevice_t device + nvmlGpuInstance_t gpuInstance + unsigned int id + unsigned int profileId + nvmlComputeInstancePlacement_t placement + +ctypedef struct nvmlGpmMetric_t 'nvmlGpmMetric_t': + unsigned int metricId + nvmlReturn_t nvmlReturn + double value + cuda_bindings_nvml__anon_pod6 metricInfo + +ctypedef struct nvmlWorkloadPowerProfileInfo_v1_t 'nvmlWorkloadPowerProfileInfo_v1_t': + unsigned int version + unsigned int profileId + unsigned int priority + nvmlMask255_t conflictingMask + +ctypedef struct nvmlWorkloadPowerProfileCurrentProfiles_v1_t 'nvmlWorkloadPowerProfileCurrentProfiles_v1_t': + unsigned int version + nvmlMask255_t perfProfilesMask + nvmlMask255_t requestedProfilesMask + nvmlMask255_t enforcedProfilesMask + +ctypedef struct nvmlWorkloadPowerProfileRequestedProfiles_v1_t 'nvmlWorkloadPowerProfileRequestedProfiles_v1_t': + unsigned int version + nvmlMask255_t requestedProfilesMask + +ctypedef struct nvmlWorkloadPowerProfileUpdateProfiles_v1_t 'nvmlWorkloadPowerProfileUpdateProfiles_v1_t': + nvmlPowerProfileOperation_t operation + nvmlMask255_t updateProfilesMask + +ctypedef struct nvmlEccSramUniqueUncorrectedErrorCounts_v1_t 'nvmlEccSramUniqueUncorrectedErrorCounts_v1_t': + unsigned int version + unsigned int entryCount + nvmlEccSramUniqueUncorrectedErrorEntry_v1_t* entries + +ctypedef struct nvmlNvlinkFirmwareInfo_t 'nvmlNvlinkFirmwareInfo_t': + nvmlNvlinkFirmwareVersion_t firmwareVersion[100] + unsigned int numValidEntries + +ctypedef struct nvmlPRMTLV_v1_t 'nvmlPRMTLV_v1_t': + unsigned dataSize + unsigned status + cuda_bindings_nvml__anon_pod7 _anon_pod_member0 + +ctypedef struct nvmlVgpuSchedulerLogInfo_v2_t 'nvmlVgpuSchedulerLogInfo_v2_t': + unsigned int engineId + unsigned int schedulerPolicy + unsigned int avgFactor + unsigned int timeslice + unsigned int entriesCount + nvmlVgpuSchedulerLogEntry_v2_t logEntries[200] + +ctypedef struct nvmlCoreRailMetrics_t 'nvmlCoreRailMetrics_t': + nvmlRailMetrics_t rails[2] + +ctypedef struct nvmlPwrModelMetricsPfpp1x_t 'nvmlPwrModelMetricsPfpp1x_t': + unsigned char numVfPoints + nvmlPwrModelMetricsSamplePfpp1x_t estimatedMetrics[32] + unsigned char bValid + nvmlPwrModelOperatingPointPfpp1x_t maxPerfPerWattPoint + nvmlPwrModelOperatingPointPfpp1x_t fmaxAtVmaxPoint + unsigned int tgpHeadroommW + +ctypedef struct nvmlGpuFabricInfo_v4_t 'nvmlGpuFabricInfo_v4_t': + unsigned char clusterUuid[16] + nvmlReturn_t status + nvmlGpuFabricClique_v1_t cliques[64] + unsigned int numCliques + nvmlGpuFabricState_t state + unsigned int healthMask + unsigned char healthSummary + +ctypedef struct nvmlNvlinkTelemetrySamples_v1_t 'nvmlNvlinkTelemetrySamples_v1_t': + unsigned int telemetryCount + nvmlNvlinkTelemetrySample_v1_t* telemetrySamples + +ctypedef struct nvmlEccBankRemapperStatus_v1_t 'nvmlEccBankRemapperStatus_v1_t': + unsigned int activeRemappings + unsigned int inactiveRemappings + unsigned int bPending + nvmlEccBankRemapperHistogram_v1_t histogram + +ctypedef nvmlVgpuTypeIdInfo_v1_t nvmlVgpuTypeIdInfo_t 'nvmlVgpuTypeIdInfo_t' + +ctypedef nvmlVgpuTypeMaxInstance_v1_t nvmlVgpuTypeMaxInstance_t 'nvmlVgpuTypeMaxInstance_t' + +ctypedef nvmlVgpuCreatablePlacementInfo_v1_t nvmlVgpuCreatablePlacementInfo_t 'nvmlVgpuCreatablePlacementInfo_t' + +ctypedef struct nvmlVgpuProcessesUtilizationInfo_v1_t 'nvmlVgpuProcessesUtilizationInfo_v1_t': + unsigned int version + unsigned int vgpuProcessCount + unsigned long long lastSeenTimeStamp + nvmlVgpuProcessUtilizationInfo_v1_t* vgpuProcUtilArray + +ctypedef nvmlActiveVgpuInstanceInfo_v1_t nvmlActiveVgpuInstanceInfo_t 'nvmlActiveVgpuInstanceInfo_t' + +ctypedef nvmlGpuFabricInfo_v3_t nvmlGpuFabricInfoV_t 'nvmlGpuFabricInfoV_t' + +ctypedef struct nvmlGetCPER_v1_t 'nvmlGetCPER_v1_t': + nvmlCPERCursor_v1_t cursor + unsigned char* buffer + unsigned int bufferSize + +ctypedef nvmlSystemEventSetCreateRequest_v1_t nvmlSystemEventSetCreateRequest_t 'nvmlSystemEventSetCreateRequest_t' + +ctypedef nvmlSystemEventSetFreeRequest_v1_t nvmlSystemEventSetFreeRequest_t 'nvmlSystemEventSetFreeRequest_t' + +ctypedef nvmlSystemRegisterEventRequest_v1_t nvmlSystemRegisterEventRequest_t 'nvmlSystemRegisterEventRequest_t' + +ctypedef nvmlProcessDetailList_v1_t nvmlProcessDetailList_t 'nvmlProcessDetailList_t' + +ctypedef struct nvmlVgpuInstancesUtilizationInfo_v1_t 'nvmlVgpuInstancesUtilizationInfo_v1_t': + unsigned int version + nvmlValueType_t sampleValType + unsigned int vgpuInstanceCount + unsigned long long lastSeenTimeStamp + nvmlVgpuInstanceUtilizationInfo_v1_t* vgpuUtilArray + +ctypedef struct nvmlPRMCounter_v1_t 'nvmlPRMCounter_v1_t': + unsigned int counterId + nvmlPRMCounterInput_v1_t inData + nvmlPRMCounterValue_v1_t counterValue + +ctypedef nvmlUUID_v1_t nvmlUUID_t 'nvmlUUID_t' + +ctypedef nvmlProcessesUtilizationInfo_v1_t nvmlProcessesUtilizationInfo_t 'nvmlProcessesUtilizationInfo_t' + +ctypedef struct nvmlVgpuSchedulerLog_t 'nvmlVgpuSchedulerLog_t': + unsigned int engineId + unsigned int schedulerPolicy + unsigned int arrMode + nvmlVgpuSchedulerParams_t schedulerParams + unsigned int entriesCount + nvmlVgpuSchedulerLogEntry_t logEntries[200] + +ctypedef struct nvmlVgpuSchedulerGetState_t 'nvmlVgpuSchedulerGetState_t': + unsigned int schedulerPolicy + unsigned int arrMode + nvmlVgpuSchedulerParams_t schedulerParams + +ctypedef struct nvmlVgpuSchedulerStateInfo_v1_t 'nvmlVgpuSchedulerStateInfo_v1_t': + unsigned int version + unsigned int engineId + unsigned int schedulerPolicy + unsigned int arrMode + nvmlVgpuSchedulerParams_t schedulerParams + +ctypedef struct nvmlVgpuSchedulerLogInfo_v1_t 'nvmlVgpuSchedulerLogInfo_v1_t': + unsigned int version + unsigned int engineId + unsigned int schedulerPolicy + unsigned int arrMode + nvmlVgpuSchedulerParams_t schedulerParams + unsigned int entriesCount + nvmlVgpuSchedulerLogEntry_t logEntries[200] + +ctypedef struct nvmlVgpuSchedulerSetState_t 'nvmlVgpuSchedulerSetState_t': + unsigned int schedulerPolicy + unsigned int enableARRMode + nvmlVgpuSchedulerSetParams_t schedulerParams + +ctypedef struct nvmlVgpuSchedulerState_v1_t 'nvmlVgpuSchedulerState_v1_t': + unsigned int version + unsigned int engineId + unsigned int schedulerPolicy + unsigned int enableARRMode + nvmlVgpuSchedulerSetParams_t schedulerParams + +ctypedef struct nvmlGridLicensableFeatures_t 'nvmlGridLicensableFeatures_t': + int isGridLicenseSupported + unsigned int licensableFeaturesCount + nvmlGridLicensableFeature_t gridLicensableFeatures[3] + +ctypedef nvmlSystemEventSetWaitRequest_v1_t nvmlSystemEventSetWaitRequest_t 'nvmlSystemEventSetWaitRequest_t' + +ctypedef struct nvmlGpmMetricsGet_t 'nvmlGpmMetricsGet_t': + unsigned int version + unsigned int numMetrics + nvmlGpmSample_t sample1 + nvmlGpmSample_t sample2 + nvmlGpmMetric_t metrics[477] + +ctypedef nvmlWorkloadPowerProfileInfo_v1_t nvmlWorkloadPowerProfileInfo_t 'nvmlWorkloadPowerProfileInfo_t' + +ctypedef nvmlWorkloadPowerProfileCurrentProfiles_v1_t nvmlWorkloadPowerProfileCurrentProfiles_t 'nvmlWorkloadPowerProfileCurrentProfiles_t' + +ctypedef nvmlWorkloadPowerProfileRequestedProfiles_v1_t nvmlWorkloadPowerProfileRequestedProfiles_t 'nvmlWorkloadPowerProfileRequestedProfiles_t' + +ctypedef nvmlEccSramUniqueUncorrectedErrorCounts_v1_t nvmlEccSramUniqueUncorrectedErrorCounts_t 'nvmlEccSramUniqueUncorrectedErrorCounts_t' + +ctypedef struct nvmlNvLinkInfo_v2_t 'nvmlNvLinkInfo_v2_t': + unsigned int version + unsigned int isNvleEnabled + nvmlNvlinkFirmwareInfo_t firmwareInfo + +ctypedef struct nvmlPwrModelMetricsDlppm1x_t 'nvmlPwrModelMetricsDlppm1x_t': + unsigned char bValid + nvmlCoreRailMetrics_t coreRail + nvmlRailMetrics_t fbRail + nvmlPmgrPwrTuple_t tgpPwrTuple + nvmlPwrModelMetricsDlppm1xPerf_t perfMetrics + +ctypedef struct nvmlPerfMetricsPfpp1xSample_t 'nvmlPerfMetricsPfpp1xSample_t': + nvmlPwrModelMetricsPfpp1x_t estimatedMetrics + +ctypedef nvmlVgpuProcessesUtilizationInfo_v1_t nvmlVgpuProcessesUtilizationInfo_t 'nvmlVgpuProcessesUtilizationInfo_t' + +ctypedef nvmlVgpuInstancesUtilizationInfo_v1_t nvmlVgpuInstancesUtilizationInfo_t 'nvmlVgpuInstancesUtilizationInfo_t' + +ctypedef struct nvmlPRMCounterList_v1_t 'nvmlPRMCounterList_v1_t': + unsigned int numCounters + nvmlPRMCounter_v1_t* counters + +ctypedef nvmlVgpuSchedulerStateInfo_v1_t nvmlVgpuSchedulerStateInfo_t 'nvmlVgpuSchedulerStateInfo_t' + +ctypedef nvmlVgpuSchedulerLogInfo_v1_t nvmlVgpuSchedulerLogInfo_t 'nvmlVgpuSchedulerLogInfo_t' + +ctypedef nvmlVgpuSchedulerState_v1_t nvmlVgpuSchedulerState_t 'nvmlVgpuSchedulerState_t' + +ctypedef struct nvmlWorkloadPowerProfileProfilesInfo_v1_t 'nvmlWorkloadPowerProfileProfilesInfo_v1_t': + unsigned int version + nvmlMask255_t perfProfilesMask + nvmlWorkloadPowerProfileInfo_t perfProfile[255] + +ctypedef nvmlNvLinkInfo_v2_t nvmlNvLinkInfo_t 'nvmlNvLinkInfo_t' + +ctypedef struct nvmlPwrModelMetricsDlppm1xDramclkEstimates_t 'nvmlPwrModelMetricsDlppm1xDramclkEstimates_t': + nvmlPwrModelMetricsDlppm1x_t estimatedMetrics[8] + unsigned char numEstimatedMetrics + +ctypedef nvmlWorkloadPowerProfileProfilesInfo_v1_t nvmlWorkloadPowerProfileProfilesInfo_t 'nvmlWorkloadPowerProfileProfilesInfo_t' + +ctypedef struct nvmlObservedMetrics_t 'nvmlObservedMetrics_t': + nvmlPwrModelMetricsDlppm1xDramclkEstimates_t initialDramclkEst[3] + unsigned char bValid + nvmlCoreRailMetrics_t coreRail + nvmlRailMetrics_t fbRail + nvmlPmgrPwrTuple_t tgpPwrTuple + nvmlPwrModelMetricsDlppm1xPerf_t perfMetrics + +ctypedef struct nvmlPerfMetricsDlppc2xSample_t 'nvmlPerfMetricsDlppc2xSample_t': + nvmlObservedMetrics_t observedMetrics + +ctypedef union cuda_bindings_nvml__anon_pod8: + nvmlPerfMetricsDlppc2xSample_t dlppc2x + nvmlPerfMetricsPfpp1xSample_t pfpp1x + +ctypedef struct nvmlPerfMetricControllerSample_t 'nvmlPerfMetricControllerSample_t': + unsigned int controllerType + cuda_bindings_nvml__anon_pod8 data + +ctypedef struct nvmlPerfMetricsSample_t 'nvmlPerfMetricsSample_t': + unsigned char numControllerData + nvmlPerfMetricControllerSample_t controllerData[4] + +ctypedef struct nvmlPerfMetricsSamples_v1_t 'nvmlPerfMetricsSamples_v1_t': + unsigned int numSamples + nvmlPerfMetricsSample_t samples[13] + + +############################################################################### +# Functions +############################################################################### + +cdef nvmlReturn_t nvmlInit_v2() except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlInitWithFlags(unsigned int flags) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlShutdown() except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef const char* nvmlErrorString(nvmlReturn_t result) except?NULL nogil +cdef nvmlReturn_t nvmlSystemGetDriverVersion(char* version, unsigned int length) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlSystemGetNVMLVersion(char* version, unsigned int length) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlSystemGetCudaDriverVersion(int* cudaDriverVersion) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlSystemGetCudaDriverVersion_v2(int* cudaDriverVersion) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlSystemGetProcessName(unsigned int pid, char* name, unsigned int length) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlSystemGetHicVersion(unsigned int* hwbcCount, nvmlHwbcEntry_t* hwbcEntries) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlSystemGetTopologyGpuSet(unsigned int cpuNumber, unsigned int* count, nvmlDevice_t* deviceArray) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlSystemGetDriverBranch(nvmlSystemDriverBranchInfo_t* branchInfo, unsigned int length) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlUnitGetCount(unsigned int* unitCount) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlUnitGetHandleByIndex(unsigned int index, nvmlUnit_t* unit) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlUnitGetUnitInfo(nvmlUnit_t unit, nvmlUnitInfo_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlUnitGetLedState(nvmlUnit_t unit, nvmlLedState_t* state) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlUnitGetPsuInfo(nvmlUnit_t unit, nvmlPSUInfo_t* psu) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlUnitGetTemperature(nvmlUnit_t unit, unsigned int type, unsigned int* temp) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlUnitGetFanSpeedInfo(nvmlUnit_t unit, nvmlUnitFanSpeeds_t* fanSpeeds) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlUnitGetDevices(nvmlUnit_t unit, unsigned int* deviceCount, nvmlDevice_t* devices) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetCount_v2(unsigned int* deviceCount) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetAttributes_v2(nvmlDevice_t device, nvmlDeviceAttributes_t* attributes) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetHandleByIndex_v2(unsigned int index, nvmlDevice_t* device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetHandleBySerial(const char* serial, nvmlDevice_t* device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetHandleByUUID(const char* uuid, nvmlDevice_t* device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetHandleByUUIDV(const nvmlUUID_t* uuid, nvmlDevice_t* device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetHandleByPciBusId_v2(const char* pciBusId, nvmlDevice_t* device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetName(nvmlDevice_t device, char* name, unsigned int length) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetBrand(nvmlDevice_t device, nvmlBrandType_t* type) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetIndex(nvmlDevice_t device, unsigned int* index) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetSerial(nvmlDevice_t device, char* serial, unsigned int length) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetModuleId(nvmlDevice_t device, unsigned int* moduleId) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetC2cModeInfoV(nvmlDevice_t device, nvmlC2cModeInfo_v1_t* c2cModeInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetMemoryAffinity(nvmlDevice_t device, unsigned int nodeSetSize, unsigned long* nodeSet, nvmlAffinityScope_t scope) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetCpuAffinityWithinScope(nvmlDevice_t device, unsigned int cpuSetSize, unsigned long* cpuSet, nvmlAffinityScope_t scope) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetCpuAffinity(nvmlDevice_t device, unsigned int cpuSetSize, unsigned long* cpuSet) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetCpuAffinity(nvmlDevice_t device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceClearCpuAffinity(nvmlDevice_t device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetNumaNodeId(nvmlDevice_t device, unsigned int* node) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetTopologyCommonAncestor(nvmlDevice_t device1, nvmlDevice_t device2, nvmlGpuTopologyLevel_t* pathInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetTopologyNearestGpus(nvmlDevice_t device, nvmlGpuTopologyLevel_t level, unsigned int* count, nvmlDevice_t* deviceArray) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetP2PStatus(nvmlDevice_t device1, nvmlDevice_t device2, nvmlGpuP2PCapsIndex_t p2pIndex, nvmlGpuP2PStatus_t* p2pStatus) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetUUID(nvmlDevice_t device, char* uuid, unsigned int length) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetMinorNumber(nvmlDevice_t device, unsigned int* minorNumber) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetBoardPartNumber(nvmlDevice_t device, char* partNumber, unsigned int length) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetInforomVersion(nvmlDevice_t device, nvmlInforomObject_t object, char* version, unsigned int length) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetInforomImageVersion(nvmlDevice_t device, char* version, unsigned int length) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetInforomConfigurationChecksum(nvmlDevice_t device, unsigned int* checksum) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceValidateInforom(nvmlDevice_t device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetLastBBXFlushTime(nvmlDevice_t device, unsigned long long* timestamp, unsigned long* durationUs) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetDisplayMode(nvmlDevice_t device, nvmlEnableState_t* display) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetDisplayActive(nvmlDevice_t device, nvmlEnableState_t* isActive) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetPersistenceMode(nvmlDevice_t device, nvmlEnableState_t* mode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetPciInfoExt(nvmlDevice_t device, nvmlPciInfoExt_t* pci) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetPciInfo_v3(nvmlDevice_t device, nvmlPciInfo_t* pci) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetMaxPcieLinkGeneration(nvmlDevice_t device, unsigned int* maxLinkGen) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetGpuMaxPcieLinkGeneration(nvmlDevice_t device, unsigned int* maxLinkGenDevice) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetMaxPcieLinkWidth(nvmlDevice_t device, unsigned int* maxLinkWidth) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetCurrPcieLinkGeneration(nvmlDevice_t device, unsigned int* currLinkGen) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetCurrPcieLinkWidth(nvmlDevice_t device, unsigned int* currLinkWidth) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetPcieThroughput(nvmlDevice_t device, nvmlPcieUtilCounter_t counter, unsigned int* value) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetPcieReplayCounter(nvmlDevice_t device, unsigned int* value) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetClockInfo(nvmlDevice_t device, nvmlClockType_t type, unsigned int* clock) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetMaxClockInfo(nvmlDevice_t device, nvmlClockType_t type, unsigned int* clock) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetGpcClkVfOffset(nvmlDevice_t device, int* offset) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetClock(nvmlDevice_t device, nvmlClockType_t clockType, nvmlClockId_t clockId, unsigned int* clockMHz) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetMaxCustomerBoostClock(nvmlDevice_t device, nvmlClockType_t clockType, unsigned int* clockMHz) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetSupportedMemoryClocks(nvmlDevice_t device, unsigned int* count, unsigned int* clocksMHz) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetSupportedGraphicsClocks(nvmlDevice_t device, unsigned int memoryClockMHz, unsigned int* count, unsigned int* clocksMHz) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetAutoBoostedClocksEnabled(nvmlDevice_t device, nvmlEnableState_t* isEnabled, nvmlEnableState_t* defaultIsEnabled) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetFanSpeed(nvmlDevice_t device, unsigned int* speed) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetFanSpeed_v2(nvmlDevice_t device, unsigned int fan, unsigned int* speed) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetFanSpeedRPM(nvmlDevice_t device, nvmlFanSpeedInfo_t* fanSpeed) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetTargetFanSpeed(nvmlDevice_t device, unsigned int fan, unsigned int* targetSpeed) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetMinMaxFanSpeed(nvmlDevice_t device, unsigned int* minSpeed, unsigned int* maxSpeed) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetFanControlPolicy_v2(nvmlDevice_t device, unsigned int fan, nvmlFanControlPolicy_t* policy) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetNumFans(nvmlDevice_t device, unsigned int* numFans) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetCoolerInfo(nvmlDevice_t device, nvmlCoolerInfo_t* coolerInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetTemperatureV(nvmlDevice_t device, nvmlTemperature_t* temperature) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetTemperatureThreshold(nvmlDevice_t device, nvmlTemperatureThresholds_t thresholdType, unsigned int* temp) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetMarginTemperature(nvmlDevice_t device, nvmlMarginTemperature_t* marginTempInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetThermalSettings(nvmlDevice_t device, unsigned int sensorIndex, nvmlGpuThermalSettings_t* pThermalSettings) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetPerformanceState(nvmlDevice_t device, nvmlPstates_t* pState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetCurrentClocksEventReasons(nvmlDevice_t device, unsigned long long* clocksEventReasons) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetSupportedClocksEventReasons(nvmlDevice_t device, unsigned long long* supportedClocksEventReasons) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetPowerState(nvmlDevice_t device, nvmlPstates_t* pState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetDynamicPstatesInfo(nvmlDevice_t device, nvmlGpuDynamicPstatesInfo_t* pDynamicPstatesInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetMemClkVfOffset(nvmlDevice_t device, int* offset) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetMinMaxClockOfPState(nvmlDevice_t device, nvmlClockType_t type, nvmlPstates_t pstate, unsigned int* minClockMHz, unsigned int* maxClockMHz) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetSupportedPerformanceStates(nvmlDevice_t device, nvmlPstates_t* pstates, unsigned int size) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetGpcClkMinMaxVfOffset(nvmlDevice_t device, int* minOffset, int* maxOffset) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetMemClkMinMaxVfOffset(nvmlDevice_t device, int* minOffset, int* maxOffset) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetClockOffsets(nvmlDevice_t device, nvmlClockOffset_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetClockOffsets(nvmlDevice_t device, nvmlClockOffset_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetPerformanceModes(nvmlDevice_t device, nvmlDevicePerfModes_t* perfModes) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetCurrentClockFreqs(nvmlDevice_t device, nvmlDeviceCurrentClockFreqs_t* currentClockFreqs) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetPowerManagementLimit(nvmlDevice_t device, unsigned int* limit) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetPowerManagementLimitConstraints(nvmlDevice_t device, unsigned int* minLimit, unsigned int* maxLimit) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetPowerManagementDefaultLimit(nvmlDevice_t device, unsigned int* defaultLimit) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetPowerUsage(nvmlDevice_t device, unsigned int* power) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetTotalEnergyConsumption(nvmlDevice_t device, unsigned long long* energy) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetEnforcedPowerLimit(nvmlDevice_t device, unsigned int* limit) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetGpuOperationMode(nvmlDevice_t device, nvmlGpuOperationMode_t* current, nvmlGpuOperationMode_t* pending) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetMemoryInfo_v2(nvmlDevice_t device, nvmlMemory_v2_t* memory) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetComputeMode(nvmlDevice_t device, nvmlComputeMode_t* mode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetCudaComputeCapability(nvmlDevice_t device, int* major, int* minor) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetDramEncryptionMode(nvmlDevice_t device, nvmlDramEncryptionInfo_t* current, nvmlDramEncryptionInfo_t* pending) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetDramEncryptionMode(nvmlDevice_t device, const nvmlDramEncryptionInfo_t* dramEncryption) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetEccMode(nvmlDevice_t device, nvmlEnableState_t* current, nvmlEnableState_t* pending) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetDefaultEccMode(nvmlDevice_t device, nvmlEnableState_t* defaultMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetBoardId(nvmlDevice_t device, unsigned int* boardId) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetMultiGpuBoard(nvmlDevice_t device, unsigned int* multiGpuBool) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetTotalEccErrors(nvmlDevice_t device, nvmlMemoryErrorType_t errorType, nvmlEccCounterType_t counterType, unsigned long long* eccCounts) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetMemoryErrorCounter(nvmlDevice_t device, nvmlMemoryErrorType_t errorType, nvmlEccCounterType_t counterType, nvmlMemoryLocation_t locationType, unsigned long long* count) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetUtilizationRates(nvmlDevice_t device, nvmlUtilization_t* utilization) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetEncoderUtilization(nvmlDevice_t device, unsigned int* utilization, unsigned int* samplingPeriodUs) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetEncoderCapacity(nvmlDevice_t device, nvmlEncoderType_t encoderQueryType, unsigned int* encoderCapacity) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetEncoderStats(nvmlDevice_t device, unsigned int* sessionCount, unsigned int* averageFps, unsigned int* averageLatency) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetEncoderSessions(nvmlDevice_t device, unsigned int* sessionCount, nvmlEncoderSessionInfo_t* sessionInfos) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetDecoderUtilization(nvmlDevice_t device, unsigned int* utilization, unsigned int* samplingPeriodUs) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetJpgUtilization(nvmlDevice_t device, unsigned int* utilization, unsigned int* samplingPeriodUs) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetOfaUtilization(nvmlDevice_t device, unsigned int* utilization, unsigned int* samplingPeriodUs) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetFBCStats(nvmlDevice_t device, nvmlFBCStats_t* fbcStats) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetFBCSessions(nvmlDevice_t device, unsigned int* sessionCount, nvmlFBCSessionInfo_t* sessionInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetDriverModel_v2(nvmlDevice_t device, nvmlDriverModel_t* current, nvmlDriverModel_t* pending) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetVbiosVersion(nvmlDevice_t device, char* version, unsigned int length) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetBridgeChipInfo(nvmlDevice_t device, nvmlBridgeChipHierarchy_t* bridgeHierarchy) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetComputeRunningProcesses_v3(nvmlDevice_t device, unsigned int* infoCount, nvmlProcessInfo_t* infos) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetGraphicsRunningProcesses_v3(nvmlDevice_t device, unsigned int* infoCount, nvmlProcessInfo_t* infos) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetMPSComputeRunningProcesses_v3(nvmlDevice_t device, unsigned int* infoCount, nvmlProcessInfo_t* infos) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetRunningProcessDetailList(nvmlDevice_t device, nvmlProcessDetailList_t* plist) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceOnSameBoard(nvmlDevice_t device1, nvmlDevice_t device2, int* onSameBoard) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetAPIRestriction(nvmlDevice_t device, nvmlRestrictedAPI_t apiType, nvmlEnableState_t* isRestricted) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetSamples(nvmlDevice_t device, nvmlSamplingType_t type, unsigned long long lastSeenTimeStamp, nvmlValueType_t* sampleValType, unsigned int* sampleCount, nvmlSample_t* samples) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetBAR1MemoryInfo(nvmlDevice_t device, nvmlBAR1Memory_t* bar1Memory) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetIrqNum(nvmlDevice_t device, unsigned int* irqNum) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetNumGpuCores(nvmlDevice_t device, unsigned int* numCores) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetPowerSource(nvmlDevice_t device, nvmlPowerSource_t* powerSource) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetMemoryBusWidth(nvmlDevice_t device, unsigned int* busWidth) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetPcieLinkMaxSpeed(nvmlDevice_t device, unsigned int* maxSpeed) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetPcieSpeed(nvmlDevice_t device, unsigned int* pcieSpeed) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetAdaptiveClockInfoStatus(nvmlDevice_t device, unsigned int* adaptiveClockStatus) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetBusType(nvmlDevice_t device, nvmlBusType_t* type) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetGpuFabricInfoV(nvmlDevice_t device, nvmlGpuFabricInfoV_t* gpuFabricInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlSystemGetConfComputeCapabilities(nvmlConfComputeSystemCaps_t* capabilities) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlSystemGetConfComputeState(nvmlConfComputeSystemState_t* state) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetConfComputeMemSizeInfo(nvmlDevice_t device, nvmlConfComputeMemSizeInfo_t* memInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlSystemGetConfComputeGpusReadyState(unsigned int* isAcceptingWork) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetConfComputeProtectedMemoryUsage(nvmlDevice_t device, nvmlMemory_t* memory) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetConfComputeGpuCertificate(nvmlDevice_t device, nvmlConfComputeGpuCertificate_t* gpuCert) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetConfComputeGpuAttestationReport(nvmlDevice_t device, nvmlConfComputeGpuAttestationReport_t* gpuAtstReport) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlSystemGetConfComputeKeyRotationThresholdInfo(nvmlConfComputeGetKeyRotationThresholdInfo_t* pKeyRotationThrInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetConfComputeUnprotectedMemSize(nvmlDevice_t device, unsigned long long sizeKiB) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlSystemSetConfComputeGpusReadyState(unsigned int isAcceptingWork) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlSystemSetConfComputeKeyRotationThresholdInfo(nvmlConfComputeSetKeyRotationThresholdInfo_t* pKeyRotationThrInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlSystemGetConfComputeSettings(nvmlSystemConfComputeSettings_t* settings) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetGspFirmwareVersion(nvmlDevice_t device, char* version) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetGspFirmwareMode(nvmlDevice_t device, unsigned int* isEnabled, unsigned int* defaultMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetSramEccErrorStatus(nvmlDevice_t device, nvmlEccSramErrorStatus_t* status) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetAccountingMode(nvmlDevice_t device, nvmlEnableState_t* mode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetAccountingStats(nvmlDevice_t device, unsigned int pid, nvmlAccountingStats_t* stats) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetAccountingPids(nvmlDevice_t device, unsigned int* count, unsigned int* pids) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetAccountingBufferSize(nvmlDevice_t device, unsigned int* bufferSize) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetRetiredPages(nvmlDevice_t device, nvmlPageRetirementCause_t cause, unsigned int* pageCount, unsigned long long* addresses) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetRetiredPages_v2(nvmlDevice_t device, nvmlPageRetirementCause_t cause, unsigned int* pageCount, unsigned long long* addresses, unsigned long long* timestamps) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetRetiredPagesPendingStatus(nvmlDevice_t device, nvmlEnableState_t* isPending) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetRemappedRows(nvmlDevice_t device, unsigned int* corrRows, unsigned int* uncRows, unsigned int* isPending, unsigned int* failureOccurred) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetRowRemapperHistogram(nvmlDevice_t device, nvmlRowRemapperHistogramValues_t* values) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetArchitecture(nvmlDevice_t device, nvmlDeviceArchitecture_t* arch) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetClkMonStatus(nvmlDevice_t device, nvmlClkMonStatus_t* status) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetProcessUtilization(nvmlDevice_t device, nvmlProcessUtilizationSample_t* utilization, unsigned int* processSamplesCount, unsigned long long lastSeenTimeStamp) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetProcessesUtilizationInfo(nvmlDevice_t device, nvmlProcessesUtilizationInfo_t* procesesUtilInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetPlatformInfo(nvmlDevice_t device, nvmlPlatformInfo_t* platformInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlUnitSetLedState(nvmlUnit_t unit, nvmlLedColor_t color) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetPersistenceMode(nvmlDevice_t device, nvmlEnableState_t mode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetComputeMode(nvmlDevice_t device, nvmlComputeMode_t mode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetEccMode(nvmlDevice_t device, nvmlEnableState_t ecc) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceClearEccErrorCounts(nvmlDevice_t device, nvmlEccCounterType_t counterType) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetDriverModel(nvmlDevice_t device, nvmlDriverModel_t driverModel, unsigned int flags) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetGpuLockedClocks(nvmlDevice_t device, unsigned int minGpuClockMHz, unsigned int maxGpuClockMHz) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceResetGpuLockedClocks(nvmlDevice_t device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetMemoryLockedClocks(nvmlDevice_t device, unsigned int minMemClockMHz, unsigned int maxMemClockMHz) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceResetMemoryLockedClocks(nvmlDevice_t device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetAutoBoostedClocksEnabled(nvmlDevice_t device, nvmlEnableState_t enabled) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetDefaultAutoBoostedClocksEnabled(nvmlDevice_t device, nvmlEnableState_t enabled, unsigned int flags) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetDefaultFanSpeed_v2(nvmlDevice_t device, unsigned int fan) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetFanControlPolicy(nvmlDevice_t device, unsigned int fan, nvmlFanControlPolicy_t policy) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetTemperatureThreshold(nvmlDevice_t device, nvmlTemperatureThresholds_t thresholdType, int* temp) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetGpuOperationMode(nvmlDevice_t device, nvmlGpuOperationMode_t mode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetAPIRestriction(nvmlDevice_t device, nvmlRestrictedAPI_t apiType, nvmlEnableState_t isRestricted) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetFanSpeed_v2(nvmlDevice_t device, unsigned int fan, unsigned int speed) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetAccountingMode(nvmlDevice_t device, nvmlEnableState_t mode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceClearAccountingPids(nvmlDevice_t device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetPowerManagementLimit_v2(nvmlDevice_t device, nvmlPowerValue_v2_t* powerValue) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetNvLinkState(nvmlDevice_t device, unsigned int link, nvmlEnableState_t* isActive) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetNvLinkVersion(nvmlDevice_t device, unsigned int link, unsigned int* version) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetNvLinkCapability(nvmlDevice_t device, unsigned int link, nvmlNvLinkCapability_t capability, unsigned int* capResult) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetNvLinkRemotePciInfo_v2(nvmlDevice_t device, unsigned int link, nvmlPciInfo_t* pci) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetNvLinkErrorCounter(nvmlDevice_t device, unsigned int link, nvmlNvLinkErrorCounter_t counter, unsigned long long* counterValue) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceResetNvLinkErrorCounters(nvmlDevice_t device, unsigned int link) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetNvLinkRemoteDeviceType(nvmlDevice_t device, unsigned int link, nvmlIntNvLinkDeviceType_t* pNvLinkDeviceType) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetNvLinkDeviceLowPowerThreshold(nvmlDevice_t device, nvmlNvLinkPowerThres_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlSystemSetNvlinkBwMode(unsigned int nvlinkBwMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlSystemGetNvlinkBwMode(unsigned int* nvlinkBwMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetNvlinkSupportedBwModes(nvmlDevice_t device, nvmlNvlinkSupportedBwModes_t* supportedBwMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetNvlinkBwMode(nvmlDevice_t device, nvmlNvlinkGetBwMode_t* getBwMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetNvlinkBwMode(nvmlDevice_t device, nvmlNvlinkSetBwMode_t* setBwMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlEventSetCreate(nvmlEventSet_t* set) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceRegisterEvents(nvmlDevice_t device, unsigned long long eventTypes, nvmlEventSet_t set) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetSupportedEventTypes(nvmlDevice_t device, unsigned long long* eventTypes) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlEventSetWait_v2(nvmlEventSet_t set, nvmlEventData_t* data, unsigned int timeoutms) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlEventSetFree(nvmlEventSet_t set) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlSystemEventSetCreate(nvmlSystemEventSetCreateRequest_t* request) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlSystemEventSetFree(nvmlSystemEventSetFreeRequest_t* request) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlSystemRegisterEvents(nvmlSystemRegisterEventRequest_t* request) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlSystemEventSetWait(nvmlSystemEventSetWaitRequest_t* request) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceModifyDrainState(nvmlPciInfo_t* pciInfo, nvmlEnableState_t newState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceQueryDrainState(nvmlPciInfo_t* pciInfo, nvmlEnableState_t* currentState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceRemoveGpu_v2(nvmlPciInfo_t* pciInfo, nvmlDetachGpuState_t gpuState, nvmlPcieLinkState_t linkState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceDiscoverGpus(nvmlPciInfo_t* pciInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetFieldValues(nvmlDevice_t device, int valuesCount, nvmlFieldValue_t* values) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceClearFieldValues(nvmlDevice_t device, int valuesCount, nvmlFieldValue_t* values) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetVirtualizationMode(nvmlDevice_t device, nvmlGpuVirtualizationMode_t* pVirtualMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetHostVgpuMode(nvmlDevice_t device, nvmlHostVgpuMode_t* pHostVgpuMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetVirtualizationMode(nvmlDevice_t device, nvmlGpuVirtualizationMode_t virtualMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetVgpuHeterogeneousMode(nvmlDevice_t device, nvmlVgpuHeterogeneousMode_t* pHeterogeneousMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetVgpuHeterogeneousMode(nvmlDevice_t device, const nvmlVgpuHeterogeneousMode_t* pHeterogeneousMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuInstanceGetPlacementId(nvmlVgpuInstance_t vgpuInstance, nvmlVgpuPlacementId_t* pPlacement) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetVgpuTypeSupportedPlacements(nvmlDevice_t device, nvmlVgpuTypeId_t vgpuTypeId, nvmlVgpuPlacementList_t* pPlacementList) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetVgpuTypeCreatablePlacements(nvmlDevice_t device, nvmlVgpuTypeId_t vgpuTypeId, nvmlVgpuPlacementList_t* pPlacementList) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuTypeGetGspHeapSize(nvmlVgpuTypeId_t vgpuTypeId, unsigned long long* gspHeapSize) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuTypeGetFbReservation(nvmlVgpuTypeId_t vgpuTypeId, unsigned long long* fbReservation) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuInstanceGetRuntimeStateSize(nvmlVgpuInstance_t vgpuInstance, nvmlVgpuRuntimeState_t* pState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetVgpuCapabilities(nvmlDevice_t device, nvmlDeviceVgpuCapability_t capability, nvmlEnableState_t state) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetGridLicensableFeatures_v4(nvmlDevice_t device, nvmlGridLicensableFeatures_t* pGridLicensableFeatures) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlGetVgpuDriverCapabilities(nvmlVgpuDriverCapability_t capability, unsigned int* capResult) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetVgpuCapabilities(nvmlDevice_t device, nvmlDeviceVgpuCapability_t capability, unsigned int* capResult) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetSupportedVgpus(nvmlDevice_t device, unsigned int* vgpuCount, nvmlVgpuTypeId_t* vgpuTypeIds) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetCreatableVgpus(nvmlDevice_t device, unsigned int* vgpuCount, nvmlVgpuTypeId_t* vgpuTypeIds) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuTypeGetClass(nvmlVgpuTypeId_t vgpuTypeId, char* vgpuTypeClass, unsigned int* size) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuTypeGetName(nvmlVgpuTypeId_t vgpuTypeId, char* vgpuTypeName, unsigned int* size) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuTypeGetGpuInstanceProfileId(nvmlVgpuTypeId_t vgpuTypeId, unsigned int* gpuInstanceProfileId) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuTypeGetDeviceID(nvmlVgpuTypeId_t vgpuTypeId, unsigned long long* deviceID, unsigned long long* subsystemID) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuTypeGetFramebufferSize(nvmlVgpuTypeId_t vgpuTypeId, unsigned long long* fbSize) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuTypeGetNumDisplayHeads(nvmlVgpuTypeId_t vgpuTypeId, unsigned int* numDisplayHeads) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuTypeGetResolution(nvmlVgpuTypeId_t vgpuTypeId, unsigned int displayIndex, unsigned int* xdim, unsigned int* ydim) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuTypeGetLicense(nvmlVgpuTypeId_t vgpuTypeId, char* vgpuTypeLicenseString, unsigned int size) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuTypeGetFrameRateLimit(nvmlVgpuTypeId_t vgpuTypeId, unsigned int* frameRateLimit) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuTypeGetMaxInstances(nvmlDevice_t device, nvmlVgpuTypeId_t vgpuTypeId, unsigned int* vgpuInstanceCount) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuTypeGetMaxInstancesPerVm(nvmlVgpuTypeId_t vgpuTypeId, unsigned int* vgpuInstanceCountPerVm) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuTypeGetBAR1Info(nvmlVgpuTypeId_t vgpuTypeId, nvmlVgpuTypeBar1Info_t* bar1Info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetActiveVgpus(nvmlDevice_t device, unsigned int* vgpuCount, nvmlVgpuInstance_t* vgpuInstances) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuInstanceGetVmID(nvmlVgpuInstance_t vgpuInstance, char* vmId, unsigned int size, nvmlVgpuVmIdType_t* vmIdType) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuInstanceGetUUID(nvmlVgpuInstance_t vgpuInstance, char* uuid, unsigned int size) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuInstanceGetVmDriverVersion(nvmlVgpuInstance_t vgpuInstance, char* version, unsigned int length) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuInstanceGetFbUsage(nvmlVgpuInstance_t vgpuInstance, unsigned long long* fbUsage) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuInstanceGetLicenseStatus(nvmlVgpuInstance_t vgpuInstance, unsigned int* licensed) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuInstanceGetType(nvmlVgpuInstance_t vgpuInstance, nvmlVgpuTypeId_t* vgpuTypeId) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuInstanceGetFrameRateLimit(nvmlVgpuInstance_t vgpuInstance, unsigned int* frameRateLimit) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuInstanceGetEccMode(nvmlVgpuInstance_t vgpuInstance, nvmlEnableState_t* eccMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuInstanceGetEncoderCapacity(nvmlVgpuInstance_t vgpuInstance, unsigned int* encoderCapacity) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuInstanceSetEncoderCapacity(nvmlVgpuInstance_t vgpuInstance, unsigned int encoderCapacity) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuInstanceGetEncoderStats(nvmlVgpuInstance_t vgpuInstance, unsigned int* sessionCount, unsigned int* averageFps, unsigned int* averageLatency) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuInstanceGetEncoderSessions(nvmlVgpuInstance_t vgpuInstance, unsigned int* sessionCount, nvmlEncoderSessionInfo_t* sessionInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuInstanceGetFBCStats(nvmlVgpuInstance_t vgpuInstance, nvmlFBCStats_t* fbcStats) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuInstanceGetFBCSessions(nvmlVgpuInstance_t vgpuInstance, unsigned int* sessionCount, nvmlFBCSessionInfo_t* sessionInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuInstanceGetGpuInstanceId(nvmlVgpuInstance_t vgpuInstance, unsigned int* gpuInstanceId) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuInstanceGetGpuPciId(nvmlVgpuInstance_t vgpuInstance, char* vgpuPciId, unsigned int* length) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuTypeGetCapabilities(nvmlVgpuTypeId_t vgpuTypeId, nvmlVgpuCapability_t capability, unsigned int* capResult) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuInstanceGetMdevUUID(nvmlVgpuInstance_t vgpuInstance, char* mdevUuid, unsigned int size) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlGpuInstanceGetCreatableVgpus(nvmlGpuInstance_t gpuInstance, nvmlVgpuTypeIdInfo_t* pVgpus) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuTypeGetMaxInstancesPerGpuInstance(nvmlVgpuTypeMaxInstance_t* pMaxInstance) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlGpuInstanceGetActiveVgpus(nvmlGpuInstance_t gpuInstance, nvmlActiveVgpuInstanceInfo_t* pVgpuInstanceInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlGpuInstanceSetVgpuSchedulerState(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerState_t* pScheduler) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlGpuInstanceGetVgpuSchedulerState(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerStateInfo_t* pSchedulerStateInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlGpuInstanceGetVgpuSchedulerLog(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerLogInfo_t* pSchedulerLogInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlGpuInstanceGetVgpuTypeCreatablePlacements(nvmlGpuInstance_t gpuInstance, nvmlVgpuCreatablePlacementInfo_t* pCreatablePlacementInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlGpuInstanceGetVgpuHeterogeneousMode(nvmlGpuInstance_t gpuInstance, nvmlVgpuHeterogeneousMode_t* pHeterogeneousMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlGpuInstanceSetVgpuHeterogeneousMode(nvmlGpuInstance_t gpuInstance, const nvmlVgpuHeterogeneousMode_t* pHeterogeneousMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuInstanceGetMetadata(nvmlVgpuInstance_t vgpuInstance, nvmlVgpuMetadata_t* vgpuMetadata, unsigned int* bufferSize) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetVgpuMetadata(nvmlDevice_t device, nvmlVgpuPgpuMetadata_t* pgpuMetadata, unsigned int* bufferSize) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlGetVgpuCompatibility(nvmlVgpuMetadata_t* vgpuMetadata, nvmlVgpuPgpuMetadata_t* pgpuMetadata, nvmlVgpuPgpuCompatibility_t* compatibilityInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetPgpuMetadataString(nvmlDevice_t device, char* pgpuMetadata, unsigned int* bufferSize) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetVgpuSchedulerLog(nvmlDevice_t device, nvmlVgpuSchedulerLog_t* pSchedulerLog) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetVgpuSchedulerState(nvmlDevice_t device, nvmlVgpuSchedulerGetState_t* pSchedulerState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetVgpuSchedulerCapabilities(nvmlDevice_t device, nvmlVgpuSchedulerCapabilities_t* pCapabilities) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetVgpuSchedulerState(nvmlDevice_t device, nvmlVgpuSchedulerSetState_t* pSchedulerState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlGetVgpuVersion(nvmlVgpuVersion_t* supported, nvmlVgpuVersion_t* current) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlSetVgpuVersion(nvmlVgpuVersion_t* vgpuVersion) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetVgpuUtilization(nvmlDevice_t device, unsigned long long lastSeenTimeStamp, nvmlValueType_t* sampleValType, unsigned int* vgpuInstanceSamplesCount, nvmlVgpuInstanceUtilizationSample_t* utilizationSamples) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetVgpuInstancesUtilizationInfo(nvmlDevice_t device, nvmlVgpuInstancesUtilizationInfo_t* vgpuUtilInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetVgpuProcessUtilization(nvmlDevice_t device, unsigned long long lastSeenTimeStamp, unsigned int* vgpuProcessSamplesCount, nvmlVgpuProcessUtilizationSample_t* utilizationSamples) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetVgpuProcessesUtilizationInfo(nvmlDevice_t device, nvmlVgpuProcessesUtilizationInfo_t* vgpuProcUtilInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuInstanceGetAccountingMode(nvmlVgpuInstance_t vgpuInstance, nvmlEnableState_t* mode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuInstanceGetAccountingPids(nvmlVgpuInstance_t vgpuInstance, unsigned int* count, unsigned int* pids) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuInstanceGetAccountingStats(nvmlVgpuInstance_t vgpuInstance, unsigned int pid, nvmlAccountingStats_t* stats) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuInstanceClearAccountingPids(nvmlVgpuInstance_t vgpuInstance) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlVgpuInstanceGetLicenseInfo_v2(nvmlVgpuInstance_t vgpuInstance, nvmlVgpuLicenseInfo_t* licenseInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlGetExcludedDeviceCount(unsigned int* deviceCount) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlGetExcludedDeviceInfoByIndex(unsigned int index, nvmlExcludedDeviceInfo_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetMigMode(nvmlDevice_t device, unsigned int mode, nvmlReturn_t* activationStatus) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetMigMode(nvmlDevice_t device, unsigned int* currentMode, unsigned int* pendingMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetGpuInstanceProfileInfoV(nvmlDevice_t device, unsigned int profile, nvmlGpuInstanceProfileInfo_v2_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetGpuInstancePossiblePlacements_v2(nvmlDevice_t device, unsigned int profileId, nvmlGpuInstancePlacement_t* placements, unsigned int* count) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetGpuInstanceRemainingCapacity(nvmlDevice_t device, unsigned int profileId, unsigned int* count) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceCreateGpuInstance(nvmlDevice_t device, unsigned int profileId, nvmlGpuInstance_t* gpuInstance) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceCreateGpuInstanceWithPlacement(nvmlDevice_t device, unsigned int profileId, const nvmlGpuInstancePlacement_t* placement, nvmlGpuInstance_t* gpuInstance) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlGpuInstanceDestroy(nvmlGpuInstance_t gpuInstance) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetGpuInstances(nvmlDevice_t device, unsigned int profileId, nvmlGpuInstance_t* gpuInstances, unsigned int* count) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetGpuInstanceById(nvmlDevice_t device, unsigned int id, nvmlGpuInstance_t* gpuInstance) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlGpuInstanceGetInfo(nvmlGpuInstance_t gpuInstance, nvmlGpuInstanceInfo_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlGpuInstanceGetComputeInstanceProfileInfoV(nvmlGpuInstance_t gpuInstance, unsigned int profile, unsigned int engProfile, nvmlComputeInstanceProfileInfo_v2_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlGpuInstanceGetComputeInstanceRemainingCapacity(nvmlGpuInstance_t gpuInstance, unsigned int profileId, unsigned int* count) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlGpuInstanceGetComputeInstancePossiblePlacements(nvmlGpuInstance_t gpuInstance, unsigned int profileId, nvmlComputeInstancePlacement_t* placements, unsigned int* count) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlGpuInstanceCreateComputeInstance(nvmlGpuInstance_t gpuInstance, unsigned int profileId, nvmlComputeInstance_t* computeInstance) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlGpuInstanceCreateComputeInstanceWithPlacement(nvmlGpuInstance_t gpuInstance, unsigned int profileId, const nvmlComputeInstancePlacement_t* placement, nvmlComputeInstance_t* computeInstance) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlComputeInstanceDestroy(nvmlComputeInstance_t computeInstance) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlGpuInstanceGetComputeInstances(nvmlGpuInstance_t gpuInstance, unsigned int profileId, nvmlComputeInstance_t* computeInstances, unsigned int* count) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlGpuInstanceGetComputeInstanceById(nvmlGpuInstance_t gpuInstance, unsigned int id, nvmlComputeInstance_t* computeInstance) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlComputeInstanceGetInfo_v2(nvmlComputeInstance_t computeInstance, nvmlComputeInstanceInfo_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceIsMigDeviceHandle(nvmlDevice_t device, unsigned int* isMigDevice) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetGpuInstanceId(nvmlDevice_t device, unsigned int* id) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetComputeInstanceId(nvmlDevice_t device, unsigned int* id) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetMaxMigDeviceCount(nvmlDevice_t device, unsigned int* count) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetMigDeviceHandleByIndex(nvmlDevice_t device, unsigned int index, nvmlDevice_t* migDevice) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetDeviceHandleFromMigDeviceHandle(nvmlDevice_t migDevice, nvmlDevice_t* device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetCapabilities(nvmlDevice_t device, nvmlDeviceCapabilities_t* caps) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDevicePowerSmoothingActivatePresetProfile(nvmlDevice_t device, nvmlPowerSmoothingProfile_t* profile) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDevicePowerSmoothingUpdatePresetProfileParam(nvmlDevice_t device, nvmlPowerSmoothingProfile_t* profile) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDevicePowerSmoothingSetState(nvmlDevice_t device, nvmlPowerSmoothingState_t* state) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetAddressingMode(nvmlDevice_t device, nvmlDeviceAddressingMode_t* mode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetRepairStatus(nvmlDevice_t device, nvmlRepairStatus_t* repairStatus) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetPowerMizerMode_v1(nvmlDevice_t device, nvmlDevicePowerMizerModes_v1_t* powerMizerMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetPowerMizerMode_v1(nvmlDevice_t device, nvmlDevicePowerMizerModes_v1_t* powerMizerMode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetPdi(nvmlDevice_t device, nvmlPdi_t* pdi) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetHostname_v1(nvmlDevice_t device, nvmlHostname_v1_t* hostname) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetHostname_v1(nvmlDevice_t device, nvmlHostname_v1_t* hostname) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetNvLinkInfo(nvmlDevice_t device, nvmlNvLinkInfo_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceReadWritePRM_v1(nvmlDevice_t device, nvmlPRMTLV_v1_t* buffer) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetGpuInstanceProfileInfoByIdV(nvmlDevice_t device, unsigned int profileId, nvmlGpuInstanceProfileInfo_v2_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetSramUniqueUncorrectedEccErrorCounts(nvmlDevice_t device, nvmlEccSramUniqueUncorrectedErrorCounts_t* errorCounts) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetUnrepairableMemoryFlag_v1(nvmlDevice_t device, nvmlUnrepairableMemoryStatus_v1_t* unrepairableMemoryStatus) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceReadPRMCounters_v1(nvmlDevice_t device, nvmlPRMCounterList_v1_t* counterList) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetRusdSettings_v1(nvmlDevice_t device, nvmlRusdSettings_v1_t* settings) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceVgpuForceGspUnload(nvmlDevice_t device) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetVgpuSchedulerState_v2(nvmlDevice_t device, nvmlVgpuSchedulerStateInfo_v2_t* pSchedulerStateInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlGpuInstanceGetVgpuSchedulerState_v2(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerStateInfo_v2_t* pSchedulerStateInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetVgpuSchedulerLog_v2(nvmlDevice_t device, nvmlVgpuSchedulerLogInfo_v2_t* pSchedulerLogInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlGpuInstanceGetVgpuSchedulerLog_v2(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerLogInfo_v2_t* pSchedulerLogInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetVgpuSchedulerState_v2(nvmlDevice_t device, nvmlVgpuSchedulerState_v2_t* pSchedulerState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlGpuInstanceSetVgpuSchedulerState_v2(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerState_v2_t* pSchedulerState) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlSystemGetCPER_v1(nvmlGetCPER_v1_t* cper) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetBBXTimeData_v1(nvmlDevice_t device, nvmlBBXTimeData_v1_t* timeData) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetAccountingStats_v2(nvmlDevice_t device, nvmlAccountingStats_v2_t* stats) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetRemappedRows_v2(nvmlDevice_t device, nvmlRemappedRowsInfo_v2_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetAdaptiveTgpMode_v1(nvmlDevice_t device, nvmlEnableState_t mode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetAdaptiveTgpModeInfo_v1(nvmlDevice_t device, nvmlAdaptiveTgpModeInfo_v1_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetMemoryLimits_v1(nvmlDevice_t device, nvmlSetMemoryLimits_v1_t* limits) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetMemoryLimits_v1(nvmlDevice_t device, nvmlGetMemoryLimits_v1_t* limits) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetGpuFabricInfo_v4(nvmlDevice_t device, nvmlGpuFabricInfo_v4_t* gpuFabricInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDevicePerfMetricsGetSamples_v1(nvmlDevice_t device, nvmlPerfMetricsSamples_v1_t* samples) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetNvlinkBwModeAsync_v1(nvmlDevice_t device, nvmlNvlinkSetBwModeAsync_v1_t* setBwModeAsync) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetNvLinkTelemetrySamples_v1(nvmlDevice_t device, nvmlNvlinkTelemetrySamples_v1_t* samples) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlEventSetRegisterGpuOperationalEvents_v1(nvmlEventSet_t eventSet, const nvmlGpuOperationalEventConfig_v1_t* config) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlEventSetWait_v3(nvmlEventSet_t set, nvmlEventSetWait_v3_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlEventSetGetContextCount_v1(nvmlEventSet_t set, nvmlEventSetGetContextCount_v1_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlEventSetGetContextInfo_v1(nvmlEventSet_t set, nvmlEventSetGetContextInfo_v1_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlEventSetGetContextData_v1(nvmlEventSet_t set, nvmlEventSetGetContextData_v1_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1(nvmlEventSet_t set, nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetBankRemapperStatus_v1(nvmlDevice_t device, nvmlEccBankRemapperStatus_v1_t* pBankRemapperStatus) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/cynvrtc.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/cynvrtc.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..5840bb9f6124d718ea3e77ba9aaf94c805cf5516 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/bindings/cynvrtc.cpython-312-x86_64-linux-gnu.so differ diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/cynvrtc.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/cynvrtc.pxd new file mode 100644 index 0000000000000000000000000000000000000000..62f3056d2266a07a99debc9195df8b016402ca49 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/cynvrtc.pxd @@ -0,0 +1,86 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. + + + +# ENUMS +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a5c9499b37f9bbb764b0cac167daeae7f4539de7093938c95d2fdc83fe70e8f6 +cdef extern from 'nvrtc.h': + ctypedef enum nvrtcResult "nvrtcResult": + NVRTC_SUCCESS + NVRTC_ERROR_OUT_OF_MEMORY + NVRTC_ERROR_PROGRAM_CREATION_FAILURE + NVRTC_ERROR_INVALID_INPUT + NVRTC_ERROR_INVALID_PROGRAM + NVRTC_ERROR_INVALID_OPTION + NVRTC_ERROR_COMPILATION + NVRTC_ERROR_BUILTIN_OPERATION_FAILURE + NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION + NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION + NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID + NVRTC_ERROR_INTERNAL_ERROR + NVRTC_ERROR_TIME_FILE_WRITE_FAILED + NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED + NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED + NVRTC_ERROR_PCH_CREATE + NVRTC_ERROR_CANCELLED + NVRTC_ERROR_TIME_TRACE_FILE_WRITE_FAILED + NVRTC_ERROR_BUSY +cdef enum: _NVRTCRESULT_INTERNAL_LOADING_ERROR = -42 + + +cdef enum: NVRTC_INSTALL_HEADERS_SKIP_IF_EXISTS = 0 +cdef enum: NVRTC_INSTALL_HEADERS_FORCE_OVERWRITE = 1 +cdef enum: NVRTC_INSTALL_HEADERS_NO_WAIT = 2 + + +# TYPES +cdef extern from 'nvrtc.h': + ctypedef struct _nvrtcProgram: + pass + ctypedef _nvrtcProgram* nvrtcProgram 'nvrtcProgram' + + +cdef extern from 'nvrtc.h': + ctypedef struct nvrtcBundledHeadersInfo 'nvrtcBundledHeadersInfo': + int available + size_t compressedSize + size_t uncompressedSize + int cudaVersionMajor + int cudaVersionMinor + unsigned int numFiles + + +# FUNCTIONS +cdef const char* nvrtcGetErrorString(nvrtcResult result) except?NULL nogil +cdef nvrtcResult nvrtcVersion(int* major, int* minor) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult nvrtcGetNumSupportedArchs(int* numArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult nvrtcGetSupportedArchs(int* supportedArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil +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 +cdef nvrtcResult nvrtcDestroyProgram(nvrtcProgram* prog) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult nvrtcCompileProgram(nvrtcProgram prog, int numOptions, const char** options) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult nvrtcGetPTXSize(nvrtcProgram prog, size_t* ptxSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult nvrtcGetPTX(nvrtcProgram prog, char* ptx) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult nvrtcGetCUBINSize(nvrtcProgram prog, size_t* cubinSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult nvrtcGetCUBIN(nvrtcProgram prog, char* cubin) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult nvrtcGetLTOIRSize(nvrtcProgram prog, size_t* LTOIRSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult nvrtcGetLTOIR(nvrtcProgram prog, char* LTOIR) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult nvrtcGetOptiXIRSize(nvrtcProgram prog, size_t* optixirSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult nvrtcGetOptiXIR(nvrtcProgram prog, char* optixir) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult nvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult nvrtcGetProgramLog(nvrtcProgram prog, char* log) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult nvrtcAddNameExpression(nvrtcProgram prog, const char* name_expression) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult nvrtcGetPCHHeapSize(size_t* ret) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult nvrtcSetPCHHeapSize(size_t size) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult nvrtcGetPCHCreateStatus(nvrtcProgram prog) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult nvrtcGetPCHHeapSizeRequired(nvrtcProgram prog, size_t* size) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult nvrtcSetFlowCallback(nvrtcProgram prog, void * callback, void* payload) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult nvrtcGetTileIRSize(nvrtcProgram prog, size_t* TileIRSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult nvrtcGetTileIR(nvrtcProgram prog, char* TileIR) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult nvrtcInstallBundledHeaders(const char* installPath, unsigned int flags, const char** errorLog) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult nvrtcGetBundledHeadersInfo(nvrtcBundledHeadersInfo* info, const char** errorLog) except ?NVRTC_ERROR_INVALID_INPUT nogil +cdef nvrtcResult nvrtcRemoveBundledHeaders(const char* installPath, const char** errorLog) except ?NVRTC_ERROR_INVALID_INPUT nogil diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/cynvvm.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/cynvvm.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..7ffc0bd945b498aa8f7571f737f869feac657cfb Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/bindings/cynvvm.cpython-312-x86_64-linux-gnu.so differ diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/cynvvm.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/cynvvm.pxd new file mode 100644 index 0000000000000000000000000000000000000000..1dea8578b409b0056d087d39831d9088d0a4858d --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/cynvvm.pxd @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This code was automatically generated across versions from 12.0.1 to 13.4.1. Do not modify it directly. + + +############################################################################### +# Types (structs, enums, ...) +############################################################################### + +# enums +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=060a4e1d735676d6239664555a8a07b292481085ca0f5b5f362ce5289f20ca6d +ctypedef enum nvvmResult "nvvmResult": + NVVM_SUCCESS "NVVM_SUCCESS" = 0 + NVVM_ERROR_OUT_OF_MEMORY "NVVM_ERROR_OUT_OF_MEMORY" = 1 + NVVM_ERROR_PROGRAM_CREATION_FAILURE "NVVM_ERROR_PROGRAM_CREATION_FAILURE" = 2 + NVVM_ERROR_IR_VERSION_MISMATCH "NVVM_ERROR_IR_VERSION_MISMATCH" = 3 + NVVM_ERROR_INVALID_INPUT "NVVM_ERROR_INVALID_INPUT" = 4 + NVVM_ERROR_INVALID_PROGRAM "NVVM_ERROR_INVALID_PROGRAM" = 5 + NVVM_ERROR_INVALID_IR "NVVM_ERROR_INVALID_IR" = 6 + NVVM_ERROR_INVALID_OPTION "NVVM_ERROR_INVALID_OPTION" = 7 + NVVM_ERROR_NO_MODULE_IN_PROGRAM "NVVM_ERROR_NO_MODULE_IN_PROGRAM" = 8 + NVVM_ERROR_COMPILATION "NVVM_ERROR_COMPILATION" = 9 + NVVM_ERROR_CANCELLED "NVVM_ERROR_CANCELLED" = 10 + _NVVMRESULT_INTERNAL_LOADING_ERROR "_NVVMRESULT_INTERNAL_LOADING_ERROR" = -42 + + +# types +ctypedef void* nvvmProgram 'nvvmProgram' + + +############################################################################### +# Functions +############################################################################### + +cdef const char* nvvmGetErrorString(nvvmResult result) except?NULL nogil +cdef nvvmResult nvvmVersion(int* major, int* minor) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult nvvmIRVersion(int* majorIR, int* minorIR, int* majorDbg, int* minorDbg) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult nvvmCreateProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult nvvmDestroyProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult nvvmAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult nvvmLazyAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult nvvmCompileProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult nvvmVerifyProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult nvvmGetCompiledResultSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult nvvmGetCompiledResult(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult nvvmGetProgramLogSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult nvvmGetProgramLog(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult nvvmLLVMVersion(const char* arch, int* major) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/cyruntime.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/cyruntime.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..e3a0ddf8215ea85a08e3ee605180f809e1265a0a --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/cyruntime.cpython-312-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ed0e0d23d23cd26aa605e0608937c4b9316d65517361d2b665a29493e6ec145 +size 119040 diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/cyruntime.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/cyruntime.pxd new file mode 100644 index 0000000000000000000000000000000000000000..2d705a6be16a56be74fe7683f6c9d74149e3b564 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/cyruntime.pxd @@ -0,0 +1,2690 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. + +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=c3643e519b69bdb09b9c4c6ff3ecd3aebb180636d00e9a7bd2fe129cbed3eeb4 +from libc.stdint cimport uint32_t, uint64_t + + +# Types overridden or aliased here because they are macros in driver_types.h +# (not real C types) and cannot be generated from headers directly. + +# GL +ctypedef unsigned int GLenum +ctypedef unsigned int GLuint + +# EGL +ctypedef void *EGLImageKHR +ctypedef void *EGLStreamKHR +ctypedef unsigned int EGLint +ctypedef void *EGLSyncKHR + +# VDPAU +ctypedef uint32_t VdpDevice +ctypedef unsigned long long VdpGetProcAddress +ctypedef uint32_t VdpVideoSurface +ctypedef uint32_t VdpOutputSurface + +# These four names are preprocessor macros in driver_types.h that alias the +# cudaLaunchAttribute* types. Omitting the C alias string is intentional: it +# preserves the Cython-mangled ABI (__pyx_t_...) that legacy_cython_gen produced, +# so downstream extensions compiled against the old headers keep working. +# Do NOT add 'CName' aliases here — that would break binary compatibility. +ctypedef cudaLaunchAttributeID cudaStreamAttrID +ctypedef cudaLaunchAttributeID cudaKernelNodeAttrID +ctypedef cudaLaunchAttributeValue cudaStreamAttrValue +ctypedef cudaLaunchAttributeValue cudaKernelNodeAttrValue + +# dim3 is used as a member type in several CUDA structs +cdef extern from 'vector_types.h': + ctypedef struct dim3 'dim3': + unsigned int x + unsigned int y + unsigned int z + +# Opaque CUDA runtime handle types declared as their underlying CU*_st pointer types +# (matching cydriver's declarations) so that runtime wrapper classes sharing _pvt_ptr +# with driver wrapper classes can assign values without Cython type errors. +cdef extern from 'driver_types.h': + cdef struct CUstream_st 'CUstream_st': + pass + ctypedef CUstream_st* cudaStream_t 'cudaStream_t' + +cdef extern from 'driver_types.h': + cdef struct CUevent_st 'CUevent_st': + pass + ctypedef CUevent_st* cudaEvent_t 'cudaEvent_t' + +cdef extern from 'driver_types.h': + cdef struct CUexternalMemory_st 'CUexternalMemory_st': + pass + ctypedef CUexternalMemory_st* cudaExternalMemory_t 'cudaExternalMemory_t' + +cdef extern from 'driver_types.h': + cdef struct CUexternalSemaphore_st 'CUexternalSemaphore_st': + pass + ctypedef CUexternalSemaphore_st* cudaExternalSemaphore_t 'cudaExternalSemaphore_t' + +cdef extern from 'driver_types.h': + cdef struct CUgraph_st 'CUgraph_st': + pass + ctypedef CUgraph_st* cudaGraph_t 'cudaGraph_t' + +cdef extern from 'driver_types.h': + cdef struct CUgraphNode_st 'CUgraphNode_st': + pass + ctypedef CUgraphNode_st* cudaGraphNode_t 'cudaGraphNode_t' + +cdef extern from 'driver_types.h': + cdef struct CUuserObject_st 'CUuserObject_st': + pass + ctypedef CUuserObject_st* cudaUserObject_t 'cudaUserObject_t' + +cdef extern from 'driver_types.h': + cdef struct CUfunc_st 'CUfunc_st': + pass + ctypedef CUfunc_st* cudaFunction_t 'cudaFunction_t' + +cdef extern from 'driver_types.h': + cdef struct CUkern_st 'CUkern_st': + pass + ctypedef CUkern_st* cudaKernel_t 'cudaKernel_t' + +cdef extern from 'driver_types.h': + cdef struct CUlib_st 'CUlib_st': + pass + ctypedef CUlib_st* cudaLibrary_t 'cudaLibrary_t' + +cdef extern from 'driver_types.h': + cdef struct CUmemPoolHandle_st 'CUmemPoolHandle_st': + pass + ctypedef CUmemPoolHandle_st* cudaMemPool_t 'cudaMemPool_t' + +cdef extern from 'driver_types.h': + cdef struct CUgraphExec_st 'CUgraphExec_st': + pass + ctypedef CUgraphExec_st* cudaGraphExec_t 'cudaGraphExec_t' + +cdef extern from 'driver_types.h': + cdef struct CUgraphDeviceUpdatableNode_st 'CUgraphDeviceUpdatableNode_st': + pass + ctypedef CUgraphDeviceUpdatableNode_st* cudaGraphDeviceNode_t 'cudaGraphDeviceNode_t' + +cdef extern from 'driver_types.h': + cdef struct CUlogsCallbackEntry_st 'CUlogsCallbackEntry_st': + pass + ctypedef CUlogsCallbackEntry_st* cudaLogsCallbackHandle 'cudaLogsCallbackHandle' + +cdef extern from 'driver_types.h': + cdef struct CUdevResourceDesc_st 'CUdevResourceDesc_st': + pass + ctypedef CUdevResourceDesc_st* cudaDevResourceDesc_t 'cudaDevResourceDesc_t' + +cdef extern from 'driver_types.h': + cdef struct cudaExecutionContext_st 'cudaExecutionContext_st': + pass + ctypedef cudaExecutionContext_st* cudaExecutionContext_t 'cudaExecutionContext_t' + +# Types that are outside the naming pattern or SKIPped but required for ABI compatibility +# with the lowpp layer (runtime.pxd) which was generated by legacy_cython_gen. +cdef extern from 'driver_types.h': + cdef struct CUuuid_st 'CUuuid_st': + char bytes[16] + ctypedef CUuuid_st CUuuid 'CUuuid' + +cdef extern from 'driver_types.h': + cdef struct cudalibraryHostUniversalFunctionAndDataTable 'cudalibraryHostUniversalFunctionAndDataTable': + void* functionTable + size_t functionWindowSize + void* dataTable + size_t dataWindowSize + +# Forward declarations for types that are SKIPped but referenced in non-skipped structs/functions +cdef extern from 'driver_types.h': + ctypedef struct cudaUUID_t 'cudaUUID_t': + char bytes[16] + +cdef extern from 'driver_types.h': + cdef struct cudaGraphicsResource 'cudaGraphicsResource': + pass + ctypedef cudaGraphicsResource* cudaGraphicsResource_t 'cudaGraphicsResource_t' + +cdef extern from *: + """ + struct CUeglStreamConnection_st; + typedef struct CUeglStreamConnection_st *cudaEglStreamConnection; + """ + cdef struct CUeglStreamConnection_st 'CUeglStreamConnection_st': + pass + +# Declared at module scope (not inside cdef extern from) so that Cython assigns +# its own mangled name (__pyx_t_...) to this typedef, preserving the Cython ABI +# that legacy_cython_gen produced for the EGL functions that take this type. +# Do NOT move this declaration back inside the cdef extern from block. +ctypedef CUeglStreamConnection_st* cudaEglStreamConnection + + +# ENUMS +cdef extern from 'driver_types.h': + cdef enum cudaError: + cudaSuccess + cudaErrorInvalidValue + cudaErrorMemoryAllocation + cudaErrorInitializationError + cudaErrorCudartUnloading + cudaErrorProfilerDisabled + cudaErrorProfilerNotInitialized + cudaErrorProfilerAlreadyStarted + cudaErrorProfilerAlreadyStopped + cudaErrorInvalidConfiguration + cudaErrorVersionTranslation + cudaErrorInvalidPitchValue + cudaErrorInvalidSymbol + cudaErrorInvalidHostPointer + cudaErrorInvalidDevicePointer + cudaErrorInvalidTexture + cudaErrorInvalidTextureBinding + cudaErrorInvalidChannelDescriptor + cudaErrorInvalidMemcpyDirection + cudaErrorAddressOfConstant + cudaErrorTextureFetchFailed + cudaErrorTextureNotBound + cudaErrorSynchronizationError + cudaErrorInvalidFilterSetting + cudaErrorInvalidNormSetting + cudaErrorMixedDeviceExecution + cudaErrorNotYetImplemented + cudaErrorMemoryValueTooLarge + cudaErrorStubLibrary + cudaErrorInsufficientDriver + cudaErrorCallRequiresNewerDriver + cudaErrorInvalidSurface + cudaErrorDuplicateVariableName + cudaErrorDuplicateTextureName + cudaErrorDuplicateSurfaceName + cudaErrorDevicesUnavailable + cudaErrorIncompatibleDriverContext + cudaErrorMissingConfiguration + cudaErrorPriorLaunchFailure + cudaErrorLaunchMaxDepthExceeded + cudaErrorLaunchFileScopedTex + cudaErrorLaunchFileScopedSurf + cudaErrorSyncDepthExceeded + cudaErrorLaunchPendingCountExceeded + cudaErrorInvalidDeviceFunction + cudaErrorNoDevice + cudaErrorInvalidDevice + cudaErrorDeviceNotLicensed + cudaErrorSoftwareValidityNotEstablished + cudaErrorStartupFailure + cudaErrorInvalidKernelImage + cudaErrorDeviceUninitialized + cudaErrorMapBufferObjectFailed + cudaErrorUnmapBufferObjectFailed + cudaErrorArrayIsMapped + cudaErrorAlreadyMapped + cudaErrorNoKernelImageForDevice + cudaErrorAlreadyAcquired + cudaErrorNotMapped + cudaErrorNotMappedAsArray + cudaErrorNotMappedAsPointer + cudaErrorECCUncorrectable + cudaErrorUnsupportedLimit + cudaErrorDeviceAlreadyInUse + cudaErrorPeerAccessUnsupported + cudaErrorInvalidPtx + cudaErrorInvalidGraphicsContext + cudaErrorNvlinkUncorrectable + cudaErrorJitCompilerNotFound + cudaErrorUnsupportedPtxVersion + cudaErrorJitCompilationDisabled + cudaErrorUnsupportedExecAffinity + cudaErrorUnsupportedDevSideSync + cudaErrorContained + cudaErrorInsufficientLoaderVersion + cudaErrorInvalidSource + cudaErrorFileNotFound + cudaErrorSharedObjectSymbolNotFound + cudaErrorSharedObjectInitFailed + cudaErrorOperatingSystem + cudaErrorInvalidResourceHandle + cudaErrorIllegalState + cudaErrorLossyQuery + cudaErrorSymbolNotFound + cudaErrorNotReady + cudaErrorIllegalAddress + cudaErrorLaunchOutOfResources + cudaErrorLaunchTimeout + cudaErrorLaunchIncompatibleTexturing + cudaErrorPeerAccessAlreadyEnabled + cudaErrorPeerAccessNotEnabled + cudaErrorSetOnActiveProcess + cudaErrorContextIsDestroyed + cudaErrorAssert + cudaErrorTooManyPeers + cudaErrorHostMemoryAlreadyRegistered + cudaErrorHostMemoryNotRegistered + cudaErrorHardwareStackError + cudaErrorIllegalInstruction + cudaErrorMisalignedAddress + cudaErrorInvalidAddressSpace + cudaErrorInvalidPc + cudaErrorLaunchFailure + cudaErrorCooperativeLaunchTooLarge + cudaErrorTensorMemoryLeak + cudaErrorNotPermitted + cudaErrorNotSupported + cudaErrorSystemNotReady + cudaErrorSystemDriverMismatch + cudaErrorCompatNotSupportedOnDevice + cudaErrorMpsConnectionFailed + cudaErrorMpsRpcFailure + cudaErrorMpsServerNotReady + cudaErrorMpsMaxClientsReached + cudaErrorMpsMaxConnectionsReached + cudaErrorMpsClientTerminated + cudaErrorCdpNotSupported + cudaErrorCdpVersionMismatch + cudaErrorStreamCaptureUnsupported + cudaErrorStreamCaptureInvalidated + cudaErrorStreamCaptureMerge + cudaErrorStreamCaptureUnmatched + cudaErrorStreamCaptureUnjoined + cudaErrorStreamCaptureIsolation + cudaErrorStreamCaptureImplicit + cudaErrorCapturedEvent + cudaErrorStreamCaptureWrongThread + cudaErrorTimeout + cudaErrorGraphExecUpdateFailure + cudaErrorExternalDevice + cudaErrorInvalidClusterSize + cudaErrorFunctionNotLoaded + cudaErrorInvalidResourceType + cudaErrorInvalidResourceConfiguration + cudaErrorStreamDetached + cudaErrorGraphRecaptureFailure + cudaErrorFabricNotReady + cudaErrorUnknown + cudaErrorApiFailureBase + +cdef extern from 'driver_types.h': + cdef enum cudaChannelFormatKind: + cudaChannelFormatKindSigned + cudaChannelFormatKindUnsigned + cudaChannelFormatKindFloat + cudaChannelFormatKindNone + cudaChannelFormatKindNV12 + cudaChannelFormatKindUnsignedNormalized8X1 + cudaChannelFormatKindUnsignedNormalized8X2 + cudaChannelFormatKindUnsignedNormalized8X4 + cudaChannelFormatKindUnsignedNormalized16X1 + cudaChannelFormatKindUnsignedNormalized16X2 + cudaChannelFormatKindUnsignedNormalized16X4 + cudaChannelFormatKindSignedNormalized8X1 + cudaChannelFormatKindSignedNormalized8X2 + cudaChannelFormatKindSignedNormalized8X4 + cudaChannelFormatKindSignedNormalized16X1 + cudaChannelFormatKindSignedNormalized16X2 + cudaChannelFormatKindSignedNormalized16X4 + cudaChannelFormatKindUnsignedBlockCompressed1 + cudaChannelFormatKindUnsignedBlockCompressed1SRGB + cudaChannelFormatKindUnsignedBlockCompressed2 + cudaChannelFormatKindUnsignedBlockCompressed2SRGB + cudaChannelFormatKindUnsignedBlockCompressed3 + cudaChannelFormatKindUnsignedBlockCompressed3SRGB + cudaChannelFormatKindUnsignedBlockCompressed4 + cudaChannelFormatKindSignedBlockCompressed4 + cudaChannelFormatKindUnsignedBlockCompressed5 + cudaChannelFormatKindSignedBlockCompressed5 + cudaChannelFormatKindUnsignedBlockCompressed6H + cudaChannelFormatKindSignedBlockCompressed6H + cudaChannelFormatKindUnsignedBlockCompressed7 + cudaChannelFormatKindUnsignedBlockCompressed7SRGB + cudaChannelFormatKindUnsignedNormalized1010102 + cudaChannelFormatKindUnsigned8Packed422 + cudaChannelFormatKindUnsigned8Packed444 + cudaChannelFormatKindUnsigned8SemiPlanar420 + cudaChannelFormatKindUnsigned16SemiPlanar420 + cudaChannelFormatKindUnsigned8SemiPlanar422 + cudaChannelFormatKindUnsigned16SemiPlanar422 + cudaChannelFormatKindUnsigned8SemiPlanar444 + cudaChannelFormatKindUnsigned16SemiPlanar444 + cudaChannelFormatKindUnsigned8Planar420 + cudaChannelFormatKindUnsigned16Planar420 + cudaChannelFormatKindUnsigned8Planar422 + cudaChannelFormatKindUnsigned16Planar422 + cudaChannelFormatKindUnsigned8Planar444 + cudaChannelFormatKindUnsigned16Planar444 + +cdef extern from 'driver_types.h': + cdef enum cudaMemoryType: + cudaMemoryTypeUnregistered + cudaMemoryTypeHost + cudaMemoryTypeDevice + cudaMemoryTypeManaged + +cdef extern from 'driver_types.h': + cdef enum cudaMemcpyKind: + cudaMemcpyHostToHost + cudaMemcpyHostToDevice + cudaMemcpyDeviceToHost + cudaMemcpyDeviceToDevice + cudaMemcpyDefault + +cdef extern from 'driver_types.h': + cdef enum cudaAccessProperty: + cudaAccessPropertyNormal + cudaAccessPropertyStreaming + cudaAccessPropertyPersisting + +cdef extern from 'driver_types.h': + cdef enum cudaStreamCaptureStatus: + cudaStreamCaptureStatusNone + cudaStreamCaptureStatusActive + cudaStreamCaptureStatusInvalidated + +cdef extern from 'driver_types.h': + cdef enum cudaStreamCaptureMode: + cudaStreamCaptureModeGlobal + cudaStreamCaptureModeThreadLocal + cudaStreamCaptureModeRelaxed + +cdef extern from 'driver_types.h': + cdef enum cudaSynchronizationPolicy: + cudaSyncPolicyAuto + cudaSyncPolicySpin + cudaSyncPolicyYield + cudaSyncPolicyBlockingSync + +cdef extern from 'driver_types.h': + cdef enum cudaClusterSchedulingPolicy: + cudaClusterSchedulingPolicyDefault + cudaClusterSchedulingPolicySpread + cudaClusterSchedulingPolicyLoadBalancing + cudaClusterSchedulingPolicyRubinDsmemLocality + +cdef extern from 'driver_types.h': + cdef enum cudaStreamUpdateCaptureDependenciesFlags: + cudaStreamAddCaptureDependencies + cudaStreamSetCaptureDependencies + +cdef extern from 'driver_types.h': + cdef enum cudaUserObjectFlags: + cudaUserObjectNoDestructorSync + +cdef extern from 'driver_types.h': + cdef enum cudaUserObjectRetainFlags: + cudaGraphUserObjectMove + +cdef extern from 'driver_types.h': + cdef enum cudaGraphicsRegisterFlags: + cudaGraphicsRegisterFlagsNone + cudaGraphicsRegisterFlagsReadOnly + cudaGraphicsRegisterFlagsWriteDiscard + cudaGraphicsRegisterFlagsSurfaceLoadStore + cudaGraphicsRegisterFlagsTextureGather + +cdef extern from 'driver_types.h': + cdef enum cudaGraphicsMapFlags: + cudaGraphicsMapFlagsNone + cudaGraphicsMapFlagsReadOnly + cudaGraphicsMapFlagsWriteDiscard + +cdef extern from 'driver_types.h': + cdef enum cudaGraphicsCubeFace: + cudaGraphicsCubeFacePositiveX + cudaGraphicsCubeFaceNegativeX + cudaGraphicsCubeFacePositiveY + cudaGraphicsCubeFaceNegativeY + cudaGraphicsCubeFacePositiveZ + cudaGraphicsCubeFaceNegativeZ + +cdef extern from 'driver_types.h': + cdef enum cudaResourceType: + cudaResourceTypeArray + cudaResourceTypeMipmappedArray + cudaResourceTypeLinear + cudaResourceTypePitch2D + +cdef extern from 'driver_types.h': + cdef enum cudaResourceViewFormat: + cudaResViewFormatNone + cudaResViewFormatUnsignedChar1 + cudaResViewFormatUnsignedChar2 + cudaResViewFormatUnsignedChar4 + cudaResViewFormatSignedChar1 + cudaResViewFormatSignedChar2 + cudaResViewFormatSignedChar4 + cudaResViewFormatUnsignedShort1 + cudaResViewFormatUnsignedShort2 + cudaResViewFormatUnsignedShort4 + cudaResViewFormatSignedShort1 + cudaResViewFormatSignedShort2 + cudaResViewFormatSignedShort4 + cudaResViewFormatUnsignedInt1 + cudaResViewFormatUnsignedInt2 + cudaResViewFormatUnsignedInt4 + cudaResViewFormatSignedInt1 + cudaResViewFormatSignedInt2 + cudaResViewFormatSignedInt4 + cudaResViewFormatHalf1 + cudaResViewFormatHalf2 + cudaResViewFormatHalf4 + cudaResViewFormatFloat1 + cudaResViewFormatFloat2 + cudaResViewFormatFloat4 + cudaResViewFormatUnsignedBlockCompressed1 + cudaResViewFormatUnsignedBlockCompressed2 + cudaResViewFormatUnsignedBlockCompressed3 + cudaResViewFormatUnsignedBlockCompressed4 + cudaResViewFormatSignedBlockCompressed4 + cudaResViewFormatUnsignedBlockCompressed5 + cudaResViewFormatSignedBlockCompressed5 + cudaResViewFormatUnsignedBlockCompressed6H + cudaResViewFormatSignedBlockCompressed6H + cudaResViewFormatUnsignedBlockCompressed7 + +cdef extern from 'driver_types.h': + cdef enum cudaFuncAttribute: + cudaFuncAttributeMaxDynamicSharedMemorySize + cudaFuncAttributePreferredSharedMemoryCarveout + cudaFuncAttributeClusterDimMustBeSet + cudaFuncAttributeRequiredClusterWidth + cudaFuncAttributeRequiredClusterHeight + cudaFuncAttributeRequiredClusterDepth + cudaFuncAttributeNonPortableClusterSizeAllowed + cudaFuncAttributeClusterSchedulingPolicyPreference + cudaFuncAttributeSharedMemoryMode + cudaFuncAttributeMax + +cdef extern from 'driver_types.h': + cdef enum cudaFuncCache: + cudaFuncCachePreferNone + cudaFuncCachePreferShared + cudaFuncCachePreferL1 + cudaFuncCachePreferEqual + +cdef extern from 'driver_types.h': + cdef enum cudaSharedMemConfig: + cudaSharedMemBankSizeDefault + cudaSharedMemBankSizeFourByte + cudaSharedMemBankSizeEightByte + +cdef extern from 'driver_types.h': + cdef enum cudaSharedCarveout: + cudaSharedmemCarveoutDefault + cudaSharedmemCarveoutMaxShared + cudaSharedmemCarveoutMaxL1 + +cdef extern from 'driver_types.h': + cdef enum cudaComputeMode: + cudaComputeModeDefault + cudaComputeModeExclusive + cudaComputeModeProhibited + cudaComputeModeExclusiveProcess + +cdef extern from 'driver_types.h': + cdef enum cudaLimit: + cudaLimitStackSize + cudaLimitPrintfFifoSize + cudaLimitMallocHeapSize + cudaLimitDevRuntimeSyncDepth + cudaLimitDevRuntimePendingLaunchCount + cudaLimitMaxL2FetchGranularity + cudaLimitPersistingL2CacheSize + cudaLimitPerBlockMemorySize + +cdef extern from 'driver_types.h': + cdef enum cudaMemoryAdvise: + cudaMemAdviseSetReadMostly + cudaMemAdviseUnsetReadMostly + cudaMemAdviseSetPreferredLocation + cudaMemAdviseUnsetPreferredLocation + cudaMemAdviseSetAccessedBy + cudaMemAdviseUnsetAccessedBy + +cdef extern from 'driver_types.h': + cdef enum cudaMemRangeAttribute: + cudaMemRangeAttributeReadMostly + cudaMemRangeAttributePreferredLocation + cudaMemRangeAttributeAccessedBy + cudaMemRangeAttributeLastPrefetchLocation + cudaMemRangeAttributePreferredLocationType + cudaMemRangeAttributePreferredLocationId + cudaMemRangeAttributeLastPrefetchLocationType + cudaMemRangeAttributeLastPrefetchLocationId + +cdef extern from 'driver_types.h': + cdef enum cudaFlushGPUDirectRDMAWritesOptions: + cudaFlushGPUDirectRDMAWritesOptionHost + cudaFlushGPUDirectRDMAWritesOptionMemOps + +cdef extern from 'driver_types.h': + cdef enum cudaGPUDirectRDMAWritesOrdering: + cudaGPUDirectRDMAWritesOrderingNone + cudaGPUDirectRDMAWritesOrderingOwner + cudaGPUDirectRDMAWritesOrderingAllDevices + +cdef extern from 'driver_types.h': + cdef enum cudaFlushGPUDirectRDMAWritesScope: + cudaFlushGPUDirectRDMAWritesToOwner + cudaFlushGPUDirectRDMAWritesToAllDevices + +cdef extern from 'driver_types.h': + cdef enum cudaFlushGPUDirectRDMAWritesTarget: + cudaFlushGPUDirectRDMAWritesTargetCurrentDevice + +cdef extern from 'driver_types.h': + cdef enum cudaDeviceAttr: + cudaDevAttrMaxThreadsPerBlock + cudaDevAttrMaxBlockDimX + cudaDevAttrMaxBlockDimY + cudaDevAttrMaxBlockDimZ + cudaDevAttrMaxGridDimX + cudaDevAttrMaxGridDimY + cudaDevAttrMaxGridDimZ + cudaDevAttrMaxSharedMemoryPerBlock + cudaDevAttrTotalConstantMemory + cudaDevAttrWarpSize + cudaDevAttrMaxPitch + cudaDevAttrMaxRegistersPerBlock + cudaDevAttrClockRate + cudaDevAttrTextureAlignment + cudaDevAttrGpuOverlap + cudaDevAttrMultiProcessorCount + cudaDevAttrKernelExecTimeout + cudaDevAttrIntegrated + cudaDevAttrCanMapHostMemory + cudaDevAttrComputeMode + cudaDevAttrMaxTexture1DWidth + cudaDevAttrMaxTexture2DWidth + cudaDevAttrMaxTexture2DHeight + cudaDevAttrMaxTexture3DWidth + cudaDevAttrMaxTexture3DHeight + cudaDevAttrMaxTexture3DDepth + cudaDevAttrMaxTexture2DLayeredWidth + cudaDevAttrMaxTexture2DLayeredHeight + cudaDevAttrMaxTexture2DLayeredLayers + cudaDevAttrSurfaceAlignment + cudaDevAttrConcurrentKernels + cudaDevAttrEccEnabled + cudaDevAttrPciBusId + cudaDevAttrPciDeviceId + cudaDevAttrTccDriver + cudaDevAttrMemoryClockRate + cudaDevAttrGlobalMemoryBusWidth + cudaDevAttrL2CacheSize + cudaDevAttrMaxThreadsPerMultiProcessor + cudaDevAttrAsyncEngineCount + cudaDevAttrUnifiedAddressing + cudaDevAttrMaxTexture1DLayeredWidth + cudaDevAttrMaxTexture1DLayeredLayers + cudaDevAttrMaxTexture2DGatherWidth + cudaDevAttrMaxTexture2DGatherHeight + cudaDevAttrMaxTexture3DWidthAlt + cudaDevAttrMaxTexture3DHeightAlt + cudaDevAttrMaxTexture3DDepthAlt + cudaDevAttrPciDomainId + cudaDevAttrTexturePitchAlignment + cudaDevAttrMaxTextureCubemapWidth + cudaDevAttrMaxTextureCubemapLayeredWidth + cudaDevAttrMaxTextureCubemapLayeredLayers + cudaDevAttrMaxSurface1DWidth + cudaDevAttrMaxSurface2DWidth + cudaDevAttrMaxSurface2DHeight + cudaDevAttrMaxSurface3DWidth + cudaDevAttrMaxSurface3DHeight + cudaDevAttrMaxSurface3DDepth + cudaDevAttrMaxSurface1DLayeredWidth + cudaDevAttrMaxSurface1DLayeredLayers + cudaDevAttrMaxSurface2DLayeredWidth + cudaDevAttrMaxSurface2DLayeredHeight + cudaDevAttrMaxSurface2DLayeredLayers + cudaDevAttrMaxSurfaceCubemapWidth + cudaDevAttrMaxSurfaceCubemapLayeredWidth + cudaDevAttrMaxSurfaceCubemapLayeredLayers + cudaDevAttrMaxTexture1DLinearWidth + cudaDevAttrMaxTexture2DLinearWidth + cudaDevAttrMaxTexture2DLinearHeight + cudaDevAttrMaxTexture2DLinearPitch + cudaDevAttrMaxTexture2DMipmappedWidth + cudaDevAttrMaxTexture2DMipmappedHeight + cudaDevAttrComputeCapabilityMajor + cudaDevAttrComputeCapabilityMinor + cudaDevAttrMaxTexture1DMipmappedWidth + cudaDevAttrStreamPrioritiesSupported + cudaDevAttrGlobalL1CacheSupported + cudaDevAttrLocalL1CacheSupported + cudaDevAttrMaxSharedMemoryPerMultiprocessor + cudaDevAttrMaxRegistersPerMultiprocessor + cudaDevAttrManagedMemory + cudaDevAttrIsMultiGpuBoard + cudaDevAttrMultiGpuBoardGroupID + cudaDevAttrHostNativeAtomicSupported + cudaDevAttrSingleToDoublePrecisionPerfRatio + cudaDevAttrPageableMemoryAccess + cudaDevAttrConcurrentManagedAccess + cudaDevAttrComputePreemptionSupported + cudaDevAttrCanUseHostPointerForRegisteredMem + cudaDevAttrReserved92 + cudaDevAttrReserved93 + cudaDevAttrReserved94 + cudaDevAttrCooperativeLaunch + cudaDevAttrReserved96 + cudaDevAttrMaxSharedMemoryPerBlockOptin + cudaDevAttrCanFlushRemoteWrites + cudaDevAttrHostRegisterSupported + cudaDevAttrPageableMemoryAccessUsesHostPageTables + cudaDevAttrDirectManagedMemAccessFromHost + cudaDevAttrMaxBlocksPerMultiprocessor + cudaDevAttrMaxPersistingL2CacheSize + cudaDevAttrMaxAccessPolicyWindowSize + cudaDevAttrReservedSharedMemoryPerBlock + cudaDevAttrSparseCudaArraySupported + cudaDevAttrHostRegisterReadOnlySupported + cudaDevAttrTimelineSemaphoreInteropSupported + cudaDevAttrMemoryPoolsSupported + cudaDevAttrGPUDirectRDMASupported + cudaDevAttrGPUDirectRDMAFlushWritesOptions + cudaDevAttrGPUDirectRDMAWritesOrdering + cudaDevAttrMemoryPoolSupportedHandleTypes + cudaDevAttrClusterLaunch + cudaDevAttrDeferredMappingCudaArraySupported + cudaDevAttrReserved122 + cudaDevAttrReserved123 + cudaDevAttrReserved124 + cudaDevAttrIpcEventSupport + cudaDevAttrMemSyncDomainCount + cudaDevAttrReserved127 + cudaDevAttrReserved128 + cudaDevAttrReserved129 + cudaDevAttrNumaConfig + cudaDevAttrNumaId + cudaDevAttrReserved132 + cudaDevAttrMpsEnabled + cudaDevAttrHostNumaId + cudaDevAttrD3D12CigSupported + cudaDevAttrVulkanCigSupported + cudaDevAttrGpuPciDeviceId + cudaDevAttrGpuPciSubsystemId + cudaDevAttrReserved141 + cudaDevAttrHostNumaMemoryPoolsSupported + cudaDevAttrHostNumaMultinodeIpcSupported + cudaDevAttrHostMemoryPoolsSupported + cudaDevAttrReserved145 + cudaDevAttrOnlyPartialHostNativeAtomicSupported + cudaDevAttrAtomicReductionSupported + cudaDevAttrLocalityDomainCount + cudaDevAttrOversizedSharedMemoryPerBlock + cudaDevAttrCigStreamsSupported + cudaDevAttrLocalityDomainMultiprocessorCount + cudaDevAttrMax + cudaDevAttrCooperativeMultiDeviceLaunch + cudaDevAttrMaxTimelineSemaphoreInteropSupported + +cdef extern from 'driver_types.h': + cdef enum cudaMemPoolAttr: + cudaMemPoolReuseFollowEventDependencies + cudaMemPoolReuseAllowOpportunistic + cudaMemPoolReuseAllowInternalDependencies + cudaMemPoolAttrReleaseThreshold + cudaMemPoolAttrReservedMemCurrent + cudaMemPoolAttrReservedMemHigh + cudaMemPoolAttrUsedMemCurrent + cudaMemPoolAttrUsedMemHigh + cudaMemPoolAttrAllocationType + cudaMemPoolAttrExportHandleTypes + cudaMemPoolAttrLocationId + cudaMemPoolAttrLocationType + cudaMemPoolAttrMaxPoolSize + cudaMemPoolAttrHwDecompressEnabled + cudaMemPoolAttrLocalityDomainId + +cdef extern from 'driver_types.h': + cdef enum cudaMemLocationType: + cudaMemLocationTypeInvalid + cudaMemLocationTypeNone + cudaMemLocationTypeDevice + cudaMemLocationTypeHost + cudaMemLocationTypeHostNuma + cudaMemLocationTypeHostNumaCurrent + cudaMemLocationTypeInvisible + cudaMemLocationTypeDeviceLocalityDomain + +cdef extern from 'driver_types.h': + cdef enum cudaMemAccessFlags: + cudaMemAccessFlagsProtNone + cudaMemAccessFlagsProtRead + cudaMemAccessFlagsProtReadWrite + +cdef extern from 'driver_types.h': + cdef enum cudaMemAllocationType: + cudaMemAllocationTypeInvalid + cudaMemAllocationTypePinned + cudaMemAllocationTypeManaged + cudaMemAllocationTypeMax + +cdef extern from 'driver_types.h': + cdef enum cudaMemAllocationHandleType: + cudaMemHandleTypeNone + cudaMemHandleTypePosixFileDescriptor + cudaMemHandleTypeWin32 + cudaMemHandleTypeWin32Kmt + cudaMemHandleTypeFabric + +cdef extern from 'driver_types.h': + cdef enum cudaGraphMemAttributeType: + cudaGraphMemAttrUsedMemCurrent + cudaGraphMemAttrUsedMemHigh + cudaGraphMemAttrReservedMemCurrent + cudaGraphMemAttrReservedMemHigh + +cdef extern from 'driver_types.h': + cdef enum cudaMemcpyFlags: + cudaMemcpyFlagDefault + cudaMemcpyFlagPreferOverlapWithCompute + +cdef extern from 'driver_types.h': + cdef enum cudaMemcpySrcAccessOrder: + cudaMemcpySrcAccessOrderInvalid + cudaMemcpySrcAccessOrderStream + cudaMemcpySrcAccessOrderDuringApiCall + cudaMemcpySrcAccessOrderAny + cudaMemcpySrcAccessOrderMax + +cdef extern from 'driver_types.h': + cdef enum cudaMemcpy3DOperandType: + cudaMemcpyOperandTypePointer + cudaMemcpyOperandTypeArray + cudaMemcpyOperandTypeMax + +cdef extern from 'driver_types.h': + cdef enum cudaDeviceP2PAttr: + cudaDevP2PAttrPerformanceRank + cudaDevP2PAttrAccessSupported + cudaDevP2PAttrNativeAtomicSupported + cudaDevP2PAttrCudaArrayAccessSupported + cudaDevP2PAttrOnlyPartialNativeAtomicSupported + +cdef extern from 'driver_types.h': + cdef enum cudaExternalMemoryHandleType: + cudaExternalMemoryHandleTypeOpaqueFd + cudaExternalMemoryHandleTypeOpaqueWin32 + cudaExternalMemoryHandleTypeOpaqueWin32Kmt + cudaExternalMemoryHandleTypeD3D12Heap + cudaExternalMemoryHandleTypeD3D12Resource + cudaExternalMemoryHandleTypeD3D11Resource + cudaExternalMemoryHandleTypeD3D11ResourceKmt + cudaExternalMemoryHandleTypeNvSciBuf + +cdef extern from 'driver_types.h': + cdef enum cudaExternalSemaphoreHandleType: + cudaExternalSemaphoreHandleTypeOpaqueFd + cudaExternalSemaphoreHandleTypeOpaqueWin32 + cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt + cudaExternalSemaphoreHandleTypeD3D12Fence + cudaExternalSemaphoreHandleTypeD3D11Fence + cudaExternalSemaphoreHandleTypeNvSciSync + cudaExternalSemaphoreHandleTypeKeyedMutex + cudaExternalSemaphoreHandleTypeKeyedMutexKmt + cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd + cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 + +cdef extern from 'driver_types.h': + ctypedef cudaError cudaError_t + +cdef extern from 'driver_types.h': + cdef enum cudaJitOption: + cudaJitMaxRegisters + cudaJitThreadsPerBlock + cudaJitWallTime + cudaJitInfoLogBuffer + cudaJitInfoLogBufferSizeBytes + cudaJitErrorLogBuffer + cudaJitErrorLogBufferSizeBytes + cudaJitOptimizationLevel + cudaJitFallbackStrategy + cudaJitGenerateDebugInfo + cudaJitLogVerbose + cudaJitGenerateLineInfo + cudaJitCacheMode + cudaJitPositionIndependentCode + cudaJitMinCtaPerSm + cudaJitMaxThreadsPerBlock + cudaJitOverrideDirectiveValues + +cdef extern from 'driver_types.h': + cdef enum cudaLibraryOption: + cudaLibraryHostUniversalFunctionAndDataTable + cudaLibraryBinaryIsPreserved + +cdef extern from 'driver_types.h': + cdef enum cudaJit_CacheMode: + cudaJitCacheOptionNone + cudaJitCacheOptionCG + cudaJitCacheOptionCA + +cdef extern from 'driver_types.h': + cdef enum cudaJit_Fallback: + cudaPreferPtx + cudaPreferBinary + +cdef extern from 'driver_types.h': + cdef enum cudaCGScope: + cudaCGScopeInvalid + cudaCGScopeGrid + cudaCGScopeReserved + cudaCGScopeMultiGrid + +cdef extern from 'driver_types.h': + cdef enum cudaGraphConditionalHandleFlags: + cudaGraphCondAssignDefault + +cdef extern from 'driver_types.h': + cdef enum cudaGraphConditionalNodeType: + cudaGraphCondTypeIf + cudaGraphCondTypeWhile + cudaGraphCondTypeSwitch + +cdef extern from 'driver_types.h': + cdef enum cudaGraphNodeType: + cudaGraphNodeTypeKernel + cudaGraphNodeTypeMemcpy + cudaGraphNodeTypeMemset + cudaGraphNodeTypeHost + cudaGraphNodeTypeGraph + cudaGraphNodeTypeEmpty + cudaGraphNodeTypeWaitEvent + cudaGraphNodeTypeEventRecord + cudaGraphNodeTypeExtSemaphoreSignal + cudaGraphNodeTypeExtSemaphoreWait + cudaGraphNodeTypeMemAlloc + cudaGraphNodeTypeMemFree + cudaGraphNodeTypeConditional + cudaGraphNodeTypeReserved16 + cudaGraphNodeTypeCount + +cdef extern from 'driver_types.h': + cdef enum cudaGraphChildGraphNodeOwnership: + cudaGraphChildGraphOwnershipClone + cudaGraphChildGraphOwnershipMove + cudaGraphChildGraphOwnershipInvalid + +cdef extern from 'driver_types.h': + cdef enum cudaGraphDependencyType_enum: + cudaGraphDependencyTypeDefault + cudaGraphDependencyTypeProgrammatic + ctypedef cudaGraphDependencyType_enum cudaGraphDependencyType + +cdef extern from 'driver_types.h': + cdef enum cudaGraphExecUpdateResult: + cudaGraphExecUpdateSuccess + cudaGraphExecUpdateError + cudaGraphExecUpdateErrorTopologyChanged + cudaGraphExecUpdateErrorNodeTypeChanged + cudaGraphExecUpdateErrorFunctionChanged + cudaGraphExecUpdateErrorParametersChanged + cudaGraphExecUpdateErrorNotSupported + cudaGraphExecUpdateErrorUnsupportedFunctionChange + cudaGraphExecUpdateErrorAttributesChanged + +cdef extern from 'driver_types.h': + cdef enum cudaGraphInstantiateResult: + cudaGraphInstantiateSuccess + cudaGraphInstantiateError + cudaGraphInstantiateInvalidStructure + cudaGraphInstantiateNodeOperationNotSupported + cudaGraphInstantiateMultipleDevicesNotSupported + cudaGraphInstantiateConditionalHandleUnused + +cdef extern from 'driver_types.h': + cdef enum cudaGraphKernelNodeField: + cudaGraphKernelNodeFieldInvalid + cudaGraphKernelNodeFieldGridDim + cudaGraphKernelNodeFieldParam + cudaGraphKernelNodeFieldEnabled + +cdef extern from 'driver_types.h': + cdef enum cudaGetDriverEntryPointFlags: + cudaEnableDefault + cudaEnableLegacyStream + cudaEnablePerThreadDefaultStream + +cdef extern from 'driver_types.h': + cdef enum cudaDriverEntryPointQueryResult: + cudaDriverEntryPointSuccess + cudaDriverEntryPointSymbolNotFound + cudaDriverEntryPointVersionNotSufficent + +cdef extern from 'driver_types.h': + cdef enum cudaGraphDebugDotFlags: + cudaGraphDebugDotFlagsVerbose + cudaGraphDebugDotFlagsKernelNodeParams + cudaGraphDebugDotFlagsMemcpyNodeParams + cudaGraphDebugDotFlagsMemsetNodeParams + cudaGraphDebugDotFlagsHostNodeParams + cudaGraphDebugDotFlagsEventNodeParams + cudaGraphDebugDotFlagsExtSemasSignalNodeParams + cudaGraphDebugDotFlagsExtSemasWaitNodeParams + cudaGraphDebugDotFlagsKernelNodeAttributes + cudaGraphDebugDotFlagsHandles + cudaGraphDebugDotFlagsConditionalNodeParams + +cdef extern from 'driver_types.h': + cdef enum cudaGraphInstantiateFlags: + cudaGraphInstantiateFlagAutoFreeOnLaunch + cudaGraphInstantiateFlagUpload + cudaGraphInstantiateFlagDeviceLaunch + cudaGraphInstantiateFlagUseNodePriority + +cdef extern from 'driver_types.h': + cdef enum cudaLaunchMemSyncDomain: + cudaLaunchMemSyncDomainDefault + cudaLaunchMemSyncDomainRemote + +cdef extern from 'driver_types.h': + cdef enum cudaLaunchAttributeID: + cudaLaunchAttributeIgnore + cudaLaunchAttributeAccessPolicyWindow + cudaLaunchAttributeCooperative + cudaLaunchAttributeSynchronizationPolicy + cudaLaunchAttributeClusterDimension + cudaLaunchAttributeClusterSchedulingPolicyPreference + cudaLaunchAttributeProgrammaticStreamSerialization + cudaLaunchAttributeProgrammaticEvent + cudaLaunchAttributePriority + cudaLaunchAttributeMemSyncDomainMap + cudaLaunchAttributeMemSyncDomain + cudaLaunchAttributePreferredClusterDimension + cudaLaunchAttributeLaunchCompletionEvent + cudaLaunchAttributeDeviceUpdatableKernelNode + cudaLaunchAttributePreferredSharedMemoryCarveout + cudaLaunchAttributeNvlinkUtilCentricScheduling + cudaLaunchAttributePortableClusterSizeMode + cudaLaunchAttributeSharedMemoryMode + +cdef extern from 'driver_types.h': + cdef enum cudaDeviceNumaConfig: + cudaDeviceNumaConfigNone + cudaDeviceNumaConfigNumaNode + +cdef extern from 'driver_types.h': + cdef enum cudaAsyncNotificationType_enum: + cudaAsyncNotificationTypeOverBudget + ctypedef cudaAsyncNotificationType_enum cudaAsyncNotificationType + +cdef extern from 'device_types.h': + cdef enum cudaRoundMode: + cudaRoundNearest + cudaRoundZero + cudaRoundPosInf + cudaRoundMinInf + +cdef extern from 'surface_types.h': + cdef enum cudaSurfaceBoundaryMode: + cudaBoundaryModeZero + cudaBoundaryModeClamp + cudaBoundaryModeTrap + +cdef extern from 'surface_types.h': + cdef enum cudaSurfaceFormatMode: + cudaFormatModeForced + cudaFormatModeAuto + +cdef extern from 'texture_types.h': + cdef enum cudaTextureAddressMode: + cudaAddressModeWrap + cudaAddressModeClamp + cudaAddressModeMirror + cudaAddressModeBorder + +cdef extern from 'texture_types.h': + cdef enum cudaTextureFilterMode: + cudaFilterModePoint + cudaFilterModeLinear + +cdef extern from 'texture_types.h': + cdef enum cudaTextureReadMode: + cudaReadModeElementType + cudaReadModeNormalizedFloat + +cdef extern from 'library_types.h': + cdef enum cudaDataType_t: + CUDA_R_16F + CUDA_C_16F + CUDA_R_16BF + CUDA_C_16BF + CUDA_R_32F + CUDA_C_32F + CUDA_R_64F + CUDA_C_64F + CUDA_R_4I + CUDA_C_4I + CUDA_R_4U + CUDA_C_4U + CUDA_R_8I + CUDA_C_8I + CUDA_R_8U + CUDA_C_8U + CUDA_R_16I + CUDA_C_16I + CUDA_R_16U + CUDA_C_16U + CUDA_R_32I + CUDA_C_32I + CUDA_R_32U + CUDA_C_32U + CUDA_R_64I + CUDA_C_64I + CUDA_R_64U + CUDA_C_64U + CUDA_R_8F_E4M3 + CUDA_R_8F_UE4M3 + CUDA_R_8F_E5M2 + CUDA_R_8F_UE8M0 + CUDA_R_6F_E2M3 + CUDA_R_6F_E3M2 + CUDA_R_4F_E2M1 + CUDA_R_8F_UE5M3 + ctypedef cudaDataType_t cudaDataType + +cdef enum cudaEglFrameType_enum: + cudaEglFrameTypeArray = 0 + cudaEglFrameTypePitch = 1 +ctypedef cudaEglFrameType_enum cudaEglFrameType + +cdef enum cudaEglResourceLocationFlags_enum: + cudaEglResourceLocationSysmem = 0x00 + cudaEglResourceLocationVidmem = 0x01 +ctypedef cudaEglResourceLocationFlags_enum cudaEglResourceLocationFlags + +cdef enum cudaEglColorFormat_enum: + cudaEglColorFormatYUV420Planar = 0 + cudaEglColorFormatYUV420SemiPlanar = 1 + cudaEglColorFormatYUV422Planar = 2 + cudaEglColorFormatYUV422SemiPlanar = 3 + cudaEglColorFormatARGB = 6 + cudaEglColorFormatRGBA = 7 + cudaEglColorFormatL = 8 + cudaEglColorFormatR = 9 + cudaEglColorFormatYUV444Planar = 10 + cudaEglColorFormatYUV444SemiPlanar = 11 + cudaEglColorFormatYUYV422 = 12 + cudaEglColorFormatUYVY422 = 13 + cudaEglColorFormatABGR = 14 + cudaEglColorFormatBGRA = 15 + cudaEglColorFormatA = 16 + cudaEglColorFormatRG = 17 + cudaEglColorFormatAYUV = 18 + cudaEglColorFormatYVU444SemiPlanar = 19 + cudaEglColorFormatYVU422SemiPlanar = 20 + cudaEglColorFormatYVU420SemiPlanar = 21 + cudaEglColorFormatY10V10U10_444SemiPlanar = 22 + cudaEglColorFormatY10V10U10_420SemiPlanar = 23 + cudaEglColorFormatY12V12U12_444SemiPlanar = 24 + cudaEglColorFormatY12V12U12_420SemiPlanar = 25 + cudaEglColorFormatVYUY_ER = 26 + cudaEglColorFormatUYVY_ER = 27 + cudaEglColorFormatYUYV_ER = 28 + cudaEglColorFormatYVYU_ER = 29 + cudaEglColorFormatYUVA_ER = 31 + cudaEglColorFormatAYUV_ER = 32 + cudaEglColorFormatYUV444Planar_ER = 33 + cudaEglColorFormatYUV422Planar_ER = 34 + cudaEglColorFormatYUV420Planar_ER = 35 + cudaEglColorFormatYUV444SemiPlanar_ER = 36 + cudaEglColorFormatYUV422SemiPlanar_ER = 37 + cudaEglColorFormatYUV420SemiPlanar_ER = 38 + cudaEglColorFormatYVU444Planar_ER = 39 + cudaEglColorFormatYVU422Planar_ER = 40 + cudaEglColorFormatYVU420Planar_ER = 41 + cudaEglColorFormatYVU444SemiPlanar_ER = 42 + cudaEglColorFormatYVU422SemiPlanar_ER = 43 + cudaEglColorFormatYVU420SemiPlanar_ER = 44 + cudaEglColorFormatBayerRGGB = 45 + cudaEglColorFormatBayerBGGR = 46 + cudaEglColorFormatBayerGRBG = 47 + cudaEglColorFormatBayerGBRG = 48 + cudaEglColorFormatBayer10RGGB = 49 + cudaEglColorFormatBayer10BGGR = 50 + cudaEglColorFormatBayer10GRBG = 51 + cudaEglColorFormatBayer10GBRG = 52 + cudaEglColorFormatBayer12RGGB = 53 + cudaEglColorFormatBayer12BGGR = 54 + cudaEglColorFormatBayer12GRBG = 55 + cudaEglColorFormatBayer12GBRG = 56 + cudaEglColorFormatBayer14RGGB = 57 + cudaEglColorFormatBayer14BGGR = 58 + cudaEglColorFormatBayer14GRBG = 59 + cudaEglColorFormatBayer14GBRG = 60 + cudaEglColorFormatBayer20RGGB = 61 + cudaEglColorFormatBayer20BGGR = 62 + cudaEglColorFormatBayer20GRBG = 63 + cudaEglColorFormatBayer20GBRG = 64 + cudaEglColorFormatYVU444Planar = 65 + cudaEglColorFormatYVU422Planar = 66 + cudaEglColorFormatYVU420Planar = 67 + cudaEglColorFormatBayerIspRGGB = 68 + cudaEglColorFormatBayerIspBGGR = 69 + cudaEglColorFormatBayerIspGRBG = 70 + cudaEglColorFormatBayerIspGBRG = 71 + cudaEglColorFormatBayerBCCR = 72 + cudaEglColorFormatBayerRCCB = 73 + cudaEglColorFormatBayerCRBC = 74 + cudaEglColorFormatBayerCBRC = 75 + cudaEglColorFormatBayer10CCCC = 76 + cudaEglColorFormatBayer12BCCR = 77 + cudaEglColorFormatBayer12RCCB = 78 + cudaEglColorFormatBayer12CRBC = 79 + cudaEglColorFormatBayer12CBRC = 80 + cudaEglColorFormatBayer12CCCC = 81 + cudaEglColorFormatY = 82 + cudaEglColorFormatYUV420SemiPlanar_2020 = 83 + cudaEglColorFormatYVU420SemiPlanar_2020 = 84 + cudaEglColorFormatYUV420Planar_2020 = 85 + cudaEglColorFormatYVU420Planar_2020 = 86 + cudaEglColorFormatYUV420SemiPlanar_709 = 87 + cudaEglColorFormatYVU420SemiPlanar_709 = 88 + cudaEglColorFormatYUV420Planar_709 = 89 + cudaEglColorFormatYVU420Planar_709 = 90 + cudaEglColorFormatY10V10U10_420SemiPlanar_709 = 91 + cudaEglColorFormatY10V10U10_420SemiPlanar_2020 = 92 + cudaEglColorFormatY10V10U10_422SemiPlanar_2020 = 93 + cudaEglColorFormatY10V10U10_422SemiPlanar = 94 + cudaEglColorFormatY10V10U10_422SemiPlanar_709 = 95 + cudaEglColorFormatY_ER = 96 + cudaEglColorFormatY_709_ER = 97 + cudaEglColorFormatY10_ER = 98 + cudaEglColorFormatY10_709_ER = 99 + cudaEglColorFormatY12_ER = 100 + cudaEglColorFormatY12_709_ER = 101 + cudaEglColorFormatYUVA = 102 + cudaEglColorFormatYVYU = 104 + cudaEglColorFormatVYUY = 105 + cudaEglColorFormatY10V10U10_420SemiPlanar_ER = 106 + cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER = 107 + cudaEglColorFormatY10V10U10_444SemiPlanar_ER = 108 + cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER = 109 + cudaEglColorFormatY12V12U12_420SemiPlanar_ER = 110 + cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER = 111 + cudaEglColorFormatY12V12U12_444SemiPlanar_ER = 112 + cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER = 113 + cudaEglColorFormatUYVY709 = 114 + cudaEglColorFormatUYVY709_ER = 115 + cudaEglColorFormatUYVY2020 = 116 +ctypedef cudaEglColorFormat_enum cudaEglColorFormat + +cdef enum cudaGLDeviceList: + cudaGLDeviceListAll = 1 + cudaGLDeviceListCurrentFrame = 2 + cudaGLDeviceListNextFrame = 3 + +cdef enum cudaGLMapFlags: + cudaGLMapFlagsNone = 0 + cudaGLMapFlagsReadOnly = 1 + cudaGLMapFlagsWriteDiscard = 2 + +cdef extern from 'driver_types.h': + cdef enum cudaAtomicOperation: + cudaAtomicOperationIntegerAdd + cudaAtomicOperationIntegerMin + cudaAtomicOperationIntegerMax + cudaAtomicOperationIntegerIncrement + cudaAtomicOperationIntegerDecrement + cudaAtomicOperationAnd + cudaAtomicOperationOr + cudaAtomicOperationXOR + cudaAtomicOperationExchange + cudaAtomicOperationCAS + cudaAtomicOperationFloatAdd + cudaAtomicOperationFloatMin + cudaAtomicOperationFloatMax + +cdef extern from 'driver_types.h': + cdef enum cudaAtomicOperationCapability: + cudaAtomicCapabilitySigned + cudaAtomicCapabilityUnsigned + cudaAtomicCapabilityReduction + cudaAtomicCapabilityScalar32 + cudaAtomicCapabilityScalar64 + cudaAtomicCapabilityScalar128 + cudaAtomicCapabilityVector32x4 + +cdef extern from 'driver_types.h': + cdef enum CUDAlogLevel_enum: + cudaLogLevelError + cudaLogLevelWarning + ctypedef CUDAlogLevel_enum cudaLogLevel + +cdef extern from 'library_types.h': + cdef enum cudaEmulationStrategy_t: + CUDA_EMULATION_STRATEGY_DEFAULT + CUDA_EMULATION_STRATEGY_PERFORMANT + CUDA_EMULATION_STRATEGY_EAGER + ctypedef cudaEmulationStrategy_t cudaEmulationStrategy + +cdef extern from 'library_types.h': + cdef enum cudaEmulationMantissaControl_t: + CUDA_EMULATION_MANTISSA_CONTROL_DYNAMIC + CUDA_EMULATION_MANTISSA_CONTROL_FIXED + ctypedef cudaEmulationMantissaControl_t cudaEmulationMantissaControl + +cdef extern from 'library_types.h': + cdef enum cudaEmulationSpecialValuesSupport_t: + CUDA_EMULATION_SPECIAL_VALUES_SUPPORT_DEFAULT + CUDA_EMULATION_SPECIAL_VALUES_SUPPORT_NONE + CUDA_EMULATION_SPECIAL_VALUES_SUPPORT_INFINITY + CUDA_EMULATION_SPECIAL_VALUES_SUPPORT_NAN + ctypedef cudaEmulationSpecialValuesSupport_t cudaEmulationSpecialValuesSupport + +cdef extern from 'driver_types.h': + cdef enum cudaDevSmResourceGroup_flags: + cudaDevSmResourceGroupDefault + cudaDevSmResourceGroupBackfill + cudaDevSmResourceGroupLocalityDomainId + +cdef extern from 'driver_types.h': + cdef enum cudaDevSmResourceSplitByCount_flags: + cudaDevSmResourceSplitIgnoreSmCoscheduling + cudaDevSmResourceSplitMaxPotentialClusterSize + +cdef extern from 'driver_types.h': + cdef enum cudaDevResourceType: + cudaDevResourceTypeInvalid + cudaDevResourceTypeSm + cudaDevResourceTypeWorkqueueConfig + cudaDevResourceTypeWorkqueue + +cdef extern from 'driver_types.h': + cdef enum cudaDevWorkqueueConfigScope: + cudaDevWorkqueueConfigScopeDeviceCtx + cudaDevWorkqueueConfigScopeGreenCtxBalanced + +cdef extern from 'driver_types.h': + cdef enum cudaHostTaskSyncMode: + cudaHostTaskBlocking + cudaHostTaskSpinWait + +cdef extern from 'driver_types.h': + cdef enum cudaKernelFunctionType: + cudaKernelFunctionTypeUnspecified + cudaKernelFunctionTypeDeviceEntry + cudaKernelFunctionTypeKernel + cudaKernelFunctionTypeFunction + +cdef extern from 'driver_types.h': + cdef enum cudaLaunchAttributePortableClusterMode: + cudaLaunchPortableClusterModeDefault + cudaLaunchPortableClusterModeRequirePortable + cudaLaunchPortableClusterModeAllowNonPortable + +cdef extern from 'driver_types.h': + cdef enum cudaSharedMemoryMode: + cudaSharedMemoryModeDefault + cudaSharedMemoryModeRequirePortable + cudaSharedMemoryModeAllowNonPortable + cudaSharedMemoryModeAllowOversizedSharedMemory + cudaSharedMemoryModePreferOversizedSharedMemory + +cdef extern from 'driver_types.h': + cdef enum cudaGraphRecaptureStatus: + cudaGraphRecaptureEligibleForUpdate + cudaGraphRecaptureIneligibleForUpdate + cudaGraphRecaptureError + +cdef extern from 'driver_types.h': + cdef enum cudaFabricOpStatusSource: + cudaFabricOpStatusSourceMbarrierV1 + cudaFabricOpStatusSourceMax + +cdef extern from 'driver_types.h': + cdef enum cudaFabricOpStatusInfo: + cudaFabricOpStatusInfoSuccess + cudaFabricOpStatusInfoLast + cudaFabricOpStatusInfoMax +cdef enum: _CUDAERROR_T_INTERNAL_LOADING_ERROR = cudaError_t.cudaErrorCallRequiresNewerDriver + + +# TYPES +cdef extern from 'driver_types.h': + ctypedef unsigned long long cudaGraphConditionalHandle 'cudaGraphConditionalHandle' + + +cdef extern from 'surface_types.h': + ctypedef unsigned long long cudaSurfaceObject_t 'cudaSurfaceObject_t' + + +cdef extern from 'texture_types.h': + ctypedef unsigned long long cudaTextureObject_t 'cudaTextureObject_t' + + +cdef extern from 'driver_types.h': + ctypedef unsigned int cudaLogIterator 'cudaLogIterator' + + +cdef extern from 'driver_types.h': + ctypedef struct cudaArray: + pass + ctypedef cudaArray* cudaArray_t 'cudaArray_t' + + +cdef extern from 'driver_types.h': + ctypedef struct cudaArray: + pass + ctypedef cudaArray* cudaArray_const_t 'cudaArray_const_t' + + +cdef extern from 'driver_types.h': + ctypedef struct cudaMipmappedArray: + pass + ctypedef cudaMipmappedArray* cudaMipmappedArray_t 'cudaMipmappedArray_t' + + +cdef extern from 'driver_types.h': + ctypedef struct cudaMipmappedArray: + pass + ctypedef cudaMipmappedArray* cudaMipmappedArray_const_t 'cudaMipmappedArray_const_t' + + +cdef extern from 'driver_types.h': + ctypedef struct cudaAsyncCallbackEntry: + pass + ctypedef cudaAsyncCallbackEntry* cudaAsyncCallbackHandle_t 'cudaAsyncCallbackHandle_t' + + +cdef extern from 'driver_types.h': + cdef struct cudaChannelFormatDesc: + int x + int y + int z + int w + cudaChannelFormatKind f + +cdef struct cuda_bindings_runtime__anon_pod0: + unsigned int width + unsigned int height + unsigned int depth + +cdef extern from 'driver_types.h': + cdef struct cudaArrayMemoryRequirements: + size_t size + size_t alignment + unsigned int reserved[4] + +cdef extern from 'driver_types.h': + cdef struct cudaPitchedPtr: + void* ptr + size_t pitch + size_t xsize + size_t ysize + +cdef extern from 'driver_types.h': + cdef struct cudaExtent: + size_t width + size_t height + size_t depth + +cdef extern from 'driver_types.h': + cdef struct cudaPos: + size_t x + size_t y + size_t z + +cdef extern from 'driver_types.h': + cdef struct cudaMemsetParams: + void* dst + size_t pitch + unsigned int value + unsigned int elementSize + size_t width + size_t height + +cdef extern from 'driver_types.h': + cdef struct cudaAccessPolicyWindow: + void* base_ptr + size_t num_bytes + float hitRatio + cudaAccessProperty hitProp + cudaAccessProperty missProp + +cdef extern from 'driver_types.h': + ctypedef void (*cudaHostFn_t 'cudaHostFn_t')( + void* userData + ) + + +cdef struct cuda_bindings_runtime__anon_pod6: + int reserved[32] + +cdef extern from 'driver_types.h': + cdef struct cudaResourceViewDesc: + cudaResourceViewFormat format + size_t width + size_t height + size_t depth + unsigned int firstMipmapLevel + unsigned int lastMipmapLevel + unsigned int firstLayer + unsigned int lastLayer + unsigned int reserved[16] + +cdef extern from 'driver_types.h': + cdef struct cudaFuncAttributes: + size_t sharedSizeBytes + size_t constSizeBytes + size_t localSizeBytes + int maxThreadsPerBlock + int numRegs + int ptxVersion + int binaryVersion + int cacheModeCA + int maxDynamicSharedSizeBytes + int preferredShmemCarveout + int clusterDimMustBeSet + int requiredClusterWidth + int requiredClusterHeight + int requiredClusterDepth + int clusterSchedulingPolicyPreference + int nonPortableClusterSizeAllowed + int deviceNodeUpdateStatus + cudaSharedMemoryMode sharedMemoryMode + int reserved[14] + +cdef struct cuda_bindings_runtime__anon_pod9: + unsigned char deviceId + unsigned char localityDomainId + +cdef extern from 'driver_types.h': + cdef struct cudaMemPoolPtrExportData: + unsigned char reserved[64] + +cdef extern from 'driver_types.h': + cdef struct cudaMemFreeNodeParams: + void* dptr + +cdef extern from 'driver_types.h': + cdef struct cudaOffset3D: + size_t x + size_t y + size_t z + +cdef extern from 'driver_types.h': + cdef struct cudaDeviceProp: + char name[256] + cudaUUID_t uuid + char luid[8] + unsigned int luidDeviceNodeMask + size_t totalGlobalMem + size_t sharedMemPerBlock + int regsPerBlock + int warpSize + size_t memPitch + int maxThreadsPerBlock + int maxThreadsDim[3] + int maxGridSize[3] + size_t totalConstMem + int major + int minor + size_t textureAlignment + size_t texturePitchAlignment + int multiProcessorCount + int integrated + int canMapHostMemory + int maxTexture1D + int maxTexture1DMipmap + int maxTexture2D[2] + int maxTexture2DMipmap[2] + int maxTexture2DLinear[3] + int maxTexture2DGather[2] + int maxTexture3D[3] + int maxTexture3DAlt[3] + int maxTextureCubemap + int maxTexture1DLayered[2] + int maxTexture2DLayered[3] + int maxTextureCubemapLayered[2] + int maxSurface1D + int maxSurface2D[2] + int maxSurface3D[3] + int maxSurface1DLayered[2] + int maxSurface2DLayered[3] + int maxSurfaceCubemap + int maxSurfaceCubemapLayered[2] + size_t surfaceAlignment + int concurrentKernels + int ECCEnabled + int pciBusID + int pciDeviceID + int pciDomainID + int tccDriver + int asyncEngineCount + int unifiedAddressing + int memoryBusWidth + int l2CacheSize + int persistingL2CacheMaxSize + int maxThreadsPerMultiProcessor + int streamPrioritiesSupported + int globalL1CacheSupported + int localL1CacheSupported + size_t sharedMemPerMultiprocessor + int regsPerMultiprocessor + int managedMemory + int isMultiGpuBoard + int multiGpuBoardGroupID + int hostNativeAtomicSupported + int pageableMemoryAccess + int concurrentManagedAccess + int computePreemptionSupported + int canUseHostPointerForRegisteredMem + int cooperativeLaunch + size_t sharedMemPerBlockOptin + int pageableMemoryAccessUsesHostPageTables + int directManagedMemAccessFromHost + int maxBlocksPerMultiProcessor + int accessPolicyMaxWindowSize + size_t reservedSharedMemPerBlock + int hostRegisterSupported + int sparseCudaArraySupported + int hostRegisterReadOnlySupported + int timelineSemaphoreInteropSupported + int memoryPoolsSupported + int gpuDirectRDMASupported + unsigned int gpuDirectRDMAFlushWritesOptions + int gpuDirectRDMAWritesOrdering + unsigned int memoryPoolSupportedHandleTypes + int deferredMappingCudaArraySupported + int ipcEventSupported + int clusterLaunch + int unifiedFunctionPointers + int deviceNumaConfig + int deviceNumaId + int mpsEnabled + int hostNumaId + unsigned int gpuPciDeviceID + unsigned int gpuPciSubsystemID + int hostNumaMultinodeIpcSupported + int reserved[56] + +cdef extern from 'driver_types.h': + cdef struct cudaIpcEventHandle_st: + char reserved[64] + ctypedef cudaIpcEventHandle_st cudaIpcEventHandle_t + +cdef extern from 'driver_types.h': + cdef struct cudaIpcMemHandle_st: + char reserved[64] + ctypedef cudaIpcMemHandle_st cudaIpcMemHandle_t + +cdef extern from 'driver_types.h': + cdef struct cudaMemFabricHandle_st: + char reserved[64] + ctypedef cudaMemFabricHandle_st cudaMemFabricHandle_t + +cdef struct cuda_bindings_runtime__anon_pod14: + void* handle + void* name + +cdef extern from 'driver_types.h': + cdef struct cudaExternalMemoryBufferDesc: + unsigned long long offset + unsigned long long size + unsigned int flags + unsigned int reserved[16] + +cdef struct cuda_bindings_runtime__anon_pod16: + void* handle + void* name + +cdef struct cuda_bindings_runtime__anon_pod18: + unsigned long long value + +cdef union cuda_bindings_runtime__anon_pod19: + void* fence + unsigned long long reserved + +cdef struct cuda_bindings_runtime__anon_pod20: + unsigned long long key + +cdef struct cuda_bindings_runtime__anon_pod22: + unsigned long long value + +cdef union cuda_bindings_runtime__anon_pod23: + void* fence + unsigned long long reserved + +cdef struct cuda_bindings_runtime__anon_pod24: + unsigned long long key + unsigned int timeoutMs + +cdef extern from 'driver_types.h': + cdef struct cudaKernelNodeParams: + void* func + dim3 gridDim + dim3 blockDim + unsigned int sharedMemBytes + void** kernelParams + void** extra + +cdef extern from 'driver_types.h': + cdef struct cudaGraphEdgeData_st: + unsigned char from_port + unsigned char to_port + unsigned char type + unsigned char reserved[5] + ctypedef cudaGraphEdgeData_st cudaGraphEdgeData + +cdef struct cuda_bindings_runtime__anon_pod28: + void* pValue + size_t offset + size_t size + +cdef extern from 'driver_types.h': + cdef struct cudaLaunchMemSyncDomainMap_st: + unsigned char default_ + unsigned char remote + ctypedef cudaLaunchMemSyncDomainMap_st cudaLaunchMemSyncDomainMap + +cdef struct cuda_bindings_runtime__anon_pod29: + unsigned int x + unsigned int y + unsigned int z + +cdef struct cuda_bindings_runtime__anon_pod31: + unsigned int x + unsigned int y + unsigned int z + +cdef struct cuda_bindings_runtime__anon_pod35: + unsigned long long bytesOverBudget + +cdef extern from '': + cdef struct cudaTextureDesc: + cudaTextureAddressMode addressMode[3] + cudaTextureFilterMode filterMode + cudaTextureReadMode readMode + int sRGB + float borderColor[4] + int normalizedCoords + unsigned int maxAnisotropy + cudaTextureFilterMode mipmapFilterMode + float mipmapLevelBias + float minMipmapLevelClamp + float maxMipmapLevelClamp + int disableTrilinearOptimization + int seamlessCubemap + +cdef extern from 'driver_types.h': + cdef struct cudaDevSmResource: + unsigned int smCount + unsigned int minSmPartitionSize + unsigned int smCoscheduledAlignment + unsigned int flags + unsigned int localityDomainId + +cdef extern from 'driver_types.h': + cdef struct cudaDevWorkqueueConfigResource: + int device + unsigned int wqConcurrencyLimit + cudaDevWorkqueueConfigScope sharingScope + +cdef extern from 'driver_types.h': + cdef struct cudaDevWorkqueueResource: + unsigned char reserved[40] + +cdef extern from 'driver_types.h': + cdef struct cudaDevSmResourceGroupParams_st: + unsigned int smCount + unsigned int coscheduledSmCount + unsigned int preferredCoscheduledSmCount + unsigned int flags + unsigned int localityDomainId + unsigned int reserved[11] + ctypedef cudaDevSmResourceGroupParams_st cudaDevSmResourceGroupParams + +cdef extern from 'cuda_runtime_api.h': + ctypedef void (*cudaLogsCallback_t 'cudaLogsCallback_t')( + void* data, + cudaLogLevel logLevel, + char* message, + size_t length + ) + + +cdef struct cuda_bindings_runtime__anon_pod2: + cudaArray_t array + +cdef struct cuda_bindings_runtime__anon_pod3: + cudaMipmappedArray_t mipmap + +cdef extern from 'cuda_runtime_api.h': + ctypedef void (*cudaStreamCallback_t 'cudaStreamCallback_t')( + cudaStream_t stream, + cudaError_t status, + void* userData + ) + + +cdef extern from 'driver_types.h': + cdef struct cudaEventWaitNodeParams: + cudaEvent_t event + +cdef struct cuda_bindings_runtime__anon_pod30: + cudaEvent_t event + int flags + int triggerAtBlockStart + +cdef struct cuda_bindings_runtime__anon_pod32: + cudaEvent_t event + int flags + +cdef extern from 'driver_types.h': + cdef struct cudaChildGraphNodeParams: + cudaGraph_t graph + cudaGraphChildGraphNodeOwnership ownership + +cdef extern from 'driver_types.h': + cdef struct cudaGraphInstantiateParams_st: + unsigned long long flags + cudaStream_t uploadStream + cudaGraphNode_t errNode_out + cudaGraphInstantiateResult result_out + ctypedef cudaGraphInstantiateParams_st cudaGraphInstantiateParams + +cdef extern from 'driver_types.h': + cdef struct cudaGraphExecUpdateResultInfo_st: + cudaGraphExecUpdateResult result + cudaGraphNode_t errorNode + cudaGraphNode_t errorFromNode + ctypedef cudaGraphExecUpdateResultInfo_st cudaGraphExecUpdateResultInfo + +cdef struct cuda_bindings_runtime__anon_pod33: + int deviceUpdatable + cudaGraphDeviceNode_t devNode + +cdef extern from 'driver_types.h': + cdef struct cudaMemsetParamsV2: + void* dst + size_t pitch + unsigned int value + unsigned int elementSize + size_t width + size_t height + cudaExecutionContext_t ctx + +cdef extern from 'driver_types.h': + cdef struct cudaConditionalNodeParams: + cudaGraphConditionalHandle handle + cudaGraphConditionalNodeType type + unsigned int size + cudaGraph_t* phGraph_out + cudaExecutionContext_t ctx + +cdef extern from 'driver_types.h': + cdef struct cudaEventRecordNodeParams: + cudaEvent_t event + cudaExecutionContext_t ctx + +cdef struct cuda_bindings_runtime__anon_pod4: + void* devPtr + cudaChannelFormatDesc desc + size_t sizeInBytes + +cdef struct cuda_bindings_runtime__anon_pod5: + void* devPtr + cudaChannelFormatDesc desc + size_t width + size_t height + size_t pitchInBytes + +cdef struct cudaEglPlaneDesc_st: + unsigned int width + unsigned int height + unsigned int depth + unsigned int pitch + unsigned int numChannels + cudaChannelFormatDesc channelDesc + unsigned int reserved[4] +ctypedef cudaEglPlaneDesc_st cudaEglPlaneDesc + +cdef extern from 'driver_types.h': + cdef struct cudaArraySparseProperties: + cuda_bindings_runtime__anon_pod0 tileExtent + unsigned int miptailFirstLevel + unsigned long long miptailSize + unsigned int flags + unsigned int reserved[4] + +cdef union cuda_bindings_runtime__anon_pod36: + cudaArray_t pArray[3] + cudaPitchedPtr pPitch[3] + +cdef extern from 'driver_types.h': + cdef struct cudaExternalMemoryMipmappedArrayDesc: + unsigned long long offset + cudaChannelFormatDesc formatDesc + cudaExtent extent + unsigned int flags + unsigned int numLevels + unsigned int reserved[16] + +cdef extern from 'driver_types.h': + cdef struct cudaMemcpy3DParms: + cudaArray_t srcArray + cudaPos srcPos + cudaPitchedPtr srcPtr + cudaArray_t dstArray + cudaPos dstPos + cudaPitchedPtr dstPtr + cudaExtent extent + cudaMemcpyKind kind + +cdef extern from 'driver_types.h': + cdef struct cudaMemcpy3DPeerParms: + cudaArray_t srcArray + cudaPos srcPos + cudaPitchedPtr srcPtr + int srcDevice + cudaArray_t dstArray + cudaPos dstPos + cudaPitchedPtr dstPtr + int dstDevice + cudaExtent extent + +cdef extern from 'driver_types.h': + cdef struct cudaHostNodeParams: + cudaHostFn_t fn + void* userData + +cdef extern from 'driver_types.h': + cdef struct cudaHostNodeParamsV2: + cudaHostFn_t fn + void* userData + unsigned int syncMode + cudaExecutionContext_t ctx + +cdef extern from 'driver_types.h': + cdef struct cudaPointerAttributes: + cudaMemoryType type + int device + void* devicePointer + void* hostPointer + int localityDomainOrdinal + long unused + long reserved[7] + +cdef struct cuda_bindings_runtime__anon_pod12: + cudaArray_t array + cudaOffset3D offset + +cdef union cuda_bindings_runtime__anon_pod13: + int fd + cuda_bindings_runtime__anon_pod14 win32 + void* nvSciBufObject + +cdef union cuda_bindings_runtime__anon_pod15: + int fd + cuda_bindings_runtime__anon_pod16 win32 + void* nvSciSyncObj + +cdef struct cuda_bindings_runtime__anon_pod17: + cuda_bindings_runtime__anon_pod18 fence + cuda_bindings_runtime__anon_pod19 nvSciSync + cuda_bindings_runtime__anon_pod20 keyedMutex + unsigned int reserved[12] + +cdef struct cuda_bindings_runtime__anon_pod21: + cuda_bindings_runtime__anon_pod22 fence + cuda_bindings_runtime__anon_pod23 nvSciSync + cuda_bindings_runtime__anon_pod24 keyedMutex + unsigned int reserved[10] + +cdef union cuda_bindings_runtime__anon_pod27: + dim3 gridDim + cuda_bindings_runtime__anon_pod28 param + unsigned int isEnabled + +cdef union cuda_bindings_runtime__anon_pod34: + cuda_bindings_runtime__anon_pod35 overBudget + +cdef extern from 'driver_types.h': + cdef struct cudaKernelNodeParamsV2: + void* func + cudaKernel_t kern + cudaFunction_t cuFunc + dim3 gridDim + dim3 blockDim + unsigned int sharedMemBytes + void** kernelParams + void** extra + cudaExecutionContext_t ctx + cudaKernelFunctionType functionType + +cdef extern from 'driver_types.h': + cdef union cudaLaunchAttributeValue: + char pad[64] + cudaAccessPolicyWindow accessPolicyWindow + int cooperative + cudaSynchronizationPolicy syncPolicy + cuda_bindings_runtime__anon_pod29 clusterDim + cudaClusterSchedulingPolicy clusterSchedulingPolicyPreference + int programmaticStreamSerializationAllowed + cuda_bindings_runtime__anon_pod30 programmaticEvent + int priority + cudaLaunchMemSyncDomainMap memSyncDomainMap + cudaLaunchMemSyncDomain memSyncDomain + cuda_bindings_runtime__anon_pod31 preferredClusterDim + cuda_bindings_runtime__anon_pod32 launchCompletionEvent + cuda_bindings_runtime__anon_pod33 deviceUpdatableKernelNode + unsigned int sharedMemCarveout + unsigned int nvlinkUtilCentricScheduling + cudaLaunchAttributePortableClusterMode portableClusterSizeMode + cudaSharedMemoryMode sharedMemoryMode + +cdef union cuda_bindings_runtime__anon_pod1: + cuda_bindings_runtime__anon_pod2 array + cuda_bindings_runtime__anon_pod3 mipmap + cuda_bindings_runtime__anon_pod4 linear + cuda_bindings_runtime__anon_pod5 pitch2D + cuda_bindings_runtime__anon_pod6 reserved + +cdef struct cudaEglFrame_st: + cuda_bindings_runtime__anon_pod36 frame + cudaEglPlaneDesc planeDesc[3] + unsigned int planeCount + cudaEglFrameType frameType + cudaEglColorFormat eglColorFormat +ctypedef cudaEglFrame_st cudaEglFrame + +cdef extern from 'driver_types.h': + cdef struct cudaMemcpyNodeParams: + int flags + int reserved + cudaExecutionContext_t ctx + cudaMemcpy3DParms copyParams + +cdef extern from 'driver_types.h': + cdef struct cudaMemLocation: + cudaMemLocationType type + int id + cuda_bindings_runtime__anon_pod9 localized + +cdef extern from 'driver_types.h': + cdef struct cudaExternalMemoryHandleDesc: + cudaExternalMemoryHandleType type + cuda_bindings_runtime__anon_pod13 handle + unsigned long long size + unsigned int flags + unsigned int reserved[16] + +cdef extern from 'driver_types.h': + cdef struct cudaExternalSemaphoreHandleDesc: + cudaExternalSemaphoreHandleType type + cuda_bindings_runtime__anon_pod15 handle + unsigned int flags + unsigned int reserved[16] + +cdef extern from 'driver_types.h': + cdef struct cudaExternalSemaphoreSignalParams: + cuda_bindings_runtime__anon_pod17 params + unsigned int flags + unsigned int reserved[16] + +cdef extern from 'driver_types.h': + cdef struct cudaExternalSemaphoreWaitParams: + cuda_bindings_runtime__anon_pod21 params + unsigned int flags + unsigned int reserved[16] + +cdef extern from 'driver_types.h': + cdef struct cudaGraphKernelNodeUpdate: + cudaGraphDeviceNode_t node + cudaGraphKernelNodeField field + cuda_bindings_runtime__anon_pod27 updateData + +cdef extern from 'driver_types.h': + cdef struct cudaAsyncNotificationInfo: + cudaAsyncNotificationType type + cuda_bindings_runtime__anon_pod34 info + ctypedef cudaAsyncNotificationInfo cudaAsyncNotificationInfo_t + +cdef extern from 'driver_types.h': + cdef struct cudaDevResource_st: + cudaDevResourceType type + unsigned char _internal_padding[92] + cudaDevSmResource sm + cudaDevWorkqueueConfigResource wqConfig + cudaDevWorkqueueResource wq + unsigned char _oversize[40] + cudaDevResource_st* nextResource + ctypedef cudaDevResource_st cudaDevResource + +cdef extern from 'driver_types.h': + cdef struct cudaResourceDesc: + cudaResourceType resType + cuda_bindings_runtime__anon_pod1 res + unsigned int flags + +cdef extern from 'driver_types.h': + cdef struct cudaMemAccessDesc: + cudaMemLocation location + cudaMemAccessFlags flags + +cdef extern from 'driver_types.h': + cdef struct cudaMemPoolProps: + cudaMemAllocationType allocType + cudaMemAllocationHandleType handleTypes + cudaMemLocation location + void* win32SecurityAttributes + size_t maxSize + unsigned short usage + unsigned char reserved[54] + +cdef extern from 'driver_types.h': + cdef struct cudaMemcpyAttributes: + cudaMemcpySrcAccessOrder srcAccessOrder + cudaMemLocation srcLocHint + cudaMemLocation dstLocHint + unsigned int flags + +cdef struct cuda_bindings_runtime__anon_pod11: + void* ptr + size_t rowLength + size_t layerHeight + cudaMemLocation locHint + +cdef extern from 'driver_types.h': + cdef struct cudaExternalSemaphoreSignalNodeParams: + cudaExternalSemaphore_t* extSemArray + cudaExternalSemaphoreSignalParams* paramsArray + unsigned int numExtSems + +cdef extern from 'driver_types.h': + cdef struct cudaExternalSemaphoreSignalNodeParamsV2: + cudaExternalSemaphore_t* extSemArray + cudaExternalSemaphoreSignalParams* paramsArray + unsigned int numExtSems + cudaExecutionContext_t ctx + +cdef extern from 'driver_types.h': + cdef struct cudaExternalSemaphoreWaitNodeParams: + cudaExternalSemaphore_t* extSemArray + cudaExternalSemaphoreWaitParams* paramsArray + unsigned int numExtSems + +cdef extern from 'driver_types.h': + cdef struct cudaExternalSemaphoreWaitNodeParamsV2: + cudaExternalSemaphore_t* extSemArray + cudaExternalSemaphoreWaitParams* paramsArray + unsigned int numExtSems + cudaExecutionContext_t ctx + +cdef extern from 'driver_types.h': + cdef struct cudaMemAllocNodeParams: + cudaMemPoolProps poolProps + cudaMemAccessDesc* accessDescs + size_t accessDescCount + size_t bytesize + void* dptr + +cdef extern from 'driver_types.h': + cdef struct cudaMemAllocNodeParamsV2: + cudaMemPoolProps poolProps + cudaMemAccessDesc* accessDescs + size_t accessDescCount + size_t bytesize + void* dptr + +cdef union cuda_bindings_runtime__anon_pod10: + cuda_bindings_runtime__anon_pod11 ptr + cuda_bindings_runtime__anon_pod12 array + +cdef extern from 'driver_types.h': + cdef struct cudaMemcpy3DOperand: + cudaMemcpy3DOperandType type + cuda_bindings_runtime__anon_pod10 op + +cdef extern from 'driver_types.h': + cdef struct cudaGraphNodeParams: + cudaGraphNodeType type + int reserved0[3] + long long reserved1[29] + cudaKernelNodeParamsV2 kernel + cudaMemcpyNodeParams memcpy + cudaMemsetParamsV2 memset + cudaHostNodeParamsV2 host + cudaChildGraphNodeParams graph + cudaEventWaitNodeParams eventWait + cudaEventRecordNodeParams eventRecord + cudaExternalSemaphoreSignalNodeParamsV2 extSemSignal + cudaExternalSemaphoreWaitNodeParamsV2 extSemWait + cudaMemAllocNodeParamsV2 alloc + cudaMemFreeNodeParams free + cudaConditionalNodeParams conditional + long long reserved2 + +cdef extern from 'driver_types.h': + cdef struct cudaMemcpy3DBatchOp: + cudaMemcpy3DOperand src + cudaMemcpy3DOperand dst + cudaExtent extent + cudaMemcpySrcAccessOrder srcAccessOrder + unsigned int flags + +cdef extern from 'cuda_runtime_api.h': + ctypedef cudaError_t (*cudaGraphRecaptureCallback_t 'cudaGraphRecaptureCallback_t')( + void* data, + cudaGraphNode_t node, + const cudaGraphNodeParams* originalParams, + const cudaGraphNodeParams* recaptureParams, + cudaGraphRecaptureStatus status + ) + + +cdef extern from '': + cdef struct cudaGraphRecaptureCallbackData: + cudaGraphRecaptureCallback_t callbackFunc + void* userData + +cdef extern from 'driver_types.h': + # cudaLaunchAttribute_st is SKIPped (sizeof-based array dimension in pad field). + # Declared here (after the enum and type sections) so that cudaLaunchAttributeID and + # cudaLaunchAttributeValue are already in scope — Cython requires forward types to + # be visible at the point of use even inside cdef extern from blocks. + # Field types must match the legacy_cython_gen ABI baseline for __pyx_capi__ compat. + ctypedef struct cudaLaunchAttribute_st 'cudaLaunchAttribute_st': + cudaLaunchAttributeID id + cudaLaunchAttributeValue val + +cdef extern from 'driver_types.h': + ctypedef cudaLaunchAttribute_st cudaLaunchAttribute 'cudaLaunchAttribute' + +# cudaLaunchConfig_st references cudaLaunchAttribute* so it must follow the above. +# Declared here rather than auto-generated (which would land in type_decls, before +# cudaLaunchAttribute) to satisfy Cython's forward-declaration requirement. +cdef extern from '': + cdef struct cudaLaunchConfig_st: + dim3 gridDim + dim3 blockDim + size_t dynamicSmemBytes + cudaStream_t stream + cudaLaunchAttribute* attrs + unsigned int numAttrs + ctypedef cudaLaunchConfig_st cudaLaunchConfig_t + +cdef extern from 'cuda_runtime_api.h': + ctypedef void (*cudaAsyncCallback)(cudaAsyncNotificationInfo_t* info, void* userData, cudaAsyncCallbackHandle_t handle) nogil + + +# FUNCTIONS +cdef cudaError_t cudaDeviceReset() except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceSynchronize() except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceSetLimit(cudaLimit limit, size_t value) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceGetPCIBusId(char* pciBusId, int len, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaIpcCloseMemHandle(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGetLastError() except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaPeekAtLastError() except ?cudaErrorCallRequiresNewerDriver nogil +cdef const char* cudaGetErrorName(cudaError_t error) except?NULL nogil +cdef const char* cudaGetErrorString(cudaError_t error) except?NULL nogil +cdef cudaError_t cudaGetDeviceCount(int* count) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaChooseDevice(int* device, const cudaDeviceProp* prop) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaSetDevice(int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGetDevice(int* device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaSetDeviceFlags(unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGetDeviceFlags(unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaStreamCreate(cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaStreamGetPriority(cudaStream_t hStream, int* priority) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaStreamDestroy(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaStreamSynchronize(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaStreamQuery(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil +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 +cdef cudaError_t cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaEventCreate(cudaEvent_t* event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaEventRecord(cudaEvent_t event, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaEventQuery(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaEventSynchronize(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaEventDestroy(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDestroyExternalMemory(cudaExternalMemory_t extMem) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaFuncGetName(const char** name, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaFuncGetParamInfo(const void* func, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMalloc(void** devPtr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMallocHost(void** ptr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaFree(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaFreeHost(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaFreeArray(cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaHostAlloc(void** pHost, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaHostRegister(void* ptr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaHostUnregister(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaHostGetFlags(unsigned int* pFlags, void* pHost) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemcpy3D(const cudaMemcpy3DParms* p) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemGetInfo(size_t* free, size_t* total) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil +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 +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 +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 +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 +cdef cudaError_t cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemcpyBatchAsync(const void** dsts, const void** srcs, const size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +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 +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 +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 +cdef cudaError_t cudaMemset(void* devPtr, int value, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemPrefetchAsync(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil +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 +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 +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 +cdef cudaError_t cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaFreeAsync(void* devPtr, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemPoolDestroy(cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceDisablePeerAccess(int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaChannelFormatDesc cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil +cdef cudaError_t cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDestroyTextureObject(cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDriverGetVersion(int* driverVersion) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaRuntimeGetVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hDst, cudaGraphNode_t hSrc) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) except ?cudaErrorCallRequiresNewerDriver nogil +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 +cdef cudaError_t cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceGraphMemTrim(int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphDestroyNode(cudaGraphNode_t node) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphExecDestroy(cudaGraphExec_t graphExec) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphDestroy(cudaGraph_t graph) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil +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 +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 +cdef cudaError_t cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaLibraryGetGlobal(void** dptr, size_t* bytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaLibraryGetManaged(void** dptr, size_t* bytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphicsEGLRegisterImage(cudaGraphicsResource** pCudaResource, EGLImageKHR image, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaEGLStreamConsumerConnect(cudaEglStreamConnection* conn, EGLStreamKHR eglStream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaEGLStreamConsumerConnectWithFlags(cudaEglStreamConnection* conn, EGLStreamKHR eglStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaEGLStreamConsumerDisconnect(cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaEGLStreamConsumerAcquireFrame(cudaEglStreamConnection* conn, cudaGraphicsResource_t* pCudaResource, cudaStream_t* pStream, unsigned int timeout) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaEGLStreamConsumerReleaseFrame(cudaEglStreamConnection* conn, cudaGraphicsResource_t pCudaResource, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaEGLStreamProducerConnect(cudaEglStreamConnection* conn, EGLStreamKHR eglStream, EGLint width, EGLint height) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaEGLStreamProducerDisconnect(cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaEGLStreamProducerPresentFrame(cudaEglStreamConnection* conn, cudaEglFrame eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaEGLStreamProducerReturnFrame(cudaEglStreamConnection* conn, cudaEglFrame* eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphicsResourceGetMappedEglFrame(cudaEglFrame* eglFrame, cudaGraphicsResource_t resource, unsigned int index, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaEventCreateFromEGLSync(cudaEvent_t* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaProfilerStart() except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGLGetDevices(unsigned int* pCudaDeviceCount, int* pCudaDevices, unsigned int cudaDeviceCount, cudaGLDeviceList deviceList) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphicsGLRegisterImage(cudaGraphicsResource** resource, GLuint image, GLenum target, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphicsGLRegisterBuffer(cudaGraphicsResource** resource, GLuint buffer, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaVDPAUGetDevice(int* device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaVDPAUSetVDPAUDevice(int device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphicsVDPAURegisterVideoSurface(cudaGraphicsResource** resource, VdpVideoSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphicsVDPAURegisterOutputSurface(cudaGraphicsResource** resource, VdpOutputSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGetDeviceProperties(cudaDeviceProp* prop, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceGetHostAtomicCapabilities(unsigned int* capabilities, const cudaAtomicOperation* operations, unsigned int count, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceGetP2PAtomicCapabilities(unsigned int* capabilities, const cudaAtomicOperation* operations, unsigned int count, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaStreamGetCaptureInfo(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 +cdef cudaError_t cudaSignalExternalSemaphoresAsync(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaWaitExternalSemaphoresAsync(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemPrefetchBatchAsync(void** dptrs, size_t* sizes, size_t count, cudaMemLocation* prefetchLocs, size_t* prefetchLocIdxs, size_t numPrefetchLocs, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemDiscardBatchAsync(void** dptrs, size_t* sizes, size_t count, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemDiscardAndPrefetchBatchAsync(void** dptrs, size_t* sizes, size_t count, cudaMemLocation* prefetchLocs, size_t* prefetchLocIdxs, size_t numPrefetchLocs, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemGetDefaultMemPool(cudaMemPool_t* memPool, cudaMemLocation* location, cudaMemAllocationType type) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemGetMemPool(cudaMemPool_t* memPool, cudaMemLocation* location, cudaMemAllocationType type) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemSetMemPool(cudaMemLocation* location, cudaMemAllocationType type, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaLogsRegisterCallback(cudaLogsCallback_t callbackFunc, void* userData, cudaLogsCallbackHandle* callback_out) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaLogsUnregisterCallback(cudaLogsCallbackHandle callback) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaLogsCurrent(cudaLogIterator* iterator_out, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaLogsDumpToFile(cudaLogIterator* iterator, const char* pathToFile, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaLogsDumpToMemory(cudaLogIterator* iterator, char* buffer, size_t* size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphNodeGetContainingGraph(cudaGraphNode_t hNode, cudaGraph_t* phGraph) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphNodeGetLocalId(cudaGraphNode_t hNode, unsigned int* nodeId) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphNodeGetToolsId(cudaGraphNode_t hNode, unsigned long long* toolsNodeId) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphGetId(cudaGraph_t hGraph, unsigned int* graphID) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphExecGetId(cudaGraphExec_t hGraphExec, unsigned int* graphID) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphConditionalHandleCreate_v2(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, cudaExecutionContext_t ctx, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceGetDevResource(int device, cudaDevResource* resource, cudaDevResourceType type) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDevSmResourceSplitByCount(cudaDevResource* result, unsigned int* nbGroups, const cudaDevResource* input, cudaDevResource* remaining, unsigned int flags, unsigned int minCount) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDevSmResourceSplit(cudaDevResource* result, unsigned int nbGroups, const cudaDevResource* input, cudaDevResource* remainder, unsigned int flags, cudaDevSmResourceGroupParams* groupParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDevResourceGenerateDesc(cudaDevResourceDesc_t* phDesc, cudaDevResource* resources, unsigned int nbResources) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGreenCtxCreate(cudaExecutionContext_t* phCtx, cudaDevResourceDesc_t desc, int device, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaExecutionCtxDestroy(cudaExecutionContext_t ctx) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaExecutionCtxGetDevResource(cudaExecutionContext_t ctx, cudaDevResource* resource, cudaDevResourceType type) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaExecutionCtxGetDevice(int* device, cudaExecutionContext_t ctx) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaExecutionCtxGetId(cudaExecutionContext_t ctx, unsigned long long* ctxId) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaExecutionCtxStreamCreate(cudaStream_t* phStream, cudaExecutionContext_t ctx, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaExecutionCtxSynchronize(cudaExecutionContext_t ctx) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaStreamGetDevResource(cudaStream_t hStream, cudaDevResource* resource, cudaDevResourceType type) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaExecutionCtxRecordEvent(cudaExecutionContext_t ctx, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaExecutionCtxWaitEvent(cudaExecutionContext_t ctx, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaDeviceGetExecutionCtx(cudaExecutionContext_t* ctx, int device) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaFuncGetParamCount(const void* func, size_t* paramCount) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaLaunchHostFunc_v2(cudaStream_t stream, cudaHostFn_t fn, void* userData, unsigned int syncMode) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemcpyWithAttributesAsync(void* dst, const void* src, size_t size, cudaMemcpyAttributes* attr, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemcpy3DWithAttributesAsync(cudaMemcpy3DBatchOp* op, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaGraphNodeGetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaStreamBeginRecaptureToGraph(cudaStream_t stream, cudaStreamCaptureMode mode, cudaGraph_t graph, cudaGraphRecaptureCallbackData* callbackData) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemGetLocationInfo(void* devPtr, size_t size, size_t summaryGranularity, size_t samplingGranularity, cudaMemLocation* location_out) except ?cudaErrorCallRequiresNewerDriver nogil + +# C #define integer constants from driver_types.h required for ABI compat with lowpp layer +cdef extern from 'driver_types.h': + cdef enum: + cudaHostAllocDefault + cudaHostAllocPortable + cudaHostAllocMapped + cudaHostAllocWriteCombined + cudaHostRegisterDefault + cudaHostRegisterPortable + cudaHostRegisterMapped + cudaHostRegisterIoMemory + cudaHostRegisterReadOnly + cudaPeerAccessDefault + cudaStreamDefault + cudaStreamNonBlocking + cudaEventDefault + cudaEventBlockingSync + cudaEventDisableTiming + cudaEventInterprocess + cudaEventRecordDefault + cudaEventRecordExternal + cudaEventWaitDefault + cudaEventWaitExternal + cudaDeviceScheduleAuto + cudaDeviceScheduleSpin + cudaDeviceScheduleYield + cudaDeviceScheduleBlockingSync + cudaDeviceBlockingSync + cudaDeviceScheduleMask + cudaDeviceMapHost + cudaDeviceLmemResizeToMax + cudaDeviceSyncMemops + cudaDeviceMask + cudaArrayDefault + cudaArrayLayered + cudaArraySurfaceLoadStore + cudaArrayCubemap + cudaArrayTextureGather + cudaArrayColorAttachment + cudaArraySparse + cudaArrayDeferredMapping + cudaIpcMemLazyEnablePeerAccess + cudaMemAttachGlobal + cudaMemAttachHost + cudaMemAttachSingle + cudaOccupancyDefault + cudaOccupancyDisableCachingOverride + cudaCpuDeviceId + cudaInvalidDeviceId + cudaInitDeviceFlagsAreValid + cudaArraySparsePropertiesSingleMipTail + cudaMemPoolCreateUsageHwDecompress + CUDA_IPC_HANDLE_SIZE + cudaExternalMemoryDedicated + cudaExternalSemaphoreSignalSkipNvSciBufMemSync + cudaExternalSemaphoreWaitSkipNvSciBufMemSync + cudaNvSciSyncAttrSignal + cudaNvSciSyncAttrWait + cudaGraphKernelNodePortDefault + cudaGraphKernelNodePortProgrammatic + cudaGraphKernelNodePortLaunchCompletion + cudaStreamAttributeAccessPolicyWindow + cudaStreamAttributeSynchronizationPolicy + cudaStreamAttributeMemSyncDomainMap + cudaStreamAttributeMemSyncDomain + cudaStreamAttributePriority + cudaKernelNodeAttributeAccessPolicyWindow + cudaKernelNodeAttributeCooperative + cudaKernelNodeAttributePriority + cudaKernelNodeAttributeClusterDimension + cudaKernelNodeAttributeClusterSchedulingPolicyPreference + cudaKernelNodeAttributeMemSyncDomainMap + cudaKernelNodeAttributeMemSyncDomain + cudaKernelNodeAttributePreferredSharedMemoryCarveout + cudaKernelNodeAttributeDeviceUpdatableKernelNode + cudaKernelNodeAttributeNvlinkUtilCentricScheduling + +# cudaStreamLegacy/PerThread are pointer-cast macros: ((cudaStream_t)0x1/0x2); use integer values +cdef enum: + cudaStreamLegacy = 1 + cudaStreamPerThread = 2 + +# Surface and texture type constants +cdef extern from 'surface_types.h': + cdef enum: + cudaSurfaceType1D + cudaSurfaceType2D + cudaSurfaceType3D + cudaSurfaceTypeCubemap + cudaSurfaceType1DLayered + cudaSurfaceType2DLayered + cudaSurfaceTypeCubemapLayered + +cdef extern from 'texture_types.h': + cdef enum: + cudaTextureType1D + cudaTextureType2D + cudaTextureType3D + cudaTextureTypeCubemap + cudaTextureType1DLayered + cudaTextureType2DLayered + cudaTextureTypeCubemapLayered + +# Version constants +cdef extern from 'cuda_runtime.h': + cdef enum: + CUDART_VERSION + +cdef extern from 'cuda_runtime_api.h': + cdef enum: + __CUDART_API_VERSION + +# CUDA_EGL_MAX_PLANES is defined as 3 in cuda_egl_interop.h; hardcoded to avoid EGL deps +cdef enum: + CUDA_EGL_MAX_PLANES = 3 + +# libraryPropertyType_t (starts lowercase, outside type pattern) +cdef extern from 'library_types.h': + ctypedef enum libraryPropertyType_t 'libraryPropertyType_t': + MAJOR_VERSION + MINOR_VERSION + PATCH_LEVEL + + +# Static inline helpers from driver_functions.h — wrapped as cdef so the lowpp layer can cimport them. +cdef cudaPitchedPtr make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil +cdef cudaPos make_cudaPos(size_t x, size_t y, size_t z) except* nogil +cdef cudaExtent make_cudaExtent(size_t w, size_t h, size_t d) except* nogil + +cdef cudaError_t getLocalRuntimeVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/driver.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/driver.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..87be6c45c449071cb0669cfbf9f3ee4bcf2890c4 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/driver.cpython-312-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:262fc01e03ce4107619d8abd1d4f1ca37faec0497fe7a4f618f1f31fa1bfd5aa +size 7499496 diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/driver.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/driver.pxd new file mode 100644 index 0000000000000000000000000000000000000000..454c4cd7e59bd4071b448a2c8712f49b57d2a011 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/driver.pxd @@ -0,0 +1,11245 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +# This code was automatically generated with version 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=4f3e3117475b43ef1ebbe0cd972d2aa6ef4dc5d449a43f1d9ad1d01625604c32 +cimport cuda.bindings.cydriver as cydriver + +include "_lib/utils.pxd" + +cdef class CUcontext: + """ + + A regular context handle + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUcontext _pvt_val + cdef cydriver.CUcontext* _pvt_ptr + +cdef class CUmodule: + """ + + CUDA module + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUmodule _pvt_val + cdef cydriver.CUmodule* _pvt_ptr + +cdef class CUfunction: + """ + + CUDA function + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUfunction _pvt_val + cdef cydriver.CUfunction* _pvt_ptr + +cdef class CUlibrary: + """ + + CUDA library + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUlibrary _pvt_val + cdef cydriver.CUlibrary* _pvt_ptr + +cdef class CUkernel: + """ + + CUDA kernel + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUkernel _pvt_val + cdef cydriver.CUkernel* _pvt_ptr + +cdef class CUarray: + """ + + CUDA array + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUarray _pvt_val + cdef cydriver.CUarray* _pvt_ptr + +cdef class CUmipmappedArray: + """ + + CUDA mipmapped array + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUmipmappedArray _pvt_val + cdef cydriver.CUmipmappedArray* _pvt_ptr + +cdef class CUtexref: + """ + + CUDA texture reference + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUtexref _pvt_val + cdef cydriver.CUtexref* _pvt_ptr + +cdef class CUsurfref: + """ + + CUDA surface reference + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUsurfref _pvt_val + cdef cydriver.CUsurfref* _pvt_ptr + +cdef class CUevent: + """ + + CUDA event + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUevent _pvt_val + cdef cydriver.CUevent* _pvt_ptr + +cdef class CUstream: + """ + + CUDA stream + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUstream _pvt_val + cdef cydriver.CUstream* _pvt_ptr + +cdef class CUgraphicsResource: + """ + + CUDA graphics interop resource + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUgraphicsResource _pvt_val + cdef cydriver.CUgraphicsResource* _pvt_ptr + +cdef class CUexternalMemory: + """ + + CUDA external memory + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUexternalMemory _pvt_val + cdef cydriver.CUexternalMemory* _pvt_ptr + +cdef class CUexternalSemaphore: + """ + + CUDA external semaphore + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUexternalSemaphore _pvt_val + cdef cydriver.CUexternalSemaphore* _pvt_ptr + +cdef class CUgraph: + """ + + CUDA graph + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUgraph _pvt_val + cdef cydriver.CUgraph* _pvt_ptr + +cdef class CUgraphNode: + """ + + CUDA graph node + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUgraphNode _pvt_val + cdef cydriver.CUgraphNode* _pvt_ptr + +cdef class CUgraphExec: + """ + + CUDA executable graph + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUgraphExec _pvt_val + cdef cydriver.CUgraphExec* _pvt_ptr + +cdef class CUmemoryPool: + """ + + CUDA memory pool + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUmemoryPool _pvt_val + cdef cydriver.CUmemoryPool* _pvt_ptr + +cdef class CUuserObject: + """ + + CUDA user object for graphs + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUuserObject _pvt_val + cdef cydriver.CUuserObject* _pvt_ptr + +cdef class CUgraphDeviceNode: + """ + + CUDA graph device node handle + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUgraphDeviceNode _pvt_val + cdef cydriver.CUgraphDeviceNode* _pvt_ptr + +cdef class CUasyncCallbackHandle: + """ + + CUDA async notification callback handle + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUasyncCallbackHandle _pvt_val + cdef cydriver.CUasyncCallbackHandle* _pvt_ptr + +cdef class CUgreenCtx: + """ + + A green context handle. This handle can be used safely from only one CPU thread at a time. Created via cuGreenCtxCreate + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUgreenCtx _pvt_val + cdef cydriver.CUgreenCtx* _pvt_ptr + +cdef class CUlinkState: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUlinkState _pvt_val + cdef cydriver.CUlinkState* _pvt_ptr + cdef list _keepalive + +cdef class CUcheckpointOperationHandle: + """ + + Handle for a CUDA custom storage checkpoint or restore operation awaiting completion + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUcheckpointOperationHandle _pvt_val + cdef cydriver.CUcheckpointOperationHandle* _pvt_ptr + +cdef class CUcoredumpCallbackHandle: + """ Opaque handle representing a registered coredump status callback. + + This handle is returned when registering a callback and must be provided when deregistering the callback. + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUcoredumpCallbackHandle _pvt_val + cdef cydriver.CUcoredumpCallbackHandle* _pvt_ptr + +cdef class CUdevResourceDesc: + """ + + An opaque descriptor handle. The descriptor encapsulates multiple created and configured resources. Created via cuDevResourceGenerateDesc + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUdevResourceDesc _pvt_val + cdef cydriver.CUdevResourceDesc* _pvt_ptr + +cdef class CUlogsCallbackHandle: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUlogsCallbackHandle _pvt_val + cdef cydriver.CUlogsCallbackHandle* _pvt_ptr + +cdef class CUeglStreamConnection: + """ + + CUDA EGLSream Connection + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUeglStreamConnection _pvt_val + cdef cydriver.CUeglStreamConnection* _pvt_ptr + +cdef class EGLImageKHR: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.EGLImageKHR _pvt_val + cdef cydriver.EGLImageKHR* _pvt_ptr + +cdef class EGLStreamKHR: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.EGLStreamKHR _pvt_val + cdef cydriver.EGLStreamKHR* _pvt_ptr + +cdef class EGLSyncKHR: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.EGLSyncKHR _pvt_val + cdef cydriver.EGLSyncKHR* _pvt_ptr + +cdef class CUasyncCallback: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUasyncCallback _pvt_val + cdef cydriver.CUasyncCallback* _pvt_ptr + +cdef class CUhostFn: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUhostFn _pvt_val + cdef cydriver.CUhostFn* _pvt_ptr + +cdef class CUstreamCallback: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUstreamCallback _pvt_val + cdef cydriver.CUstreamCallback* _pvt_ptr + +cdef class CUoccupancyB2DSize: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUoccupancyB2DSize _pvt_val + cdef cydriver.CUoccupancyB2DSize* _pvt_ptr + +cdef class CUgraphRecaptureCallback: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUgraphRecaptureCallback _pvt_val + cdef cydriver.CUgraphRecaptureCallback* _pvt_ptr + +cdef class CUcoredumpStatusCallback: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUcoredumpStatusCallback _pvt_val + cdef cydriver.CUcoredumpStatusCallback* _pvt_ptr + +cdef class CUlogsCallback: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUlogsCallback _pvt_val + cdef cydriver.CUlogsCallback* _pvt_ptr + +cdef class CUuuid_st: + """ + Attributes + ---------- + + bytes : bytes + < CUDA definition of UUID + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUuuid_st _pvt_val + cdef cydriver.CUuuid_st* _pvt_ptr + +cdef class CUmemFabricHandle_st: + """ + Fabric handle - An opaque handle representing a memory allocation + that can be exported to processes in same or different nodes. For + IPC between processes on different nodes they must be connected via + the NVSwitch fabric. + + Attributes + ---------- + + data : bytes + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemFabricHandle_st _pvt_val + cdef cydriver.CUmemFabricHandle_st* _pvt_ptr + +cdef class CUipcEventHandle_st: + """ + CUDA IPC event handle + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUipcEventHandle_st _pvt_val + cdef cydriver.CUipcEventHandle_st* _pvt_ptr + +cdef class CUipcMemHandle_st: + """ + CUDA IPC mem handle + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUipcMemHandle_st _pvt_val + cdef cydriver.CUipcMemHandle_st* _pvt_ptr + +cdef class CUstreamMemOpWaitValueParams_st: + """ + Attributes + ---------- + + operation : CUstreamBatchMemOpType + + + + address : CUdeviceptr + + + + value : cuuint32_t + + + + value64 : cuuint64_t + + + + flags : unsigned int + See CUstreamWaitValue_flags. + + + alias : CUdeviceptr + For driver internal use. Initial value is unimportant. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUstreamBatchMemOpParams_union* _pvt_ptr + + cdef CUdeviceptr _address + + + cdef cuuint32_t _value + + + cdef cuuint64_t _value64 + + + cdef CUdeviceptr _alias + + +cdef class CUstreamMemOpWriteValueParams_st: + """ + Attributes + ---------- + + operation : CUstreamBatchMemOpType + + + + address : CUdeviceptr + + + + value : cuuint32_t + + + + value64 : cuuint64_t + + + + flags : unsigned int + See CUstreamWriteValue_flags. + + + alias : CUdeviceptr + For driver internal use. Initial value is unimportant. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUstreamBatchMemOpParams_union* _pvt_ptr + + cdef CUdeviceptr _address + + + cdef cuuint32_t _value + + + cdef cuuint64_t _value64 + + + cdef CUdeviceptr _alias + + +cdef class CUstreamMemOpFlushRemoteWritesParams_st: + """ + Attributes + ---------- + + operation : CUstreamBatchMemOpType + + + + flags : unsigned int + Must be 0. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUstreamBatchMemOpParams_union* _pvt_ptr + +cdef class CUstreamMemOpMemoryBarrierParams_st: + """ + Attributes + ---------- + + operation : CUstreamBatchMemOpType + < Only supported in the _v2 API + + + flags : unsigned int + See CUstreamMemoryBarrier_flags + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUstreamBatchMemOpParams_union* _pvt_ptr + +cdef class CUstreamMemOpAtomicReductionParams_st: + """ + Attributes + ---------- + + operation : CUstreamBatchMemOpType + + + + flags : unsigned int + Must be 0 + + + reductionOp : CUstreamAtomicReductionOpType + See CUstreamAtomicReductionOpType + + + dataType : CUstreamAtomicReductionDataType + See CUstreamAtomicReductionDataType + + + address : CUdeviceptr + The address the atomic operation will be operated on + + + value : cuuint64_t + The operand value the atomic operation will operate with + + + alias : CUdeviceptr + For driver internal use. Initial value is unimportant. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUstreamBatchMemOpParams_union* _pvt_ptr + + cdef CUdeviceptr _address + + + cdef cuuint64_t _value + + + cdef CUdeviceptr _alias + + +cdef class CUstreamBatchMemOpParams_union: + """ + Per-operation parameters for cuStreamBatchMemOp + + Attributes + ---------- + + operation : CUstreamBatchMemOpType + Operation. This is the first field of all the union elemets and + acts as a TAG to determine which union member is valid. + + + waitValue : CUstreamMemOpWaitValueParams_st + Params for CU_STREAM_MEM_OP_WAIT_VALUE_32 and + CU_STREAM_MEM_OP_WAIT_VALUE_64 operations. + + + writeValue : CUstreamMemOpWriteValueParams_st + Params for CU_STREAM_MEM_OP_WRITE_VALUE_32 and + CU_STREAM_MEM_OP_WRITE_VALUE_64 operations. + + + flushRemoteWrites : CUstreamMemOpFlushRemoteWritesParams_st + Params for CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES operations. + + + memoryBarrier : CUstreamMemOpMemoryBarrierParams_st + Params for CU_STREAM_MEM_OP_BARRIER operations. + + + atomicReduction : CUstreamMemOpAtomicReductionParams_st + + + + pad : list[cuuint64_t] + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUstreamBatchMemOpParams_union _pvt_val + cdef cydriver.CUstreamBatchMemOpParams_union* _pvt_ptr + + cdef CUstreamMemOpWaitValueParams_st _waitValue + + + cdef CUstreamMemOpWriteValueParams_st _writeValue + + + cdef CUstreamMemOpFlushRemoteWritesParams_st _flushRemoteWrites + + + cdef CUstreamMemOpMemoryBarrierParams_st _memoryBarrier + + + cdef CUstreamMemOpAtomicReductionParams_st _atomicReduction + + +cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st: + """ + Batch memory operation node parameters Used in the legacy + cuGraphAddBatchMemOpNode api. New code should use cuGraphAddNode() + + Attributes + ---------- + + ctx : CUcontext + + + + count : unsigned int + + + + paramArray : CUstreamBatchMemOpParams + + + + flags : unsigned int + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st _pvt_val + cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st* _pvt_ptr + + cdef CUcontext _ctx + + + cdef size_t _paramArray_length + cdef cydriver.CUstreamBatchMemOpParams* _paramArray + + +cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st: + """ + Batch memory operation node parameters + + Attributes + ---------- + + ctx : CUcontext + Context to use for the operations. + + + count : unsigned int + Number of operations in paramArray. + + + paramArray : CUstreamBatchMemOpParams + Array of batch memory operations. + + + flags : unsigned int + Flags to control the node. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st _pvt_val + cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st* _pvt_ptr + + cdef CUcontext _ctx + + + cdef size_t _paramArray_length + cdef cydriver.CUstreamBatchMemOpParams* _paramArray + + +cdef class anon_struct0: + """ + Attributes + ---------- + + bytesOverBudget : unsigned long long + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUasyncNotificationInfo_st* _pvt_ptr + +cdef class anon_union2: + """ + Attributes + ---------- + + overBudget : anon_struct0 + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUasyncNotificationInfo_st* _pvt_ptr + + cdef anon_struct0 _overBudget + + +cdef class CUasyncNotificationInfo_st: + """ + Information passed to the user via the async notification callback + + Attributes + ---------- + + type : CUasyncNotificationType + The type of notification being sent + + + info : anon_union2 + Information about the notification. `typename` must be checked in + order to interpret this field. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUasyncNotificationInfo_st* _val_ptr + cdef cydriver.CUasyncNotificationInfo_st* _pvt_ptr + + cdef anon_union2 _info + + +cdef class CUdevprop_st: + """ + Legacy device properties + + Attributes + ---------- + + maxThreadsPerBlock : int + Maximum number of threads per block + + + maxThreadsDim : list[int] + Maximum size of each dimension of a block + + + maxGridSize : list[int] + Maximum size of each dimension of a grid + + + sharedMemPerBlock : int + Shared memory available per block in bytes + + + totalConstantMemory : int + Constant memory available on device in bytes + + + SIMDWidth : int + Warp size in threads + + + memPitch : int + Maximum pitch in bytes allowed by memory copies + + + regsPerBlock : int + 32-bit registers available per block + + + clockRate : int + Clock frequency in kilohertz + + + textureAlign : int + Alignment requirement for textures + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUdevprop_st _pvt_val + cdef cydriver.CUdevprop_st* _pvt_ptr + +cdef class CUaccessPolicyWindow_st: + """ + Specifies an access policy for a window, a contiguous extent of + memory beginning at base_ptr and ending at base_ptr + num_bytes. + num_bytes is limited by + CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE. Partition into + many segments and assign segments such that: sum of "hit segments" + / window == approx. ratio. sum of "miss segments" / window == + approx 1-ratio. Segments and ratio specifications are fitted to the + capabilities of the architecture. Accesses in a hit segment apply + the hitProp access policy. Accesses in a miss segment apply the + missProp access policy. + + Attributes + ---------- + + base_ptr : Any + Starting address of the access policy window. CUDA driver may align + it. + + + num_bytes : size_t + Size in bytes of the window policy. CUDA driver may restrict the + maximum size and alignment. + + + hitRatio : float + hitRatio specifies percentage of lines assigned hitProp, rest are + assigned missProp. + + + hitProp : CUaccessProperty + CUaccessProperty set for hit. + + + missProp : CUaccessProperty + CUaccessProperty set for miss. Must be either NORMAL or STREAMING + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUaccessPolicyWindow_st _pvt_val + cdef cydriver.CUaccessPolicyWindow_st* _pvt_ptr + + cdef _HelperInputVoidPtr _cybase_ptr + + +cdef class CUDA_KERNEL_NODE_PARAMS_st: + """ + GPU kernel node parameters + + Attributes + ---------- + + func : CUfunction + Kernel to launch + + + gridDimX : unsigned int + Width of grid in blocks + + + gridDimY : unsigned int + Height of grid in blocks + + + gridDimZ : unsigned int + Depth of grid in blocks + + + blockDimX : unsigned int + X dimension of each thread block + + + blockDimY : unsigned int + Y dimension of each thread block + + + blockDimZ : unsigned int + Z dimension of each thread block + + + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + + + kernelParams : Any + Array of pointers to kernel parameters + + + extra : Any + Extra options + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_KERNEL_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_KERNEL_NODE_PARAMS_st* _pvt_ptr + + cdef CUfunction _func + + + cdef _HelperKernelParams _cykernelParams + + +cdef class CUDA_KERNEL_NODE_PARAMS_v2_st: + """ + GPU kernel node parameters + + Attributes + ---------- + + func : CUfunction + Kernel to launch + + + gridDimX : unsigned int + Width of grid in blocks + + + gridDimY : unsigned int + Height of grid in blocks + + + gridDimZ : unsigned int + Depth of grid in blocks + + + blockDimX : unsigned int + X dimension of each thread block + + + blockDimY : unsigned int + Y dimension of each thread block + + + blockDimZ : unsigned int + Z dimension of each thread block + + + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + + + kernelParams : Any + Array of pointers to kernel parameters + + + extra : Any + Extra options + + + kern : CUkernel + Kernel to launch, will only be referenced if func is NULL + + + ctx : CUcontext + Context for the kernel task to run in. The value NULL will indicate + the current context should be used by the api. This field is + ignored if func is set. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_KERNEL_NODE_PARAMS_v2_st _pvt_val + cdef cydriver.CUDA_KERNEL_NODE_PARAMS_v2_st* _pvt_ptr + + cdef CUfunction _func + + + cdef _HelperKernelParams _cykernelParams + + + cdef CUkernel _kern + + + cdef CUcontext _ctx + + +cdef class CUDA_KERNEL_NODE_PARAMS_v3_st: + """ + GPU kernel node parameters + + Attributes + ---------- + + func : CUfunction + Kernel to launch + + + gridDimX : unsigned int + Width of grid in blocks + + + gridDimY : unsigned int + Height of grid in blocks + + + gridDimZ : unsigned int + Depth of grid in blocks + + + blockDimX : unsigned int + X dimension of each thread block + + + blockDimY : unsigned int + Y dimension of each thread block + + + blockDimZ : unsigned int + Z dimension of each thread block + + + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + + + kernelParams : Any + Array of pointers to kernel parameters + + + extra : Any + Extra options + + + kern : CUkernel + Kernel to launch, will only be referenced if func is NULL + + + ctx : CUcontext + Context for the kernel task to run in. The value NULL will indicate + the current context should be used by the api. This field is + ignored if func is set. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_KERNEL_NODE_PARAMS_v3_st _pvt_val + cdef cydriver.CUDA_KERNEL_NODE_PARAMS_v3_st* _pvt_ptr + + cdef CUfunction _func + + + cdef _HelperKernelParams _cykernelParams + + + cdef CUkernel _kern + + + cdef CUcontext _ctx + + +cdef class CUDA_MEMSET_NODE_PARAMS_st: + """ + Memset node parameters + + Attributes + ---------- + + dst : CUdeviceptr + Destination device pointer + + + pitch : size_t + Pitch of destination device pointer. Unused if height is 1 + + + value : unsigned int + Value to be set + + + elementSize : unsigned int + Size of each element in bytes. Must be 1, 2, or 4. + + + width : size_t + Width of the row in elements + + + height : size_t + Number of rows + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_MEMSET_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_MEMSET_NODE_PARAMS_st* _pvt_ptr + + cdef CUdeviceptr _dst + + +cdef class CUDA_MEMSET_NODE_PARAMS_v2_st: + """ + Memset node parameters + + Attributes + ---------- + + dst : CUdeviceptr + Destination device pointer + + + pitch : size_t + Pitch of destination device pointer. Unused if height is 1 + + + value : unsigned int + Value to be set + + + elementSize : unsigned int + Size of each element in bytes. Must be 1, 2, or 4. + + + width : size_t + Width of the row in elements + + + height : size_t + Number of rows + + + ctx : CUcontext + Context on which to run the node + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_MEMSET_NODE_PARAMS_v2_st _pvt_val + cdef cydriver.CUDA_MEMSET_NODE_PARAMS_v2_st* _pvt_ptr + + cdef CUdeviceptr _dst + + + cdef CUcontext _ctx + + +cdef class CUDA_HOST_NODE_PARAMS_st: + """ + Host node parameters + + Attributes + ---------- + + fn : CUhostFn + The function to call when the node executes + + + userData : Any + Argument to pass to the function + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_HOST_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_HOST_NODE_PARAMS_st* _pvt_ptr + + cdef CUhostFn _fn + + + cdef _HelperInputVoidPtr _cyuserData + + +cdef class CUDA_HOST_NODE_PARAMS_v2_st: + """ + Host node parameters + + Attributes + ---------- + + fn : CUhostFn + The function to call when the node executes + + + userData : Any + Argument to pass to the function + + + syncMode : unsigned int + The sync mode to use for the host task + + + ctx : CUcontext + + + + gCtx : CUgreenCtx + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_HOST_NODE_PARAMS_v2_st* _val_ptr + cdef cydriver.CUDA_HOST_NODE_PARAMS_v2_st* _pvt_ptr + + cdef CUhostFn _fn + + + cdef _HelperInputVoidPtr _cyuserData + + + cdef CUcontext _ctx + + + cdef CUgreenCtx _gCtx + + +cdef class CUDA_CONDITIONAL_NODE_PARAMS: + """ + Conditional node parameters + + Attributes + ---------- + + handle : CUgraphConditionalHandle + Conditional node handle. Handles must be created in advance of + creating the node using cuGraphConditionalHandleCreate. + + + type : CUgraphConditionalNodeType + Type of conditional node. + + + size : unsigned int + Size of graph output array. Allowed values are 1 for + CU_GRAPH_COND_TYPE_WHILE, 1 or 2 for CU_GRAPH_COND_TYPE_IF, or any + value greater than zero for CU_GRAPH_COND_TYPE_SWITCH. + + + phGraph_out : CUgraph + CUDA-owned array populated with conditional node child graphs + during creation of the node. Valid for the lifetime of the + conditional node. The contents of the graph(s) are subject to the + following constraints: - Allowed node types are kernel nodes, + empty nodes, child graphs, memsets, memcopies, and conditionals. + This applies recursively to child graphs and conditional bodies. + - All kernels, including kernels in nested conditionals or child + graphs at any level, must belong to the same device context. + These graphs may be populated using graph node creation APIs or + cuStreamBeginCaptureToGraph. CU_GRAPH_COND_TYPE_IF: phGraph_out[0] + is executed when the condition is non-zero. If `size` == 2, + phGraph_out[1] will be executed when the condition is zero. + CU_GRAPH_COND_TYPE_WHILE: phGraph_out[0] is executed as long as the + condition is non-zero. CU_GRAPH_COND_TYPE_SWITCH: phGraph_out[n] is + executed when the condition is equal to n. If the condition >= + `size`, no body graph is executed. + + + ctx : CUcontext + Context on which to run the node. Must match context used to create + the handle and all body nodes. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_CONDITIONAL_NODE_PARAMS _pvt_val + cdef cydriver.CUDA_CONDITIONAL_NODE_PARAMS* _pvt_ptr + + cdef CUgraphConditionalHandle _handle + + + cdef size_t _phGraph_out_length + cdef cydriver.CUgraph* _phGraph_out + + + cdef CUcontext _ctx + + +cdef class CUgraphEdgeData_st: + """ + Optional annotation for edges in a CUDA graph. Note, all edges + implicitly have annotations and default to a zero-initialized value + if not specified. A zero-initialized struct indicates a standard + full serialization of two nodes with memory visibility. + + Attributes + ---------- + + from_port : bytes + This indicates when the dependency is triggered from the upstream + node on the edge. The meaning is specfic to the node type. A value + of 0 in all cases means full completion of the upstream node, with + memory visibility to the downstream node or portion thereof + (indicated by `to_port`). Only kernel nodes define non-zero + ports. A kernel node can use the following output port types: + CU_GRAPH_KERNEL_NODE_PORT_DEFAULT, + CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC, or + CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER. + + + to_port : bytes + This indicates what portion of the downstream node is dependent on + the upstream node or portion thereof (indicated by `from_port`). + The meaning is specific to the node type. A value of 0 in all cases + means the entirety of the downstream node is dependent on the + upstream work. Currently no node types define non-zero ports. + Accordingly, this field must be set to zero. + + + type : bytes + This should be populated with a value from CUgraphDependencyType. + (It is typed as char due to compiler-specific layout of bitfields.) + See CUgraphDependencyType. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUgraphEdgeData_st _pvt_val + cdef cydriver.CUgraphEdgeData_st* _pvt_ptr + +cdef class CUDA_GRAPH_INSTANTIATE_PARAMS_st: + """ + Graph instantiation parameters + + Attributes + ---------- + + flags : cuuint64_t + Instantiation flags + + + hUploadStream : CUstream + Upload stream + + + hErrNode_out : CUgraphNode + The node which caused instantiation to fail, if any + + + result_out : CUgraphInstantiateResult + Whether instantiation was successful. If it failed, the reason why + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_GRAPH_INSTANTIATE_PARAMS_st _pvt_val + cdef cydriver.CUDA_GRAPH_INSTANTIATE_PARAMS_st* _pvt_ptr + + cdef cuuint64_t _flags + + + cdef CUstream _hUploadStream + + + cdef CUgraphNode _hErrNode_out + + +cdef class CUlaunchMemSyncDomainMap_st: + """ + Memory Synchronization Domain map See ::cudaLaunchMemSyncDomain. + By default, kernels are launched in domain 0. Kernel launched with + CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE will have a different domain ID. + User may also alter the domain ID with CUlaunchMemSyncDomainMap for + a specific stream / graph node / kernel launch. See + CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. Domain ID range is + available through CU_DEVICE_ATTRIBUTE_MEM_SYNC_DOMAIN_COUNT. + + Attributes + ---------- + + default_ : bytes + The default domain ID to use for designated kernels + + + remote : bytes + The remote domain ID to use for designated kernels + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUlaunchMemSyncDomainMap_st _pvt_val + cdef cydriver.CUlaunchMemSyncDomainMap_st* _pvt_ptr + +cdef class anon_struct1: + """ + Attributes + ---------- + + x : unsigned int + + + + y : unsigned int + + + + z : unsigned int + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUlaunchAttributeValue_union* _pvt_ptr + +cdef class anon_struct2: + """ + Attributes + ---------- + + event : CUevent + + + + flags : int + + + + triggerAtBlockStart : int + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUlaunchAttributeValue_union* _pvt_ptr + + cdef CUevent _event + + +cdef class anon_struct3: + """ + Attributes + ---------- + + event : CUevent + + + + flags : int + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUlaunchAttributeValue_union* _pvt_ptr + + cdef CUevent _event + + +cdef class anon_struct4: + """ + Attributes + ---------- + + x : unsigned int + + + + y : unsigned int + + + + z : unsigned int + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUlaunchAttributeValue_union* _pvt_ptr + +cdef class anon_struct5: + """ + Attributes + ---------- + + deviceUpdatable : int + + + + devNode : CUgraphDeviceNode + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUlaunchAttributeValue_union* _pvt_ptr + + cdef CUgraphDeviceNode _devNode + + +cdef class CUlaunchAttributeValue_union: + """ + Launch attributes union; used as value field of CUlaunchAttribute + + Attributes + ---------- + + pad : bytes + + + + accessPolicyWindow : CUaccessPolicyWindow + Value of launch attribute CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW. + + + cooperative : int + Value of launch attribute CU_LAUNCH_ATTRIBUTE_COOPERATIVE. Nonzero + indicates a cooperative kernel (see cuLaunchCooperativeKernel). + + + syncPolicy : CUsynchronizationPolicy + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. CUsynchronizationPolicy + for work queued up in this stream + + + clusterDim : anon_struct1 + Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION + that represents the desired cluster dimensions for the kernel. + Opaque type with the following fields: - `x` - The X dimension of + the cluster, in blocks. Must be a divisor of the grid X dimension. + - `y` - The Y dimension of the cluster, in blocks. Must be a + divisor of the grid Y dimension. - `z` - The Z dimension of the + cluster, in blocks. Must be a divisor of the grid Z dimension. + + + clusterSchedulingPolicyPreference : CUclusterSchedulingPolicy + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Cluster + scheduling policy preference for the kernel. + + + programmaticStreamSerializationAllowed : int + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION. + + + programmaticEvent : anon_struct2 + Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT + with the following fields: - `CUevent` event - Event to fire when + all blocks trigger it. - `Event` record flags, see + cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL. + - `triggerAtBlockStart` - If this is set to non-0, each block + launch will automatically trigger the event. + + + launchCompletionEvent : anon_struct3 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT with the following + fields: - `CUevent` event - Event to fire when the last block + launches - `int` flags; - Event record flags, see + cuEventRecordWithFlags. Does not accept CU_EVENT_RECORD_EXTERNAL. + + + priority : int + Value of launch attribute CU_LAUNCH_ATTRIBUTE_PRIORITY. Execution + priority of the kernel. + + + memSyncDomainMap : CUlaunchMemSyncDomainMap + Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. + See CUlaunchMemSyncDomainMap. + + + memSyncDomain : CUlaunchMemSyncDomain + Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN. + See::CUlaunchMemSyncDomain + + + preferredClusterDim : anon_struct4 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + CUlaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + CUlaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + CUlaunchAttributeValue::clusterDim. + + + deviceUpdatableKernelNode : anon_struct5 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE. with the + following fields: - `int` deviceUpdatable - Whether or not the + resulting kernel node should be device-updatable. - + `CUgraphDeviceNode` devNode - Returns a handle to pass to the + various device-side update functions. + + + sharedMemCarveout : unsigned int + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT. + + + nvlinkUtilCentricScheduling : unsigned int + + + + portableClusterSizeMode : CUlaunchAttributePortableClusterMode + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PORTABLE_CLUSTER_SIZE_MODE. + + + sharedMemoryMode : CUsharedMemoryMode + Value of launch attribute CU_LAUNCH_ATTRIBUTE_SHARED_MEMORY_MODE. + See CUsharedMemoryMode for acceptable values. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUlaunchAttributeValue_union _pvt_val + cdef cydriver.CUlaunchAttributeValue_union* _pvt_ptr + + cdef CUaccessPolicyWindow _accessPolicyWindow + + + cdef anon_struct1 _clusterDim + + + cdef anon_struct2 _programmaticEvent + + + cdef anon_struct3 _launchCompletionEvent + + + cdef CUlaunchMemSyncDomainMap _memSyncDomainMap + + + cdef anon_struct4 _preferredClusterDim + + + cdef anon_struct5 _deviceUpdatableKernelNode + + +cdef class CUlaunchAttribute_st: + """ + Launch attribute + + Attributes + ---------- + + id : CUlaunchAttributeID + Attribute to set + + + value : CUlaunchAttributeValue + Value of the attribute + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUlaunchAttribute_st _pvt_val + cdef cydriver.CUlaunchAttribute_st* _pvt_ptr + + cdef CUlaunchAttributeValue _value + + +cdef class CUlaunchConfig_st: + """ + CUDA extensible launch configuration + + Attributes + ---------- + + gridDimX : unsigned int + Width of grid in blocks + + + gridDimY : unsigned int + Height of grid in blocks + + + gridDimZ : unsigned int + Depth of grid in blocks + + + blockDimX : unsigned int + X dimension of each thread block + + + blockDimY : unsigned int + Y dimension of each thread block + + + blockDimZ : unsigned int + Z dimension of each thread block + + + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + + + hStream : CUstream + Stream identifier + + + attrs : CUlaunchAttribute + List of attributes; nullable if CUlaunchConfig::numAttrs == 0 + + + numAttrs : unsigned int + Number of attributes populated in CUlaunchConfig::attrs + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUlaunchConfig_st _pvt_val + cdef cydriver.CUlaunchConfig_st* _pvt_ptr + + cdef CUstream _hStream + + + cdef size_t _attrs_length + cdef cydriver.CUlaunchAttribute* _attrs + + +cdef class CUexecAffinitySmCount_st: + """ + Value for CU_EXEC_AFFINITY_TYPE_SM_COUNT + + Attributes + ---------- + + val : unsigned int + The number of SMs the context is limited to use. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUexecAffinitySmCount_st _pvt_val + cdef cydriver.CUexecAffinitySmCount_st* _pvt_ptr + +cdef class anon_union4: + """ + Attributes + ---------- + + smCount : CUexecAffinitySmCount + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUexecAffinityParam_st* _pvt_ptr + + cdef CUexecAffinitySmCount _smCount + + +cdef class CUexecAffinityParam_st: + """ + Execution Affinity Parameters + + Attributes + ---------- + + type : CUexecAffinityType + Type of execution affinity. + + + param : anon_union4 + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUexecAffinityParam_st* _val_ptr + cdef cydriver.CUexecAffinityParam_st* _pvt_ptr + + cdef anon_union4 _param + + +cdef class CUctxCigParam_st: + """ + CIG Context Create Params + + Attributes + ---------- + + sharedDataType : CUcigDataType + Type of shared data from graphics client (D3D12 or Vulkan). + + + sharedData : Any + Graphics client data handle (ID3D12CommandQueue or Nvidia specific + data blob). + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUctxCigParam_st _pvt_val + cdef cydriver.CUctxCigParam_st* _pvt_ptr + + cdef _HelperInputVoidPtr _cysharedData + + +cdef class CUctxCreateParams_st: + """ + Params for creating CUDA context. Both execAffinityParams and + cigParams cannot be non-NULL at the same time. If both are NULL, + the context will be created as a regular CUDA context. + + Attributes + ---------- + + execAffinityParams : CUexecAffinityParam + Array of execution affinity parameters to limit context resources + (e.g., SM count). Only supported Volta+ MPS. Mutually exclusive + with cigParams. + + + numExecAffinityParams : int + Number of elements in execAffinityParams array. Must be 0 if + execAffinityParams is NULL. + + + cigParams : CUctxCigParam + CIG (CUDA in Graphics) parameters for sharing data from + D3D12/Vulkan graphics clients. Mutually exclusive with + execAffinityParams. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUctxCreateParams_st _pvt_val + cdef cydriver.CUctxCreateParams_st* _pvt_ptr + + cdef size_t _execAffinityParams_length + cdef cydriver.CUexecAffinityParam* _execAffinityParams + + + cdef size_t _cigParams_length + cdef cydriver.CUctxCigParam* _cigParams + + +cdef class CUstreamCigParam_st: + """ + CIG Stream Capture Params + + Attributes + ---------- + + streamSharedDataType : CUstreamCigDataType + Type of shared data from graphics client (D3D12). + + + streamSharedData : Any + Graphics client data handle + (ID3D12CommandList/ID3D12GraphicsCommandList). + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUstreamCigParam_st _pvt_val + cdef cydriver.CUstreamCigParam_st* _pvt_ptr + + cdef _HelperInputVoidPtr _cystreamSharedData + + +cdef class CUstreamCigCaptureParams_st: + """ + Params for capturing CUDA stream to CIG streamCigParams must be + non-NULL. + + Attributes + ---------- + + streamCigParams : CUstreamCigParam + CIG (CUDA in Graphics) parameters for sharing command list data + from D3D12 graphics clients. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUstreamCigCaptureParams_st _pvt_val + cdef cydriver.CUstreamCigCaptureParams_st* _pvt_ptr + + cdef size_t _streamCigParams_length + cdef cydriver.CUstreamCigParam* _streamCigParams + + +cdef class CUlibraryHostUniversalFunctionAndDataTable_st: + """ + Attributes + ---------- + + functionTable : Any + + + + functionWindowSize : size_t + + + + dataTable : Any + + + + dataWindowSize : size_t + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUlibraryHostUniversalFunctionAndDataTable_st _pvt_val + cdef cydriver.CUlibraryHostUniversalFunctionAndDataTable_st* _pvt_ptr + + cdef _HelperInputVoidPtr _cyfunctionTable + + + cdef _HelperInputVoidPtr _cydataTable + + +cdef class CUDA_MEMCPY2D_st: + """ + 2D memory copy parameters + + Attributes + ---------- + + srcXInBytes : size_t + Source X in bytes + + + srcY : size_t + Source Y + + + srcMemoryType : CUmemorytype + Source memory type (host, device, array) + + + srcHost : Any + Source host pointer + + + srcDevice : CUdeviceptr + Source device pointer + + + srcArray : CUarray + Source array reference + + + srcPitch : size_t + Source pitch (ignored when src is array) + + + dstXInBytes : size_t + Destination X in bytes + + + dstY : size_t + Destination Y + + + dstMemoryType : CUmemorytype + Destination memory type (host, device, array) + + + dstHost : Any + Destination host pointer + + + dstDevice : CUdeviceptr + Destination device pointer + + + dstArray : CUarray + Destination array reference + + + dstPitch : size_t + Destination pitch (ignored when dst is array) + + + WidthInBytes : size_t + Width of 2D memory copy in bytes + + + Height : size_t + Height of 2D memory copy + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_MEMCPY2D_st _pvt_val + cdef cydriver.CUDA_MEMCPY2D_st* _pvt_ptr + + cdef _HelperInputVoidPtr _cysrcHost + + + cdef CUdeviceptr _srcDevice + + + cdef CUarray _srcArray + + + cdef _HelperInputVoidPtr _cydstHost + + + cdef CUdeviceptr _dstDevice + + + cdef CUarray _dstArray + + +cdef class CUDA_MEMCPY3D_st: + """ + 3D memory copy parameters + + Attributes + ---------- + + srcXInBytes : size_t + Source X in bytes + + + srcY : size_t + Source Y + + + srcZ : size_t + Source Z + + + srcLOD : size_t + Source LOD + + + srcMemoryType : CUmemorytype + Source memory type (host, device, array) + + + srcHost : Any + Source host pointer + + + srcDevice : CUdeviceptr + Source device pointer + + + srcArray : CUarray + Source array reference + + + srcPitch : size_t + Source pitch (ignored when src is array) + + + srcHeight : size_t + Source height (ignored when src is array; may be 0 if Depth==1) + + + dstXInBytes : size_t + Destination X in bytes + + + dstY : size_t + Destination Y + + + dstZ : size_t + Destination Z + + + dstLOD : size_t + Destination LOD + + + dstMemoryType : CUmemorytype + Destination memory type (host, device, array) + + + dstHost : Any + Destination host pointer + + + dstDevice : CUdeviceptr + Destination device pointer + + + dstArray : CUarray + Destination array reference + + + dstPitch : size_t + Destination pitch (ignored when dst is array) + + + dstHeight : size_t + Destination height (ignored when dst is array; may be 0 if + Depth==1) + + + WidthInBytes : size_t + Width of 3D memory copy in bytes + + + Height : size_t + Height of 3D memory copy + + + Depth : size_t + Depth of 3D memory copy + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_MEMCPY3D_st _pvt_val + cdef cydriver.CUDA_MEMCPY3D_st* _pvt_ptr + + cdef _HelperInputVoidPtr _cysrcHost + + + cdef CUdeviceptr _srcDevice + + + cdef CUarray _srcArray + + + cdef _HelperInputVoidPtr _cydstHost + + + cdef CUdeviceptr _dstDevice + + + cdef CUarray _dstArray + + +cdef class CUDA_MEMCPY3D_PEER_st: + """ + 3D memory cross-context copy parameters + + Attributes + ---------- + + srcXInBytes : size_t + Source X in bytes + + + srcY : size_t + Source Y + + + srcZ : size_t + Source Z + + + srcLOD : size_t + Source LOD + + + srcMemoryType : CUmemorytype + Source memory type (host, device, array) + + + srcHost : Any + Source host pointer + + + srcDevice : CUdeviceptr + Source device pointer + + + srcArray : CUarray + Source array reference + + + srcContext : CUcontext + Source context (ignored with srcMemoryType is CU_MEMORYTYPE_ARRAY) + + + srcPitch : size_t + Source pitch (ignored when src is array) + + + srcHeight : size_t + Source height (ignored when src is array; may be 0 if Depth==1) + + + dstXInBytes : size_t + Destination X in bytes + + + dstY : size_t + Destination Y + + + dstZ : size_t + Destination Z + + + dstLOD : size_t + Destination LOD + + + dstMemoryType : CUmemorytype + Destination memory type (host, device, array) + + + dstHost : Any + Destination host pointer + + + dstDevice : CUdeviceptr + Destination device pointer + + + dstArray : CUarray + Destination array reference + + + dstContext : CUcontext + Destination context (ignored with dstMemoryType is + CU_MEMORYTYPE_ARRAY) + + + dstPitch : size_t + Destination pitch (ignored when dst is array) + + + dstHeight : size_t + Destination height (ignored when dst is array; may be 0 if + Depth==1) + + + WidthInBytes : size_t + Width of 3D memory copy in bytes + + + Height : size_t + Height of 3D memory copy + + + Depth : size_t + Depth of 3D memory copy + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_MEMCPY3D_PEER_st _pvt_val + cdef cydriver.CUDA_MEMCPY3D_PEER_st* _pvt_ptr + + cdef _HelperInputVoidPtr _cysrcHost + + + cdef CUdeviceptr _srcDevice + + + cdef CUarray _srcArray + + + cdef CUcontext _srcContext + + + cdef _HelperInputVoidPtr _cydstHost + + + cdef CUdeviceptr _dstDevice + + + cdef CUarray _dstArray + + + cdef CUcontext _dstContext + + +cdef class CUDA_MEMCPY_NODE_PARAMS_st: + """ + Memcpy node parameters + + Attributes + ---------- + + flags : int + Must be zero + + + copyCtx : CUcontext + Context on which to run the node + + + copyParams : CUDA_MEMCPY3D + Parameters for the memory copy + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_MEMCPY_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_MEMCPY_NODE_PARAMS_st* _pvt_ptr + + cdef CUcontext _copyCtx + + + cdef CUDA_MEMCPY3D _copyParams + + +cdef class CUDA_ARRAY_DESCRIPTOR_st: + """ + Array descriptor + + Attributes + ---------- + + Width : size_t + Width of array + + + Height : size_t + Height of array + + + Format : CUarray_format + Array format + + + NumChannels : unsigned int + Channels per array element + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_ARRAY_DESCRIPTOR_st _pvt_val + cdef cydriver.CUDA_ARRAY_DESCRIPTOR_st* _pvt_ptr + +cdef class CUDA_ARRAY3D_DESCRIPTOR_st: + """ + 3D array descriptor + + Attributes + ---------- + + Width : size_t + Width of 3D array + + + Height : size_t + Height of 3D array + + + Depth : size_t + Depth of 3D array + + + Format : CUarray_format + Array format + + + NumChannels : unsigned int + Channels per array element + + + Flags : unsigned int + Flags + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_ARRAY3D_DESCRIPTOR_st _pvt_val + cdef cydriver.CUDA_ARRAY3D_DESCRIPTOR_st* _pvt_ptr + +cdef class anon_struct6: + """ + Attributes + ---------- + + width : unsigned int + + + + height : unsigned int + + + + depth : unsigned int + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_ARRAY_SPARSE_PROPERTIES_st* _pvt_ptr + +cdef class CUDA_ARRAY_SPARSE_PROPERTIES_st: + """ + CUDA array sparse properties + + Attributes + ---------- + + tileExtent : anon_struct6 + + + + miptailFirstLevel : unsigned int + First mip level at which the mip tail begins. + + + miptailSize : unsigned long long + Total size of the mip tail. + + + flags : unsigned int + Flags will either be zero or + CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_ARRAY_SPARSE_PROPERTIES_st _pvt_val + cdef cydriver.CUDA_ARRAY_SPARSE_PROPERTIES_st* _pvt_ptr + + cdef anon_struct6 _tileExtent + + +cdef class CUDA_ARRAY_MEMORY_REQUIREMENTS_st: + """ + CUDA array memory requirements + + Attributes + ---------- + + size : size_t + Total required memory size + + + alignment : size_t + alignment requirement + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_ARRAY_MEMORY_REQUIREMENTS_st _pvt_val + cdef cydriver.CUDA_ARRAY_MEMORY_REQUIREMENTS_st* _pvt_ptr + +cdef class anon_struct7: + """ + Attributes + ---------- + + hArray : CUarray + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_RESOURCE_DESC_st* _pvt_ptr + + cdef CUarray _hArray + + +cdef class anon_struct8: + """ + Attributes + ---------- + + hMipmappedArray : CUmipmappedArray + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_RESOURCE_DESC_st* _pvt_ptr + + cdef CUmipmappedArray _hMipmappedArray + + +cdef class anon_struct9: + """ + Attributes + ---------- + + devPtr : CUdeviceptr + + + + format : CUarray_format + + + + numChannels : unsigned int + + + + sizeInBytes : size_t + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_RESOURCE_DESC_st* _pvt_ptr + + cdef CUdeviceptr _devPtr + + +cdef class anon_struct10: + """ + Attributes + ---------- + + devPtr : CUdeviceptr + + + + format : CUarray_format + + + + numChannels : unsigned int + + + + width : size_t + + + + height : size_t + + + + pitchInBytes : size_t + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_RESOURCE_DESC_st* _pvt_ptr + + cdef CUdeviceptr _devPtr + + +cdef class anon_struct11: + """ + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_RESOURCE_DESC_st* _pvt_ptr + +cdef class anon_union5: + """ + Attributes + ---------- + + array : anon_struct7 + + + + mipmap : anon_struct8 + + + + linear : anon_struct9 + + + + pitch2D : anon_struct10 + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_RESOURCE_DESC_st* _pvt_ptr + + cdef anon_struct7 _array + + + cdef anon_struct8 _mipmap + + + cdef anon_struct9 _linear + + + cdef anon_struct10 _pitch2D + + +cdef class CUDA_RESOURCE_DESC_st: + """ + CUDA Resource descriptor + + Attributes + ---------- + + resType : CUresourcetype + Resource type + + + res : anon_union5 + + + + flags : unsigned int + Flags (must be zero) + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_RESOURCE_DESC_st* _val_ptr + cdef cydriver.CUDA_RESOURCE_DESC_st* _pvt_ptr + + cdef anon_union5 _res + + +cdef class CUDA_TEXTURE_DESC_st: + """ + Texture descriptor + + Attributes + ---------- + + addressMode : list[CUaddress_mode] + Address modes + + + filterMode : CUfilter_mode + Filter mode + + + flags : unsigned int + Flags + + + maxAnisotropy : unsigned int + Maximum anisotropy ratio + + + mipmapFilterMode : CUfilter_mode + Mipmap filter mode + + + mipmapLevelBias : float + Mipmap level bias + + + minMipmapLevelClamp : float + Mipmap minimum level clamp + + + maxMipmapLevelClamp : float + Mipmap maximum level clamp + + + borderColor : list[float] + Border Color + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_TEXTURE_DESC_st _pvt_val + cdef cydriver.CUDA_TEXTURE_DESC_st* _pvt_ptr + +cdef class CUDA_RESOURCE_VIEW_DESC_st: + """ + Resource view descriptor + + Attributes + ---------- + + format : CUresourceViewFormat + Resource view format + + + width : size_t + Width of the resource view + + + height : size_t + Height of the resource view + + + depth : size_t + Depth of the resource view + + + firstMipmapLevel : unsigned int + First defined mipmap level + + + lastMipmapLevel : unsigned int + Last defined mipmap level + + + firstLayer : unsigned int + First layer index + + + lastLayer : unsigned int + Last layer index + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_RESOURCE_VIEW_DESC_st _pvt_val + cdef cydriver.CUDA_RESOURCE_VIEW_DESC_st* _pvt_ptr + +cdef class CUtensorMap_st: + """ + Tensor map descriptor. Requires compiler support for aligning to + 128 bytes. + + Attributes + ---------- + + opaque : list[cuuint64_t] + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUtensorMap_st _pvt_val + cdef cydriver.CUtensorMap_st* _pvt_ptr + +cdef class CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st: + """ + GPU Direct v3 tokens + + Attributes + ---------- + + p2pToken : unsigned long long + + + + vaSpaceToken : unsigned int + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st _pvt_val + cdef cydriver.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st* _pvt_ptr + +cdef class CUDA_LAUNCH_PARAMS_st: + """ + Kernel launch parameters + + Attributes + ---------- + + function : CUfunction + Kernel to launch + + + gridDimX : unsigned int + Width of grid in blocks + + + gridDimY : unsigned int + Height of grid in blocks + + + gridDimZ : unsigned int + Depth of grid in blocks + + + blockDimX : unsigned int + X dimension of each thread block + + + blockDimY : unsigned int + Y dimension of each thread block + + + blockDimZ : unsigned int + Z dimension of each thread block + + + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + + + hStream : CUstream + Stream identifier + + + kernelParams : Any + Array of pointers to kernel parameters + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_LAUNCH_PARAMS_st _pvt_val + cdef cydriver.CUDA_LAUNCH_PARAMS_st* _pvt_ptr + + cdef CUfunction _function + + + cdef CUstream _hStream + + + cdef _HelperKernelParams _cykernelParams + + +cdef class anon_struct12: + """ + Attributes + ---------- + + handle : Any + + + + name : Any + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st* _pvt_ptr + + cdef _HelperInputVoidPtr _cyhandle + + + cdef _HelperInputVoidPtr _cyname + + +cdef class anon_union6: + """ + Attributes + ---------- + + fd : int + + + + win32 : anon_struct12 + + + + nvSciBufObject : Any + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st* _pvt_ptr + + cdef anon_struct12 _win32 + + + cdef _HelperInputVoidPtr _cynvSciBufObject + + +cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st: + """ + External memory handle descriptor + + Attributes + ---------- + + type : CUexternalMemoryHandleType + Type of the handle + + + handle : anon_union6 + + + + size : unsigned long long + Size of the memory allocation + + + flags : unsigned int + Flags must either be zero or CUDA_EXTERNAL_MEMORY_DEDICATED + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st* _val_ptr + cdef cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st* _pvt_ptr + + cdef anon_union6 _handle + + +cdef class CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st: + """ + External memory buffer descriptor + + Attributes + ---------- + + offset : unsigned long long + Offset into the memory object where the buffer's base is + + + size : unsigned long long + Size of the buffer + + + flags : unsigned int + Flags reserved for future use. Must be zero. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st _pvt_val + cdef cydriver.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st* _pvt_ptr + +cdef class CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st: + """ + External memory mipmap descriptor + + Attributes + ---------- + + offset : unsigned long long + Offset into the memory object where the base level of the mipmap + chain is. + + + arrayDesc : CUDA_ARRAY3D_DESCRIPTOR + Format, dimension and type of base level of the mipmap chain + + + numLevels : unsigned int + Total number of levels in the mipmap chain + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st _pvt_val + cdef cydriver.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st* _pvt_ptr + + cdef CUDA_ARRAY3D_DESCRIPTOR _arrayDesc + + +cdef class anon_struct13: + """ + Attributes + ---------- + + handle : Any + + + + name : Any + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st* _pvt_ptr + + cdef _HelperInputVoidPtr _cyhandle + + + cdef _HelperInputVoidPtr _cyname + + +cdef class anon_union7: + """ + Attributes + ---------- + + fd : int + + + + win32 : anon_struct13 + + + + nvSciSyncObj : Any + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st* _pvt_ptr + + cdef anon_struct13 _win32 + + + cdef _HelperInputVoidPtr _cynvSciSyncObj + + +cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st: + """ + External semaphore handle descriptor + + Attributes + ---------- + + type : CUexternalSemaphoreHandleType + Type of the handle + + + handle : anon_union7 + + + + flags : unsigned int + Flags reserved for the future. Must be zero. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st* _val_ptr + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st* _pvt_ptr + + cdef anon_union7 _handle + + +cdef class anon_struct14: + """ + Attributes + ---------- + + value : unsigned long long + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st* _pvt_ptr + +cdef class anon_union8: + """ + Attributes + ---------- + + fence : Any + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st* _pvt_ptr + + cdef _HelperInputVoidPtr _cyfence + + +cdef class anon_struct15: + """ + Attributes + ---------- + + key : unsigned long long + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st* _pvt_ptr + +cdef class anon_struct16: + """ + Attributes + ---------- + + fence : anon_struct14 + + + + nvSciSync : anon_union8 + + + + keyedMutex : anon_struct15 + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st* _pvt_ptr + + cdef anon_struct14 _fence + + + cdef anon_union8 _nvSciSync + + + cdef anon_struct15 _keyedMutex + + +cdef class CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st: + """ + External semaphore signal parameters + + Attributes + ---------- + + params : anon_struct16 + + + + flags : unsigned int + Only when CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS is used to signal a + CUexternalSemaphore of type + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is + CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC which + indicates that while signaling the CUexternalSemaphore, no memory + synchronization operations should be performed for any external + memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. + For all other types of CUexternalSemaphore, flags must be zero. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st _pvt_val + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st* _pvt_ptr + + cdef anon_struct16 _params + + +cdef class anon_struct17: + """ + Attributes + ---------- + + value : unsigned long long + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st* _pvt_ptr + +cdef class anon_union9: + """ + Attributes + ---------- + + fence : Any + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st* _pvt_ptr + + cdef _HelperInputVoidPtr _cyfence + + +cdef class anon_struct18: + """ + Attributes + ---------- + + key : unsigned long long + + + + timeoutMs : unsigned int + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st* _pvt_ptr + +cdef class anon_struct19: + """ + Attributes + ---------- + + fence : anon_struct17 + + + + nvSciSync : anon_union9 + + + + keyedMutex : anon_struct18 + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st* _pvt_ptr + + cdef anon_struct17 _fence + + + cdef anon_union9 _nvSciSync + + + cdef anon_struct18 _keyedMutex + + +cdef class CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st: + """ + External semaphore wait parameters + + Attributes + ---------- + + params : anon_struct19 + + + + flags : unsigned int + Only when CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS is used to wait on a + CUexternalSemaphore of type + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is + CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC which indicates + that while waiting for the CUexternalSemaphore, no memory + synchronization operations should be performed for any external + memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. + For all other types of CUexternalSemaphore, flags must be zero. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st _pvt_val + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st* _pvt_ptr + + cdef anon_struct19 _params + + +cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st: + """ + Semaphore signal node parameters + + Attributes + ---------- + + extSemArray : CUexternalSemaphore + Array of external semaphore handles. + + + paramsArray : CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS + Array of external semaphore signal parameters. + + + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st* _pvt_ptr + + cdef size_t _extSemArray_length + cdef cydriver.CUexternalSemaphore* _extSemArray + + + cdef size_t _paramsArray_length + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* _paramsArray + + +cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st: + """ + Semaphore signal node parameters + + Attributes + ---------- + + extSemArray : CUexternalSemaphore + Array of external semaphore handles. + + + paramsArray : CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS + Array of external semaphore signal parameters. + + + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + + ctx : CUcontext + + + + gCtx : CUgreenCtx + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st* _val_ptr + cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st* _pvt_ptr + + cdef size_t _extSemArray_length + cdef cydriver.CUexternalSemaphore* _extSemArray + + + cdef size_t _paramsArray_length + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* _paramsArray + + + cdef CUcontext _ctx + + + cdef CUgreenCtx _gCtx + + +cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_st: + """ + Semaphore wait node parameters + + Attributes + ---------- + + extSemArray : CUexternalSemaphore + Array of external semaphore handles. + + + paramsArray : CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS + Array of external semaphore wait parameters. + + + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st* _pvt_ptr + + cdef size_t _extSemArray_length + cdef cydriver.CUexternalSemaphore* _extSemArray + + + cdef size_t _paramsArray_length + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* _paramsArray + + +cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st: + """ + Semaphore wait node parameters + + Attributes + ---------- + + extSemArray : CUexternalSemaphore + Array of external semaphore handles. + + + paramsArray : CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS + Array of external semaphore wait parameters. + + + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + + ctx : CUcontext + + + + gCtx : CUgreenCtx + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st* _val_ptr + cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st* _pvt_ptr + + cdef size_t _extSemArray_length + cdef cydriver.CUexternalSemaphore* _extSemArray + + + cdef size_t _paramsArray_length + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* _paramsArray + + + cdef CUcontext _ctx + + + cdef CUgreenCtx _gCtx + + +cdef class anon_union12: + """ + Attributes + ---------- + + mipmap : CUmipmappedArray + + + + array : CUarray + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUarrayMapInfo_st* _pvt_ptr + + cdef CUmipmappedArray _mipmap + + + cdef CUarray _array + + +cdef class anon_struct20: + """ + Attributes + ---------- + + level : unsigned int + + + + layer : unsigned int + + + + offsetX : unsigned int + + + + offsetY : unsigned int + + + + offsetZ : unsigned int + + + + extentWidth : unsigned int + + + + extentHeight : unsigned int + + + + extentDepth : unsigned int + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUarrayMapInfo_st* _pvt_ptr + +cdef class anon_struct21: + """ + Attributes + ---------- + + layer : unsigned int + + + + offset : unsigned long long + + + + size : unsigned long long + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUarrayMapInfo_st* _pvt_ptr + +cdef class anon_union13: + """ + Attributes + ---------- + + sparseLevel : anon_struct20 + + + + miptail : anon_struct21 + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUarrayMapInfo_st* _pvt_ptr + + cdef anon_struct20 _sparseLevel + + + cdef anon_struct21 _miptail + + +cdef class anon_union14: + """ + Attributes + ---------- + + memHandle : CUmemGenericAllocationHandle + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUarrayMapInfo_st* _pvt_ptr + + cdef CUmemGenericAllocationHandle _memHandle + + +cdef class CUarrayMapInfo_st: + """ + Specifies the CUDA array or CUDA mipmapped array memory mapping + information + + Attributes + ---------- + + resourceType : CUresourcetype + Resource type + + + resource : anon_union12 + + + + subresourceType : CUarraySparseSubresourceType + Sparse subresource type + + + subresource : anon_union13 + + + + memOperationType : CUmemOperationType + Memory operation type + + + memHandleType : CUmemHandleType + Memory handle type + + + memHandle : anon_union14 + + + + offset : unsigned long long + Offset within mip tail Offset within the memory + + + deviceBitMask : unsigned int + Device ordinal bit mask + + + flags : unsigned int + flags for future use, must be zero now. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUarrayMapInfo_st* _val_ptr + cdef cydriver.CUarrayMapInfo_st* _pvt_ptr + + cdef anon_union12 _resource + + + cdef anon_union13 _subresource + + + cdef anon_union14 _memHandle + + +cdef class anon_struct22: + """ + Attributes + ---------- + + deviceId : bytes + + + + localityDomainId : bytes + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemLocation_st* _pvt_ptr + +cdef class CUmemLocation_st: + """ + Specifies a memory location. + + Attributes + ---------- + + type : CUmemLocationType + Specifies the location type, which modifies the meaning of id. + + + id : int + Identifier for CUmemLocationType::CU_MEM_LOCATION_TYPE_DEVICE, + CUmemLocationType::CU_MEM_LOCATION_TYPE_HOST, + CUmemLocationType::CU_MEM_LOCATION_TYPE_HOST_NUMA. + + + localized : anon_struct22 + Identifier for + CUmemLocationType::CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemLocation_st* _val_ptr + cdef cydriver.CUmemLocation_st* _pvt_ptr + + cdef anon_struct22 _localized + + +cdef class anon_struct23: + """ + Attributes + ---------- + + compressionType : bytes + + + + gpuDirectRDMACapable : bytes + + + + usage : unsigned short + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemAllocationProp_st* _pvt_ptr + +cdef class CUmemAllocationProp_st: + """ + Specifies the allocation properties for a allocation. + + Attributes + ---------- + + type : CUmemAllocationType + Allocation type + + + requestedHandleTypes : CUmemAllocationHandleType + requested CUmemAllocationHandleType + + + location : CUmemLocation + Location of allocation + + + win32HandleMetaData : Any + Windows-specific POBJECT_ATTRIBUTES required when + CU_MEM_HANDLE_TYPE_WIN32 is specified. This object attributes + structure includes security attributes that define the scope of + which exported allocations may be transferred to other processes. + In all other cases, this field is required to be zero. + + + allocFlags : anon_struct23 + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemAllocationProp_st _pvt_val + cdef cydriver.CUmemAllocationProp_st* _pvt_ptr + + cdef CUmemLocation _location + + + cdef _HelperInputVoidPtr _cywin32HandleMetaData + + + cdef anon_struct23 _allocFlags + + +cdef class CUmulticastObjectProp_st: + """ + Specifies the properties for a multicast object. + + Attributes + ---------- + + numDevices : unsigned int + The number of devices in the multicast team that will bind memory + to this object + + + size : size_t + The maximum amount of memory that can be bound to this multicast + object per device + + + handleTypes : unsigned long long + Bitmask of exportable handle types (see CUmemAllocationHandleType) + for this object + + + flags : unsigned long long + Flags for future use, must be zero now + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmulticastObjectProp_st _pvt_val + cdef cydriver.CUmulticastObjectProp_st* _pvt_ptr + +cdef class CUmemAccessDesc_st: + """ + Memory access descriptor + + Attributes + ---------- + + location : CUmemLocation + Location on which the request is to change it's accessibility + + + flags : CUmemAccess_flags + ::CUmemProt accessibility flags to set on the request + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemAccessDesc_st _pvt_val + cdef cydriver.CUmemAccessDesc_st* _pvt_ptr + + cdef CUmemLocation _location + + +cdef class CUgraphExecUpdateResultInfo_st: + """ + Result information returned by cuGraphExecUpdate + + Attributes + ---------- + + result : CUgraphExecUpdateResult + Gives more specific detail when a cuda graph update fails. + + + errorNode : CUgraphNode + The "to node" of the error edge when the topologies do not match. + The error node when the error is associated with a specific node. + NULL when the error is generic. + + + errorFromNode : CUgraphNode + The from node of error edge when the topologies do not match. + Otherwise NULL. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUgraphExecUpdateResultInfo_st _pvt_val + cdef cydriver.CUgraphExecUpdateResultInfo_st* _pvt_ptr + + cdef CUgraphNode _errorNode + + + cdef CUgraphNode _errorFromNode + + +cdef class CUmemPoolProps_st: + """ + Specifies the properties of allocations made from the pool. + + Attributes + ---------- + + allocType : CUmemAllocationType + Allocation type. Currently must be specified as + CU_MEM_ALLOCATION_TYPE_PINNED + + + handleTypes : CUmemAllocationHandleType + Handle types that will be supported by allocations from the pool. + + + location : CUmemLocation + Location where allocations should reside. + + + win32SecurityAttributes : Any + Windows-specific LPSECURITYATTRIBUTES required when + CU_MEM_HANDLE_TYPE_WIN32 is specified. This security attribute + defines the scope of which exported allocations may be transferred + to other processes. In all other cases, this field is required to + be zero. + + + maxSize : size_t + Maximum pool size. When set to 0, defaults to a system dependent + value. + + + usage : unsigned short + Bitmask indicating intended usage for the pool. + + + gpuDirectRDMACapable : bytes + Allocation hint for requesting GPUDirect RDMA capable memory. On + devices that support GPUDirect RDMA, this flag indicates that the + memory will be used for GPUDirect RDMA. On platforms where the + default RDMA path does not support localized allocations, this flag + has the following effects: - For MPS clients using MLOPart/locality + domains, this flag has the effect of disabling localization for the + pool. This allows the pool to be used for GPUDirect RDMA with the + default RDMA path. - For pools that are localized using CUDA + locality domain APIs, using this flag will have no effect, but + attempting to export the localized memory without forcing PCIe will + return an error. To use GPUDirect RDMA with localized pools on + platforms where the default RDMA path does not support localized + allocations, handles must be acquired with the flag + CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE. Note that CUDA memory + pools are only compatible with dma_buf mappings. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemPoolProps_st _pvt_val + cdef cydriver.CUmemPoolProps_st* _pvt_ptr + + cdef CUmemLocation _location + + + cdef _HelperInputVoidPtr _cywin32SecurityAttributes + + +cdef class CUmemPoolPtrExportData_st: + """ + Opaque data for exporting a pool allocation + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemPoolPtrExportData_st _pvt_val + cdef cydriver.CUmemPoolPtrExportData_st* _pvt_ptr + +cdef class CUmemcpyAttributes_st: + """ + Attributes specific to copies within a batch. For more details on + usage see cuMemcpyBatchAsync. + + Attributes + ---------- + + srcAccessOrder : CUmemcpySrcAccessOrder + Source access ordering to be observed for copies with this + attribute. + + + srcLocHint : CUmemLocation + Hint location for the source operand. Ignored when the pointers are + not managed memory or memory allocated outside CUDA. + + + dstLocHint : CUmemLocation + Hint location for the destination operand. Ignored when the + pointers are not managed memory or memory allocated outside CUDA. + + + flags : unsigned int + Additional flags for copies with this attribute. See CUmemcpyFlags + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemcpyAttributes_st _pvt_val + cdef cydriver.CUmemcpyAttributes_st* _pvt_ptr + + cdef CUmemLocation _srcLocHint + + + cdef CUmemLocation _dstLocHint + + +cdef class CUoffset3D_st: + """ + Struct representing a 3D offset + + Attributes + ---------- + + x : size_t + + + + y : size_t + + + + z : size_t + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUoffset3D_st _pvt_val + cdef cydriver.CUoffset3D_st* _pvt_ptr + +cdef class CUextent3D_st: + """ + Struct representing width/height/depth of a CUarray in elements + + Attributes + ---------- + + width : size_t + + + + height : size_t + + + + depth : size_t + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUextent3D_st _pvt_val + cdef cydriver.CUextent3D_st* _pvt_ptr + +cdef class anon_struct24: + """ + Attributes + ---------- + + ptr : CUdeviceptr + + + + rowLength : size_t + + + + layerHeight : size_t + + + + locHint : CUmemLocation + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemcpy3DOperand_st* _pvt_ptr + + cdef CUdeviceptr _ptr + + + cdef CUmemLocation _locHint + + +cdef class anon_struct25: + """ + Attributes + ---------- + + array : CUarray + + + + offset : CUoffset3D + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemcpy3DOperand_st* _pvt_ptr + + cdef CUarray _array + + + cdef CUoffset3D _offset + + +cdef class anon_union16: + """ + Attributes + ---------- + + ptr : anon_struct24 + + + + array : anon_struct25 + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemcpy3DOperand_st* _pvt_ptr + + cdef anon_struct24 _ptr + + + cdef anon_struct25 _array + + +cdef class CUmemcpy3DOperand_st: + """ + Struct representing an operand for copy with cuMemcpy3DBatchAsync + + Attributes + ---------- + + type : CUmemcpy3DOperandType + + + + op : anon_union16 + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemcpy3DOperand_st* _val_ptr + cdef cydriver.CUmemcpy3DOperand_st* _pvt_ptr + + cdef anon_union16 _op + + +cdef class CUDA_MEMCPY3D_BATCH_OP_st: + """ + Attributes + ---------- + + src : CUmemcpy3DOperand + Source memcpy operand. + + + dst : CUmemcpy3DOperand + Destination memcpy operand. + + + extent : CUextent3D + Extents of the memcpy between src and dst. The width, height and + depth components must not be 0. + + + srcAccessOrder : CUmemcpySrcAccessOrder + Source access ordering to be observed for copy from src to dst. + + + flags : unsigned int + Additional flags for copies with this attribute. See CUmemcpyFlags + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_MEMCPY3D_BATCH_OP_st _pvt_val + cdef cydriver.CUDA_MEMCPY3D_BATCH_OP_st* _pvt_ptr + + cdef CUmemcpy3DOperand _src + + + cdef CUmemcpy3DOperand _dst + + + cdef CUextent3D _extent + + +cdef class CUDA_MEM_ALLOC_NODE_PARAMS_v1_st: + """ + Memory allocation node parameters + + Attributes + ---------- + + poolProps : CUmemPoolProps + in: location where the allocation should reside (specified in + ::location). ::handleTypes must be CU_MEM_HANDLE_TYPE_NONE. IPC is + not supported. + + + accessDescs : CUmemAccessDesc + in: array of memory access descriptors. Used to describe peer GPU + access + + + accessDescCount : size_t + in: number of memory access descriptors. Must not exceed the number + of GPUs. + + + bytesize : size_t + in: size in bytes of the requested allocation + + + dptr : CUdeviceptr + out: address of the allocation returned by CUDA + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_MEM_ALLOC_NODE_PARAMS_v1_st _pvt_val + cdef cydriver.CUDA_MEM_ALLOC_NODE_PARAMS_v1_st* _pvt_ptr + + cdef CUmemPoolProps _poolProps + + + cdef size_t _accessDescs_length + cdef cydriver.CUmemAccessDesc* _accessDescs + + + cdef CUdeviceptr _dptr + + +cdef class CUDA_MEM_ALLOC_NODE_PARAMS_v2_st: + """ + Memory allocation node parameters + + Attributes + ---------- + + poolProps : CUmemPoolProps + in: location where the allocation should reside (specified in + ::location). ::handleTypes must be CU_MEM_HANDLE_TYPE_NONE. IPC is + not supported. + + + accessDescs : CUmemAccessDesc + in: array of memory access descriptors. Used to describe peer GPU + access + + + accessDescCount : size_t + in: number of memory access descriptors. Must not exceed the number + of GPUs. + + + bytesize : size_t + in: size in bytes of the requested allocation + + + dptr : CUdeviceptr + out: address of the allocation returned by CUDA + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_MEM_ALLOC_NODE_PARAMS_v2_st _pvt_val + cdef cydriver.CUDA_MEM_ALLOC_NODE_PARAMS_v2_st* _pvt_ptr + + cdef CUmemPoolProps _poolProps + + + cdef size_t _accessDescs_length + cdef cydriver.CUmemAccessDesc* _accessDescs + + + cdef CUdeviceptr _dptr + + +cdef class CUDA_MEM_FREE_NODE_PARAMS_st: + """ + Memory free node parameters + + Attributes + ---------- + + dptr : CUdeviceptr + in: the pointer to free + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_MEM_FREE_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_MEM_FREE_NODE_PARAMS_st* _pvt_ptr + + cdef CUdeviceptr _dptr + + +cdef class CUDA_CHILD_GRAPH_NODE_PARAMS_st: + """ + Child graph node parameters + + Attributes + ---------- + + graph : CUgraph + The child graph to clone into the node for node creation, or a + handle to the graph owned by the node for node query. The graph + must not contain conditional nodes. Graphs containing memory + allocation or memory free nodes must set the ownership to be moved + to the parent. + + + ownership : CUgraphChildGraphNodeOwnership + The ownership relationship of the child graph node. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_CHILD_GRAPH_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_CHILD_GRAPH_NODE_PARAMS_st* _pvt_ptr + + cdef CUgraph _graph + + +cdef class CUDA_EVENT_RECORD_NODE_PARAMS_st: + """ + Event record node parameters + + Attributes + ---------- + + event : CUevent + The event to record when the node executes + + + ctx : CUcontext + + + + gCtx : CUgreenCtx + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EVENT_RECORD_NODE_PARAMS_st* _val_ptr + cdef cydriver.CUDA_EVENT_RECORD_NODE_PARAMS_st* _pvt_ptr + + cdef CUevent _event + + + cdef CUcontext _ctx + + + cdef CUgreenCtx _gCtx + + +cdef class CUDA_EVENT_WAIT_NODE_PARAMS_st: + """ + Event wait node parameters + + Attributes + ---------- + + event : CUevent + The event to wait on from the node + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EVENT_WAIT_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_EVENT_WAIT_NODE_PARAMS_st* _pvt_ptr + + cdef CUevent _event + + +cdef class CUgraphNodeParams_st: + """ + Graph node parameters. See cuGraphAddNode. + + Attributes + ---------- + + type : CUgraphNodeType + Type of the node + + + kernel : CUDA_KERNEL_NODE_PARAMS_v3 + Kernel node parameters. + + + memcpy : CUDA_MEMCPY_NODE_PARAMS + Memcpy node parameters. + + + memset : CUDA_MEMSET_NODE_PARAMS_v2 + Memset node parameters. + + + host : CUDA_HOST_NODE_PARAMS_v2 + Host node parameters. + + + graph : CUDA_CHILD_GRAPH_NODE_PARAMS + Child graph node parameters. + + + eventWait : CUDA_EVENT_WAIT_NODE_PARAMS + Event wait node parameters. + + + eventRecord : CUDA_EVENT_RECORD_NODE_PARAMS + Event record node parameters. + + + extSemSignal : CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2 + External semaphore signal node parameters. + + + extSemWait : CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2 + External semaphore wait node parameters. + + + alloc : CUDA_MEM_ALLOC_NODE_PARAMS_v2 + Memory allocation node parameters. + + + free : CUDA_MEM_FREE_NODE_PARAMS + Memory free node parameters. + + + memOp : CUDA_BATCH_MEM_OP_NODE_PARAMS_v2 + MemOp node parameters. + + + conditional : CUDA_CONDITIONAL_NODE_PARAMS + Conditional node parameters. + + + asBytes : bytes + Padding as bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUgraphNodeParams_st* _val_ptr + cdef cydriver.CUgraphNodeParams_st* _pvt_ptr + + cdef CUDA_KERNEL_NODE_PARAMS_v3 _kernel + + + cdef CUDA_MEMCPY_NODE_PARAMS _memcpy + + + cdef CUDA_MEMSET_NODE_PARAMS_v2 _memset + + + cdef CUDA_HOST_NODE_PARAMS_v2 _host + + + cdef CUDA_CHILD_GRAPH_NODE_PARAMS _graph + + + cdef CUDA_EVENT_WAIT_NODE_PARAMS _eventWait + + + cdef CUDA_EVENT_RECORD_NODE_PARAMS _eventRecord + + + cdef CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2 _extSemSignal + + + cdef CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2 _extSemWait + + + cdef CUDA_MEM_ALLOC_NODE_PARAMS_v2 _alloc + + + cdef CUDA_MEM_FREE_NODE_PARAMS _free + + + cdef CUDA_BATCH_MEM_OP_NODE_PARAMS_v2 _memOp + + + cdef CUDA_CONDITIONAL_NODE_PARAMS _conditional + + +cdef class CUcheckpointCustomStoragePerDeviceData_st: + """ + Per-GPU data for zero-copy mapped device memory used with CUDA + checkpoint/restore on custom storage + + Attributes + ---------- + + devPtr : CUdeviceptr + Zero-copy mapped device memory pointer for the user to copy to/from + + + size : size_t + Size of mapped memory + + + stream : CUstream + Stream the user may use for the copy; the CUDA driver synchronizes + on this stream before completing checkpoint or restore + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUcheckpointCustomStoragePerDeviceData_st _pvt_val + cdef cydriver.CUcheckpointCustomStoragePerDeviceData_st* _pvt_ptr + + cdef CUdeviceptr _devPtr + + + cdef CUstream _stream + + +cdef class CUcheckpointCustomStorageInfo_st: + """ + Output from CUDA custom storage checkpoint/restore: per-GPU device + pointers and a handle to complete the operation + + Attributes + ---------- + + handle : CUcheckpointOperationHandle + Handle returned that is needed to complete checkpoint or restore + + + perDeviceData : CUcheckpointCustomStoragePerDeviceData + Returned pointer to array of per-device data, one per device. User + should set to NULL + + + deviceCount : unsigned int + Number of devices (and elements in `perDeviceData` array) + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUcheckpointCustomStorageInfo_st _pvt_val + cdef cydriver.CUcheckpointCustomStorageInfo_st* _pvt_ptr + + cdef CUcheckpointOperationHandle _handle + + + cdef size_t _perDeviceData_length + cdef cydriver.CUcheckpointCustomStoragePerDeviceData* _perDeviceData + + +cdef class CUcheckpointLockArgs_st: + """ + CUDA checkpoint optional lock arguments + + Attributes + ---------- + + timeoutMs : unsigned int + Timeout in milliseconds to attempt to lock the process, 0 indicates + no timeout + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUcheckpointLockArgs_st _pvt_val + cdef cydriver.CUcheckpointLockArgs_st* _pvt_ptr + +cdef class CUcheckpointCheckpointArgs_st: + """ + CUDA checkpoint optional checkpoint arguments + + Attributes + ---------- + + customStorageInfo_out : CUcheckpointCustomStorageInfo + Optional custom storage; if NULL, GPU memory is checkpointed to + host + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUcheckpointCheckpointArgs_st _pvt_val + cdef cydriver.CUcheckpointCheckpointArgs_st* _pvt_ptr + +cdef class CUcheckpointGpuPair_st: + """ + CUDA checkpoint GPU UUID pairs for device remapping during restore + + Attributes + ---------- + + oldUuid : CUuuid + UUID of the GPU that was checkpointed + + + newUuid : CUuuid + UUID of the GPU to restore onto + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUcheckpointGpuPair_st _pvt_val + cdef cydriver.CUcheckpointGpuPair_st* _pvt_ptr + + cdef CUuuid _oldUuid + + + cdef CUuuid _newUuid + + +cdef class CUcheckpointRestoreArgs_st: + """ + CUDA checkpoint optional restore arguments + + Attributes + ---------- + + gpuPairs : CUcheckpointGpuPair + Pointer to array of gpu pairs that indicate how to remap GPUs + during restore + + + gpuPairsCount : unsigned int + Number of gpu pairs to remap + + + customStorageInfo_out : CUcheckpointCustomStorageInfo + Optional custom storage; if NULL, GPU memory is restored from host + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUcheckpointRestoreArgs_st _pvt_val + cdef cydriver.CUcheckpointRestoreArgs_st* _pvt_ptr + + cdef size_t _gpuPairs_length + cdef cydriver.CUcheckpointGpuPair* _gpuPairs + + +cdef class CUcheckpointUnlockArgs_st: + """ + CUDA checkpoint optional unlock arguments + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUcheckpointUnlockArgs_st _pvt_val + cdef cydriver.CUcheckpointUnlockArgs_st* _pvt_ptr + +cdef class CUmemDecompressParams_st: + """ + Structure describing the parameters that compose a single + decompression operation. + + Attributes + ---------- + + srcNumBytes : size_t + The number of bytes to be read and decompressed from + CUmemDecompressParams_st.src. + + + dstNumBytes : size_t + The number of bytes that the decompression operation will be + expected to write to CUmemDecompressParams_st.dst. This value is + optional; if present, it may be used by the CUDA driver as a + heuristic for scheduling the individual decompression operations. + + + dstActBytes : cuuint32_t + After the decompression operation has completed, the actual number + of bytes written to CUmemDecompressParams.dst will be recorded as a + 32-bit unsigned integer in the memory at this address. + + + src : Any + Pointer to a buffer of at least + CUmemDecompressParams_st.srcNumBytes compressed bytes. + + + dst : Any + Pointer to a buffer where the decompressed data will be written. + The number of bytes written to this location will be recorded in + the memory pointed to by CUmemDecompressParams_st.dstActBytes + + + algo : CUmemDecompressAlgorithm + The decompression algorithm to use. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemDecompressParams_st _pvt_val + cdef cydriver.CUmemDecompressParams_st* _pvt_ptr + + cdef _HelperInputVoidPtr _cysrc + + + cdef _HelperInputVoidPtr _cydst + + +cdef class CUcliqueInfo_st: + """ + Fabric clique information + + Attributes + ---------- + + type : CUcliqueType + Type of the fabric clique + + + id : unsigned int + ID of the fabric clique + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUcliqueInfo_st _pvt_val + cdef cydriver.CUcliqueInfo_st* _pvt_ptr + +cdef class CUlogicalEndpointFabricHandle_st: + """ + Fabric handle for a logical endpoint + + Attributes + ---------- + + data : bytes + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUlogicalEndpointFabricHandle_st _pvt_val + cdef cydriver.CUlogicalEndpointFabricHandle_st* _pvt_ptr + +cdef class anon_struct26: + """ + Attributes + ---------- + + device : CUdevice + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUlogicalEndpointProp_struct* _pvt_ptr + + cdef CUdevice _device + + +cdef class anon_struct27: + """ + Attributes + ---------- + + numDevices : unsigned int + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUlogicalEndpointProp_struct* _pvt_ptr + +cdef class CUlogicalEndpointProp_struct: + """ + Properties of a logical endpoint construction + + Attributes + ---------- + + type : CUlogicalEndpointType + Type of the logical endpoint defined in CUlogicalEndpointType + + + unicast : anon_struct26 + + + + multicast : anon_struct27 + + + + size : unsigned long long + Size of the logical endpoint + + + ipcHandleTypes : unsigned int + A bitmask of IPC handle types defined in + CUlogicalEndpointIpcHandleType + + + flags : unsigned int + A bitmask of flags defined in CUlogicalEndpointFlag + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUlogicalEndpointProp_struct* _val_ptr + cdef cydriver.CUlogicalEndpointProp_struct* _pvt_ptr + + cdef anon_struct26 _unicast + + + cdef anon_struct27 _multicast + + +cdef class CUdevSmResource_st: + """ + Attributes + ---------- + + smCount : unsigned int + The amount of streaming multiprocessors available in this resource. + + + minSmPartitionSize : unsigned int + The minimum number of streaming multiprocessors required to + partition this resource. + + + smCoscheduledAlignment : unsigned int + The number of streaming multiprocessors in this resource that are + guaranteed to be co-scheduled on the same GPU processing cluster. + smCount will be a multiple of this value, unless the backfill flag + is set. + + + flags : unsigned int + The flags set on this SM resource. For possible values see + CUdevSmResourceGroup_flags. + + + localityDomainId : unsigned int + Locality domain that the SM must be located on. Only valid if + CU_DEV_SM_RESOURCE_GROUP_LOCALITY_DOMAIN_ID is set in flags. If the + backfill flag is set, SMs may be assigned from other locality + domains. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUdevSmResource_st _pvt_val + cdef cydriver.CUdevSmResource_st* _pvt_ptr + +cdef class CUdevWorkqueueConfigResource_st: + """ + Attributes + ---------- + + device : CUdevice + The device on which the workqueue resources are available + + + wqConcurrencyLimit : unsigned int + The expected maximum number of concurrent stream-ordered workloads + + + sharingScope : CUdevWorkqueueConfigScope + The sharing scope for the workqueue resources + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUdevWorkqueueConfigResource_st _pvt_val + cdef cydriver.CUdevWorkqueueConfigResource_st* _pvt_ptr + + cdef CUdevice _device + + +cdef class CUdevWorkqueueResource_st: + """ + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUdevWorkqueueResource_st _pvt_val + cdef cydriver.CUdevWorkqueueResource_st* _pvt_ptr + +cdef class CU_DEV_SM_RESOURCE_GROUP_PARAMS_st: + """ + Attributes + ---------- + + smCount : unsigned int + The amount of SMs available in this resource. + + + coscheduledSmCount : unsigned int + The amount of co-scheduled SMs grouped together for locality + purposes. + + + preferredCoscheduledSmCount : unsigned int + When possible, combine co-scheduled groups together into larger + groups of this size. + + + flags : unsigned int + The flags set on this SM resource group. For possible values see + CUdevSmResourceGroup_flags. + + + localityDomainId : unsigned int + Locality domain that the SM must be located on. Only valid if + CU_DEV_SM_RESOURCE_GROUP_LOCALITY_DOMAIN_ID is set in flags + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CU_DEV_SM_RESOURCE_GROUP_PARAMS_st _pvt_val + cdef cydriver.CU_DEV_SM_RESOURCE_GROUP_PARAMS_st* _pvt_ptr + +cdef class CUdevResource_st: + """ + Attributes + ---------- + + type : CUdevResourceType + Type of resource, dictates which union field was last set + + + _internal_padding : bytes + + + + sm : CUdevSmResource + Resource corresponding to CU_DEV_RESOURCE_TYPE_SM `typename`. + + + wqConfig : CUdevWorkqueueConfigResource + Resource corresponding to CU_DEV_RESOURCE_TYPE_WORKQUEUE_CONFIG + `typename`. + + + wq : CUdevWorkqueueResource + Resource corresponding to CU_DEV_RESOURCE_TYPE_WORKQUEUE + `typename`. + + + _oversize : bytes + + + + nextResource : CUdevResource_st + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUdevResource_st* _val_ptr + cdef cydriver.CUdevResource_st* _pvt_ptr + + cdef CUdevSmResource _sm + + + cdef CUdevWorkqueueConfigResource _wqConfig + + + cdef CUdevWorkqueueResource _wq + + + cdef size_t _nextResource_length + cdef cydriver.CUdevResource_st* _nextResource + + +cdef class anon_union21: + """ + Attributes + ---------- + + pArray : list[CUarray] + + + + pPitch : list[Any] + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUeglFrame_st* _pvt_ptr + +cdef class CUeglFrame_st: + """ + CUDA EGLFrame structure Descriptor - structure defining one frame + of EGL. Each frame may contain one or more planes depending on + whether the surface * is Multiplanar or not. + + Attributes + ---------- + + frame : anon_union21 + + + + width : unsigned int + Width of first plane + + + height : unsigned int + Height of first plane + + + depth : unsigned int + Depth of first plane + + + pitch : unsigned int + Pitch of first plane + + + planeCount : unsigned int + Number of planes + + + numChannels : unsigned int + Number of channels for the plane + + + frameType : CUeglFrameType + Array or Pitch + + + eglColorFormat : CUeglColorFormat + CUDA EGL Color Format + + + cuFormat : CUarray_format + CUDA Array Format + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUeglFrame_st* _val_ptr + cdef cydriver.CUeglFrame_st* _pvt_ptr + + cdef anon_union21 _frame + + +cdef class CUdeviceptr: + """ + + CUDA device pointer CUdeviceptr is defined as an unsigned integer type whose size matches the size of a pointer on the target platform. + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUdeviceptr _pvt_val + cdef cydriver.CUdeviceptr* _pvt_ptr + +cdef class CUdevice: + """ + + CUDA device + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUdevice _pvt_val + cdef cydriver.CUdevice* _pvt_ptr + +cdef class CUtexObject: + """ + + An opaque value that represents a CUDA texture object + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUtexObject _pvt_val + cdef cydriver.CUtexObject* _pvt_ptr + +cdef class CUsurfObject: + """ + + An opaque value that represents a CUDA surface object + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUsurfObject _pvt_val + cdef cydriver.CUsurfObject* _pvt_ptr + +cdef class CUgraphConditionalHandle: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUgraphConditionalHandle _pvt_val + cdef cydriver.CUgraphConditionalHandle* _pvt_ptr + +cdef class CUuuid(CUuuid_st): + """ + Attributes + ---------- + + bytes : bytes + < CUDA definition of UUID + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemFabricHandle_v1(CUmemFabricHandle_st): + """ + Fabric handle - An opaque handle representing a memory allocation + that can be exported to processes in same or different nodes. For + IPC between processes on different nodes they must be connected via + the NVSwitch fabric. + + Attributes + ---------- + + data : bytes + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemFabricHandle(CUmemFabricHandle_v1): + """ + Fabric handle - An opaque handle representing a memory allocation + that can be exported to processes in same or different nodes. For + IPC between processes on different nodes they must be connected via + the NVSwitch fabric. + + Attributes + ---------- + + data : bytes + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUipcEventHandle_v1(CUipcEventHandle_st): + """ + CUDA IPC event handle + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUipcEventHandle(CUipcEventHandle_v1): + """ + CUDA IPC event handle + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUipcMemHandle_v1(CUipcMemHandle_st): + """ + CUDA IPC mem handle + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUipcMemHandle(CUipcMemHandle_v1): + """ + CUDA IPC mem handle + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUstreamBatchMemOpParams_v1(CUstreamBatchMemOpParams_union): + """ + Per-operation parameters for cuStreamBatchMemOp + + Attributes + ---------- + + operation : CUstreamBatchMemOpType + Operation. This is the first field of all the union elemets and + acts as a TAG to determine which union member is valid. + + + waitValue : CUstreamMemOpWaitValueParams_st + Params for CU_STREAM_MEM_OP_WAIT_VALUE_32 and + CU_STREAM_MEM_OP_WAIT_VALUE_64 operations. + + + writeValue : CUstreamMemOpWriteValueParams_st + Params for CU_STREAM_MEM_OP_WRITE_VALUE_32 and + CU_STREAM_MEM_OP_WRITE_VALUE_64 operations. + + + flushRemoteWrites : CUstreamMemOpFlushRemoteWritesParams_st + Params for CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES operations. + + + memoryBarrier : CUstreamMemOpMemoryBarrierParams_st + Params for CU_STREAM_MEM_OP_BARRIER operations. + + + atomicReduction : CUstreamMemOpAtomicReductionParams_st + + + + pad : list[cuuint64_t] + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUstreamBatchMemOpParams(CUstreamBatchMemOpParams_v1): + """ + Per-operation parameters for cuStreamBatchMemOp + + Attributes + ---------- + + operation : CUstreamBatchMemOpType + Operation. This is the first field of all the union elemets and + acts as a TAG to determine which union member is valid. + + + waitValue : CUstreamMemOpWaitValueParams_st + Params for CU_STREAM_MEM_OP_WAIT_VALUE_32 and + CU_STREAM_MEM_OP_WAIT_VALUE_64 operations. + + + writeValue : CUstreamMemOpWriteValueParams_st + Params for CU_STREAM_MEM_OP_WRITE_VALUE_32 and + CU_STREAM_MEM_OP_WRITE_VALUE_64 operations. + + + flushRemoteWrites : CUstreamMemOpFlushRemoteWritesParams_st + Params for CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES operations. + + + memoryBarrier : CUstreamMemOpMemoryBarrierParams_st + Params for CU_STREAM_MEM_OP_BARRIER operations. + + + atomicReduction : CUstreamMemOpAtomicReductionParams_st + + + + pad : list[cuuint64_t] + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS_v1(CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st): + """ + Batch memory operation node parameters Used in the legacy + cuGraphAddBatchMemOpNode api. New code should use cuGraphAddNode() + + Attributes + ---------- + + ctx : CUcontext + + + + count : unsigned int + + + + paramArray : CUstreamBatchMemOpParams + + + + flags : unsigned int + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS(CUDA_BATCH_MEM_OP_NODE_PARAMS_v1): + """ + Batch memory operation node parameters Used in the legacy + cuGraphAddBatchMemOpNode api. New code should use cuGraphAddNode() + + Attributes + ---------- + + ctx : CUcontext + + + + count : unsigned int + + + + paramArray : CUstreamBatchMemOpParams + + + + flags : unsigned int + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS_v2(CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st): + """ + Batch memory operation node parameters + + Attributes + ---------- + + ctx : CUcontext + Context to use for the operations. + + + count : unsigned int + Number of operations in paramArray. + + + paramArray : CUstreamBatchMemOpParams + Array of batch memory operations. + + + flags : unsigned int + Flags to control the node. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUasyncNotificationInfo(CUasyncNotificationInfo_st): + """ + Information passed to the user via the async notification callback + + Attributes + ---------- + + type : CUasyncNotificationType + The type of notification being sent + + + info : anon_union2 + Information about the notification. `typename` must be checked in + order to interpret this field. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUdevprop_v1(CUdevprop_st): + """ + Legacy device properties + + Attributes + ---------- + + maxThreadsPerBlock : int + Maximum number of threads per block + + + maxThreadsDim : list[int] + Maximum size of each dimension of a block + + + maxGridSize : list[int] + Maximum size of each dimension of a grid + + + sharedMemPerBlock : int + Shared memory available per block in bytes + + + totalConstantMemory : int + Constant memory available on device in bytes + + + SIMDWidth : int + Warp size in threads + + + memPitch : int + Maximum pitch in bytes allowed by memory copies + + + regsPerBlock : int + 32-bit registers available per block + + + clockRate : int + Clock frequency in kilohertz + + + textureAlign : int + Alignment requirement for textures + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUdevprop(CUdevprop_v1): + """ + Legacy device properties + + Attributes + ---------- + + maxThreadsPerBlock : int + Maximum number of threads per block + + + maxThreadsDim : list[int] + Maximum size of each dimension of a block + + + maxGridSize : list[int] + Maximum size of each dimension of a grid + + + sharedMemPerBlock : int + Shared memory available per block in bytes + + + totalConstantMemory : int + Constant memory available on device in bytes + + + SIMDWidth : int + Warp size in threads + + + memPitch : int + Maximum pitch in bytes allowed by memory copies + + + regsPerBlock : int + 32-bit registers available per block + + + clockRate : int + Clock frequency in kilohertz + + + textureAlign : int + Alignment requirement for textures + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUaccessPolicyWindow_v1(CUaccessPolicyWindow_st): + """ + Specifies an access policy for a window, a contiguous extent of + memory beginning at base_ptr and ending at base_ptr + num_bytes. + num_bytes is limited by + CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE. Partition into + many segments and assign segments such that: sum of "hit segments" + / window == approx. ratio. sum of "miss segments" / window == + approx 1-ratio. Segments and ratio specifications are fitted to the + capabilities of the architecture. Accesses in a hit segment apply + the hitProp access policy. Accesses in a miss segment apply the + missProp access policy. + + Attributes + ---------- + + base_ptr : Any + Starting address of the access policy window. CUDA driver may align + it. + + + num_bytes : size_t + Size in bytes of the window policy. CUDA driver may restrict the + maximum size and alignment. + + + hitRatio : float + hitRatio specifies percentage of lines assigned hitProp, rest are + assigned missProp. + + + hitProp : CUaccessProperty + CUaccessProperty set for hit. + + + missProp : CUaccessProperty + CUaccessProperty set for miss. Must be either NORMAL or STREAMING + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUaccessPolicyWindow(CUaccessPolicyWindow_v1): + """ + Specifies an access policy for a window, a contiguous extent of + memory beginning at base_ptr and ending at base_ptr + num_bytes. + num_bytes is limited by + CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE. Partition into + many segments and assign segments such that: sum of "hit segments" + / window == approx. ratio. sum of "miss segments" / window == + approx 1-ratio. Segments and ratio specifications are fitted to the + capabilities of the architecture. Accesses in a hit segment apply + the hitProp access policy. Accesses in a miss segment apply the + missProp access policy. + + Attributes + ---------- + + base_ptr : Any + Starting address of the access policy window. CUDA driver may align + it. + + + num_bytes : size_t + Size in bytes of the window policy. CUDA driver may restrict the + maximum size and alignment. + + + hitRatio : float + hitRatio specifies percentage of lines assigned hitProp, rest are + assigned missProp. + + + hitProp : CUaccessProperty + CUaccessProperty set for hit. + + + missProp : CUaccessProperty + CUaccessProperty set for miss. Must be either NORMAL or STREAMING + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_KERNEL_NODE_PARAMS_v1(CUDA_KERNEL_NODE_PARAMS_st): + """ + GPU kernel node parameters + + Attributes + ---------- + + func : CUfunction + Kernel to launch + + + gridDimX : unsigned int + Width of grid in blocks + + + gridDimY : unsigned int + Height of grid in blocks + + + gridDimZ : unsigned int + Depth of grid in blocks + + + blockDimX : unsigned int + X dimension of each thread block + + + blockDimY : unsigned int + Y dimension of each thread block + + + blockDimZ : unsigned int + Z dimension of each thread block + + + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + + + kernelParams : Any + Array of pointers to kernel parameters + + + extra : Any + Extra options + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_KERNEL_NODE_PARAMS_v2(CUDA_KERNEL_NODE_PARAMS_v2_st): + """ + GPU kernel node parameters + + Attributes + ---------- + + func : CUfunction + Kernel to launch + + + gridDimX : unsigned int + Width of grid in blocks + + + gridDimY : unsigned int + Height of grid in blocks + + + gridDimZ : unsigned int + Depth of grid in blocks + + + blockDimX : unsigned int + X dimension of each thread block + + + blockDimY : unsigned int + Y dimension of each thread block + + + blockDimZ : unsigned int + Z dimension of each thread block + + + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + + + kernelParams : Any + Array of pointers to kernel parameters + + + extra : Any + Extra options + + + kern : CUkernel + Kernel to launch, will only be referenced if func is NULL + + + ctx : CUcontext + Context for the kernel task to run in. The value NULL will indicate + the current context should be used by the api. This field is + ignored if func is set. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_KERNEL_NODE_PARAMS(CUDA_KERNEL_NODE_PARAMS_v2): + """ + GPU kernel node parameters + + Attributes + ---------- + + func : CUfunction + Kernel to launch + + + gridDimX : unsigned int + Width of grid in blocks + + + gridDimY : unsigned int + Height of grid in blocks + + + gridDimZ : unsigned int + Depth of grid in blocks + + + blockDimX : unsigned int + X dimension of each thread block + + + blockDimY : unsigned int + Y dimension of each thread block + + + blockDimZ : unsigned int + Z dimension of each thread block + + + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + + + kernelParams : Any + Array of pointers to kernel parameters + + + extra : Any + Extra options + + + kern : CUkernel + Kernel to launch, will only be referenced if func is NULL + + + ctx : CUcontext + Context for the kernel task to run in. The value NULL will indicate + the current context should be used by the api. This field is + ignored if func is set. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_KERNEL_NODE_PARAMS_v3(CUDA_KERNEL_NODE_PARAMS_v3_st): + """ + GPU kernel node parameters + + Attributes + ---------- + + func : CUfunction + Kernel to launch + + + gridDimX : unsigned int + Width of grid in blocks + + + gridDimY : unsigned int + Height of grid in blocks + + + gridDimZ : unsigned int + Depth of grid in blocks + + + blockDimX : unsigned int + X dimension of each thread block + + + blockDimY : unsigned int + Y dimension of each thread block + + + blockDimZ : unsigned int + Z dimension of each thread block + + + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + + + kernelParams : Any + Array of pointers to kernel parameters + + + extra : Any + Extra options + + + kern : CUkernel + Kernel to launch, will only be referenced if func is NULL + + + ctx : CUcontext + Context for the kernel task to run in. The value NULL will indicate + the current context should be used by the api. This field is + ignored if func is set. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEMSET_NODE_PARAMS_v1(CUDA_MEMSET_NODE_PARAMS_st): + """ + Memset node parameters + + Attributes + ---------- + + dst : CUdeviceptr + Destination device pointer + + + pitch : size_t + Pitch of destination device pointer. Unused if height is 1 + + + value : unsigned int + Value to be set + + + elementSize : unsigned int + Size of each element in bytes. Must be 1, 2, or 4. + + + width : size_t + Width of the row in elements + + + height : size_t + Number of rows + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEMSET_NODE_PARAMS(CUDA_MEMSET_NODE_PARAMS_v1): + """ + Memset node parameters + + Attributes + ---------- + + dst : CUdeviceptr + Destination device pointer + + + pitch : size_t + Pitch of destination device pointer. Unused if height is 1 + + + value : unsigned int + Value to be set + + + elementSize : unsigned int + Size of each element in bytes. Must be 1, 2, or 4. + + + width : size_t + Width of the row in elements + + + height : size_t + Number of rows + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEMSET_NODE_PARAMS_v2(CUDA_MEMSET_NODE_PARAMS_v2_st): + """ + Memset node parameters + + Attributes + ---------- + + dst : CUdeviceptr + Destination device pointer + + + pitch : size_t + Pitch of destination device pointer. Unused if height is 1 + + + value : unsigned int + Value to be set + + + elementSize : unsigned int + Size of each element in bytes. Must be 1, 2, or 4. + + + width : size_t + Width of the row in elements + + + height : size_t + Number of rows + + + ctx : CUcontext + Context on which to run the node + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_HOST_NODE_PARAMS_v1(CUDA_HOST_NODE_PARAMS_st): + """ + Host node parameters + + Attributes + ---------- + + fn : CUhostFn + The function to call when the node executes + + + userData : Any + Argument to pass to the function + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_HOST_NODE_PARAMS(CUDA_HOST_NODE_PARAMS_v1): + """ + Host node parameters + + Attributes + ---------- + + fn : CUhostFn + The function to call when the node executes + + + userData : Any + Argument to pass to the function + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_HOST_NODE_PARAMS_v2(CUDA_HOST_NODE_PARAMS_v2_st): + """ + Host node parameters + + Attributes + ---------- + + fn : CUhostFn + The function to call when the node executes + + + userData : Any + Argument to pass to the function + + + syncMode : unsigned int + The sync mode to use for the host task + + + ctx : CUcontext + + + + gCtx : CUgreenCtx + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUgraphEdgeData(CUgraphEdgeData_st): + """ + Optional annotation for edges in a CUDA graph. Note, all edges + implicitly have annotations and default to a zero-initialized value + if not specified. A zero-initialized struct indicates a standard + full serialization of two nodes with memory visibility. + + Attributes + ---------- + + from_port : bytes + This indicates when the dependency is triggered from the upstream + node on the edge. The meaning is specfic to the node type. A value + of 0 in all cases means full completion of the upstream node, with + memory visibility to the downstream node or portion thereof + (indicated by `to_port`). Only kernel nodes define non-zero + ports. A kernel node can use the following output port types: + CU_GRAPH_KERNEL_NODE_PORT_DEFAULT, + CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC, or + CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER. + + + to_port : bytes + This indicates what portion of the downstream node is dependent on + the upstream node or portion thereof (indicated by `from_port`). + The meaning is specific to the node type. A value of 0 in all cases + means the entirety of the downstream node is dependent on the + upstream work. Currently no node types define non-zero ports. + Accordingly, this field must be set to zero. + + + type : bytes + This should be populated with a value from CUgraphDependencyType. + (It is typed as char due to compiler-specific layout of bitfields.) + See CUgraphDependencyType. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_GRAPH_INSTANTIATE_PARAMS(CUDA_GRAPH_INSTANTIATE_PARAMS_st): + """ + Graph instantiation parameters + + Attributes + ---------- + + flags : cuuint64_t + Instantiation flags + + + hUploadStream : CUstream + Upload stream + + + hErrNode_out : CUgraphNode + The node which caused instantiation to fail, if any + + + result_out : CUgraphInstantiateResult + Whether instantiation was successful. If it failed, the reason why + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUlaunchMemSyncDomainMap(CUlaunchMemSyncDomainMap_st): + """ + Memory Synchronization Domain map See ::cudaLaunchMemSyncDomain. + By default, kernels are launched in domain 0. Kernel launched with + CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE will have a different domain ID. + User may also alter the domain ID with CUlaunchMemSyncDomainMap for + a specific stream / graph node / kernel launch. See + CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. Domain ID range is + available through CU_DEVICE_ATTRIBUTE_MEM_SYNC_DOMAIN_COUNT. + + Attributes + ---------- + + default_ : bytes + The default domain ID to use for designated kernels + + + remote : bytes + The remote domain ID to use for designated kernels + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUlaunchAttributeValue(CUlaunchAttributeValue_union): + """ + Launch attributes union; used as value field of CUlaunchAttribute + + Attributes + ---------- + + pad : bytes + + + + accessPolicyWindow : CUaccessPolicyWindow + Value of launch attribute CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW. + + + cooperative : int + Value of launch attribute CU_LAUNCH_ATTRIBUTE_COOPERATIVE. Nonzero + indicates a cooperative kernel (see cuLaunchCooperativeKernel). + + + syncPolicy : CUsynchronizationPolicy + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. CUsynchronizationPolicy + for work queued up in this stream + + + clusterDim : anon_struct1 + Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION + that represents the desired cluster dimensions for the kernel. + Opaque type with the following fields: - `x` - The X dimension of + the cluster, in blocks. Must be a divisor of the grid X dimension. + - `y` - The Y dimension of the cluster, in blocks. Must be a + divisor of the grid Y dimension. - `z` - The Z dimension of the + cluster, in blocks. Must be a divisor of the grid Z dimension. + + + clusterSchedulingPolicyPreference : CUclusterSchedulingPolicy + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Cluster + scheduling policy preference for the kernel. + + + programmaticStreamSerializationAllowed : int + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION. + + + programmaticEvent : anon_struct2 + Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT + with the following fields: - `CUevent` event - Event to fire when + all blocks trigger it. - `Event` record flags, see + cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL. + - `triggerAtBlockStart` - If this is set to non-0, each block + launch will automatically trigger the event. + + + launchCompletionEvent : anon_struct3 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT with the following + fields: - `CUevent` event - Event to fire when the last block + launches - `int` flags; - Event record flags, see + cuEventRecordWithFlags. Does not accept CU_EVENT_RECORD_EXTERNAL. + + + priority : int + Value of launch attribute CU_LAUNCH_ATTRIBUTE_PRIORITY. Execution + priority of the kernel. + + + memSyncDomainMap : CUlaunchMemSyncDomainMap + Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. + See CUlaunchMemSyncDomainMap. + + + memSyncDomain : CUlaunchMemSyncDomain + Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN. + See::CUlaunchMemSyncDomain + + + preferredClusterDim : anon_struct4 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + CUlaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + CUlaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + CUlaunchAttributeValue::clusterDim. + + + deviceUpdatableKernelNode : anon_struct5 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE. with the + following fields: - `int` deviceUpdatable - Whether or not the + resulting kernel node should be device-updatable. - + `CUgraphDeviceNode` devNode - Returns a handle to pass to the + various device-side update functions. + + + sharedMemCarveout : unsigned int + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT. + + + nvlinkUtilCentricScheduling : unsigned int + + + + portableClusterSizeMode : CUlaunchAttributePortableClusterMode + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PORTABLE_CLUSTER_SIZE_MODE. + + + sharedMemoryMode : CUsharedMemoryMode + Value of launch attribute CU_LAUNCH_ATTRIBUTE_SHARED_MEMORY_MODE. + See CUsharedMemoryMode for acceptable values. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUlaunchAttribute(CUlaunchAttribute_st): + """ + Launch attribute + + Attributes + ---------- + + id : CUlaunchAttributeID + Attribute to set + + + value : CUlaunchAttributeValue + Value of the attribute + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUlaunchConfig(CUlaunchConfig_st): + """ + CUDA extensible launch configuration + + Attributes + ---------- + + gridDimX : unsigned int + Width of grid in blocks + + + gridDimY : unsigned int + Height of grid in blocks + + + gridDimZ : unsigned int + Depth of grid in blocks + + + blockDimX : unsigned int + X dimension of each thread block + + + blockDimY : unsigned int + Y dimension of each thread block + + + blockDimZ : unsigned int + Z dimension of each thread block + + + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + + + hStream : CUstream + Stream identifier + + + attrs : CUlaunchAttribute + List of attributes; nullable if CUlaunchConfig::numAttrs == 0 + + + numAttrs : unsigned int + Number of attributes populated in CUlaunchConfig::attrs + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUkernelNodeAttrValue_v1(CUlaunchAttributeValue): + """ + Launch attributes union; used as value field of CUlaunchAttribute + + Attributes + ---------- + + pad : bytes + + + + accessPolicyWindow : CUaccessPolicyWindow + Value of launch attribute CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW. + + + cooperative : int + Value of launch attribute CU_LAUNCH_ATTRIBUTE_COOPERATIVE. Nonzero + indicates a cooperative kernel (see cuLaunchCooperativeKernel). + + + syncPolicy : CUsynchronizationPolicy + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. CUsynchronizationPolicy + for work queued up in this stream + + + clusterDim : anon_struct1 + Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION + that represents the desired cluster dimensions for the kernel. + Opaque type with the following fields: - `x` - The X dimension of + the cluster, in blocks. Must be a divisor of the grid X dimension. + - `y` - The Y dimension of the cluster, in blocks. Must be a + divisor of the grid Y dimension. - `z` - The Z dimension of the + cluster, in blocks. Must be a divisor of the grid Z dimension. + + + clusterSchedulingPolicyPreference : CUclusterSchedulingPolicy + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Cluster + scheduling policy preference for the kernel. + + + programmaticStreamSerializationAllowed : int + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION. + + + programmaticEvent : anon_struct2 + Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT + with the following fields: - `CUevent` event - Event to fire when + all blocks trigger it. - `Event` record flags, see + cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL. + - `triggerAtBlockStart` - If this is set to non-0, each block + launch will automatically trigger the event. + + + launchCompletionEvent : anon_struct3 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT with the following + fields: - `CUevent` event - Event to fire when the last block + launches - `int` flags; - Event record flags, see + cuEventRecordWithFlags. Does not accept CU_EVENT_RECORD_EXTERNAL. + + + priority : int + Value of launch attribute CU_LAUNCH_ATTRIBUTE_PRIORITY. Execution + priority of the kernel. + + + memSyncDomainMap : CUlaunchMemSyncDomainMap + Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. + See CUlaunchMemSyncDomainMap. + + + memSyncDomain : CUlaunchMemSyncDomain + Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN. + See::CUlaunchMemSyncDomain + + + preferredClusterDim : anon_struct4 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + CUlaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + CUlaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + CUlaunchAttributeValue::clusterDim. + + + deviceUpdatableKernelNode : anon_struct5 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE. with the + following fields: - `int` deviceUpdatable - Whether or not the + resulting kernel node should be device-updatable. - + `CUgraphDeviceNode` devNode - Returns a handle to pass to the + various device-side update functions. + + + sharedMemCarveout : unsigned int + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT. + + + nvlinkUtilCentricScheduling : unsigned int + + + + portableClusterSizeMode : CUlaunchAttributePortableClusterMode + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PORTABLE_CLUSTER_SIZE_MODE. + + + sharedMemoryMode : CUsharedMemoryMode + Value of launch attribute CU_LAUNCH_ATTRIBUTE_SHARED_MEMORY_MODE. + See CUsharedMemoryMode for acceptable values. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUkernelNodeAttrValue(CUkernelNodeAttrValue_v1): + """ + Launch attributes union; used as value field of CUlaunchAttribute + + Attributes + ---------- + + pad : bytes + + + + accessPolicyWindow : CUaccessPolicyWindow + Value of launch attribute CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW. + + + cooperative : int + Value of launch attribute CU_LAUNCH_ATTRIBUTE_COOPERATIVE. Nonzero + indicates a cooperative kernel (see cuLaunchCooperativeKernel). + + + syncPolicy : CUsynchronizationPolicy + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. CUsynchronizationPolicy + for work queued up in this stream + + + clusterDim : anon_struct1 + Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION + that represents the desired cluster dimensions for the kernel. + Opaque type with the following fields: - `x` - The X dimension of + the cluster, in blocks. Must be a divisor of the grid X dimension. + - `y` - The Y dimension of the cluster, in blocks. Must be a + divisor of the grid Y dimension. - `z` - The Z dimension of the + cluster, in blocks. Must be a divisor of the grid Z dimension. + + + clusterSchedulingPolicyPreference : CUclusterSchedulingPolicy + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Cluster + scheduling policy preference for the kernel. + + + programmaticStreamSerializationAllowed : int + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION. + + + programmaticEvent : anon_struct2 + Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT + with the following fields: - `CUevent` event - Event to fire when + all blocks trigger it. - `Event` record flags, see + cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL. + - `triggerAtBlockStart` - If this is set to non-0, each block + launch will automatically trigger the event. + + + launchCompletionEvent : anon_struct3 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT with the following + fields: - `CUevent` event - Event to fire when the last block + launches - `int` flags; - Event record flags, see + cuEventRecordWithFlags. Does not accept CU_EVENT_RECORD_EXTERNAL. + + + priority : int + Value of launch attribute CU_LAUNCH_ATTRIBUTE_PRIORITY. Execution + priority of the kernel. + + + memSyncDomainMap : CUlaunchMemSyncDomainMap + Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. + See CUlaunchMemSyncDomainMap. + + + memSyncDomain : CUlaunchMemSyncDomain + Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN. + See::CUlaunchMemSyncDomain + + + preferredClusterDim : anon_struct4 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + CUlaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + CUlaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + CUlaunchAttributeValue::clusterDim. + + + deviceUpdatableKernelNode : anon_struct5 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE. with the + following fields: - `int` deviceUpdatable - Whether or not the + resulting kernel node should be device-updatable. - + `CUgraphDeviceNode` devNode - Returns a handle to pass to the + various device-side update functions. + + + sharedMemCarveout : unsigned int + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT. + + + nvlinkUtilCentricScheduling : unsigned int + + + + portableClusterSizeMode : CUlaunchAttributePortableClusterMode + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PORTABLE_CLUSTER_SIZE_MODE. + + + sharedMemoryMode : CUsharedMemoryMode + Value of launch attribute CU_LAUNCH_ATTRIBUTE_SHARED_MEMORY_MODE. + See CUsharedMemoryMode for acceptable values. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUstreamAttrValue_v1(CUlaunchAttributeValue): + """ + Launch attributes union; used as value field of CUlaunchAttribute + + Attributes + ---------- + + pad : bytes + + + + accessPolicyWindow : CUaccessPolicyWindow + Value of launch attribute CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW. + + + cooperative : int + Value of launch attribute CU_LAUNCH_ATTRIBUTE_COOPERATIVE. Nonzero + indicates a cooperative kernel (see cuLaunchCooperativeKernel). + + + syncPolicy : CUsynchronizationPolicy + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. CUsynchronizationPolicy + for work queued up in this stream + + + clusterDim : anon_struct1 + Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION + that represents the desired cluster dimensions for the kernel. + Opaque type with the following fields: - `x` - The X dimension of + the cluster, in blocks. Must be a divisor of the grid X dimension. + - `y` - The Y dimension of the cluster, in blocks. Must be a + divisor of the grid Y dimension. - `z` - The Z dimension of the + cluster, in blocks. Must be a divisor of the grid Z dimension. + + + clusterSchedulingPolicyPreference : CUclusterSchedulingPolicy + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Cluster + scheduling policy preference for the kernel. + + + programmaticStreamSerializationAllowed : int + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION. + + + programmaticEvent : anon_struct2 + Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT + with the following fields: - `CUevent` event - Event to fire when + all blocks trigger it. - `Event` record flags, see + cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL. + - `triggerAtBlockStart` - If this is set to non-0, each block + launch will automatically trigger the event. + + + launchCompletionEvent : anon_struct3 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT with the following + fields: - `CUevent` event - Event to fire when the last block + launches - `int` flags; - Event record flags, see + cuEventRecordWithFlags. Does not accept CU_EVENT_RECORD_EXTERNAL. + + + priority : int + Value of launch attribute CU_LAUNCH_ATTRIBUTE_PRIORITY. Execution + priority of the kernel. + + + memSyncDomainMap : CUlaunchMemSyncDomainMap + Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. + See CUlaunchMemSyncDomainMap. + + + memSyncDomain : CUlaunchMemSyncDomain + Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN. + See::CUlaunchMemSyncDomain + + + preferredClusterDim : anon_struct4 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + CUlaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + CUlaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + CUlaunchAttributeValue::clusterDim. + + + deviceUpdatableKernelNode : anon_struct5 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE. with the + following fields: - `int` deviceUpdatable - Whether or not the + resulting kernel node should be device-updatable. - + `CUgraphDeviceNode` devNode - Returns a handle to pass to the + various device-side update functions. + + + sharedMemCarveout : unsigned int + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT. + + + nvlinkUtilCentricScheduling : unsigned int + + + + portableClusterSizeMode : CUlaunchAttributePortableClusterMode + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PORTABLE_CLUSTER_SIZE_MODE. + + + sharedMemoryMode : CUsharedMemoryMode + Value of launch attribute CU_LAUNCH_ATTRIBUTE_SHARED_MEMORY_MODE. + See CUsharedMemoryMode for acceptable values. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUstreamAttrValue(CUstreamAttrValue_v1): + """ + Launch attributes union; used as value field of CUlaunchAttribute + + Attributes + ---------- + + pad : bytes + + + + accessPolicyWindow : CUaccessPolicyWindow + Value of launch attribute CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW. + + + cooperative : int + Value of launch attribute CU_LAUNCH_ATTRIBUTE_COOPERATIVE. Nonzero + indicates a cooperative kernel (see cuLaunchCooperativeKernel). + + + syncPolicy : CUsynchronizationPolicy + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. CUsynchronizationPolicy + for work queued up in this stream + + + clusterDim : anon_struct1 + Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION + that represents the desired cluster dimensions for the kernel. + Opaque type with the following fields: - `x` - The X dimension of + the cluster, in blocks. Must be a divisor of the grid X dimension. + - `y` - The Y dimension of the cluster, in blocks. Must be a + divisor of the grid Y dimension. - `z` - The Z dimension of the + cluster, in blocks. Must be a divisor of the grid Z dimension. + + + clusterSchedulingPolicyPreference : CUclusterSchedulingPolicy + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Cluster + scheduling policy preference for the kernel. + + + programmaticStreamSerializationAllowed : int + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION. + + + programmaticEvent : anon_struct2 + Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT + with the following fields: - `CUevent` event - Event to fire when + all blocks trigger it. - `Event` record flags, see + cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL. + - `triggerAtBlockStart` - If this is set to non-0, each block + launch will automatically trigger the event. + + + launchCompletionEvent : anon_struct3 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT with the following + fields: - `CUevent` event - Event to fire when the last block + launches - `int` flags; - Event record flags, see + cuEventRecordWithFlags. Does not accept CU_EVENT_RECORD_EXTERNAL. + + + priority : int + Value of launch attribute CU_LAUNCH_ATTRIBUTE_PRIORITY. Execution + priority of the kernel. + + + memSyncDomainMap : CUlaunchMemSyncDomainMap + Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. + See CUlaunchMemSyncDomainMap. + + + memSyncDomain : CUlaunchMemSyncDomain + Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN. + See::CUlaunchMemSyncDomain + + + preferredClusterDim : anon_struct4 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + CUlaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + CUlaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + CUlaunchAttributeValue::clusterDim. + + + deviceUpdatableKernelNode : anon_struct5 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE. with the + following fields: - `int` deviceUpdatable - Whether or not the + resulting kernel node should be device-updatable. - + `CUgraphDeviceNode` devNode - Returns a handle to pass to the + various device-side update functions. + + + sharedMemCarveout : unsigned int + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT. + + + nvlinkUtilCentricScheduling : unsigned int + + + + portableClusterSizeMode : CUlaunchAttributePortableClusterMode + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PORTABLE_CLUSTER_SIZE_MODE. + + + sharedMemoryMode : CUsharedMemoryMode + Value of launch attribute CU_LAUNCH_ATTRIBUTE_SHARED_MEMORY_MODE. + See CUsharedMemoryMode for acceptable values. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUexecAffinitySmCount_v1(CUexecAffinitySmCount_st): + """ + Value for CU_EXEC_AFFINITY_TYPE_SM_COUNT + + Attributes + ---------- + + val : unsigned int + The number of SMs the context is limited to use. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUexecAffinitySmCount(CUexecAffinitySmCount_v1): + """ + Value for CU_EXEC_AFFINITY_TYPE_SM_COUNT + + Attributes + ---------- + + val : unsigned int + The number of SMs the context is limited to use. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUexecAffinityParam_v1(CUexecAffinityParam_st): + """ + Execution Affinity Parameters + + Attributes + ---------- + + type : CUexecAffinityType + Type of execution affinity. + + + param : anon_union4 + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUexecAffinityParam(CUexecAffinityParam_v1): + """ + Execution Affinity Parameters + + Attributes + ---------- + + type : CUexecAffinityType + Type of execution affinity. + + + param : anon_union4 + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUctxCigParam(CUctxCigParam_st): + """ + CIG Context Create Params + + Attributes + ---------- + + sharedDataType : CUcigDataType + Type of shared data from graphics client (D3D12 or Vulkan). + + + sharedData : Any + Graphics client data handle (ID3D12CommandQueue or Nvidia specific + data blob). + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUctxCreateParams(CUctxCreateParams_st): + """ + Params for creating CUDA context. Both execAffinityParams and + cigParams cannot be non-NULL at the same time. If both are NULL, + the context will be created as a regular CUDA context. + + Attributes + ---------- + + execAffinityParams : CUexecAffinityParam + Array of execution affinity parameters to limit context resources + (e.g., SM count). Only supported Volta+ MPS. Mutually exclusive + with cigParams. + + + numExecAffinityParams : int + Number of elements in execAffinityParams array. Must be 0 if + execAffinityParams is NULL. + + + cigParams : CUctxCigParam + CIG (CUDA in Graphics) parameters for sharing data from + D3D12/Vulkan graphics clients. Mutually exclusive with + execAffinityParams. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUstreamCigParam(CUstreamCigParam_st): + """ + CIG Stream Capture Params + + Attributes + ---------- + + streamSharedDataType : CUstreamCigDataType + Type of shared data from graphics client (D3D12). + + + streamSharedData : Any + Graphics client data handle + (ID3D12CommandList/ID3D12GraphicsCommandList). + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUstreamCigCaptureParams(CUstreamCigCaptureParams_st): + """ + Params for capturing CUDA stream to CIG streamCigParams must be + non-NULL. + + Attributes + ---------- + + streamCigParams : CUstreamCigParam + CIG (CUDA in Graphics) parameters for sharing command list data + from D3D12 graphics clients. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUlibraryHostUniversalFunctionAndDataTable(CUlibraryHostUniversalFunctionAndDataTable_st): + """ + Attributes + ---------- + + functionTable : Any + + + + functionWindowSize : size_t + + + + dataTable : Any + + + + dataWindowSize : size_t + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEMCPY2D_v2(CUDA_MEMCPY2D_st): + """ + 2D memory copy parameters + + Attributes + ---------- + + srcXInBytes : size_t + Source X in bytes + + + srcY : size_t + Source Y + + + srcMemoryType : CUmemorytype + Source memory type (host, device, array) + + + srcHost : Any + Source host pointer + + + srcDevice : CUdeviceptr + Source device pointer + + + srcArray : CUarray + Source array reference + + + srcPitch : size_t + Source pitch (ignored when src is array) + + + dstXInBytes : size_t + Destination X in bytes + + + dstY : size_t + Destination Y + + + dstMemoryType : CUmemorytype + Destination memory type (host, device, array) + + + dstHost : Any + Destination host pointer + + + dstDevice : CUdeviceptr + Destination device pointer + + + dstArray : CUarray + Destination array reference + + + dstPitch : size_t + Destination pitch (ignored when dst is array) + + + WidthInBytes : size_t + Width of 2D memory copy in bytes + + + Height : size_t + Height of 2D memory copy + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEMCPY2D(CUDA_MEMCPY2D_v2): + """ + 2D memory copy parameters + + Attributes + ---------- + + srcXInBytes : size_t + Source X in bytes + + + srcY : size_t + Source Y + + + srcMemoryType : CUmemorytype + Source memory type (host, device, array) + + + srcHost : Any + Source host pointer + + + srcDevice : CUdeviceptr + Source device pointer + + + srcArray : CUarray + Source array reference + + + srcPitch : size_t + Source pitch (ignored when src is array) + + + dstXInBytes : size_t + Destination X in bytes + + + dstY : size_t + Destination Y + + + dstMemoryType : CUmemorytype + Destination memory type (host, device, array) + + + dstHost : Any + Destination host pointer + + + dstDevice : CUdeviceptr + Destination device pointer + + + dstArray : CUarray + Destination array reference + + + dstPitch : size_t + Destination pitch (ignored when dst is array) + + + WidthInBytes : size_t + Width of 2D memory copy in bytes + + + Height : size_t + Height of 2D memory copy + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEMCPY3D_v2(CUDA_MEMCPY3D_st): + """ + 3D memory copy parameters + + Attributes + ---------- + + srcXInBytes : size_t + Source X in bytes + + + srcY : size_t + Source Y + + + srcZ : size_t + Source Z + + + srcLOD : size_t + Source LOD + + + srcMemoryType : CUmemorytype + Source memory type (host, device, array) + + + srcHost : Any + Source host pointer + + + srcDevice : CUdeviceptr + Source device pointer + + + srcArray : CUarray + Source array reference + + + srcPitch : size_t + Source pitch (ignored when src is array) + + + srcHeight : size_t + Source height (ignored when src is array; may be 0 if Depth==1) + + + dstXInBytes : size_t + Destination X in bytes + + + dstY : size_t + Destination Y + + + dstZ : size_t + Destination Z + + + dstLOD : size_t + Destination LOD + + + dstMemoryType : CUmemorytype + Destination memory type (host, device, array) + + + dstHost : Any + Destination host pointer + + + dstDevice : CUdeviceptr + Destination device pointer + + + dstArray : CUarray + Destination array reference + + + dstPitch : size_t + Destination pitch (ignored when dst is array) + + + dstHeight : size_t + Destination height (ignored when dst is array; may be 0 if + Depth==1) + + + WidthInBytes : size_t + Width of 3D memory copy in bytes + + + Height : size_t + Height of 3D memory copy + + + Depth : size_t + Depth of 3D memory copy + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEMCPY3D(CUDA_MEMCPY3D_v2): + """ + 3D memory copy parameters + + Attributes + ---------- + + srcXInBytes : size_t + Source X in bytes + + + srcY : size_t + Source Y + + + srcZ : size_t + Source Z + + + srcLOD : size_t + Source LOD + + + srcMemoryType : CUmemorytype + Source memory type (host, device, array) + + + srcHost : Any + Source host pointer + + + srcDevice : CUdeviceptr + Source device pointer + + + srcArray : CUarray + Source array reference + + + srcPitch : size_t + Source pitch (ignored when src is array) + + + srcHeight : size_t + Source height (ignored when src is array; may be 0 if Depth==1) + + + dstXInBytes : size_t + Destination X in bytes + + + dstY : size_t + Destination Y + + + dstZ : size_t + Destination Z + + + dstLOD : size_t + Destination LOD + + + dstMemoryType : CUmemorytype + Destination memory type (host, device, array) + + + dstHost : Any + Destination host pointer + + + dstDevice : CUdeviceptr + Destination device pointer + + + dstArray : CUarray + Destination array reference + + + dstPitch : size_t + Destination pitch (ignored when dst is array) + + + dstHeight : size_t + Destination height (ignored when dst is array; may be 0 if + Depth==1) + + + WidthInBytes : size_t + Width of 3D memory copy in bytes + + + Height : size_t + Height of 3D memory copy + + + Depth : size_t + Depth of 3D memory copy + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEMCPY3D_PEER_v1(CUDA_MEMCPY3D_PEER_st): + """ + 3D memory cross-context copy parameters + + Attributes + ---------- + + srcXInBytes : size_t + Source X in bytes + + + srcY : size_t + Source Y + + + srcZ : size_t + Source Z + + + srcLOD : size_t + Source LOD + + + srcMemoryType : CUmemorytype + Source memory type (host, device, array) + + + srcHost : Any + Source host pointer + + + srcDevice : CUdeviceptr + Source device pointer + + + srcArray : CUarray + Source array reference + + + srcContext : CUcontext + Source context (ignored with srcMemoryType is CU_MEMORYTYPE_ARRAY) + + + srcPitch : size_t + Source pitch (ignored when src is array) + + + srcHeight : size_t + Source height (ignored when src is array; may be 0 if Depth==1) + + + dstXInBytes : size_t + Destination X in bytes + + + dstY : size_t + Destination Y + + + dstZ : size_t + Destination Z + + + dstLOD : size_t + Destination LOD + + + dstMemoryType : CUmemorytype + Destination memory type (host, device, array) + + + dstHost : Any + Destination host pointer + + + dstDevice : CUdeviceptr + Destination device pointer + + + dstArray : CUarray + Destination array reference + + + dstContext : CUcontext + Destination context (ignored with dstMemoryType is + CU_MEMORYTYPE_ARRAY) + + + dstPitch : size_t + Destination pitch (ignored when dst is array) + + + dstHeight : size_t + Destination height (ignored when dst is array; may be 0 if + Depth==1) + + + WidthInBytes : size_t + Width of 3D memory copy in bytes + + + Height : size_t + Height of 3D memory copy + + + Depth : size_t + Depth of 3D memory copy + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEMCPY3D_PEER(CUDA_MEMCPY3D_PEER_v1): + """ + 3D memory cross-context copy parameters + + Attributes + ---------- + + srcXInBytes : size_t + Source X in bytes + + + srcY : size_t + Source Y + + + srcZ : size_t + Source Z + + + srcLOD : size_t + Source LOD + + + srcMemoryType : CUmemorytype + Source memory type (host, device, array) + + + srcHost : Any + Source host pointer + + + srcDevice : CUdeviceptr + Source device pointer + + + srcArray : CUarray + Source array reference + + + srcContext : CUcontext + Source context (ignored with srcMemoryType is CU_MEMORYTYPE_ARRAY) + + + srcPitch : size_t + Source pitch (ignored when src is array) + + + srcHeight : size_t + Source height (ignored when src is array; may be 0 if Depth==1) + + + dstXInBytes : size_t + Destination X in bytes + + + dstY : size_t + Destination Y + + + dstZ : size_t + Destination Z + + + dstLOD : size_t + Destination LOD + + + dstMemoryType : CUmemorytype + Destination memory type (host, device, array) + + + dstHost : Any + Destination host pointer + + + dstDevice : CUdeviceptr + Destination device pointer + + + dstArray : CUarray + Destination array reference + + + dstContext : CUcontext + Destination context (ignored with dstMemoryType is + CU_MEMORYTYPE_ARRAY) + + + dstPitch : size_t + Destination pitch (ignored when dst is array) + + + dstHeight : size_t + Destination height (ignored when dst is array; may be 0 if + Depth==1) + + + WidthInBytes : size_t + Width of 3D memory copy in bytes + + + Height : size_t + Height of 3D memory copy + + + Depth : size_t + Depth of 3D memory copy + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEMCPY_NODE_PARAMS(CUDA_MEMCPY_NODE_PARAMS_st): + """ + Memcpy node parameters + + Attributes + ---------- + + flags : int + Must be zero + + + copyCtx : CUcontext + Context on which to run the node + + + copyParams : CUDA_MEMCPY3D + Parameters for the memory copy + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_ARRAY_DESCRIPTOR_v2(CUDA_ARRAY_DESCRIPTOR_st): + """ + Array descriptor + + Attributes + ---------- + + Width : size_t + Width of array + + + Height : size_t + Height of array + + + Format : CUarray_format + Array format + + + NumChannels : unsigned int + Channels per array element + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_ARRAY_DESCRIPTOR(CUDA_ARRAY_DESCRIPTOR_v2): + """ + Array descriptor + + Attributes + ---------- + + Width : size_t + Width of array + + + Height : size_t + Height of array + + + Format : CUarray_format + Array format + + + NumChannels : unsigned int + Channels per array element + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_ARRAY3D_DESCRIPTOR_v2(CUDA_ARRAY3D_DESCRIPTOR_st): + """ + 3D array descriptor + + Attributes + ---------- + + Width : size_t + Width of 3D array + + + Height : size_t + Height of 3D array + + + Depth : size_t + Depth of 3D array + + + Format : CUarray_format + Array format + + + NumChannels : unsigned int + Channels per array element + + + Flags : unsigned int + Flags + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_ARRAY3D_DESCRIPTOR(CUDA_ARRAY3D_DESCRIPTOR_v2): + """ + 3D array descriptor + + Attributes + ---------- + + Width : size_t + Width of 3D array + + + Height : size_t + Height of 3D array + + + Depth : size_t + Depth of 3D array + + + Format : CUarray_format + Array format + + + NumChannels : unsigned int + Channels per array element + + + Flags : unsigned int + Flags + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_ARRAY_SPARSE_PROPERTIES_v1(CUDA_ARRAY_SPARSE_PROPERTIES_st): + """ + CUDA array sparse properties + + Attributes + ---------- + + tileExtent : anon_struct6 + + + + miptailFirstLevel : unsigned int + First mip level at which the mip tail begins. + + + miptailSize : unsigned long long + Total size of the mip tail. + + + flags : unsigned int + Flags will either be zero or + CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_ARRAY_SPARSE_PROPERTIES(CUDA_ARRAY_SPARSE_PROPERTIES_v1): + """ + CUDA array sparse properties + + Attributes + ---------- + + tileExtent : anon_struct6 + + + + miptailFirstLevel : unsigned int + First mip level at which the mip tail begins. + + + miptailSize : unsigned long long + Total size of the mip tail. + + + flags : unsigned int + Flags will either be zero or + CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_ARRAY_MEMORY_REQUIREMENTS_v1(CUDA_ARRAY_MEMORY_REQUIREMENTS_st): + """ + CUDA array memory requirements + + Attributes + ---------- + + size : size_t + Total required memory size + + + alignment : size_t + alignment requirement + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_ARRAY_MEMORY_REQUIREMENTS(CUDA_ARRAY_MEMORY_REQUIREMENTS_v1): + """ + CUDA array memory requirements + + Attributes + ---------- + + size : size_t + Total required memory size + + + alignment : size_t + alignment requirement + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_RESOURCE_DESC_v1(CUDA_RESOURCE_DESC_st): + """ + CUDA Resource descriptor + + Attributes + ---------- + + resType : CUresourcetype + Resource type + + + res : anon_union5 + + + + flags : unsigned int + Flags (must be zero) + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_RESOURCE_DESC(CUDA_RESOURCE_DESC_v1): + """ + CUDA Resource descriptor + + Attributes + ---------- + + resType : CUresourcetype + Resource type + + + res : anon_union5 + + + + flags : unsigned int + Flags (must be zero) + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_TEXTURE_DESC_v1(CUDA_TEXTURE_DESC_st): + """ + Texture descriptor + + Attributes + ---------- + + addressMode : list[CUaddress_mode] + Address modes + + + filterMode : CUfilter_mode + Filter mode + + + flags : unsigned int + Flags + + + maxAnisotropy : unsigned int + Maximum anisotropy ratio + + + mipmapFilterMode : CUfilter_mode + Mipmap filter mode + + + mipmapLevelBias : float + Mipmap level bias + + + minMipmapLevelClamp : float + Mipmap minimum level clamp + + + maxMipmapLevelClamp : float + Mipmap maximum level clamp + + + borderColor : list[float] + Border Color + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_TEXTURE_DESC(CUDA_TEXTURE_DESC_v1): + """ + Texture descriptor + + Attributes + ---------- + + addressMode : list[CUaddress_mode] + Address modes + + + filterMode : CUfilter_mode + Filter mode + + + flags : unsigned int + Flags + + + maxAnisotropy : unsigned int + Maximum anisotropy ratio + + + mipmapFilterMode : CUfilter_mode + Mipmap filter mode + + + mipmapLevelBias : float + Mipmap level bias + + + minMipmapLevelClamp : float + Mipmap minimum level clamp + + + maxMipmapLevelClamp : float + Mipmap maximum level clamp + + + borderColor : list[float] + Border Color + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_RESOURCE_VIEW_DESC_v1(CUDA_RESOURCE_VIEW_DESC_st): + """ + Resource view descriptor + + Attributes + ---------- + + format : CUresourceViewFormat + Resource view format + + + width : size_t + Width of the resource view + + + height : size_t + Height of the resource view + + + depth : size_t + Depth of the resource view + + + firstMipmapLevel : unsigned int + First defined mipmap level + + + lastMipmapLevel : unsigned int + Last defined mipmap level + + + firstLayer : unsigned int + First layer index + + + lastLayer : unsigned int + Last layer index + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_RESOURCE_VIEW_DESC(CUDA_RESOURCE_VIEW_DESC_v1): + """ + Resource view descriptor + + Attributes + ---------- + + format : CUresourceViewFormat + Resource view format + + + width : size_t + Width of the resource view + + + height : size_t + Height of the resource view + + + depth : size_t + Depth of the resource view + + + firstMipmapLevel : unsigned int + First defined mipmap level + + + lastMipmapLevel : unsigned int + Last defined mipmap level + + + firstLayer : unsigned int + First layer index + + + lastLayer : unsigned int + Last layer index + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUtensorMap(CUtensorMap_st): + """ + Tensor map descriptor. Requires compiler support for aligning to + 128 bytes. + + Attributes + ---------- + + opaque : list[cuuint64_t] + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1(CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st): + """ + GPU Direct v3 tokens + + Attributes + ---------- + + p2pToken : unsigned long long + + + + vaSpaceToken : unsigned int + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_POINTER_ATTRIBUTE_P2P_TOKENS(CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1): + """ + GPU Direct v3 tokens + + Attributes + ---------- + + p2pToken : unsigned long long + + + + vaSpaceToken : unsigned int + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_LAUNCH_PARAMS_v1(CUDA_LAUNCH_PARAMS_st): + """ + Kernel launch parameters + + Attributes + ---------- + + function : CUfunction + Kernel to launch + + + gridDimX : unsigned int + Width of grid in blocks + + + gridDimY : unsigned int + Height of grid in blocks + + + gridDimZ : unsigned int + Depth of grid in blocks + + + blockDimX : unsigned int + X dimension of each thread block + + + blockDimY : unsigned int + Y dimension of each thread block + + + blockDimZ : unsigned int + Z dimension of each thread block + + + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + + + hStream : CUstream + Stream identifier + + + kernelParams : Any + Array of pointers to kernel parameters + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_LAUNCH_PARAMS(CUDA_LAUNCH_PARAMS_v1): + """ + Kernel launch parameters + + Attributes + ---------- + + function : CUfunction + Kernel to launch + + + gridDimX : unsigned int + Width of grid in blocks + + + gridDimY : unsigned int + Height of grid in blocks + + + gridDimZ : unsigned int + Depth of grid in blocks + + + blockDimX : unsigned int + X dimension of each thread block + + + blockDimY : unsigned int + Y dimension of each thread block + + + blockDimZ : unsigned int + Z dimension of each thread block + + + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + + + hStream : CUstream + Stream identifier + + + kernelParams : Any + Array of pointers to kernel parameters + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st): + """ + External memory handle descriptor + + Attributes + ---------- + + type : CUexternalMemoryHandleType + Type of the handle + + + handle : anon_union6 + + + + size : unsigned long long + Size of the memory allocation + + + flags : unsigned int + Flags must either be zero or CUDA_EXTERNAL_MEMORY_DEDICATED + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1): + """ + External memory handle descriptor + + Attributes + ---------- + + type : CUexternalMemoryHandleType + Type of the handle + + + handle : anon_union6 + + + + size : unsigned long long + Size of the memory allocation + + + flags : unsigned int + Flags must either be zero or CUDA_EXTERNAL_MEMORY_DEDICATED + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1(CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st): + """ + External memory buffer descriptor + + Attributes + ---------- + + offset : unsigned long long + Offset into the memory object where the buffer's base is + + + size : unsigned long long + Size of the buffer + + + flags : unsigned int + Flags reserved for future use. Must be zero. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXTERNAL_MEMORY_BUFFER_DESC(CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1): + """ + External memory buffer descriptor + + Attributes + ---------- + + offset : unsigned long long + Offset into the memory object where the buffer's base is + + + size : unsigned long long + Size of the buffer + + + flags : unsigned int + Flags reserved for future use. Must be zero. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1(CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st): + """ + External memory mipmap descriptor + + Attributes + ---------- + + offset : unsigned long long + Offset into the memory object where the base level of the mipmap + chain is. + + + arrayDesc : CUDA_ARRAY3D_DESCRIPTOR + Format, dimension and type of base level of the mipmap chain + + + numLevels : unsigned int + Total number of levels in the mipmap chain + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC(CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1): + """ + External memory mipmap descriptor + + Attributes + ---------- + + offset : unsigned long long + Offset into the memory object where the base level of the mipmap + chain is. + + + arrayDesc : CUDA_ARRAY3D_DESCRIPTOR + Format, dimension and type of base level of the mipmap chain + + + numLevels : unsigned int + Total number of levels in the mipmap chain + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st): + """ + External semaphore handle descriptor + + Attributes + ---------- + + type : CUexternalSemaphoreHandleType + Type of the handle + + + handle : anon_union7 + + + + flags : unsigned int + Flags reserved for the future. Must be zero. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1): + """ + External semaphore handle descriptor + + Attributes + ---------- + + type : CUexternalSemaphoreHandleType + Type of the handle + + + handle : anon_union7 + + + + flags : unsigned int + Flags reserved for the future. Must be zero. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st): + """ + External semaphore signal parameters + + Attributes + ---------- + + params : anon_struct16 + + + + flags : unsigned int + Only when CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS is used to signal a + CUexternalSemaphore of type + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is + CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC which + indicates that while signaling the CUexternalSemaphore, no memory + synchronization operations should be performed for any external + memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. + For all other types of CUexternalSemaphore, flags must be zero. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1): + """ + External semaphore signal parameters + + Attributes + ---------- + + params : anon_struct16 + + + + flags : unsigned int + Only when CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS is used to signal a + CUexternalSemaphore of type + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is + CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC which + indicates that while signaling the CUexternalSemaphore, no memory + synchronization operations should be performed for any external + memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. + For all other types of CUexternalSemaphore, flags must be zero. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st): + """ + External semaphore wait parameters + + Attributes + ---------- + + params : anon_struct19 + + + + flags : unsigned int + Only when CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS is used to wait on a + CUexternalSemaphore of type + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is + CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC which indicates + that while waiting for the CUexternalSemaphore, no memory + synchronization operations should be performed for any external + memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. + For all other types of CUexternalSemaphore, flags must be zero. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1): + """ + External semaphore wait parameters + + Attributes + ---------- + + params : anon_struct19 + + + + flags : unsigned int + Only when CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS is used to wait on a + CUexternalSemaphore of type + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is + CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC which indicates + that while waiting for the CUexternalSemaphore, no memory + synchronization operations should be performed for any external + memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. + For all other types of CUexternalSemaphore, flags must be zero. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1(CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st): + """ + Semaphore signal node parameters + + Attributes + ---------- + + extSemArray : CUexternalSemaphore + Array of external semaphore handles. + + + paramsArray : CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS + Array of external semaphore signal parameters. + + + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS(CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1): + """ + Semaphore signal node parameters + + Attributes + ---------- + + extSemArray : CUexternalSemaphore + Array of external semaphore handles. + + + paramsArray : CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS + Array of external semaphore signal parameters. + + + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2(CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st): + """ + Semaphore signal node parameters + + Attributes + ---------- + + extSemArray : CUexternalSemaphore + Array of external semaphore handles. + + + paramsArray : CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS + Array of external semaphore signal parameters. + + + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + + ctx : CUcontext + + + + gCtx : CUgreenCtx + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1(CUDA_EXT_SEM_WAIT_NODE_PARAMS_st): + """ + Semaphore wait node parameters + + Attributes + ---------- + + extSemArray : CUexternalSemaphore + Array of external semaphore handles. + + + paramsArray : CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS + Array of external semaphore wait parameters. + + + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS(CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1): + """ + Semaphore wait node parameters + + Attributes + ---------- + + extSemArray : CUexternalSemaphore + Array of external semaphore handles. + + + paramsArray : CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS + Array of external semaphore wait parameters. + + + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2(CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st): + """ + Semaphore wait node parameters + + Attributes + ---------- + + extSemArray : CUexternalSemaphore + Array of external semaphore handles. + + + paramsArray : CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS + Array of external semaphore wait parameters. + + + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + + ctx : CUcontext + + + + gCtx : CUgreenCtx + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemGenericAllocationHandle: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUmemGenericAllocationHandle _pvt_val + cdef cydriver.CUmemGenericAllocationHandle* _pvt_ptr + +cdef class CUarrayMapInfo_v1(CUarrayMapInfo_st): + """ + Specifies the CUDA array or CUDA mipmapped array memory mapping + information + + Attributes + ---------- + + resourceType : CUresourcetype + Resource type + + + resource : anon_union12 + + + + subresourceType : CUarraySparseSubresourceType + Sparse subresource type + + + subresource : anon_union13 + + + + memOperationType : CUmemOperationType + Memory operation type + + + memHandleType : CUmemHandleType + Memory handle type + + + memHandle : anon_union14 + + + + offset : unsigned long long + Offset within mip tail Offset within the memory + + + deviceBitMask : unsigned int + Device ordinal bit mask + + + flags : unsigned int + flags for future use, must be zero now. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUarrayMapInfo(CUarrayMapInfo_v1): + """ + Specifies the CUDA array or CUDA mipmapped array memory mapping + information + + Attributes + ---------- + + resourceType : CUresourcetype + Resource type + + + resource : anon_union12 + + + + subresourceType : CUarraySparseSubresourceType + Sparse subresource type + + + subresource : anon_union13 + + + + memOperationType : CUmemOperationType + Memory operation type + + + memHandleType : CUmemHandleType + Memory handle type + + + memHandle : anon_union14 + + + + offset : unsigned long long + Offset within mip tail Offset within the memory + + + deviceBitMask : unsigned int + Device ordinal bit mask + + + flags : unsigned int + flags for future use, must be zero now. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemLocation_v1(CUmemLocation_st): + """ + Specifies a memory location. + + Attributes + ---------- + + type : CUmemLocationType + Specifies the location type, which modifies the meaning of id. + + + id : int + Identifier for CUmemLocationType::CU_MEM_LOCATION_TYPE_DEVICE, + CUmemLocationType::CU_MEM_LOCATION_TYPE_HOST, + CUmemLocationType::CU_MEM_LOCATION_TYPE_HOST_NUMA. + + + localized : anon_struct22 + Identifier for + CUmemLocationType::CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemLocation(CUmemLocation_v1): + """ + Specifies a memory location. + + Attributes + ---------- + + type : CUmemLocationType + Specifies the location type, which modifies the meaning of id. + + + id : int + Identifier for CUmemLocationType::CU_MEM_LOCATION_TYPE_DEVICE, + CUmemLocationType::CU_MEM_LOCATION_TYPE_HOST, + CUmemLocationType::CU_MEM_LOCATION_TYPE_HOST_NUMA. + + + localized : anon_struct22 + Identifier for + CUmemLocationType::CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemAllocationProp_v1(CUmemAllocationProp_st): + """ + Specifies the allocation properties for a allocation. + + Attributes + ---------- + + type : CUmemAllocationType + Allocation type + + + requestedHandleTypes : CUmemAllocationHandleType + requested CUmemAllocationHandleType + + + location : CUmemLocation + Location of allocation + + + win32HandleMetaData : Any + Windows-specific POBJECT_ATTRIBUTES required when + CU_MEM_HANDLE_TYPE_WIN32 is specified. This object attributes + structure includes security attributes that define the scope of + which exported allocations may be transferred to other processes. + In all other cases, this field is required to be zero. + + + allocFlags : anon_struct23 + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemAllocationProp(CUmemAllocationProp_v1): + """ + Specifies the allocation properties for a allocation. + + Attributes + ---------- + + type : CUmemAllocationType + Allocation type + + + requestedHandleTypes : CUmemAllocationHandleType + requested CUmemAllocationHandleType + + + location : CUmemLocation + Location of allocation + + + win32HandleMetaData : Any + Windows-specific POBJECT_ATTRIBUTES required when + CU_MEM_HANDLE_TYPE_WIN32 is specified. This object attributes + structure includes security attributes that define the scope of + which exported allocations may be transferred to other processes. + In all other cases, this field is required to be zero. + + + allocFlags : anon_struct23 + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmulticastObjectProp_v1(CUmulticastObjectProp_st): + """ + Specifies the properties for a multicast object. + + Attributes + ---------- + + numDevices : unsigned int + The number of devices in the multicast team that will bind memory + to this object + + + size : size_t + The maximum amount of memory that can be bound to this multicast + object per device + + + handleTypes : unsigned long long + Bitmask of exportable handle types (see CUmemAllocationHandleType) + for this object + + + flags : unsigned long long + Flags for future use, must be zero now + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmulticastObjectProp(CUmulticastObjectProp_v1): + """ + Specifies the properties for a multicast object. + + Attributes + ---------- + + numDevices : unsigned int + The number of devices in the multicast team that will bind memory + to this object + + + size : size_t + The maximum amount of memory that can be bound to this multicast + object per device + + + handleTypes : unsigned long long + Bitmask of exportable handle types (see CUmemAllocationHandleType) + for this object + + + flags : unsigned long long + Flags for future use, must be zero now + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemAccessDesc_v1(CUmemAccessDesc_st): + """ + Memory access descriptor + + Attributes + ---------- + + location : CUmemLocation + Location on which the request is to change it's accessibility + + + flags : CUmemAccess_flags + ::CUmemProt accessibility flags to set on the request + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemAccessDesc(CUmemAccessDesc_v1): + """ + Memory access descriptor + + Attributes + ---------- + + location : CUmemLocation + Location on which the request is to change it's accessibility + + + flags : CUmemAccess_flags + ::CUmemProt accessibility flags to set on the request + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUgraphExecUpdateResultInfo_v1(CUgraphExecUpdateResultInfo_st): + """ + Result information returned by cuGraphExecUpdate + + Attributes + ---------- + + result : CUgraphExecUpdateResult + Gives more specific detail when a cuda graph update fails. + + + errorNode : CUgraphNode + The "to node" of the error edge when the topologies do not match. + The error node when the error is associated with a specific node. + NULL when the error is generic. + + + errorFromNode : CUgraphNode + The from node of error edge when the topologies do not match. + Otherwise NULL. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUgraphExecUpdateResultInfo(CUgraphExecUpdateResultInfo_v1): + """ + Result information returned by cuGraphExecUpdate + + Attributes + ---------- + + result : CUgraphExecUpdateResult + Gives more specific detail when a cuda graph update fails. + + + errorNode : CUgraphNode + The "to node" of the error edge when the topologies do not match. + The error node when the error is associated with a specific node. + NULL when the error is generic. + + + errorFromNode : CUgraphNode + The from node of error edge when the topologies do not match. + Otherwise NULL. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemPoolProps_v1(CUmemPoolProps_st): + """ + Specifies the properties of allocations made from the pool. + + Attributes + ---------- + + allocType : CUmemAllocationType + Allocation type. Currently must be specified as + CU_MEM_ALLOCATION_TYPE_PINNED + + + handleTypes : CUmemAllocationHandleType + Handle types that will be supported by allocations from the pool. + + + location : CUmemLocation + Location where allocations should reside. + + + win32SecurityAttributes : Any + Windows-specific LPSECURITYATTRIBUTES required when + CU_MEM_HANDLE_TYPE_WIN32 is specified. This security attribute + defines the scope of which exported allocations may be transferred + to other processes. In all other cases, this field is required to + be zero. + + + maxSize : size_t + Maximum pool size. When set to 0, defaults to a system dependent + value. + + + usage : unsigned short + Bitmask indicating intended usage for the pool. + + + gpuDirectRDMACapable : bytes + Allocation hint for requesting GPUDirect RDMA capable memory. On + devices that support GPUDirect RDMA, this flag indicates that the + memory will be used for GPUDirect RDMA. On platforms where the + default RDMA path does not support localized allocations, this flag + has the following effects: - For MPS clients using MLOPart/locality + domains, this flag has the effect of disabling localization for the + pool. This allows the pool to be used for GPUDirect RDMA with the + default RDMA path. - For pools that are localized using CUDA + locality domain APIs, using this flag will have no effect, but + attempting to export the localized memory without forcing PCIe will + return an error. To use GPUDirect RDMA with localized pools on + platforms where the default RDMA path does not support localized + allocations, handles must be acquired with the flag + CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE. Note that CUDA memory + pools are only compatible with dma_buf mappings. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemPoolProps(CUmemPoolProps_v1): + """ + Specifies the properties of allocations made from the pool. + + Attributes + ---------- + + allocType : CUmemAllocationType + Allocation type. Currently must be specified as + CU_MEM_ALLOCATION_TYPE_PINNED + + + handleTypes : CUmemAllocationHandleType + Handle types that will be supported by allocations from the pool. + + + location : CUmemLocation + Location where allocations should reside. + + + win32SecurityAttributes : Any + Windows-specific LPSECURITYATTRIBUTES required when + CU_MEM_HANDLE_TYPE_WIN32 is specified. This security attribute + defines the scope of which exported allocations may be transferred + to other processes. In all other cases, this field is required to + be zero. + + + maxSize : size_t + Maximum pool size. When set to 0, defaults to a system dependent + value. + + + usage : unsigned short + Bitmask indicating intended usage for the pool. + + + gpuDirectRDMACapable : bytes + Allocation hint for requesting GPUDirect RDMA capable memory. On + devices that support GPUDirect RDMA, this flag indicates that the + memory will be used for GPUDirect RDMA. On platforms where the + default RDMA path does not support localized allocations, this flag + has the following effects: - For MPS clients using MLOPart/locality + domains, this flag has the effect of disabling localization for the + pool. This allows the pool to be used for GPUDirect RDMA with the + default RDMA path. - For pools that are localized using CUDA + locality domain APIs, using this flag will have no effect, but + attempting to export the localized memory without forcing PCIe will + return an error. To use GPUDirect RDMA with localized pools on + platforms where the default RDMA path does not support localized + allocations, handles must be acquired with the flag + CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE. Note that CUDA memory + pools are only compatible with dma_buf mappings. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemPoolPtrExportData_v1(CUmemPoolPtrExportData_st): + """ + Opaque data for exporting a pool allocation + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemPoolPtrExportData(CUmemPoolPtrExportData_v1): + """ + Opaque data for exporting a pool allocation + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemcpyAttributes_v1(CUmemcpyAttributes_st): + """ + Attributes specific to copies within a batch. For more details on + usage see cuMemcpyBatchAsync. + + Attributes + ---------- + + srcAccessOrder : CUmemcpySrcAccessOrder + Source access ordering to be observed for copies with this + attribute. + + + srcLocHint : CUmemLocation + Hint location for the source operand. Ignored when the pointers are + not managed memory or memory allocated outside CUDA. + + + dstLocHint : CUmemLocation + Hint location for the destination operand. Ignored when the + pointers are not managed memory or memory allocated outside CUDA. + + + flags : unsigned int + Additional flags for copies with this attribute. See CUmemcpyFlags + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemcpyAttributes(CUmemcpyAttributes_v1): + """ + Attributes specific to copies within a batch. For more details on + usage see cuMemcpyBatchAsync. + + Attributes + ---------- + + srcAccessOrder : CUmemcpySrcAccessOrder + Source access ordering to be observed for copies with this + attribute. + + + srcLocHint : CUmemLocation + Hint location for the source operand. Ignored when the pointers are + not managed memory or memory allocated outside CUDA. + + + dstLocHint : CUmemLocation + Hint location for the destination operand. Ignored when the + pointers are not managed memory or memory allocated outside CUDA. + + + flags : unsigned int + Additional flags for copies with this attribute. See CUmemcpyFlags + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUoffset3D_v1(CUoffset3D_st): + """ + Struct representing a 3D offset + + Attributes + ---------- + + x : size_t + + + + y : size_t + + + + z : size_t + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUoffset3D(CUoffset3D_v1): + """ + Struct representing a 3D offset + + Attributes + ---------- + + x : size_t + + + + y : size_t + + + + z : size_t + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUextent3D_v1(CUextent3D_st): + """ + Struct representing width/height/depth of a CUarray in elements + + Attributes + ---------- + + width : size_t + + + + height : size_t + + + + depth : size_t + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUextent3D(CUextent3D_v1): + """ + Struct representing width/height/depth of a CUarray in elements + + Attributes + ---------- + + width : size_t + + + + height : size_t + + + + depth : size_t + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemcpy3DOperand_v1(CUmemcpy3DOperand_st): + """ + Struct representing an operand for copy with cuMemcpy3DBatchAsync + + Attributes + ---------- + + type : CUmemcpy3DOperandType + + + + op : anon_union16 + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemcpy3DOperand(CUmemcpy3DOperand_v1): + """ + Struct representing an operand for copy with cuMemcpy3DBatchAsync + + Attributes + ---------- + + type : CUmemcpy3DOperandType + + + + op : anon_union16 + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEMCPY3D_BATCH_OP_v1(CUDA_MEMCPY3D_BATCH_OP_st): + """ + Attributes + ---------- + + src : CUmemcpy3DOperand + Source memcpy operand. + + + dst : CUmemcpy3DOperand + Destination memcpy operand. + + + extent : CUextent3D + Extents of the memcpy between src and dst. The width, height and + depth components must not be 0. + + + srcAccessOrder : CUmemcpySrcAccessOrder + Source access ordering to be observed for copy from src to dst. + + + flags : unsigned int + Additional flags for copies with this attribute. See CUmemcpyFlags + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEMCPY3D_BATCH_OP(CUDA_MEMCPY3D_BATCH_OP_v1): + """ + Attributes + ---------- + + src : CUmemcpy3DOperand + Source memcpy operand. + + + dst : CUmemcpy3DOperand + Destination memcpy operand. + + + extent : CUextent3D + Extents of the memcpy between src and dst. The width, height and + depth components must not be 0. + + + srcAccessOrder : CUmemcpySrcAccessOrder + Source access ordering to be observed for copy from src to dst. + + + flags : unsigned int + Additional flags for copies with this attribute. See CUmemcpyFlags + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEM_ALLOC_NODE_PARAMS_v1(CUDA_MEM_ALLOC_NODE_PARAMS_v1_st): + """ + Memory allocation node parameters + + Attributes + ---------- + + poolProps : CUmemPoolProps + in: location where the allocation should reside (specified in + ::location). ::handleTypes must be CU_MEM_HANDLE_TYPE_NONE. IPC is + not supported. + + + accessDescs : CUmemAccessDesc + in: array of memory access descriptors. Used to describe peer GPU + access + + + accessDescCount : size_t + in: number of memory access descriptors. Must not exceed the number + of GPUs. + + + bytesize : size_t + in: size in bytes of the requested allocation + + + dptr : CUdeviceptr + out: address of the allocation returned by CUDA + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEM_ALLOC_NODE_PARAMS(CUDA_MEM_ALLOC_NODE_PARAMS_v1): + """ + Memory allocation node parameters + + Attributes + ---------- + + poolProps : CUmemPoolProps + in: location where the allocation should reside (specified in + ::location). ::handleTypes must be CU_MEM_HANDLE_TYPE_NONE. IPC is + not supported. + + + accessDescs : CUmemAccessDesc + in: array of memory access descriptors. Used to describe peer GPU + access + + + accessDescCount : size_t + in: number of memory access descriptors. Must not exceed the number + of GPUs. + + + bytesize : size_t + in: size in bytes of the requested allocation + + + dptr : CUdeviceptr + out: address of the allocation returned by CUDA + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEM_ALLOC_NODE_PARAMS_v2(CUDA_MEM_ALLOC_NODE_PARAMS_v2_st): + """ + Memory allocation node parameters + + Attributes + ---------- + + poolProps : CUmemPoolProps + in: location where the allocation should reside (specified in + ::location). ::handleTypes must be CU_MEM_HANDLE_TYPE_NONE. IPC is + not supported. + + + accessDescs : CUmemAccessDesc + in: array of memory access descriptors. Used to describe peer GPU + access + + + accessDescCount : size_t + in: number of memory access descriptors. Must not exceed the number + of GPUs. + + + bytesize : size_t + in: size in bytes of the requested allocation + + + dptr : CUdeviceptr + out: address of the allocation returned by CUDA + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEM_FREE_NODE_PARAMS(CUDA_MEM_FREE_NODE_PARAMS_st): + """ + Memory free node parameters + + Attributes + ---------- + + dptr : CUdeviceptr + in: the pointer to free + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_CHILD_GRAPH_NODE_PARAMS(CUDA_CHILD_GRAPH_NODE_PARAMS_st): + """ + Child graph node parameters + + Attributes + ---------- + + graph : CUgraph + The child graph to clone into the node for node creation, or a + handle to the graph owned by the node for node query. The graph + must not contain conditional nodes. Graphs containing memory + allocation or memory free nodes must set the ownership to be moved + to the parent. + + + ownership : CUgraphChildGraphNodeOwnership + The ownership relationship of the child graph node. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EVENT_RECORD_NODE_PARAMS(CUDA_EVENT_RECORD_NODE_PARAMS_st): + """ + Event record node parameters + + Attributes + ---------- + + event : CUevent + The event to record when the node executes + + + ctx : CUcontext + + + + gCtx : CUgreenCtx + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EVENT_WAIT_NODE_PARAMS(CUDA_EVENT_WAIT_NODE_PARAMS_st): + """ + Event wait node parameters + + Attributes + ---------- + + event : CUevent + The event to wait on from the node + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUgraphNodeParams(CUgraphNodeParams_st): + """ + Graph node parameters. See cuGraphAddNode. + + Attributes + ---------- + + type : CUgraphNodeType + Type of the node + + + kernel : CUDA_KERNEL_NODE_PARAMS_v3 + Kernel node parameters. + + + memcpy : CUDA_MEMCPY_NODE_PARAMS + Memcpy node parameters. + + + memset : CUDA_MEMSET_NODE_PARAMS_v2 + Memset node parameters. + + + host : CUDA_HOST_NODE_PARAMS_v2 + Host node parameters. + + + graph : CUDA_CHILD_GRAPH_NODE_PARAMS + Child graph node parameters. + + + eventWait : CUDA_EVENT_WAIT_NODE_PARAMS + Event wait node parameters. + + + eventRecord : CUDA_EVENT_RECORD_NODE_PARAMS + Event record node parameters. + + + extSemSignal : CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2 + External semaphore signal node parameters. + + + extSemWait : CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2 + External semaphore wait node parameters. + + + alloc : CUDA_MEM_ALLOC_NODE_PARAMS_v2 + Memory allocation node parameters. + + + free : CUDA_MEM_FREE_NODE_PARAMS + Memory free node parameters. + + + memOp : CUDA_BATCH_MEM_OP_NODE_PARAMS_v2 + MemOp node parameters. + + + conditional : CUDA_CONDITIONAL_NODE_PARAMS + Conditional node parameters. + + + asBytes : bytes + Padding as bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUcheckpointCustomStoragePerDeviceData(CUcheckpointCustomStoragePerDeviceData_st): + """ + Per-GPU data for zero-copy mapped device memory used with CUDA + checkpoint/restore on custom storage + + Attributes + ---------- + + devPtr : CUdeviceptr + Zero-copy mapped device memory pointer for the user to copy to/from + + + size : size_t + Size of mapped memory + + + stream : CUstream + Stream the user may use for the copy; the CUDA driver synchronizes + on this stream before completing checkpoint or restore + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUcheckpointCustomStorageInfo(CUcheckpointCustomStorageInfo_st): + """ + Output from CUDA custom storage checkpoint/restore: per-GPU device + pointers and a handle to complete the operation + + Attributes + ---------- + + handle : CUcheckpointOperationHandle + Handle returned that is needed to complete checkpoint or restore + + + perDeviceData : CUcheckpointCustomStoragePerDeviceData + Returned pointer to array of per-device data, one per device. User + should set to NULL + + + deviceCount : unsigned int + Number of devices (and elements in `perDeviceData` array) + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUcheckpointLockArgs(CUcheckpointLockArgs_st): + """ + CUDA checkpoint optional lock arguments + + Attributes + ---------- + + timeoutMs : unsigned int + Timeout in milliseconds to attempt to lock the process, 0 indicates + no timeout + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUcheckpointCheckpointArgs(CUcheckpointCheckpointArgs_st): + """ + CUDA checkpoint optional checkpoint arguments + + Attributes + ---------- + + customStorageInfo_out : CUcheckpointCustomStorageInfo + Optional custom storage; if NULL, GPU memory is checkpointed to + host + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUcheckpointGpuPair(CUcheckpointGpuPair_st): + """ + CUDA checkpoint GPU UUID pairs for device remapping during restore + + Attributes + ---------- + + oldUuid : CUuuid + UUID of the GPU that was checkpointed + + + newUuid : CUuuid + UUID of the GPU to restore onto + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUcheckpointRestoreArgs(CUcheckpointRestoreArgs_st): + """ + CUDA checkpoint optional restore arguments + + Attributes + ---------- + + gpuPairs : CUcheckpointGpuPair + Pointer to array of gpu pairs that indicate how to remap GPUs + during restore + + + gpuPairsCount : unsigned int + Number of gpu pairs to remap + + + customStorageInfo_out : CUcheckpointCustomStorageInfo + Optional custom storage; if NULL, GPU memory is restored from host + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUcheckpointUnlockArgs(CUcheckpointUnlockArgs_st): + """ + CUDA checkpoint optional unlock arguments + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemDecompressParams(CUmemDecompressParams_st): + """ + Structure describing the parameters that compose a single + decompression operation. + + Attributes + ---------- + + srcNumBytes : size_t + The number of bytes to be read and decompressed from + CUmemDecompressParams_st.src. + + + dstNumBytes : size_t + The number of bytes that the decompression operation will be + expected to write to CUmemDecompressParams_st.dst. This value is + optional; if present, it may be used by the CUDA driver as a + heuristic for scheduling the individual decompression operations. + + + dstActBytes : cuuint32_t + After the decompression operation has completed, the actual number + of bytes written to CUmemDecompressParams.dst will be recorded as a + 32-bit unsigned integer in the memory at this address. + + + src : Any + Pointer to a buffer of at least + CUmemDecompressParams_st.srcNumBytes compressed bytes. + + + dst : Any + Pointer to a buffer where the decompressed data will be written. + The number of bytes written to this location will be recorded in + the memory pointed to by CUmemDecompressParams_st.dstActBytes + + + algo : CUmemDecompressAlgorithm + The decompression algorithm to use. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUcliqueInfo(CUcliqueInfo_st): + """ + Fabric clique information + + Attributes + ---------- + + type : CUcliqueType + Type of the fabric clique + + + id : unsigned int + ID of the fabric clique + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUlogicalEndpointId: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUlogicalEndpointId _pvt_val + cdef cydriver.CUlogicalEndpointId* _pvt_ptr + +cdef class CUlogicalEndpointFabricHandle(CUlogicalEndpointFabricHandle_st): + """ + Fabric handle for a logical endpoint + + Attributes + ---------- + + data : bytes + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUlogicalEndpointProp(CUlogicalEndpointProp_struct): + """ + Properties of a logical endpoint construction + + Attributes + ---------- + + type : CUlogicalEndpointType + Type of the logical endpoint defined in CUlogicalEndpointType + + + unicast : anon_struct26 + + + + multicast : anon_struct27 + + + + size : unsigned long long + Size of the logical endpoint + + + ipcHandleTypes : unsigned int + A bitmask of IPC handle types defined in + CUlogicalEndpointIpcHandleType + + + flags : unsigned int + A bitmask of flags defined in CUlogicalEndpointFlag + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUdevSmResource(CUdevSmResource_st): + """ + Attributes + ---------- + + smCount : unsigned int + The amount of streaming multiprocessors available in this resource. + + + minSmPartitionSize : unsigned int + The minimum number of streaming multiprocessors required to + partition this resource. + + + smCoscheduledAlignment : unsigned int + The number of streaming multiprocessors in this resource that are + guaranteed to be co-scheduled on the same GPU processing cluster. + smCount will be a multiple of this value, unless the backfill flag + is set. + + + flags : unsigned int + The flags set on this SM resource. For possible values see + CUdevSmResourceGroup_flags. + + + localityDomainId : unsigned int + Locality domain that the SM must be located on. Only valid if + CU_DEV_SM_RESOURCE_GROUP_LOCALITY_DOMAIN_ID is set in flags. If the + backfill flag is set, SMs may be assigned from other locality + domains. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUdevWorkqueueConfigResource(CUdevWorkqueueConfigResource_st): + """ + Attributes + ---------- + + device : CUdevice + The device on which the workqueue resources are available + + + wqConcurrencyLimit : unsigned int + The expected maximum number of concurrent stream-ordered workloads + + + sharingScope : CUdevWorkqueueConfigScope + The sharing scope for the workqueue resources + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUdevWorkqueueResource(CUdevWorkqueueResource_st): + """ + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CU_DEV_SM_RESOURCE_GROUP_PARAMS(CU_DEV_SM_RESOURCE_GROUP_PARAMS_st): + """ + Attributes + ---------- + + smCount : unsigned int + The amount of SMs available in this resource. + + + coscheduledSmCount : unsigned int + The amount of co-scheduled SMs grouped together for locality + purposes. + + + preferredCoscheduledSmCount : unsigned int + When possible, combine co-scheduled groups together into larger + groups of this size. + + + flags : unsigned int + The flags set on this SM resource group. For possible values see + CUdevSmResourceGroup_flags. + + + localityDomainId : unsigned int + Locality domain that the SM must be located on. Only valid if + CU_DEV_SM_RESOURCE_GROUP_LOCALITY_DOMAIN_ID is set in flags + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUdevResource_v1(CUdevResource_st): + """ + Attributes + ---------- + + type : CUdevResourceType + Type of resource, dictates which union field was last set + + + _internal_padding : bytes + + + + sm : CUdevSmResource + Resource corresponding to CU_DEV_RESOURCE_TYPE_SM `typename`. + + + wqConfig : CUdevWorkqueueConfigResource + Resource corresponding to CU_DEV_RESOURCE_TYPE_WORKQUEUE_CONFIG + `typename`. + + + wq : CUdevWorkqueueResource + Resource corresponding to CU_DEV_RESOURCE_TYPE_WORKQUEUE + `typename`. + + + _oversize : bytes + + + + nextResource : CUdevResource_st + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUdevResource(CUdevResource_v1): + """ + Attributes + ---------- + + type : CUdevResourceType + Type of resource, dictates which union field was last set + + + _internal_padding : bytes + + + + sm : CUdevSmResource + Resource corresponding to CU_DEV_RESOURCE_TYPE_SM `typename`. + + + wqConfig : CUdevWorkqueueConfigResource + Resource corresponding to CU_DEV_RESOURCE_TYPE_WORKQUEUE_CONFIG + `typename`. + + + wq : CUdevWorkqueueResource + Resource corresponding to CU_DEV_RESOURCE_TYPE_WORKQUEUE + `typename`. + + + _oversize : bytes + + + + nextResource : CUdevResource_st + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUeglFrame_v1(CUeglFrame_st): + """ + CUDA EGLFrame structure Descriptor - structure defining one frame + of EGL. Each frame may contain one or more planes depending on + whether the surface * is Multiplanar or not. + + Attributes + ---------- + + frame : anon_union21 + + + + width : unsigned int + Width of first plane + + + height : unsigned int + Height of first plane + + + depth : unsigned int + Depth of first plane + + + pitch : unsigned int + Pitch of first plane + + + planeCount : unsigned int + Number of planes + + + numChannels : unsigned int + Number of channels for the plane + + + frameType : CUeglFrameType + Array or Pitch + + + eglColorFormat : CUeglColorFormat + CUDA EGL Color Format + + + cuFormat : CUarray_format + CUDA Array Format + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUeglFrame(CUeglFrame_v1): + """ + CUDA EGLFrame structure Descriptor - structure defining one frame + of EGL. Each frame may contain one or more planes depending on + whether the surface * is Multiplanar or not. + + Attributes + ---------- + + frame : anon_union21 + + + + width : unsigned int + Width of first plane + + + height : unsigned int + Height of first plane + + + depth : unsigned int + Depth of first plane + + + pitch : unsigned int + Pitch of first plane + + + planeCount : unsigned int + Number of planes + + + numChannels : unsigned int + Number of channels for the plane + + + frameType : CUeglFrameType + Array or Pitch + + + eglColorFormat : CUeglColorFormat + CUDA EGL Color Format + + + cuFormat : CUarray_format + CUDA Array Format + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cuuint32_t: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.cuuint32_t _pvt_val + cdef cydriver.cuuint32_t* _pvt_ptr + +cdef class cuuint64_t: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.cuuint64_t _pvt_val + cdef cydriver.cuuint64_t* _pvt_ptr + +cdef class CUdeviceptr_v2: + """ + + CUDA device pointer CUdeviceptr is defined as an unsigned integer type whose size matches the size of a pointer on the target platform. + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUdeviceptr_v2 _pvt_val + cdef cydriver.CUdeviceptr_v2* _pvt_ptr + +cdef class CUdevice_v1: + """ + + CUDA device + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUdevice_v1 _pvt_val + cdef cydriver.CUdevice_v1* _pvt_ptr + +cdef class CUtexObject_v1: + """ + + An opaque value that represents a CUDA texture object + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUtexObject_v1 _pvt_val + cdef cydriver.CUtexObject_v1* _pvt_ptr + +cdef class CUsurfObject_v1: + """ + + An opaque value that represents a CUDA surface object + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUsurfObject_v1 _pvt_val + cdef cydriver.CUsurfObject_v1* _pvt_ptr + +cdef class CUmemGenericAllocationHandle_v1: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUmemGenericAllocationHandle_v1 _pvt_val + cdef cydriver.CUmemGenericAllocationHandle_v1* _pvt_ptr + +cdef class CUlogIterator: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUlogIterator _pvt_val + cdef cydriver.CUlogIterator* _pvt_ptr + +cdef class GLenum: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.GLenum _pvt_val + cdef cydriver.GLenum* _pvt_ptr + +cdef class GLuint: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.GLuint _pvt_val + cdef cydriver.GLuint* _pvt_ptr + +cdef class EGLint: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.EGLint _pvt_val + cdef cydriver.EGLint* _pvt_ptr + +cdef class VdpDevice: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.VdpDevice _pvt_val + cdef cydriver.VdpDevice* _pvt_ptr + +cdef class VdpGetProcAddress: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.VdpGetProcAddress _pvt_val + cdef cydriver.VdpGetProcAddress* _pvt_ptr + +cdef class VdpVideoSurface: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.VdpVideoSurface _pvt_val + cdef cydriver.VdpVideoSurface* _pvt_ptr + +cdef class VdpOutputSurface: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.VdpOutputSurface _pvt_val + cdef cydriver.VdpOutputSurface* _pvt_ptr diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/nvfatbin.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/nvfatbin.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..221cd465ecacb9e444a235feae8c50699836efac --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/nvfatbin.cpython-312-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d8832da013aa1a336d7d26f8d5611e7fdc95b14577d42a69c870d0894bd3ac56 +size 124304 diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/nvfatbin.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/nvfatbin.pxd new file mode 100644 index 0000000000000000000000000000000000000000..192e7f55fde774888c1654ddd2b0650d40b5286d --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/nvfatbin.pxd @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This code was automatically generated across versions from 12.4.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=9ead77b928fe2009e92249025e5b38bf079a25fc0d9737aafd3cbeddb5c86661 + + + +# <<<< PREAMBLE CONTENT >>>> + +from libc.stdint cimport intptr_t + + +# <<<< END OF PREAMBLE CONTENT >>>> + +from .cynvfatbin cimport * + + +############################################################################### +# Types +############################################################################### + +ctypedef nvFatbinHandle Handle + + +############################################################################### +# Enum +############################################################################### + +ctypedef nvFatbinResult _Result + + +############################################################################### +# Functions +############################################################################### + +cpdef intptr_t create(options, size_t options_count) except -1 +cpdef add_ptx(intptr_t handle, code, size_t size, arch, identifier, options_cmd_line) +cpdef add_cubin(intptr_t handle, code, size_t size, arch, identifier) +cpdef add_ltoir(intptr_t handle, code, size_t size, arch, identifier, options_cmd_line) +cpdef size_t size(intptr_t handle) except? 0 +cpdef get(intptr_t handle, buffer) +cpdef tuple version() +cpdef add_index(intptr_t handle, code, size_t size, identifier) +cpdef add_reloc(intptr_t handle, code, size_t size) +cpdef add_tile_ir(intptr_t handle, code, size_t size, identifier, options_cmd_line) diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/nvjitlink.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/nvjitlink.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..894dc82ac4ca93f3644dcd8c60577c27b5fe6f9a --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/nvjitlink.cpython-312-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af9af3d78811a2fc36606fb124a8340f0a507f5c459599988d43e24a3bf68012 +size 128528 diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/nvjitlink.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/nvjitlink.pxd new file mode 100644 index 0000000000000000000000000000000000000000..b383554eacae0bdca1faa672ca3a77ce368654ce --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/nvjitlink.pxd @@ -0,0 +1,56 @@ +# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This code was automatically generated across versions from 12.0.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=bdd807ca03377f36b064e28eaa2421255316987c009a65a55f05fbc1a22e2bf3 + + + +# <<<< PREAMBLE CONTENT >>>> + +from libc.stdint cimport ( + intptr_t, + uint32_t, +) + + +# <<<< END OF PREAMBLE CONTENT >>>> + +from .cynvjitlink cimport * + + +############################################################################### +# Types +############################################################################### + +ctypedef nvJitLinkHandle Handle + + +############################################################################### +# Enum +############################################################################### + +ctypedef nvJitLinkResult _Result +ctypedef nvJitLinkInputType _InputType + + +############################################################################### +# Functions +############################################################################### + +cpdef intptr_t create(uint32_t num_options, options) except -1 +cpdef add_data(intptr_t handle, int input_type, data, size_t size, name) +cpdef add_file(intptr_t handle, int input_type, file_name) +cpdef complete(intptr_t handle) +cpdef size_t get_linked_cubin_size(intptr_t handle) except? 0 +cpdef get_linked_cubin(intptr_t handle, cubin) +cpdef size_t get_linked_ptx_size(intptr_t handle) except? 0 +cpdef get_linked_ptx(intptr_t handle, ptx) +cpdef size_t get_error_log_size(intptr_t handle) except? 0 +cpdef get_error_log(intptr_t handle, log) +cpdef size_t get_info_log_size(intptr_t handle) except? 0 +cpdef get_info_log(intptr_t handle, log) +cpdef tuple version() +cpdef size_t get_linked_ltoir_size(intptr_t handle) except? 0 +cpdef get_linked_ltoir(intptr_t handle, ltoir) diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/nvml.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/nvml.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..c9e1472159792edf84774103b5553dffdd4fe606 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/nvml.cpython-312-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:217225f2d7e9c530d0ca61f285ed9e09fdd3358d891e9cc8fe5dc4cdaf8babb1 +size 5837648 diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/nvml.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/nvml.pxd new file mode 100644 index 0000000000000000000000000000000000000000..6f35132912fc2f9710f85924fa2d56aa6adde910 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/nvml.pxd @@ -0,0 +1,456 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This code was automatically generated across versions from 12.9.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=635b329217b9c57fce06de4ffd743372a120b5039eb247f49205bd4d2baf663c + + + +# <<<< PREAMBLE CONTENT >>>> + +from libc.stdint cimport intptr_t + + +# <<<< END OF PREAMBLE CONTENT >>>> + +from .cynvml cimport * + + +############################################################################### +# Types +############################################################################### + +ctypedef nvmlDramEncryptionInfo_v1_t DramEncryptionInfo_v1 +ctypedef nvmlMarginTemperature_v1_t MarginTemperature_v1 +ctypedef nvmlFanSpeedInfo_v1_t FanSpeedInfo_v1 +ctypedef nvmlDevicePerfModes_v1_t DevicePerfModes_v1 +ctypedef nvmlDeviceCurrentClockFreqs_v1_t DeviceCurrentClockFreqs_v1 +ctypedef nvmlVgpuHeterogeneousMode_v1_t VgpuHeterogeneousMode_v1 +ctypedef nvmlVgpuPlacementId_v1_t VgpuPlacementId_v1 +ctypedef nvmlVgpuRuntimeState_v1_t VgpuRuntimeState_v1 +ctypedef nvmlConfComputeSetKeyRotationThresholdInfo_v1_t ConfComputeSetKeyRotationThresholdInfo_v1 +ctypedef nvmlConfComputeGetKeyRotationThresholdInfo_v1_t ConfComputeGetKeyRotationThresholdInfo_v1 +ctypedef nvmlSystemDriverBranchInfo_v1_t SystemDriverBranchInfo_v1 +ctypedef nvmlTemperature_v1_t Temperature_v1 +ctypedef nvmlDeviceCapabilities_v1_t DeviceCapabilities_v1 +ctypedef nvmlPowerSmoothingProfile_v1_t PowerSmoothingProfile_v1 +ctypedef nvmlPowerSmoothingState_v1_t PowerSmoothingState_v1 +ctypedef nvmlPdi_v1_t Pdi_v1 +ctypedef nvmlDevice_t Device +ctypedef nvmlGpuInstance_t GpuInstance +ctypedef nvmlUnit_t Unit +ctypedef nvmlEventSet_t EventSet +ctypedef nvmlSystemEventSet_t SystemEventSet +ctypedef nvmlComputeInstance_t ComputeInstance +ctypedef nvmlGpmSample_t GpmSample +ctypedef nvmlEccErrorCounts_t EccErrorCounts +ctypedef nvmlProcessInfo_v1_t ProcessInfo_v1 +ctypedef nvmlProcessInfo_v2_t ProcessInfo_v2 +ctypedef nvmlNvLinkUtilizationControl_t NvLinkUtilizationControl +ctypedef nvmlViolationTime_t ViolationTime +ctypedef nvmlUUIDValue_t UUIDValue +ctypedef nvmlVgpuPlacementList_v1_t VgpuPlacementList_v1 +ctypedef nvmlNvLinkPowerThres_t NvLinkPowerThres +ctypedef nvmlGpuInstanceProfileInfo_t GpuInstanceProfileInfo +ctypedef nvmlGpuInstanceProfileInfo_v2_t GpuInstanceProfileInfo_v2 +ctypedef nvmlComputeInstanceProfileInfo_t ComputeInstanceProfileInfo +ctypedef nvmlGpmSupport_t GpmSupport +ctypedef nvmlMask255_t Mask255 +ctypedef nvmlHostname_v1_t Hostname_v1 +ctypedef nvmlUnrepairableMemoryStatus_v1_t UnrepairableMemoryStatus_v1 +ctypedef nvmlRusdSettings_v1_t RusdSettings_v1 +ctypedef nvmlPowerValue_v2_t PowerValue_v2 +ctypedef nvmlVgpuTypeMaxInstance_v1_t VgpuTypeMaxInstance_v1 +ctypedef nvmlVgpuProcessUtilizationSample_t VgpuProcessUtilizationSample +ctypedef nvmlGpuFabricInfo_t GpuFabricInfo +ctypedef nvmlSystemEventSetCreateRequest_v1_t SystemEventSetCreateRequest_v1 +ctypedef nvmlSystemEventSetFreeRequest_v1_t SystemEventSetFreeRequest_v1 +ctypedef nvmlSystemRegisterEventRequest_v1_t SystemRegisterEventRequest_v1 +ctypedef nvmlUUID_v1_t UUID_v1 +ctypedef nvmlSystemEventSetWaitRequest_v1_t SystemEventSetWaitRequest_v1 +ctypedef nvmlGpmMetric_t GpmMetric +ctypedef nvmlWorkloadPowerProfileInfo_v1_t WorkloadPowerProfileInfo_v1 +ctypedef nvmlWorkloadPowerProfileCurrentProfiles_v1_t WorkloadPowerProfileCurrentProfiles_v1 +ctypedef nvmlWorkloadPowerProfileRequestedProfiles_v1_t WorkloadPowerProfileRequestedProfiles_v1 +ctypedef nvmlWorkloadPowerProfileUpdateProfiles_v1_t WorkloadPowerProfileUpdateProfiles_v1 +ctypedef nvmlPRMTLV_v1_t PRMTLV_v1 +ctypedef nvmlVgpuSchedulerSetState_t VgpuSchedulerSetState +ctypedef nvmlGpmMetricsGet_t GpmMetricsGet +ctypedef nvmlPRMCounterList_v1_t PRMCounterList_v1 +ctypedef nvmlWorkloadPowerProfileProfilesInfo_v1_t WorkloadPowerProfileProfilesInfo_v1 + + +############################################################################### +# Enum +############################################################################### + +ctypedef nvmlBridgeChipType_t _BridgeChipType +ctypedef nvmlNvLinkUtilizationCountUnits_t _NvLinkUtilizationCountUnits +ctypedef nvmlNvLinkUtilizationCountPktTypes_t _NvLinkUtilizationCountPktTypes +ctypedef nvmlNvLinkCapability_t _NvLinkCapability +ctypedef nvmlNvLinkErrorCounter_t _NvLinkErrorCounter +ctypedef nvmlIntNvLinkDeviceType_t _IntNvLinkDeviceType +ctypedef nvmlGpuTopologyLevel_t _GpuTopologyLevel +ctypedef nvmlGpuP2PStatus_t _GpuP2PStatus +ctypedef nvmlGpuP2PCapsIndex_t _GpuP2PCapsIndex +ctypedef nvmlSamplingType_t _SamplingType +ctypedef nvmlPcieUtilCounter_t _PcieUtilCounter +ctypedef nvmlValueType_t _ValueType +ctypedef nvmlPerfPolicyType_t _PerfPolicyType +ctypedef nvmlThermalTarget_t _ThermalTarget +ctypedef nvmlThermalController_t _ThermalController +ctypedef nvmlCoolerControl_t _CoolerControl +ctypedef nvmlCoolerTarget_t _CoolerTarget +ctypedef nvmlUUIDType_t _UUIDType +ctypedef nvmlEnableState_t _EnableState +ctypedef nvmlBrandType_t _BrandType +ctypedef nvmlTemperatureThresholds_t _TemperatureThresholds +ctypedef nvmlTemperatureSensors_t _TemperatureSensors +ctypedef nvmlComputeMode_t _ComputeMode +ctypedef nvmlMemoryErrorType_t _MemoryErrorType +ctypedef nvmlNvlinkVersion_t _NvlinkVersion +ctypedef nvmlEccCounterType_t _EccCounterType +ctypedef nvmlClockType_t _ClockType +ctypedef nvmlClockId_t _ClockId +ctypedef nvmlDriverModel_t _DriverModel +ctypedef nvmlPstates_t _Pstates +ctypedef nvmlGpuOperationMode_t _GpuOperationMode +ctypedef nvmlInforomObject_t _InforomObject +ctypedef nvmlReturn_t _Return +ctypedef nvmlMemoryLocation_t _MemoryLocation +ctypedef nvmlPageRetirementCause_t _PageRetirementCause +ctypedef nvmlRestrictedAPI_t _RestrictedAPI +ctypedef nvmlGpuUtilizationDomainId_t _GpuUtilizationDomainId +ctypedef nvmlGpuVirtualizationMode_t _GpuVirtualizationMode +ctypedef nvmlHostVgpuMode_t _HostVgpuMode +ctypedef nvmlVgpuVmIdType_t _VgpuVmIdType +ctypedef nvmlVgpuGuestInfoState_t _VgpuGuestInfoState +ctypedef nvmlGridLicenseFeatureCode_t _GridLicenseFeatureCode +ctypedef nvmlVgpuCapability_t _VgpuCapability +ctypedef nvmlVgpuDriverCapability_t _VgpuDriverCapability +ctypedef nvmlDeviceVgpuCapability_t _DeviceVgpuCapability +ctypedef nvmlDeviceGpuRecoveryAction_t _DeviceGpuRecoveryAction +ctypedef nvmlFanState_t _FanState +ctypedef nvmlLedColor_t _LedColor +ctypedef nvmlEncoderType_t _EncoderType +ctypedef nvmlFBCSessionType_t _FBCSessionType +ctypedef nvmlDetachGpuState_t _DetachGpuState +ctypedef nvmlPcieLinkState_t _PcieLinkState +ctypedef nvmlClockLimitId_t _ClockLimitId +ctypedef nvmlVgpuVmCompatibility_t _VgpuVmCompatibility +ctypedef nvmlVgpuPgpuCompatibilityLimitCode_t _VgpuPgpuCompatibilityLimitCode +ctypedef nvmlGpmMetricId_t _GpmMetricId +ctypedef nvmlPowerProfileType_t _PowerProfileType +ctypedef nvmlDeviceAddressingModeType_t _DeviceAddressingModeType +ctypedef nvmlPRMCounterId_t _PRMCounterId +ctypedef nvmlPowerProfileOperation_t _PowerProfileOperation +ctypedef nvmlProcessMode_t _ProcessMode +ctypedef nvmlCPERType_t _CPERType +ctypedef nvmlGpuOperationalEventLogLevel_t _GpuOperationalEventLogLevel +ctypedef nvmlOperationalEventSeverity_t _OperationalEventSeverity +ctypedef nvmlEventDataType_t _EventDataType +ctypedef nvmlGpuOperationalEventContextType_t _GpuOperationalEventContextType +ctypedef nvmlNvlinkTelemetrySampleType_t _NvlinkTelemetrySampleType + + +############################################################################### +# Functions +############################################################################### + +cpdef init_v2() +cpdef init_with_flags(unsigned int flags) +cpdef shutdown() +cpdef str error_string(int result) +cpdef str system_get_driver_version() +cpdef str system_get_nvml_version() +cpdef int system_get_cuda_driver_version() except * +cpdef int system_get_cuda_driver_version_v2() except 0 +cpdef str system_get_process_name(unsigned int pid) +cpdef object system_get_hic_version() +cpdef unsigned int unit_get_count() except? 0 +cpdef intptr_t unit_get_handle_by_index(unsigned int index) except? 0 +cpdef object unit_get_unit_info(intptr_t unit) +cpdef object unit_get_led_state(intptr_t unit) +cpdef object unit_get_psu_info(intptr_t unit) +cpdef unsigned int unit_get_temperature(intptr_t unit, unsigned int type) except? 0 +cpdef object unit_get_fan_speed_info(intptr_t unit) +cpdef unsigned int device_get_count_v2() except? 0 +cpdef object device_get_attributes_v2(intptr_t device) +cpdef intptr_t device_get_handle_by_index_v2(unsigned int index) except? 0 +cpdef intptr_t device_get_handle_by_serial(serial) except? 0 +cpdef intptr_t device_get_handle_by_uuid(uuid) except? 0 +cpdef intptr_t device_get_handle_by_pci_bus_id_v2(pci_bus_id) except? 0 +cpdef str device_get_name(intptr_t device) +cpdef int device_get_brand(intptr_t device) except? -1 +cpdef unsigned int device_get_index(intptr_t device) except? 0 +cpdef str device_get_serial(intptr_t device) +cpdef unsigned int device_get_module_id(intptr_t device) except? 0 +cpdef object device_get_c2c_mode_info_v(intptr_t device) +cpdef object device_get_memory_affinity(intptr_t device, unsigned int node_set_size, unsigned int scope) +cpdef object device_get_cpu_affinity_within_scope(intptr_t device, unsigned int cpu_set_size, unsigned int scope) +cpdef object device_get_cpu_affinity(intptr_t device, unsigned int cpu_set_size) +cpdef device_set_cpu_affinity(intptr_t device) +cpdef device_clear_cpu_affinity(intptr_t device) +cpdef unsigned int device_get_numa_node_id(intptr_t device) except? 0 +cpdef int device_get_topology_common_ancestor(intptr_t device1, intptr_t device2) except? -1 +cpdef int device_get_p2p_status(intptr_t device1, intptr_t device2, int p2p_index) except? -1 +cpdef str device_get_uuid(intptr_t device) +cpdef unsigned int device_get_minor_number(intptr_t device) except? 0 +cpdef str device_get_board_part_number(intptr_t device) +cpdef str device_get_inforom_version(intptr_t device, int object) +cpdef str device_get_inforom_image_version(intptr_t device) +cpdef unsigned int device_get_inforom_configuration_checksum(intptr_t device) except? 0 +cpdef device_validate_inforom(intptr_t device) +cpdef tuple device_get_last_bbx_flush_time(intptr_t device) +cpdef int device_get_display_mode(intptr_t device) except? -1 +cpdef int device_get_display_active(intptr_t device) except? -1 +cpdef int device_get_persistence_mode(intptr_t device) except? -1 +cpdef object device_get_pci_info_ext(intptr_t device) +cpdef object device_get_pci_info_v3(intptr_t device) +cpdef unsigned int device_get_max_pcie_link_generation(intptr_t device) except? 0 +cpdef unsigned int device_get_gpu_max_pcie_link_generation(intptr_t device) except? 0 +cpdef unsigned int device_get_max_pcie_link_width(intptr_t device) except? 0 +cpdef unsigned int device_get_curr_pcie_link_generation(intptr_t device) except? 0 +cpdef unsigned int device_get_curr_pcie_link_width(intptr_t device) except? 0 +cpdef unsigned int device_get_pcie_throughput(intptr_t device, int counter) except? 0 +cpdef unsigned int device_get_pcie_replay_counter(intptr_t device) except? 0 +cpdef unsigned int device_get_clock_info(intptr_t device, int type) except? 0 +cpdef unsigned int device_get_max_clock_info(intptr_t device, int type) except? 0 +cpdef int device_get_gpc_clk_vf_offset(intptr_t device) except? 0 +cpdef unsigned int device_get_clock(intptr_t device, int clock_type, int clock_id) except? 0 +cpdef unsigned int device_get_max_customer_boost_clock(intptr_t device, int clock_type) except? 0 +cpdef object device_get_supported_memory_clocks(intptr_t device) +cpdef object device_get_supported_graphics_clocks(intptr_t device, unsigned int memory_clock_m_hz) +cpdef tuple device_get_auto_boosted_clocks_enabled(intptr_t device) +cpdef unsigned int device_get_fan_speed(intptr_t device) except? 0 +cpdef unsigned int device_get_fan_speed_v2(intptr_t device, unsigned int fan) except? 0 +cpdef unsigned int device_get_target_fan_speed(intptr_t device, unsigned int fan) except? 0 +cpdef tuple device_get_min_max_fan_speed(intptr_t device) +cpdef unsigned int device_get_fan_control_policy_v2(intptr_t device, unsigned int fan) except * +cpdef unsigned int device_get_num_fans(intptr_t device) except? 0 +cpdef object device_get_cooler_info(intptr_t device) +cpdef unsigned int device_get_temperature_threshold(intptr_t device, int threshold_type) except? 0 +cpdef object device_get_thermal_settings(intptr_t device, unsigned int sensor_index) +cpdef int device_get_performance_state(intptr_t device) except? -1 +cpdef unsigned long long device_get_current_clocks_event_reasons(intptr_t device) except? 0 +cpdef unsigned long long device_get_supported_clocks_event_reasons(intptr_t device) except? 0 +cpdef int device_get_power_state(intptr_t device) except? -1 +cpdef object device_get_dynamic_pstates_info(intptr_t device) +cpdef int device_get_mem_clk_vf_offset(intptr_t device) except? 0 +cpdef tuple device_get_min_max_clock_of_p_state(intptr_t device, int type, int pstate) +cpdef tuple device_get_gpc_clk_min_max_vf_offset(intptr_t device) +cpdef tuple device_get_mem_clk_min_max_vf_offset(intptr_t device) +cpdef device_set_clock_offsets(intptr_t device, intptr_t info) +cpdef unsigned int device_get_power_management_limit(intptr_t device) except? 0 +cpdef tuple device_get_power_management_limit_constraints(intptr_t device) +cpdef unsigned int device_get_power_management_default_limit(intptr_t device) except? 0 +cpdef unsigned int device_get_power_usage(intptr_t device) except? 0 +cpdef unsigned long long device_get_total_energy_consumption(intptr_t device) except? 0 +cpdef unsigned int device_get_enforced_power_limit(intptr_t device) except? 0 +cpdef tuple device_get_gpu_operation_mode(intptr_t device) +cpdef object device_get_memory_info_v2(intptr_t device) +cpdef int device_get_compute_mode(intptr_t device) except? -1 +cpdef tuple device_get_cuda_compute_capability(intptr_t device) +cpdef tuple device_get_ecc_mode(intptr_t device) +cpdef int device_get_default_ecc_mode(intptr_t device) except? -1 +cpdef unsigned int device_get_board_id(intptr_t device) except? 0 +cpdef unsigned int device_get_multi_gpu_board(intptr_t device) except? 0 +cpdef unsigned long long device_get_total_ecc_errors(intptr_t device, int error_type, int counter_type) except? 0 +cpdef unsigned long long device_get_memory_error_counter(intptr_t device, int error_type, int counter_type, int location_type) except? 0 +cpdef object device_get_utilization_rates(intptr_t device) +cpdef tuple device_get_encoder_utilization(intptr_t device) +cpdef unsigned int device_get_encoder_capacity(intptr_t device, int encoder_query_type) except? 0 +cpdef tuple device_get_encoder_stats(intptr_t device) +cpdef object device_get_encoder_sessions(intptr_t device) +cpdef tuple device_get_decoder_utilization(intptr_t device) +cpdef tuple device_get_jpg_utilization(intptr_t device) +cpdef tuple device_get_ofa_utilization(intptr_t device) +cpdef object device_get_fbc_stats(intptr_t device) +cpdef object device_get_fbc_sessions(intptr_t device) +cpdef tuple device_get_driver_model_v2(intptr_t device) +cpdef str device_get_vbios_version(intptr_t device) +cpdef object device_get_bridge_chip_info(intptr_t device) +cpdef object device_get_compute_running_processes_v3(intptr_t device) +cpdef object device_get_graphics_running_processes_v3(intptr_t device) +cpdef object device_get_mps_compute_running_processes_v3(intptr_t device) +cpdef int device_on_same_board(intptr_t device1, intptr_t device2) except? 0 +cpdef int device_get_api_restriction(intptr_t device, int api_type) except? -1 +cpdef object device_get_bar1_memory_info(intptr_t device) +cpdef unsigned int device_get_irq_num(intptr_t device) except? 0 +cpdef unsigned int device_get_num_gpu_cores(intptr_t device) except? 0 +cpdef unsigned int device_get_power_source(intptr_t device) except * +cpdef unsigned int device_get_memory_bus_width(intptr_t device) except? 0 +cpdef unsigned int device_get_pcie_link_max_speed(intptr_t device) except? 0 +cpdef unsigned int device_get_pcie_speed(intptr_t device) except? 0 +cpdef unsigned int device_get_adaptive_clock_info_status(intptr_t device) except? 0 +cpdef unsigned int device_get_bus_type(intptr_t device) except? 0 +cpdef object system_get_conf_compute_capabilities() +cpdef object system_get_conf_compute_state() +cpdef object device_get_conf_compute_mem_size_info(intptr_t device) +cpdef unsigned int system_get_conf_compute_gpus_ready_state() except? 0 +cpdef object device_get_conf_compute_protected_memory_usage(intptr_t device) +cpdef object device_get_conf_compute_gpu_certificate(intptr_t device) +cpdef device_set_conf_compute_unprotected_mem_size(intptr_t device, unsigned long long size_ki_b) +cpdef system_set_conf_compute_gpus_ready_state(unsigned int is_accepting_work) +cpdef object system_get_conf_compute_settings() +cpdef char device_get_gsp_firmware_version(intptr_t device) except? 0 +cpdef tuple device_get_gsp_firmware_mode(intptr_t device) +cpdef object device_get_sram_ecc_error_status(intptr_t device) +cpdef int device_get_accounting_mode(intptr_t device) except? -1 +cpdef object device_get_accounting_stats(intptr_t device, unsigned int pid) +cpdef object device_get_accounting_pids(intptr_t device) +cpdef unsigned int device_get_accounting_buffer_size(intptr_t device) except? 0 +cpdef object device_get_retired_pages(intptr_t device, int cause) +cpdef int device_get_retired_pages_pending_status(intptr_t device) except? -1 +cpdef tuple device_get_remapped_rows(intptr_t device) +cpdef object device_get_row_remapper_histogram(intptr_t device) +cpdef unsigned int device_get_architecture(intptr_t device) except? 0 +cpdef object device_get_clk_mon_status(intptr_t device) +cpdef object device_get_process_utilization(intptr_t device, unsigned long long last_seen_time_stamp) +cpdef unit_set_led_state(intptr_t unit, int color) +cpdef device_set_persistence_mode(intptr_t device, int mode) +cpdef device_set_compute_mode(intptr_t device, int mode) +cpdef device_set_ecc_mode(intptr_t device, int ecc) +cpdef device_clear_ecc_error_counts(intptr_t device, int counter_type) +cpdef device_set_driver_model(intptr_t device, int driver_model, unsigned int flags) +cpdef device_set_gpu_locked_clocks(intptr_t device, unsigned int min_gpu_clock_m_hz, unsigned int max_gpu_clock_m_hz) +cpdef device_reset_gpu_locked_clocks(intptr_t device) +cpdef device_set_memory_locked_clocks(intptr_t device, unsigned int min_mem_clock_m_hz, unsigned int max_mem_clock_m_hz) +cpdef device_reset_memory_locked_clocks(intptr_t device) +cpdef device_set_auto_boosted_clocks_enabled(intptr_t device, int enabled) +cpdef device_set_default_auto_boosted_clocks_enabled(intptr_t device, int enabled, unsigned int flags) +cpdef device_set_default_fan_speed_v2(intptr_t device, unsigned int fan) +cpdef device_set_fan_control_policy(intptr_t device, unsigned int fan, unsigned int policy) +cpdef device_set_gpu_operation_mode(intptr_t device, int mode) +cpdef device_set_api_restriction(intptr_t device, int api_type, int is_restricted) +cpdef device_set_fan_speed_v2(intptr_t device, unsigned int fan, unsigned int speed) +cpdef device_set_accounting_mode(intptr_t device, int mode) +cpdef device_clear_accounting_pids(intptr_t device) +cpdef int device_get_nvlink_state(intptr_t device, unsigned int link) except? -1 +cpdef unsigned int device_get_nvlink_version(intptr_t device, unsigned int link) except? 0 +cpdef unsigned int device_get_nvlink_capability(intptr_t device, unsigned int link, int capability) except? 0 +cpdef object device_get_nvlink_remote_pci_info_v2(intptr_t device, unsigned int link) +cpdef unsigned long long device_get_nvlink_error_counter(intptr_t device, unsigned int link, int counter) except? 0 +cpdef device_reset_nvlink_error_counters(intptr_t device, unsigned int link) +cpdef int device_get_nvlink_remote_device_type(intptr_t device, unsigned int link) except? -1 +cpdef system_set_nvlink_bw_mode(unsigned int nvlink_bw_mode) +cpdef unsigned int system_get_nvlink_bw_mode() except? 0 +cpdef object device_get_nvlink_supported_bw_modes(intptr_t device) +cpdef object device_get_nvlink_bw_mode(intptr_t device) +cpdef device_set_nvlink_bw_mode(intptr_t device, intptr_t set_bw_mode) +cpdef intptr_t event_set_create() except? 0 +cpdef device_register_events(intptr_t device, unsigned long long event_types, intptr_t set) +cpdef unsigned long long device_get_supported_event_types(intptr_t device) except? 0 +cpdef object event_set_wait_v2(intptr_t set, unsigned int timeoutms) +cpdef event_set_free(intptr_t set) +cpdef device_modify_drain_state(intptr_t pci_info, int new_state) +cpdef int device_query_drain_state(intptr_t pci_info) except? -1 +cpdef device_remove_gpu_v2(intptr_t pci_info, int gpu_state, int link_state) +cpdef device_discover_gpus(intptr_t pci_info) +cpdef int device_get_virtualization_mode(intptr_t device) except? -1 +cpdef int device_get_host_vgpu_mode(intptr_t device) except? -1 +cpdef device_set_virtualization_mode(intptr_t device, int virtual_mode) +cpdef unsigned long long vgpu_type_get_gsp_heap_size(unsigned int vgpu_type_id) except? 0 +cpdef unsigned long long vgpu_type_get_fb_reservation(unsigned int vgpu_type_id) except? 0 +cpdef device_set_vgpu_capabilities(intptr_t device, int capability, int state) +cpdef object device_get_grid_licensable_features_v4(intptr_t device) +cpdef unsigned int get_vgpu_driver_capabilities(int capability) except? 0 +cpdef unsigned int device_get_vgpu_capabilities(intptr_t device, int capability) except? 0 +cpdef str vgpu_type_get_class(unsigned int vgpu_type_id) +cpdef unsigned int vgpu_type_get_gpu_instance_profile_id(unsigned int vgpu_type_id) except? 0 +cpdef tuple vgpu_type_get_device_id(unsigned int vgpu_type_id) +cpdef unsigned long long vgpu_type_get_framebuffer_size(unsigned int vgpu_type_id) except? 0 +cpdef unsigned int vgpu_type_get_num_display_heads(unsigned int vgpu_type_id) except? 0 +cpdef tuple vgpu_type_get_resolution(unsigned int vgpu_type_id, unsigned int display_index) +cpdef str vgpu_type_get_license(unsigned int vgpu_type_id) +cpdef unsigned int vgpu_type_get_frame_rate_limit(unsigned int vgpu_type_id) except? 0 +cpdef unsigned int vgpu_type_get_max_instances(intptr_t device, unsigned int vgpu_type_id) except? 0 +cpdef unsigned int vgpu_type_get_max_instances_per_vm(unsigned int vgpu_type_id) except? 0 +cpdef object vgpu_type_get_bar1_info(unsigned int vgpu_type_id) +cpdef str vgpu_instance_get_uuid(unsigned int vgpu_instance) +cpdef str vgpu_instance_get_vm_driver_version(unsigned int vgpu_instance) +cpdef unsigned long long vgpu_instance_get_fb_usage(unsigned int vgpu_instance) except? 0 +cpdef unsigned int vgpu_instance_get_license_status(unsigned int vgpu_instance) except? 0 +cpdef unsigned int vgpu_instance_get_type(unsigned int vgpu_instance) except? 0 +cpdef unsigned int vgpu_instance_get_frame_rate_limit(unsigned int vgpu_instance) except? 0 +cpdef int vgpu_instance_get_ecc_mode(unsigned int vgpu_instance) except? -1 +cpdef unsigned int vgpu_instance_get_encoder_capacity(unsigned int vgpu_instance) except? 0 +cpdef vgpu_instance_set_encoder_capacity(unsigned int vgpu_instance, unsigned int encoder_capacity) +cpdef tuple vgpu_instance_get_encoder_stats(unsigned int vgpu_instance) +cpdef object vgpu_instance_get_encoder_sessions(unsigned int vgpu_instance) +cpdef object vgpu_instance_get_fbc_stats(unsigned int vgpu_instance) +cpdef object vgpu_instance_get_fbc_sessions(unsigned int vgpu_instance) +cpdef unsigned int vgpu_instance_get_gpu_instance_id(unsigned int vgpu_instance) except? 0 +cpdef str vgpu_instance_get_gpu_pci_id(unsigned int vgpu_instance) +cpdef unsigned int vgpu_type_get_capabilities(unsigned int vgpu_type_id, int capability) except? 0 +cpdef str vgpu_instance_get_mdev_uuid(unsigned int vgpu_instance) +cpdef gpu_instance_set_vgpu_scheduler_state(intptr_t gpu_instance, intptr_t p_scheduler) +cpdef object gpu_instance_get_vgpu_scheduler_state(intptr_t gpu_instance) +cpdef object gpu_instance_get_vgpu_scheduler_log(intptr_t gpu_instance) +cpdef str device_get_pgpu_metadata_string(intptr_t device) +cpdef object device_get_vgpu_scheduler_log(intptr_t device) +cpdef object device_get_vgpu_scheduler_state(intptr_t device) +cpdef object device_get_vgpu_scheduler_capabilities(intptr_t device) +cpdef device_set_vgpu_scheduler_state(intptr_t device, intptr_t p_scheduler_state) +cpdef set_vgpu_version(intptr_t vgpu_version) +cpdef tuple device_get_vgpu_process_utilization(intptr_t device, unsigned long long last_seen_time_stamp) +cpdef int vgpu_instance_get_accounting_mode(unsigned int vgpu_instance) except? -1 +cpdef object vgpu_instance_get_accounting_pids(unsigned int vgpu_instance) +cpdef object vgpu_instance_get_accounting_stats(unsigned int vgpu_instance, unsigned int pid) +cpdef vgpu_instance_clear_accounting_pids(unsigned int vgpu_instance) +cpdef object vgpu_instance_get_license_info_v2(unsigned int vgpu_instance) +cpdef unsigned int get_excluded_device_count() except? 0 +cpdef object get_excluded_device_info_by_index(unsigned int index) +cpdef int device_set_mig_mode(intptr_t device, unsigned int mode) except? -1 +cpdef tuple device_get_mig_mode(intptr_t device) +cpdef object device_get_gpu_instance_possible_placements_v2(intptr_t device, unsigned int profile_id) +cpdef unsigned int device_get_gpu_instance_remaining_capacity(intptr_t device, unsigned int profile_id) except? 0 +cpdef intptr_t device_create_gpu_instance(intptr_t device, unsigned int profile_id) except? 0 +cpdef intptr_t device_create_gpu_instance_with_placement(intptr_t device, unsigned int profile_id, intptr_t placement) except? 0 +cpdef gpu_instance_destroy(intptr_t gpu_instance) +cpdef intptr_t device_get_gpu_instance_by_id(intptr_t device, unsigned int id) except? 0 +cpdef object gpu_instance_get_info(intptr_t gpu_instance) +cpdef object gpu_instance_get_compute_instance_profile_info_v(intptr_t gpu_instance, unsigned int profile, unsigned int eng_profile) +cpdef unsigned int gpu_instance_get_compute_instance_remaining_capacity(intptr_t gpu_instance, unsigned int profile_id) except? 0 +cpdef object gpu_instance_get_compute_instance_possible_placements(intptr_t gpu_instance, unsigned int profile_id) +cpdef intptr_t gpu_instance_create_compute_instance(intptr_t gpu_instance, unsigned int profile_id) except? 0 +cpdef intptr_t gpu_instance_create_compute_instance_with_placement(intptr_t gpu_instance, unsigned int profile_id, intptr_t placement) except? 0 +cpdef compute_instance_destroy(intptr_t compute_instance) +cpdef intptr_t gpu_instance_get_compute_instance_by_id(intptr_t gpu_instance, unsigned int id) except? 0 +cpdef object compute_instance_get_info_v2(intptr_t compute_instance) +cpdef unsigned int device_is_mig_device_handle(intptr_t device) except? 0 +cpdef unsigned int device_get_gpu_instance_id(intptr_t device) except? 0 +cpdef unsigned int device_get_compute_instance_id(intptr_t device) except? 0 +cpdef unsigned int device_get_max_mig_device_count(intptr_t device) except? 0 +cpdef intptr_t device_get_mig_device_handle_by_index(intptr_t device, unsigned int index) except? 0 +cpdef intptr_t device_get_device_handle_from_mig_device_handle(intptr_t mig_device) except? 0 +cpdef device_power_smoothing_activate_preset_profile(intptr_t device, intptr_t profile) +cpdef device_power_smoothing_update_preset_profile_param(intptr_t device, intptr_t profile) +cpdef device_power_smoothing_set_state(intptr_t device, intptr_t state) +cpdef object device_get_addressing_mode(intptr_t device) +cpdef object device_get_repair_status(intptr_t device) +cpdef object device_get_power_mizer_mode_v1(intptr_t device) +cpdef device_set_power_mizer_mode_v1(intptr_t device, intptr_t power_mizer_mode) +cpdef device_vgpu_force_gsp_unload(intptr_t device) +cpdef object device_get_vgpu_scheduler_state_v2(intptr_t device) +cpdef object gpu_instance_get_vgpu_scheduler_state_v2(intptr_t gpu_instance) +cpdef object device_get_vgpu_scheduler_log_v2(intptr_t device) +cpdef object gpu_instance_get_vgpu_scheduler_log_v2(intptr_t gpu_instance) +cpdef device_set_vgpu_scheduler_state_v2(intptr_t device, intptr_t p_scheduler_state) +cpdef gpu_instance_set_vgpu_scheduler_state_v2(intptr_t gpu_instance, intptr_t p_scheduler_state) +cpdef object system_get_cper_v1() +cpdef object device_get_bbx_time_data_v1(intptr_t device) +cpdef object device_get_accounting_stats_v2(intptr_t device) +cpdef object device_get_remapped_rows_v2(intptr_t device) +cpdef device_set_adaptive_tgp_mode_v1(intptr_t device, int mode) +cpdef object device_get_adaptive_tgp_mode_info_v1(intptr_t device) +cpdef device_set_memory_limits_v1(intptr_t device, intptr_t limits) +cpdef object device_get_memory_limits_v1(intptr_t device) +cpdef object device_get_gpu_fabric_info_v4(intptr_t device) +cpdef object device_perf_metrics_get_samples_v1(intptr_t device) +cpdef object device_set_nvlink_bw_mode_async_v1(intptr_t device) +cpdef object device_get_nv_link_telemetry_samples_v1(intptr_t device) +cpdef event_set_register_gpu_operational_events_v1(intptr_t event_set, intptr_t config) +cpdef object event_set_get_context_count_v1(intptr_t set) +cpdef object device_get_bank_remapper_status_v1(intptr_t device) diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/nvrtc.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/nvrtc.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..d44266f1979a30ce5df752f1a473a5816c965843 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/nvrtc.cpython-312-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c0c54b08cbdba5c69f6527feba9cdc3bf20e23959d2b088bab7231206316a07c +size 442344 diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/nvrtc.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/nvrtc.pxd new file mode 100644 index 0000000000000000000000000000000000000000..2e7ca2b505ab84cd81f49d379351767c2c298e8d --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/nvrtc.pxd @@ -0,0 +1,61 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +# This code was automatically generated with version 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ba23f6c3908c2fa6496002f8def30ec166cec8643e4de22c1741040b2c4b2965 +cimport cuda.bindings.cynvrtc as cynvrtc + +include "_lib/utils.pxd" + +cdef class nvrtcProgram: + """ nvrtcProgram is the unit of compilation, and an opaque handle for a program. + + To compile a CUDA program string, an instance of nvrtcProgram must be created first with nvrtcCreateProgram, then compiled with nvrtcCompileProgram. + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cynvrtc.nvrtcProgram _pvt_val + cdef cynvrtc.nvrtcProgram* _pvt_ptr + +cdef class nvrtcBundledHeadersInfo: + """ + Structure containing information about bundled headers. + + Attributes + ---------- + + available : int + Non-zero if bundled headers are available + + + compressedSize : size_t + Size of compressed archive in bytes + + + uncompressedSize : size_t + Estimated size when extracted in bytes + + + cudaVersionMajor : int + CUDA major version of bundled headers + + + cudaVersionMinor : int + CUDA minor version of bundled headers + + + numFiles : unsigned int + Number of header files in the bundle + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cynvrtc.nvrtcBundledHeadersInfo _pvt_val + cdef cynvrtc.nvrtcBundledHeadersInfo* _pvt_ptr diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/nvvm.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/nvvm.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..914654d216060932c003eed74989610953e9f2c4 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/nvvm.cpython-312-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2d91b56e80a229cb1ae10c568247a6301c3f09dcf8dfa447279d0f20230addc +size 116176 diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/nvvm.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/nvvm.pxd new file mode 100644 index 0000000000000000000000000000000000000000..9e78ece8069079b595ac90303d88679a1c87453f --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/nvvm.pxd @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# This code was automatically generated across versions from 12.0.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ee88a87ab53668207e31e3b38c1593a3cd3724e02300ebea7574aafb509bb3b6 + + + +# <<<< PREAMBLE CONTENT >>>> + +from libc.stdint cimport intptr_t + + +# <<<< END OF PREAMBLE CONTENT >>>> + +from .cynvvm cimport * + + +############################################################################### +# Types +############################################################################### + +ctypedef nvvmProgram Program + + +############################################################################### +# Enum +############################################################################### + +ctypedef nvvmResult _Result + + +############################################################################### +# Functions +############################################################################### + +cpdef str get_error_string(int result) +cpdef tuple version() +cpdef tuple ir_version() +cpdef intptr_t create_program() except? 0 +cpdef add_module_to_program(intptr_t prog, buffer, size_t size, name) +cpdef lazy_add_module_to_program(intptr_t prog, buffer, size_t size, name) +cpdef compile_program(intptr_t prog, int num_options, options) +cpdef verify_program(intptr_t prog, int num_options, options) +cpdef size_t get_compiled_result_size(intptr_t prog) except? 0 +cpdef get_compiled_result(intptr_t prog, buffer) +cpdef size_t get_program_log_size(intptr_t prog) except? 0 +cpdef get_program_log(intptr_t prog, buffer) +cpdef int llvm_version(arch) except? 0 diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/runtime.cpython-312-x86_64-linux-gnu.so b/hug/lib/python3.12/site-packages/cuda/bindings/runtime.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..e45163c90ecd40b487b498e6888ffe3d4172b8d5 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/runtime.cpython-312-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bdd061294dd0d595df280aa7931e125d1356e80016751eaec009f5f2f2c57e59 +size 5332200 diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/runtime.pxd b/hug/lib/python3.12/site-packages/cuda/bindings/runtime.pxd new file mode 100644 index 0000000000000000000000000000000000000000..3665c0a1eba80cf83e1299a532262cfb6c0d143c --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/runtime.pxd @@ -0,0 +1,5252 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +# This code was automatically generated with version 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=7449c15b6137a39e8e9c26a3aee810954cead6b88b7c8a768abb9a2bc5875913 +cimport cuda.bindings.cyruntime as cyruntime + +include "_lib/utils.pxd" +cimport cuda.bindings.driver as driver + +cdef class cudaDevResourceDesc_t: + """ + + An opaque descriptor handle. The descriptor encapsulates multiple created and configured resources. Created via ::cudaDeviceResourceGenerateDesc + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaDevResourceDesc_t _pvt_val + cdef cyruntime.cudaDevResourceDesc_t* _pvt_ptr + +cdef class cudaExecutionContext_t: + """ + + An opaque handle to a CUDA execution context. It represents an execution context created via CUDA Runtime APIs such as cudaGreenCtxCreate. + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaExecutionContext_t _pvt_val + cdef cyruntime.cudaExecutionContext_t* _pvt_ptr + +cdef class cudaArray_t: + """ + + CUDA array + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaArray_t _pvt_val + cdef cyruntime.cudaArray_t* _pvt_ptr + +cdef class cudaArray_const_t: + """ + + CUDA array (as source copy argument) + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaArray_const_t _pvt_val + cdef cyruntime.cudaArray_const_t* _pvt_ptr + +cdef class cudaMipmappedArray_t: + """ + + CUDA mipmapped array + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaMipmappedArray_t _pvt_val + cdef cyruntime.cudaMipmappedArray_t* _pvt_ptr + +cdef class cudaMipmappedArray_const_t: + """ + + CUDA mipmapped array (as source argument) + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaMipmappedArray_const_t _pvt_val + cdef cyruntime.cudaMipmappedArray_const_t* _pvt_ptr + +cdef class cudaGraphicsResource_t: + """ + + CUDA graphics resource types + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaGraphicsResource_t _pvt_val + cdef cyruntime.cudaGraphicsResource_t* _pvt_ptr + +cdef class cudaExternalMemory_t: + """ + + CUDA external memory + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaExternalMemory_t _pvt_val + cdef cyruntime.cudaExternalMemory_t* _pvt_ptr + +cdef class cudaExternalSemaphore_t: + """ + + CUDA external semaphore + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaExternalSemaphore_t _pvt_val + cdef cyruntime.cudaExternalSemaphore_t* _pvt_ptr + +cdef class cudaKernel_t: + """ + + CUDA kernel + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaKernel_t _pvt_val + cdef cyruntime.cudaKernel_t* _pvt_ptr + +cdef class cudaLibrary_t: + """ + + CUDA library + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaLibrary_t _pvt_val + cdef cyruntime.cudaLibrary_t* _pvt_ptr + +cdef class cudaGraphDeviceNode_t: + """ + + CUDA device node handle for device-side node update + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaGraphDeviceNode_t _pvt_val + cdef cyruntime.cudaGraphDeviceNode_t* _pvt_ptr + +cdef class cudaAsyncCallbackHandle_t: + """ + + CUDA async callback handle + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaAsyncCallbackHandle_t _pvt_val + cdef cyruntime.cudaAsyncCallbackHandle_t* _pvt_ptr + +cdef class cudaLogsCallbackHandle: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaLogsCallbackHandle _pvt_val + cdef cyruntime.cudaLogsCallbackHandle* _pvt_ptr + +cdef class EGLImageKHR: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.EGLImageKHR _pvt_val + cdef cyruntime.EGLImageKHR* _pvt_ptr + +cdef class EGLStreamKHR: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.EGLStreamKHR _pvt_val + cdef cyruntime.EGLStreamKHR* _pvt_ptr + +cdef class EGLSyncKHR: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.EGLSyncKHR _pvt_val + cdef cyruntime.EGLSyncKHR* _pvt_ptr + +cdef class cudaHostFn_t: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaHostFn_t _pvt_val + cdef cyruntime.cudaHostFn_t* _pvt_ptr + +cdef class cudaAsyncCallback: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaAsyncCallback _pvt_val + cdef cyruntime.cudaAsyncCallback* _pvt_ptr + +cdef class cudaStreamCallback_t: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaStreamCallback_t _pvt_val + cdef cyruntime.cudaStreamCallback_t* _pvt_ptr + +cdef class cudaGraphRecaptureCallback_t: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaGraphRecaptureCallback_t _pvt_val + cdef cyruntime.cudaGraphRecaptureCallback_t* _pvt_ptr + +cdef class cudaLogsCallback_t: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaLogsCallback_t _pvt_val + cdef cyruntime.cudaLogsCallback_t* _pvt_ptr + +cdef class dim3: + """ + Attributes + ---------- + + x : unsigned int + + + + y : unsigned int + + + + z : unsigned int + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.dim3 _pvt_val + cdef cyruntime.dim3* _pvt_ptr + +cdef class cudaChannelFormatDesc: + """ + CUDA Channel format descriptor + + Attributes + ---------- + + x : int + x + + + y : int + y + + + z : int + z + + + w : int + w + + + f : cudaChannelFormatKind + Channel format kind + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaChannelFormatDesc _pvt_val + cdef cyruntime.cudaChannelFormatDesc* _pvt_ptr + +cdef class anon_struct0: + """ + Attributes + ---------- + + width : unsigned int + + + + height : unsigned int + + + + depth : unsigned int + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaArraySparseProperties* _pvt_ptr + +cdef class cudaArraySparseProperties: + """ + Sparse CUDA array and CUDA mipmapped array properties + + Attributes + ---------- + + tileExtent : anon_struct0 + + + + miptailFirstLevel : unsigned int + First mip level at which the mip tail begins + + + miptailSize : unsigned long long + Total size of the mip tail. + + + flags : unsigned int + Flags will either be zero or cudaArraySparsePropertiesSingleMipTail + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaArraySparseProperties _pvt_val + cdef cyruntime.cudaArraySparseProperties* _pvt_ptr + + cdef anon_struct0 _tileExtent + + +cdef class cudaArrayMemoryRequirements: + """ + CUDA array and CUDA mipmapped array memory requirements + + Attributes + ---------- + + size : size_t + Total size of the array. + + + alignment : size_t + Alignment necessary for mapping the array. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaArrayMemoryRequirements _pvt_val + cdef cyruntime.cudaArrayMemoryRequirements* _pvt_ptr + +cdef class cudaPitchedPtr: + """ + CUDA Pitched memory pointer make_cudaPitchedPtr + + Attributes + ---------- + + ptr : Any + Pointer to allocated memory + + + pitch : size_t + Pitch of allocated memory in bytes + + + xsize : size_t + Logical width of allocation in elements + + + ysize : size_t + Logical height of allocation in elements + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaPitchedPtr _pvt_val + cdef cyruntime.cudaPitchedPtr* _pvt_ptr + + cdef _HelperInputVoidPtr _cyptr + + +cdef class cudaExtent: + """ + CUDA extent make_cudaExtent + + Attributes + ---------- + + width : size_t + Width in elements when referring to array memory, in bytes when + referring to linear memory + + + height : size_t + Height in elements + + + depth : size_t + Depth in elements + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExtent _pvt_val + cdef cyruntime.cudaExtent* _pvt_ptr + +cdef class cudaPos: + """ + CUDA 3D position make_cudaPos + + Attributes + ---------- + + x : size_t + x + + + y : size_t + y + + + z : size_t + z + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaPos _pvt_val + cdef cyruntime.cudaPos* _pvt_ptr + +cdef class cudaMemcpy3DParms: + """ + CUDA 3D memory copying parameters + + Attributes + ---------- + + srcArray : cudaArray_t + Source memory address + + + srcPos : cudaPos + Source position offset + + + srcPtr : cudaPitchedPtr + Pitched source memory address + + + dstArray : cudaArray_t + Destination memory address + + + dstPos : cudaPos + Destination position offset + + + dstPtr : cudaPitchedPtr + Pitched destination memory address + + + extent : cudaExtent + Requested memory copy size + + + kind : cudaMemcpyKind + Type of transfer + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemcpy3DParms _pvt_val + cdef cyruntime.cudaMemcpy3DParms* _pvt_ptr + + cdef cudaArray_t _srcArray + + + cdef cudaPos _srcPos + + + cdef cudaPitchedPtr _srcPtr + + + cdef cudaArray_t _dstArray + + + cdef cudaPos _dstPos + + + cdef cudaPitchedPtr _dstPtr + + + cdef cudaExtent _extent + + +cdef class cudaMemcpyNodeParams: + """ + Memcpy node parameters + + Attributes + ---------- + + flags : int + Must be zero + + + ctx : cudaExecutionContext_t + Context in which to run the memcpy. If NULL will try to use the + current context. + + + copyParams : cudaMemcpy3DParms + Parameters for the memory copy + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemcpyNodeParams _pvt_val + cdef cyruntime.cudaMemcpyNodeParams* _pvt_ptr + + cdef cudaExecutionContext_t _ctx + + + cdef cudaMemcpy3DParms _copyParams + + +cdef class cudaMemcpy3DPeerParms: + """ + CUDA 3D cross-device memory copying parameters + + Attributes + ---------- + + srcArray : cudaArray_t + Source memory address + + + srcPos : cudaPos + Source position offset + + + srcPtr : cudaPitchedPtr + Pitched source memory address + + + srcDevice : int + Source device + + + dstArray : cudaArray_t + Destination memory address + + + dstPos : cudaPos + Destination position offset + + + dstPtr : cudaPitchedPtr + Pitched destination memory address + + + dstDevice : int + Destination device + + + extent : cudaExtent + Requested memory copy size + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemcpy3DPeerParms _pvt_val + cdef cyruntime.cudaMemcpy3DPeerParms* _pvt_ptr + + cdef cudaArray_t _srcArray + + + cdef cudaPos _srcPos + + + cdef cudaPitchedPtr _srcPtr + + + cdef cudaArray_t _dstArray + + + cdef cudaPos _dstPos + + + cdef cudaPitchedPtr _dstPtr + + + cdef cudaExtent _extent + + +cdef class cudaMemsetParams: + """ + CUDA Memset node parameters + + Attributes + ---------- + + dst : Any + Destination device pointer + + + pitch : size_t + Pitch of destination device pointer. Unused if height is 1 + + + value : unsigned int + Value to be set + + + elementSize : unsigned int + Size of each element in bytes. Must be 1, 2, or 4. + + + width : size_t + Width of the row in elements + + + height : size_t + Number of rows + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemsetParams _pvt_val + cdef cyruntime.cudaMemsetParams* _pvt_ptr + + cdef _HelperInputVoidPtr _cydst + + +cdef class cudaMemsetParamsV2: + """ + CUDA Memset node parameters + + Attributes + ---------- + + dst : Any + Destination device pointer + + + pitch : size_t + Pitch of destination device pointer. Unused if height is 1 + + + value : unsigned int + Value to be set + + + elementSize : unsigned int + Size of each element in bytes. Must be 1, 2, or 4. + + + width : size_t + Width of the row in elements + + + height : size_t + Number of rows + + + ctx : cudaExecutionContext_t + Context in which to run the memset. If NULL will try to use the + current context. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemsetParamsV2 _pvt_val + cdef cyruntime.cudaMemsetParamsV2* _pvt_ptr + + cdef _HelperInputVoidPtr _cydst + + + cdef cudaExecutionContext_t _ctx + + +cdef class cudaAccessPolicyWindow: + """ + Specifies an access policy for a window, a contiguous extent of + memory beginning at base_ptr and ending at base_ptr + num_bytes. + Partition into many segments and assign segments such that. sum of + "hit segments" / window == approx. ratio. sum of "miss segments" / + window == approx 1-ratio. Segments and ratio specifications are + fitted to the capabilities of the architecture. Accesses in a hit + segment apply the hitProp access policy. Accesses in a miss segment + apply the missProp access policy. + + Attributes + ---------- + + base_ptr : Any + Starting address of the access policy window. CUDA driver may align + it. + + + num_bytes : size_t + Size in bytes of the window policy. CUDA driver may restrict the + maximum size and alignment. + + + hitRatio : float + hitRatio specifies percentage of lines assigned hitProp, rest are + assigned missProp. + + + hitProp : cudaAccessProperty + ::CUaccessProperty set for hit. + + + missProp : cudaAccessProperty + ::CUaccessProperty set for miss. Must be either NORMAL or + STREAMING. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaAccessPolicyWindow _pvt_val + cdef cyruntime.cudaAccessPolicyWindow* _pvt_ptr + + cdef _HelperInputVoidPtr _cybase_ptr + + +cdef class cudaHostNodeParams: + """ + CUDA host node parameters + + Attributes + ---------- + + fn : cudaHostFn_t + The function to call when the node executes + + + userData : Any + Argument to pass to the function + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaHostNodeParams _pvt_val + cdef cyruntime.cudaHostNodeParams* _pvt_ptr + + cdef cudaHostFn_t _fn + + + cdef _HelperInputVoidPtr _cyuserData + + +cdef class cudaHostNodeParamsV2: + """ + CUDA host node parameters + + Attributes + ---------- + + fn : cudaHostFn_t + The function to call when the node executes + + + userData : Any + Argument to pass to the function + + + syncMode : unsigned int + The synchronization mode to use for the host task + + + ctx : cudaExecutionContext_t + CUDA Execution Context + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaHostNodeParamsV2 _pvt_val + cdef cyruntime.cudaHostNodeParamsV2* _pvt_ptr + + cdef cudaHostFn_t _fn + + + cdef _HelperInputVoidPtr _cyuserData + + + cdef cudaExecutionContext_t _ctx + + +cdef class anon_struct1: + """ + Attributes + ---------- + + array : cudaArray_t + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaResourceDesc* _pvt_ptr + + cdef cudaArray_t _array + + +cdef class anon_struct2: + """ + Attributes + ---------- + + mipmap : cudaMipmappedArray_t + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaResourceDesc* _pvt_ptr + + cdef cudaMipmappedArray_t _mipmap + + +cdef class anon_struct3: + """ + Attributes + ---------- + + devPtr : Any + + + + desc : cudaChannelFormatDesc + + + + sizeInBytes : size_t + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaResourceDesc* _pvt_ptr + + cdef _HelperInputVoidPtr _cydevPtr + + + cdef cudaChannelFormatDesc _desc + + +cdef class anon_struct4: + """ + Attributes + ---------- + + devPtr : Any + + + + desc : cudaChannelFormatDesc + + + + width : size_t + + + + height : size_t + + + + pitchInBytes : size_t + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaResourceDesc* _pvt_ptr + + cdef _HelperInputVoidPtr _cydevPtr + + + cdef cudaChannelFormatDesc _desc + + +cdef class anon_struct5: + """ + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaResourceDesc* _pvt_ptr + +cdef class anon_union0: + """ + Attributes + ---------- + + array : anon_struct1 + + + + mipmap : anon_struct2 + + + + linear : anon_struct3 + + + + pitch2D : anon_struct4 + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaResourceDesc* _pvt_ptr + + cdef anon_struct1 _array + + + cdef anon_struct2 _mipmap + + + cdef anon_struct3 _linear + + + cdef anon_struct4 _pitch2D + + +cdef class cudaResourceDesc: + """ + CUDA resource descriptor + + Attributes + ---------- + + resType : cudaResourceType + Resource type + + + res : anon_union0 + + + + flags : unsigned int + Flags (must be zero) + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaResourceDesc* _val_ptr + cdef cyruntime.cudaResourceDesc* _pvt_ptr + + cdef anon_union0 _res + + +cdef class cudaResourceViewDesc: + """ + CUDA resource view descriptor + + Attributes + ---------- + + format : cudaResourceViewFormat + Resource view format + + + width : size_t + Width of the resource view + + + height : size_t + Height of the resource view + + + depth : size_t + Depth of the resource view + + + firstMipmapLevel : unsigned int + First defined mipmap level + + + lastMipmapLevel : unsigned int + Last defined mipmap level + + + firstLayer : unsigned int + First layer index + + + lastLayer : unsigned int + Last layer index + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaResourceViewDesc _pvt_val + cdef cyruntime.cudaResourceViewDesc* _pvt_ptr + +cdef class cudaPointerAttributes: + """ + CUDA pointer attributes + + Attributes + ---------- + + type : cudaMemoryType + The type of memory - cudaMemoryTypeUnregistered, + cudaMemoryTypeHost, cudaMemoryTypeDevice or cudaMemoryTypeManaged. + + + device : int + The device against which the memory was allocated or registered. If + the memory type is cudaMemoryTypeDevice then this identifies the + device on which the memory referred physically resides. If the + memory type is cudaMemoryTypeHost or::cudaMemoryTypeManaged then + this identifies the device which was current when the memory was + allocated or registered (and if that device is deinitialized then + this allocation will vanish with that device's state). + + + devicePointer : Any + The address which may be dereferenced on the current device to + access the memory or NULL if no such address exists. + + + hostPointer : Any + The address which may be dereferenced on the host to access the + memory or NULL if no such address exists. CUDA doesn't check if + unregistered memory is allocated so this field may contain invalid + pointer if an invalid pointer has been passed to CUDA. + + + localityDomainOrdinal : int + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaPointerAttributes* _val_ptr + cdef cyruntime.cudaPointerAttributes* _pvt_ptr + + cdef _HelperInputVoidPtr _cydevicePointer + + + cdef _HelperInputVoidPtr _cyhostPointer + + +cdef class cudaFuncAttributes: + """ + CUDA function attributes + + Attributes + ---------- + + sharedSizeBytes : size_t + The size in bytes of statically-allocated shared memory per block + required by this function. This does not include dynamically- + allocated shared memory requested by the user at runtime. + + + constSizeBytes : size_t + The size in bytes of user-allocated constant memory required by + this function. + + + localSizeBytes : size_t + The size in bytes of local memory used by each thread of this + function. + + + maxThreadsPerBlock : int + The maximum number of threads per block, beyond which a launch of + the function would fail. This number depends on both the function + and the device on which the function is currently loaded. + + + numRegs : int + The number of registers used by each thread of this function. + + + ptxVersion : int + The PTX virtual architecture version for which the function was + compiled. This value is the major PTX version * 10 + the minor PTX + version, so a PTX version 1.3 function would return the value 13. + + + binaryVersion : int + The binary architecture version for which the function was + compiled. This value is the major binary version * 10 + the minor + binary version, so a binary version 1.3 function would return the + value 13. + + + cacheModeCA : int + The attribute to indicate whether the function has been compiled + with user specified option "-Xptxas --dlcm=ca" set. + + + maxDynamicSharedSizeBytes : int + The maximum size in bytes of dynamic shared memory per block for + this function. Any launch must have a dynamic shared memory size + smaller than this value. This attribute is ignored if the + sharedMemoryMode function or launch attribute is set. This + attribute cannot be used to access oversized shared memory. + Oversized shared memory can only be accessed by setting the shared + memory mode. See cudaFuncSetAttribute + + + preferredShmemCarveout : int + On devices where the L1 cache and shared memory use the same + hardware resources, this sets the shared memory carveout + preference, in percent of the maximum shared memory. Refer to + cudaDevAttrMaxSharedMemoryPerMultiprocessor. This is only a hint, + and the driver can choose a different ratio if required to execute + the function. See cudaFuncSetAttribute + + + clusterDimMustBeSet : int + If this attribute is set, the kernel must launch with a valid + cluster dimension specified. + + + requiredClusterWidth : int + The required cluster width/height/depth in blocks. The values must + either all be 0 or all be positive. The validity of the cluster + dimensions is otherwise checked at launch time. If the value is + set during compile time, it cannot be set at runtime. Setting it at + runtime should return cudaErrorNotPermitted. See + cudaFuncSetAttribute + + + requiredClusterHeight : int + + + + requiredClusterDepth : int + + + + clusterSchedulingPolicyPreference : int + The block scheduling policy of a function. See + cudaFuncSetAttribute + + + nonPortableClusterSizeAllowed : int + Whether the function can be launched with non-portable cluster + size. 1 is allowed, 0 is disallowed. A non-portable cluster size + may only function on the specific SKUs the program is tested on. + The launch might fail if the program is run on a different hardware + platform. CUDA API provides cudaOccupancyMaxActiveClusters to + assist with checking whether the desired size can be launched on + the current device. Portable Cluster Size A portable cluster size + is guaranteed to be functional on all compute capabilities higher + than the target compute capability. The portable cluster size for + sm_90 is 8 blocks per cluster. This value may increase for future + compute capabilities. The specific hardware unit may support + higher cluster sizes that’s not guaranteed to be portable. See + cudaFuncSetAttribute + + + deviceNodeUpdateStatus : int + Whether the function can be updated on device. 1 means device node + update is supported, 0 is unsupported or driver is too old to check + the value. + + + sharedMemoryMode : cudaSharedMemoryMode + This controls a kernel's use of non-portable or oversized shared + memory configurations. See cudaFuncSetAttribute + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaFuncAttributes _pvt_val + cdef cyruntime.cudaFuncAttributes* _pvt_ptr + +cdef class anon_struct6: + """ + Attributes + ---------- + + deviceId : bytes + + + + localityDomainId : bytes + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemLocation* _pvt_ptr + +cdef class cudaMemLocation: + """ + Specifies a memory location. To specify a gpu, set type = + cudaMemLocationTypeDevice and set id = the gpu's device ordinal. To + specify a cpu NUMA node, set type = cudaMemLocationTypeHostNuma and + set id = host NUMA node id. + + Attributes + ---------- + + type : cudaMemLocationType + Specifies the location type, which modifies the meaning of id. + + + id : int + Identifier for cudaMemLocationType::cudaMemLocationTypeDevice, + cudaMemLocationType::cudaMemLocationTypeHost, or + cudaMemLocationType::cudaMemLocationTypeHostNuma. + + + localized : anon_struct6 + Identifier for + cudaMemLocationType::cudaMemLocationTypeDeviceLocalityDomain. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemLocation* _val_ptr + cdef cyruntime.cudaMemLocation* _pvt_ptr + + cdef anon_struct6 _localized + + +cdef class cudaMemAccessDesc: + """ + Memory access descriptor + + Attributes + ---------- + + location : cudaMemLocation + Location on which the request is to change it's accessibility + + + flags : cudaMemAccessFlags + ::CUmemProt accessibility flags to set on the request + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemAccessDesc _pvt_val + cdef cyruntime.cudaMemAccessDesc* _pvt_ptr + + cdef cudaMemLocation _location + + +cdef class cudaMemPoolProps: + """ + Specifies the properties of allocations made from the pool. + + Attributes + ---------- + + allocType : cudaMemAllocationType + Allocation type. Currently must be specified as + cudaMemAllocationTypePinned + + + handleTypes : cudaMemAllocationHandleType + Handle types that will be supported by allocations from the pool. + + + location : cudaMemLocation + Location allocations should reside. + + + win32SecurityAttributes : Any + Windows-specific LPSECURITYATTRIBUTES required when + cudaMemHandleTypeWin32 is specified. This security attribute + defines the scope of which exported allocations may be tranferred + to other processes. In all other cases, this field is required to + be zero. + + + maxSize : size_t + Maximum pool size. When set to 0, defaults to a system dependent + value. + + + usage : unsigned short + Bitmask indicating intended usage for the pool. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemPoolProps _pvt_val + cdef cyruntime.cudaMemPoolProps* _pvt_ptr + + cdef cudaMemLocation _location + + + cdef _HelperInputVoidPtr _cywin32SecurityAttributes + + +cdef class cudaMemPoolPtrExportData: + """ + Opaque data for exporting a pool allocation + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemPoolPtrExportData _pvt_val + cdef cyruntime.cudaMemPoolPtrExportData* _pvt_ptr + +cdef class cudaMemAllocNodeParams: + """ + Memory allocation node parameters + + Attributes + ---------- + + poolProps : cudaMemPoolProps + in: location where the allocation should reside (specified in + ::location). ::handleTypes must be cudaMemHandleTypeNone. IPC is + not supported. in: array of memory access descriptors. Used to + describe peer GPU access + + + accessDescs : cudaMemAccessDesc + in: number of memory access descriptors. Must not exceed the number + of GPUs. + + + accessDescCount : size_t + in: Number of `accessDescs`s + + + bytesize : size_t + in: size in bytes of the requested allocation + + + dptr : Any + out: address of the allocation returned by CUDA + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemAllocNodeParams _pvt_val + cdef cyruntime.cudaMemAllocNodeParams* _pvt_ptr + + cdef cudaMemPoolProps _poolProps + + + cdef size_t _accessDescs_length + cdef cyruntime.cudaMemAccessDesc* _accessDescs + + + cdef _HelperInputVoidPtr _cydptr + + +cdef class cudaMemAllocNodeParamsV2: + """ + Memory allocation node parameters + + Attributes + ---------- + + poolProps : cudaMemPoolProps + in: location where the allocation should reside (specified in + ::location). ::handleTypes must be cudaMemHandleTypeNone. IPC is + not supported. in: array of memory access descriptors. Used to + describe peer GPU access + + + accessDescs : cudaMemAccessDesc + in: number of memory access descriptors. Must not exceed the number + of GPUs. + + + accessDescCount : size_t + in: Number of `accessDescs`s + + + bytesize : size_t + in: size in bytes of the requested allocation + + + dptr : Any + out: address of the allocation returned by CUDA + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemAllocNodeParamsV2 _pvt_val + cdef cyruntime.cudaMemAllocNodeParamsV2* _pvt_ptr + + cdef cudaMemPoolProps _poolProps + + + cdef size_t _accessDescs_length + cdef cyruntime.cudaMemAccessDesc* _accessDescs + + + cdef _HelperInputVoidPtr _cydptr + + +cdef class cudaMemFreeNodeParams: + """ + Memory free node parameters + + Attributes + ---------- + + dptr : Any + in: the pointer to free + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemFreeNodeParams _pvt_val + cdef cyruntime.cudaMemFreeNodeParams* _pvt_ptr + + cdef _HelperInputVoidPtr _cydptr + + +cdef class cudaMemcpyAttributes: + """ + Attributes specific to copies within a batch. For more details on + usage see cudaMemcpyBatchAsync. + + Attributes + ---------- + + srcAccessOrder : cudaMemcpySrcAccessOrder + Source access ordering to be observed for copies with this + attribute. + + + srcLocHint : cudaMemLocation + Hint location for the source operand. Ignored when the pointers are + not managed memory or memory allocated outside CUDA. + + + dstLocHint : cudaMemLocation + Hint location for the destination operand. Ignored when the + pointers are not managed memory or memory allocated outside CUDA. + + + flags : unsigned int + Additional flags for copies with this attribute. See + cudaMemcpyFlags. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemcpyAttributes _pvt_val + cdef cyruntime.cudaMemcpyAttributes* _pvt_ptr + + cdef cudaMemLocation _srcLocHint + + + cdef cudaMemLocation _dstLocHint + + +cdef class cudaOffset3D: + """ + Struct representing offset into a cudaArray_t in elements + + Attributes + ---------- + + x : size_t + + + + y : size_t + + + + z : size_t + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaOffset3D _pvt_val + cdef cyruntime.cudaOffset3D* _pvt_ptr + +cdef class anon_struct7: + """ + Attributes + ---------- + + ptr : Any + + + + rowLength : size_t + + + + layerHeight : size_t + + + + locHint : cudaMemLocation + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemcpy3DOperand* _pvt_ptr + + cdef _HelperInputVoidPtr _cyptr + + + cdef cudaMemLocation _locHint + + +cdef class anon_struct8: + """ + Attributes + ---------- + + array : cudaArray_t + + + + offset : cudaOffset3D + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemcpy3DOperand* _pvt_ptr + + cdef cudaArray_t _array + + + cdef cudaOffset3D _offset + + +cdef class anon_union3: + """ + Attributes + ---------- + + ptr : anon_struct7 + + + + array : anon_struct8 + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemcpy3DOperand* _pvt_ptr + + cdef anon_struct7 _ptr + + + cdef anon_struct8 _array + + +cdef class cudaMemcpy3DOperand: + """ + Struct representing an operand for copy with cudaMemcpy3DBatchAsync + + Attributes + ---------- + + type : cudaMemcpy3DOperandType + + + + op : anon_union3 + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemcpy3DOperand* _val_ptr + cdef cyruntime.cudaMemcpy3DOperand* _pvt_ptr + + cdef anon_union3 _op + + +cdef class cudaMemcpy3DBatchOp: + """ + Attributes + ---------- + + src : cudaMemcpy3DOperand + Source memcpy operand. + + + dst : cudaMemcpy3DOperand + Destination memcpy operand. + + + extent : cudaExtent + Extents of the memcpy between src and dst. The width, height and + depth components must not be 0. + + + srcAccessOrder : cudaMemcpySrcAccessOrder + Source access ordering to be observed for copy from src to dst. + + + flags : unsigned int + Additional flags for copy from src to dst. See cudaMemcpyFlags. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemcpy3DBatchOp _pvt_val + cdef cyruntime.cudaMemcpy3DBatchOp* _pvt_ptr + + cdef cudaMemcpy3DOperand _src + + + cdef cudaMemcpy3DOperand _dst + + + cdef cudaExtent _extent + + +cdef class CUuuid_st: + """ + Attributes + ---------- + + bytes : bytes + < CUDA definition of UUID + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.CUuuid_st _pvt_val + cdef cyruntime.CUuuid_st* _pvt_ptr + +cdef class cudaDeviceProp: + """ + CUDA device properties + + Attributes + ---------- + + name : bytes + ASCII string identifying device + + + uuid : cudaUUID_t + 16-byte unique identifier + + + luid : bytes + 8-byte locally unique identifier. Value is undefined on TCC and + non-Windows platforms + + + luidDeviceNodeMask : unsigned int + LUID device node mask. Value is undefined on TCC and non-Windows + platforms + + + totalGlobalMem : size_t + Global memory available on device in bytes + + + sharedMemPerBlock : size_t + Shared memory available per block in bytes + + + regsPerBlock : int + 32-bit registers available per block + + + warpSize : int + Warp size in threads + + + memPitch : size_t + Maximum pitch in bytes allowed by memory copies + + + maxThreadsPerBlock : int + Maximum number of threads per block + + + maxThreadsDim : list[int] + Maximum size of each dimension of a block + + + maxGridSize : list[int] + Maximum size of each dimension of a grid + + + totalConstMem : size_t + Constant memory available on device in bytes + + + major : int + Major compute capability + + + minor : int + Minor compute capability + + + textureAlignment : size_t + Alignment requirement for textures + + + texturePitchAlignment : size_t + Pitch alignment requirement for texture references bound to pitched + memory + + + multiProcessorCount : int + Number of multiprocessors on device + + + integrated : int + Device is integrated as opposed to discrete + + + canMapHostMemory : int + Device can map host memory with + cudaHostAlloc/cudaHostGetDevicePointer + + + maxTexture1D : int + Maximum 1D texture size + + + maxTexture1DMipmap : int + Maximum 1D mipmapped texture size + + + maxTexture2D : list[int] + Maximum 2D texture dimensions + + + maxTexture2DMipmap : list[int] + Maximum 2D mipmapped texture dimensions + + + maxTexture2DLinear : list[int] + Maximum dimensions (width, height, pitch) for 2D textures bound to + pitched memory + + + maxTexture2DGather : list[int] + Maximum 2D texture dimensions if texture gather operations have to + be performed + + + maxTexture3D : list[int] + Maximum 3D texture dimensions + + + maxTexture3DAlt : list[int] + Maximum alternate 3D texture dimensions + + + maxTextureCubemap : int + Maximum Cubemap texture dimensions + + + maxTexture1DLayered : list[int] + Maximum 1D layered texture dimensions + + + maxTexture2DLayered : list[int] + Maximum 2D layered texture dimensions + + + maxTextureCubemapLayered : list[int] + Maximum Cubemap layered texture dimensions + + + maxSurface1D : int + Maximum 1D surface size + + + maxSurface2D : list[int] + Maximum 2D surface dimensions + + + maxSurface3D : list[int] + Maximum 3D surface dimensions + + + maxSurface1DLayered : list[int] + Maximum 1D layered surface dimensions + + + maxSurface2DLayered : list[int] + Maximum 2D layered surface dimensions + + + maxSurfaceCubemap : int + Maximum Cubemap surface dimensions + + + maxSurfaceCubemapLayered : list[int] + Maximum Cubemap layered surface dimensions + + + surfaceAlignment : size_t + Alignment requirements for surfaces + + + concurrentKernels : int + Device can possibly execute multiple kernels concurrently + + + ECCEnabled : int + Device has ECC support enabled + + + pciBusID : int + PCI bus ID of the device + + + pciDeviceID : int + PCI device ID of the device + + + pciDomainID : int + PCI domain ID of the device + + + tccDriver : int + 1 if device is a Tesla device using TCC driver, 0 otherwise + + + asyncEngineCount : int + Number of asynchronous engines + + + unifiedAddressing : int + Device shares a unified address space with the host + + + memoryBusWidth : int + Global memory bus width in bits + + + l2CacheSize : int + Size of L2 cache in bytes + + + persistingL2CacheMaxSize : int + Device's maximum l2 persisting lines capacity setting in bytes + + + maxThreadsPerMultiProcessor : int + Maximum resident threads per multiprocessor + + + streamPrioritiesSupported : int + Device supports stream priorities + + + globalL1CacheSupported : int + Device supports caching globals in L1 + + + localL1CacheSupported : int + Device supports caching locals in L1 + + + sharedMemPerMultiprocessor : size_t + Shared memory available per multiprocessor in bytes + + + regsPerMultiprocessor : int + 32-bit registers available per multiprocessor + + + managedMemory : int + Device supports allocating managed memory on this system + + + isMultiGpuBoard : int + Device is on a multi-GPU board + + + multiGpuBoardGroupID : int + Unique identifier for a group of devices on the same multi-GPU + board + + + hostNativeAtomicSupported : int + Link between the device and the host supports native atomic + operations + + + pageableMemoryAccess : int + Device supports coherently accessing pageable memory without + calling cudaHostRegister on it + + + concurrentManagedAccess : int + Device can coherently access managed memory concurrently with the + CPU + + + computePreemptionSupported : int + Device supports Compute Preemption + + + canUseHostPointerForRegisteredMem : int + Device can access host registered memory at the same virtual + address as the CPU + + + cooperativeLaunch : int + Device supports launching cooperative kernels via + cudaLaunchCooperativeKernel + + + sharedMemPerBlockOptin : size_t + Per device maximum shared memory per block usable by special opt in + + + pageableMemoryAccessUsesHostPageTables : int + Device accesses pageable memory via the host's page tables + + + directManagedMemAccessFromHost : int + Host can directly access managed memory on the device without + migration. + + + maxBlocksPerMultiProcessor : int + Maximum number of resident blocks per multiprocessor + + + accessPolicyMaxWindowSize : int + The maximum value of cudaAccessPolicyWindow::num_bytes. + + + reservedSharedMemPerBlock : size_t + Shared memory reserved by CUDA driver per block in bytes + + + hostRegisterSupported : int + Device supports host memory registration via cudaHostRegister. + + + sparseCudaArraySupported : int + 1 if the device supports sparse CUDA arrays and sparse CUDA + mipmapped arrays, 0 otherwise + + + hostRegisterReadOnlySupported : int + Device supports using the cudaHostRegister flag + cudaHostRegisterReadOnly to register memory that must be mapped as + read-only to the GPU + + + timelineSemaphoreInteropSupported : int + External timeline semaphore interop is supported on the device + + + memoryPoolsSupported : int + 1 if the device supports using the cudaMallocAsync and cudaMemPool + family of APIs, 0 otherwise + + + gpuDirectRDMASupported : int + 1 if the device supports GPUDirect RDMA APIs, 0 otherwise + + + gpuDirectRDMAFlushWritesOptions : unsigned int + Bitmask to be interpreted according to the + cudaFlushGPUDirectRDMAWritesOptions enum + + + gpuDirectRDMAWritesOrdering : int + See the cudaGPUDirectRDMAWritesOrdering enum for numerical values + + + memoryPoolSupportedHandleTypes : unsigned int + Bitmask of handle types supported with mempool-based IPC + + + deferredMappingCudaArraySupported : int + 1 if the device supports deferred mapping CUDA arrays and CUDA + mipmapped arrays + + + ipcEventSupported : int + Device supports IPC Events. + + + clusterLaunch : int + Indicates device supports cluster launch + + + unifiedFunctionPointers : int + Indicates device supports unified pointers + + + deviceNumaConfig : int + NUMA configuration of a device: value is of type + cudaDeviceNumaConfig enum + + + deviceNumaId : int + NUMA node ID of the GPU memory + + + mpsEnabled : int + Indicates if contexts created on this device will be shared via MPS + + + hostNumaId : int + NUMA ID of the host node closest to the device or -1 when system + does not support NUMA + + + gpuPciDeviceID : unsigned int + The combined 16-bit PCI device ID and 16-bit PCI vendor ID + + + gpuPciSubsystemID : unsigned int + The combined 16-bit PCI subsystem ID and 16-bit PCI subsystem + vendor ID + + + hostNumaMultinodeIpcSupported : int + 1 if the device supports HostNuma location IPC between nodes in a + multi-node system. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaDeviceProp _pvt_val + cdef cyruntime.cudaDeviceProp* _pvt_ptr + + cdef cudaUUID_t _uuid + + +cdef class cudaIpcEventHandle_st: + """ + CUDA IPC event handle + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaIpcEventHandle_st _pvt_val + cdef cyruntime.cudaIpcEventHandle_st* _pvt_ptr + +cdef class cudaIpcMemHandle_st: + """ + CUDA IPC memory handle + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaIpcMemHandle_st _pvt_val + cdef cyruntime.cudaIpcMemHandle_st* _pvt_ptr + +cdef class cudaMemFabricHandle_st: + """ + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemFabricHandle_st _pvt_val + cdef cyruntime.cudaMemFabricHandle_st* _pvt_ptr + +cdef class anon_struct9: + """ + Attributes + ---------- + + handle : Any + + + + name : Any + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalMemoryHandleDesc* _pvt_ptr + + cdef _HelperInputVoidPtr _cyhandle + + + cdef _HelperInputVoidPtr _cyname + + +cdef class anon_union4: + """ + Attributes + ---------- + + fd : int + + + + win32 : anon_struct9 + + + + nvSciBufObject : Any + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalMemoryHandleDesc* _pvt_ptr + + cdef anon_struct9 _win32 + + + cdef _HelperInputVoidPtr _cynvSciBufObject + + +cdef class cudaExternalMemoryHandleDesc: + """ + External memory handle descriptor + + Attributes + ---------- + + type : cudaExternalMemoryHandleType + Type of the handle + + + handle : anon_union4 + + + + size : unsigned long long + Size of the memory allocation + + + flags : unsigned int + Flags must either be zero or cudaExternalMemoryDedicated + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalMemoryHandleDesc* _val_ptr + cdef cyruntime.cudaExternalMemoryHandleDesc* _pvt_ptr + + cdef anon_union4 _handle + + +cdef class cudaExternalMemoryBufferDesc: + """ + External memory buffer descriptor + + Attributes + ---------- + + offset : unsigned long long + Offset into the memory object where the buffer's base is + + + size : unsigned long long + Size of the buffer + + + flags : unsigned int + Flags reserved for future use. Must be zero. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalMemoryBufferDesc _pvt_val + cdef cyruntime.cudaExternalMemoryBufferDesc* _pvt_ptr + +cdef class cudaExternalMemoryMipmappedArrayDesc: + """ + External memory mipmap descriptor + + Attributes + ---------- + + offset : unsigned long long + Offset into the memory object where the base level of the mipmap + chain is. + + + formatDesc : cudaChannelFormatDesc + Format of base level of the mipmap chain + + + extent : cudaExtent + Dimensions of base level of the mipmap chain + + + flags : unsigned int + Flags associated with CUDA mipmapped arrays. See + cudaMallocMipmappedArray + + + numLevels : unsigned int + Total number of levels in the mipmap chain + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalMemoryMipmappedArrayDesc _pvt_val + cdef cyruntime.cudaExternalMemoryMipmappedArrayDesc* _pvt_ptr + + cdef cudaChannelFormatDesc _formatDesc + + + cdef cudaExtent _extent + + +cdef class anon_struct10: + """ + Attributes + ---------- + + handle : Any + + + + name : Any + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreHandleDesc* _pvt_ptr + + cdef _HelperInputVoidPtr _cyhandle + + + cdef _HelperInputVoidPtr _cyname + + +cdef class anon_union5: + """ + Attributes + ---------- + + fd : int + + + + win32 : anon_struct10 + + + + nvSciSyncObj : Any + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreHandleDesc* _pvt_ptr + + cdef anon_struct10 _win32 + + + cdef _HelperInputVoidPtr _cynvSciSyncObj + + +cdef class cudaExternalSemaphoreHandleDesc: + """ + External semaphore handle descriptor + + Attributes + ---------- + + type : cudaExternalSemaphoreHandleType + Type of the handle + + + handle : anon_union5 + + + + flags : unsigned int + Flags reserved for the future. Must be zero. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreHandleDesc* _val_ptr + cdef cyruntime.cudaExternalSemaphoreHandleDesc* _pvt_ptr + + cdef anon_union5 _handle + + +cdef class anon_struct11: + """ + Attributes + ---------- + + value : unsigned long long + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreSignalParams* _pvt_ptr + +cdef class anon_union6: + """ + Attributes + ---------- + + fence : Any + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreSignalParams* _pvt_ptr + + cdef _HelperInputVoidPtr _cyfence + + +cdef class anon_struct12: + """ + Attributes + ---------- + + key : unsigned long long + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreSignalParams* _pvt_ptr + +cdef class anon_struct13: + """ + Attributes + ---------- + + fence : anon_struct11 + + + + nvSciSync : anon_union6 + + + + keyedMutex : anon_struct12 + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreSignalParams* _pvt_ptr + + cdef anon_struct11 _fence + + + cdef anon_union6 _nvSciSync + + + cdef anon_struct12 _keyedMutex + + +cdef class cudaExternalSemaphoreSignalParams: + """ + External semaphore signal parameters, compatible with driver type + + Attributes + ---------- + + params : anon_struct13 + + + + flags : unsigned int + Only when cudaExternalSemaphoreSignalParams is used to signal a + cudaExternalSemaphore_t of type + cudaExternalSemaphoreHandleTypeNvSciSync, the valid flag is + cudaExternalSemaphoreSignalSkipNvSciBufMemSync: which indicates + that while signaling the cudaExternalSemaphore_t, no memory + synchronization operations should be performed for any external + memory object imported as cudaExternalMemoryHandleTypeNvSciBuf. For + all other types of cudaExternalSemaphore_t, flags must be zero. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreSignalParams _pvt_val + cdef cyruntime.cudaExternalSemaphoreSignalParams* _pvt_ptr + + cdef anon_struct13 _params + + +cdef class anon_struct14: + """ + Attributes + ---------- + + value : unsigned long long + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreWaitParams* _pvt_ptr + +cdef class anon_union7: + """ + Attributes + ---------- + + fence : Any + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreWaitParams* _pvt_ptr + + cdef _HelperInputVoidPtr _cyfence + + +cdef class anon_struct15: + """ + Attributes + ---------- + + key : unsigned long long + + + + timeoutMs : unsigned int + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreWaitParams* _pvt_ptr + +cdef class anon_struct16: + """ + Attributes + ---------- + + fence : anon_struct14 + + + + nvSciSync : anon_union7 + + + + keyedMutex : anon_struct15 + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreWaitParams* _pvt_ptr + + cdef anon_struct14 _fence + + + cdef anon_union7 _nvSciSync + + + cdef anon_struct15 _keyedMutex + + +cdef class cudaExternalSemaphoreWaitParams: + """ + External semaphore wait parameters, compatible with driver type + + Attributes + ---------- + + params : anon_struct16 + + + + flags : unsigned int + Only when cudaExternalSemaphoreSignalParams is used to signal a + cudaExternalSemaphore_t of type + cudaExternalSemaphoreHandleTypeNvSciSync, the valid flag is + cudaExternalSemaphoreSignalSkipNvSciBufMemSync: which indicates + that while waiting for the cudaExternalSemaphore_t, no memory + synchronization operations should be performed for any external + memory object imported as cudaExternalMemoryHandleTypeNvSciBuf. For + all other types of cudaExternalSemaphore_t, flags must be zero. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreWaitParams _pvt_val + cdef cyruntime.cudaExternalSemaphoreWaitParams* _pvt_ptr + + cdef anon_struct16 _params + + +cdef class cudaDevSmResource: + """ + Data for SM-related resources All parameters in this structure are + OUTPUT only. Do not write to any of the fields in this structure. + + Attributes + ---------- + + smCount : unsigned int + The amount of streaming multiprocessors available in this resource. + + + minSmPartitionSize : unsigned int + The minimum number of streaming multiprocessors required to + partition this resource. + + + smCoscheduledAlignment : unsigned int + The number of streaming multiprocessors in this resource that are + guaranteed to be co-scheduled on the same GPU processing cluster. + smCount will be a multiple of this value, unless the backfill flag + is set. + + + flags : unsigned int + The flags set on this SM resource. For available flags see + cudaDevSmResourceGroup_flags. + + + localityDomainId : unsigned int + Locality domain that the SM must be located on. Only valid if + cudaDevSmResourceConstraintTypeLocalityDomainId is set in flags + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaDevSmResource _pvt_val + cdef cyruntime.cudaDevSmResource* _pvt_ptr + +cdef class cudaDevWorkqueueConfigResource: + """ + Data for workqueue configuration related resources + + Attributes + ---------- + + device : int + The device on which the workqueue resources are available + + + wqConcurrencyLimit : unsigned int + The expected maximum number of concurrent stream-ordered workloads + + + sharingScope : cudaDevWorkqueueConfigScope + The sharing scope for the workqueue resources + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaDevWorkqueueConfigResource _pvt_val + cdef cyruntime.cudaDevWorkqueueConfigResource* _pvt_ptr + +cdef class cudaDevWorkqueueResource: + """ + Handle to a pre-existing workqueue related resource + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaDevWorkqueueResource _pvt_val + cdef cyruntime.cudaDevWorkqueueResource* _pvt_ptr + +cdef class cudaDevSmResourceGroupParams_st: + """ + Input data for splitting SMs + + Attributes + ---------- + + smCount : unsigned int + The amount of SMs available in this resource. + + + coscheduledSmCount : unsigned int + The amount of co-scheduled SMs grouped together for locality + purposes. + + + preferredCoscheduledSmCount : unsigned int + When possible, combine co-scheduled groups together into larger + groups of this size. + + + flags : unsigned int + Combination of `cudaDevSmResourceGroup_flags` values to indicate + this this group is created. + + + localityDomainId : unsigned int + Locality domain that the SM must be located on. Only valid if + cudaDevSmResourceGroupLocalityDomainId is set in flags + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaDevSmResourceGroupParams_st _pvt_val + cdef cyruntime.cudaDevSmResourceGroupParams_st* _pvt_ptr + +cdef class cudaDevResource_st: + """ + A tagged union describing different resources identified by the + type field. This structure should not be directly modified outside + of the API that created it. struct enumcudaDevResourceTypetype; + union structcudaDevSmResourcesm; + structcudaDevWorkqueueConfigResourcewqConfig; + structcudaDevWorkqueueResourcewq; ; ; - If `typename` is + `cudaDevResourceTypeInvalid`, this resoure is not valid and cannot + be further accessed. - If `typename` is `cudaDevResourceTypeSm`, + the cudaDevSmResource structure `sm` is filled in. For example, + `sm.smCount` will reflect the amount of streaming multiprocessors + available in this resource. - If `typename` is + `cudaDevResourceTypeWorkqueueConfig`, the + cudaDevWorkqueueConfigResource structure `wqConfig` is filled in. + - If `typename` is `cudaDevResourceTypeWorkqueue`, the + cudaDevWorkqueueResource structure `wq` is filled in. + + Attributes + ---------- + + type : cudaDevResourceType + Type of resource, dictates which union field was last set + + + _internal_padding : bytes + + + + sm : cudaDevSmResource + Resource corresponding to cudaDevResourceTypeSm `typename`. + + + wqConfig : cudaDevWorkqueueConfigResource + Resource corresponding to cudaDevResourceTypeWorkqueueConfig + `typename`. + + + wq : cudaDevWorkqueueResource + Resource corresponding to cudaDevResourceTypeWorkqueue `typename`. + + + _oversize : bytes + + + + nextResource : cudaDevResource_st + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaDevResource_st* _val_ptr + cdef cyruntime.cudaDevResource_st* _pvt_ptr + + cdef cudaDevSmResource _sm + + + cdef cudaDevWorkqueueConfigResource _wqConfig + + + cdef cudaDevWorkqueueResource _wq + + + cdef size_t _nextResource_length + cdef cyruntime.cudaDevResource_st* _nextResource + + +cdef class cudalibraryHostUniversalFunctionAndDataTable: + """ + Attributes + ---------- + + functionTable : Any + + + + functionWindowSize : size_t + + + + dataTable : Any + + + + dataWindowSize : size_t + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudalibraryHostUniversalFunctionAndDataTable _pvt_val + cdef cyruntime.cudalibraryHostUniversalFunctionAndDataTable* _pvt_ptr + + cdef _HelperInputVoidPtr _cyfunctionTable + + + cdef _HelperInputVoidPtr _cydataTable + + +cdef class cudaKernelNodeParams: + """ + CUDA GPU kernel node parameters + + Attributes + ---------- + + func : Any + Kernel to launch + + + gridDim : dim3 + Grid dimensions + + + blockDim : dim3 + Block dimensions + + + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + + + kernelParams : Any + Array of pointers to individual kernel arguments + + + extra : Any + Pointer to kernel arguments in the "extra" format + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaKernelNodeParams _pvt_val + cdef cyruntime.cudaKernelNodeParams* _pvt_ptr + + cdef _HelperInputVoidPtr _cyfunc + + + cdef dim3 _gridDim + + + cdef dim3 _blockDim + + + cdef _HelperKernelParams _cykernelParams + + +cdef class cudaKernelNodeParamsV2: + """ + CUDA GPU kernel node parameters + + Attributes + ---------- + + func : Any + functionType = cudaKernelFucntionTypeDevice + + + kern : cudaKernel_t + functionType = cudaKernelFucntionTypeKernel + + + cuFunc : cudaFunction_t + functionType = cudaKernelFucntionTypeFunction + + + gridDim : dim3 + Grid dimensions + + + blockDim : dim3 + Block dimensions + + + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + + + kernelParams : Any + Array of pointers to individual kernel arguments + + + extra : Any + Pointer to kernel arguments in the "extra" format + + + ctx : cudaExecutionContext_t + Context in which to run the kernel. If NULL will try to use the + current context. + + + functionType : cudaKernelFunctionType + Type of handle passed in the func/kern/cuFunc union above + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaKernelNodeParamsV2* _val_ptr + cdef cyruntime.cudaKernelNodeParamsV2* _pvt_ptr + + cdef _HelperInputVoidPtr _cyfunc + + + cdef cudaKernel_t _kern + + + cdef cudaFunction_t _cuFunc + + + cdef dim3 _gridDim + + + cdef dim3 _blockDim + + + cdef _HelperKernelParams _cykernelParams + + + cdef cudaExecutionContext_t _ctx + + +cdef class cudaExternalSemaphoreSignalNodeParams: + """ + External semaphore signal node parameters + + Attributes + ---------- + + extSemArray : cudaExternalSemaphore_t + Array of external semaphore handles. + + + paramsArray : cudaExternalSemaphoreSignalParams + Array of external semaphore signal parameters. + + + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreSignalNodeParams _pvt_val + cdef cyruntime.cudaExternalSemaphoreSignalNodeParams* _pvt_ptr + + cdef size_t _extSemArray_length + cdef cyruntime.cudaExternalSemaphore_t* _extSemArray + + + cdef size_t _paramsArray_length + cdef cyruntime.cudaExternalSemaphoreSignalParams* _paramsArray + + +cdef class cudaExternalSemaphoreSignalNodeParamsV2: + """ + External semaphore signal node parameters + + Attributes + ---------- + + extSemArray : cudaExternalSemaphore_t + Array of external semaphore handles. + + + paramsArray : cudaExternalSemaphoreSignalParams + Array of external semaphore signal parameters. + + + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + + ctx : cudaExecutionContext_t + CUDA Execution Context + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreSignalNodeParamsV2 _pvt_val + cdef cyruntime.cudaExternalSemaphoreSignalNodeParamsV2* _pvt_ptr + + cdef size_t _extSemArray_length + cdef cyruntime.cudaExternalSemaphore_t* _extSemArray + + + cdef size_t _paramsArray_length + cdef cyruntime.cudaExternalSemaphoreSignalParams* _paramsArray + + + cdef cudaExecutionContext_t _ctx + + +cdef class cudaExternalSemaphoreWaitNodeParams: + """ + External semaphore wait node parameters + + Attributes + ---------- + + extSemArray : cudaExternalSemaphore_t + Array of external semaphore handles. + + + paramsArray : cudaExternalSemaphoreWaitParams + Array of external semaphore wait parameters. + + + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreWaitNodeParams _pvt_val + cdef cyruntime.cudaExternalSemaphoreWaitNodeParams* _pvt_ptr + + cdef size_t _extSemArray_length + cdef cyruntime.cudaExternalSemaphore_t* _extSemArray + + + cdef size_t _paramsArray_length + cdef cyruntime.cudaExternalSemaphoreWaitParams* _paramsArray + + +cdef class cudaExternalSemaphoreWaitNodeParamsV2: + """ + External semaphore wait node parameters + + Attributes + ---------- + + extSemArray : cudaExternalSemaphore_t + Array of external semaphore handles. + + + paramsArray : cudaExternalSemaphoreWaitParams + Array of external semaphore wait parameters. + + + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + + ctx : cudaExecutionContext_t + CUDA Execution Context + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreWaitNodeParamsV2 _pvt_val + cdef cyruntime.cudaExternalSemaphoreWaitNodeParamsV2* _pvt_ptr + + cdef size_t _extSemArray_length + cdef cyruntime.cudaExternalSemaphore_t* _extSemArray + + + cdef size_t _paramsArray_length + cdef cyruntime.cudaExternalSemaphoreWaitParams* _paramsArray + + + cdef cudaExecutionContext_t _ctx + + +cdef class cudaConditionalNodeParams: + """ + CUDA conditional node parameters + + Attributes + ---------- + + handle : cudaGraphConditionalHandle + Conditional node handle. Handles must be created in advance of + creating the node using cudaGraphConditionalHandleCreate. + + + type : cudaGraphConditionalNodeType + Type of conditional node. + + + size : unsigned int + Size of graph output array. Allowed values are 1 for + cudaGraphCondTypeWhile, 1 or 2 for cudaGraphCondTypeIf, or any + value greater than zero for cudaGraphCondTypeSwitch. + + + phGraph_out : cudaGraph_t + CUDA-owned array populated with conditional node child graphs + during creation of the node. Valid for the lifetime of the + conditional node. The contents of the graph(s) are subject to the + following constraints: - Allowed node types are kernel nodes, + empty nodes, child graphs, memsets, memcopies, and conditionals. + This applies recursively to child graphs and conditional bodies. + - All kernels, including kernels in nested conditionals or child + graphs at any level, must belong to the same device context. + These graphs may be populated using graph node creation APIs or + cudaStreamBeginCaptureToGraph. cudaGraphCondTypeIf: phGraph_out[0] + is executed when the condition is non-zero. If `size` == 2, + phGraph_out[1] will be executed when the condition is zero. + cudaGraphCondTypeWhile: phGraph_out[0] is executed as long as the + condition is non-zero. cudaGraphCondTypeSwitch: phGraph_out[n] is + executed when the condition is equal to n. If the condition >= + `size`, no body graph is executed. + + + ctx : cudaExecutionContext_t + CUDA Execution Context + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaConditionalNodeParams _pvt_val + cdef cyruntime.cudaConditionalNodeParams* _pvt_ptr + + cdef cudaGraphConditionalHandle _handle + + + cdef size_t _phGraph_out_length + cdef cyruntime.cudaGraph_t* _phGraph_out + + + cdef cudaExecutionContext_t _ctx + + +cdef class cudaChildGraphNodeParams: + """ + Child graph node parameters + + Attributes + ---------- + + graph : cudaGraph_t + The child graph to clone into the node for node creation, or a + handle to the graph owned by the node for node query. The graph + must not contain conditional nodes. Graphs containing memory + allocation or memory free nodes must set the ownership to be moved + to the parent. + + + ownership : cudaGraphChildGraphNodeOwnership + The ownership relationship of the child graph node. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaChildGraphNodeParams _pvt_val + cdef cyruntime.cudaChildGraphNodeParams* _pvt_ptr + + cdef cudaGraph_t _graph + + +cdef class cudaEventRecordNodeParams: + """ + Event record node parameters + + Attributes + ---------- + + event : cudaEvent_t + The event to record when the node executes + + + ctx : cudaExecutionContext_t + CUDA Execution Context + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaEventRecordNodeParams _pvt_val + cdef cyruntime.cudaEventRecordNodeParams* _pvt_ptr + + cdef cudaEvent_t _event + + + cdef cudaExecutionContext_t _ctx + + +cdef class cudaEventWaitNodeParams: + """ + Event wait node parameters + + Attributes + ---------- + + event : cudaEvent_t + The event to wait on from the node + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaEventWaitNodeParams _pvt_val + cdef cyruntime.cudaEventWaitNodeParams* _pvt_ptr + + cdef cudaEvent_t _event + + +cdef class cudaGraphNodeParams: + """ + Graph node parameters. See cudaGraphAddNode. + + Attributes + ---------- + + type : cudaGraphNodeType + Type of the node + + + kernel : cudaKernelNodeParamsV2 + Kernel node parameters. + + + memcpy : cudaMemcpyNodeParams + Memcpy node parameters. + + + memset : cudaMemsetParamsV2 + Memset node parameters. + + + host : cudaHostNodeParamsV2 + Host node parameters. + + + graph : cudaChildGraphNodeParams + Child graph node parameters. + + + eventWait : cudaEventWaitNodeParams + Event wait node parameters. + + + eventRecord : cudaEventRecordNodeParams + Event record node parameters. + + + extSemSignal : cudaExternalSemaphoreSignalNodeParamsV2 + External semaphore signal node parameters. + + + extSemWait : cudaExternalSemaphoreWaitNodeParamsV2 + External semaphore wait node parameters. + + + alloc : cudaMemAllocNodeParamsV2 + Memory allocation node parameters. + + + free : cudaMemFreeNodeParams + Memory free node parameters. + + + conditional : cudaConditionalNodeParams + Conditional node parameters. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaGraphNodeParams* _val_ptr + cdef cyruntime.cudaGraphNodeParams* _pvt_ptr + + cdef cudaKernelNodeParamsV2 _kernel + + + cdef cudaMemcpyNodeParams _memcpy + + + cdef cudaMemsetParamsV2 _memset + + + cdef cudaHostNodeParamsV2 _host + + + cdef cudaChildGraphNodeParams _graph + + + cdef cudaEventWaitNodeParams _eventWait + + + cdef cudaEventRecordNodeParams _eventRecord + + + cdef cudaExternalSemaphoreSignalNodeParamsV2 _extSemSignal + + + cdef cudaExternalSemaphoreWaitNodeParamsV2 _extSemWait + + + cdef cudaMemAllocNodeParamsV2 _alloc + + + cdef cudaMemFreeNodeParams _free + + + cdef cudaConditionalNodeParams _conditional + + +cdef class cudaGraphEdgeData_st: + """ + Optional annotation for edges in a CUDA graph. Note, all edges + implicitly have annotations and default to a zero-initialized value + if not specified. A zero-initialized struct indicates a standard + full serialization of two nodes with memory visibility. + + Attributes + ---------- + + from_port : bytes + This indicates when the dependency is triggered from the upstream + node on the edge. The meaning is specfic to the node type. A value + of 0 in all cases means full completion of the upstream node, with + memory visibility to the downstream node or portion thereof + (indicated by `to_port`). Only kernel nodes define non-zero + ports. A kernel node can use the following output port types: + cudaGraphKernelNodePortDefault, + cudaGraphKernelNodePortProgrammatic, or + cudaGraphKernelNodePortLaunchCompletion. + + + to_port : bytes + This indicates what portion of the downstream node is dependent on + the upstream node or portion thereof (indicated by `from_port`). + The meaning is specific to the node type. A value of 0 in all cases + means the entirety of the downstream node is dependent on the + upstream work. Currently no node types define non-zero ports. + Accordingly, this field must be set to zero. + + + type : bytes + This should be populated with a value from cudaGraphDependencyType. + (It is typed as char due to compiler-specific layout of bitfields.) + See cudaGraphDependencyType. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaGraphEdgeData_st _pvt_val + cdef cyruntime.cudaGraphEdgeData_st* _pvt_ptr + +cdef class cudaGraphInstantiateParams_st: + """ + Graph instantiation parameters + + Attributes + ---------- + + flags : unsigned long long + Instantiation flags + + + uploadStream : cudaStream_t + Upload stream + + + errNode_out : cudaGraphNode_t + The node which caused instantiation to fail, if any + + + result_out : cudaGraphInstantiateResult + Whether instantiation was successful. If it failed, the reason why + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaGraphInstantiateParams_st _pvt_val + cdef cyruntime.cudaGraphInstantiateParams_st* _pvt_ptr + + cdef cudaStream_t _uploadStream + + + cdef cudaGraphNode_t _errNode_out + + +cdef class cudaGraphExecUpdateResultInfo_st: + """ + Result information returned by cudaGraphExecUpdate + + Attributes + ---------- + + result : cudaGraphExecUpdateResult + Gives more specific detail when a cuda graph update fails. + + + errorNode : cudaGraphNode_t + The "to node" of the error edge when the topologies do not match. + The error node when the error is associated with a specific node. + NULL when the error is generic. + + + errorFromNode : cudaGraphNode_t + The from node of error edge when the topologies do not match. + Otherwise NULL. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaGraphExecUpdateResultInfo_st _pvt_val + cdef cyruntime.cudaGraphExecUpdateResultInfo_st* _pvt_ptr + + cdef cudaGraphNode_t _errorNode + + + cdef cudaGraphNode_t _errorFromNode + + +cdef class anon_struct17: + """ + Attributes + ---------- + + pValue : Any + + + + offset : size_t + + + + size : size_t + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaGraphKernelNodeUpdate* _pvt_ptr + + cdef _HelperInputVoidPtr _cypValue + + +cdef class anon_union11: + """ + Attributes + ---------- + + gridDim : dim3 + + + + param : anon_struct17 + + + + isEnabled : unsigned int + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaGraphKernelNodeUpdate* _pvt_ptr + + cdef dim3 _gridDim + + + cdef anon_struct17 _param + + +cdef class cudaGraphKernelNodeUpdate: + """ + Struct to specify a single node update to pass as part of a larger + array to ::cudaGraphKernelNodeUpdatesApply + + Attributes + ---------- + + node : cudaGraphDeviceNode_t + Node to update + + + field : cudaGraphKernelNodeField + Which type of update to apply. Determines how updateData is + interpreted + + + updateData : anon_union11 + Update data to apply. Which field is used depends on field's value + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaGraphKernelNodeUpdate* _val_ptr + cdef cyruntime.cudaGraphKernelNodeUpdate* _pvt_ptr + + cdef cudaGraphDeviceNode_t _node + + + cdef anon_union11 _updateData + + +cdef class cudaLaunchMemSyncDomainMap_st: + """ + Memory Synchronization Domain map See cudaLaunchMemSyncDomain. By + default, kernels are launched in domain 0. Kernel launched with + cudaLaunchMemSyncDomainRemote will have a different domain ID. User + may also alter the domain ID with cudaLaunchMemSyncDomainMap for a + specific stream / graph node / kernel launch. See + cudaLaunchAttributeMemSyncDomainMap. Domain ID range is available + through cudaDevAttrMemSyncDomainCount. + + Attributes + ---------- + + default_ : bytes + The default domain ID to use for designated kernels + + + remote : bytes + The remote domain ID to use for designated kernels + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaLaunchMemSyncDomainMap_st _pvt_val + cdef cyruntime.cudaLaunchMemSyncDomainMap_st* _pvt_ptr + +cdef class anon_struct18: + """ + Attributes + ---------- + + x : unsigned int + + + + y : unsigned int + + + + z : unsigned int + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaLaunchAttributeValue* _pvt_ptr + +cdef class anon_struct19: + """ + Attributes + ---------- + + event : cudaEvent_t + + + + flags : int + + + + triggerAtBlockStart : int + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaLaunchAttributeValue* _pvt_ptr + + cdef cudaEvent_t _event + + +cdef class anon_struct20: + """ + Attributes + ---------- + + x : unsigned int + + + + y : unsigned int + + + + z : unsigned int + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaLaunchAttributeValue* _pvt_ptr + +cdef class anon_struct21: + """ + Attributes + ---------- + + event : cudaEvent_t + + + + flags : int + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaLaunchAttributeValue* _pvt_ptr + + cdef cudaEvent_t _event + + +cdef class anon_struct22: + """ + Attributes + ---------- + + deviceUpdatable : int + + + + devNode : cudaGraphDeviceNode_t + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaLaunchAttributeValue* _pvt_ptr + + cdef cudaGraphDeviceNode_t _devNode + + +cdef class cudaLaunchAttributeValue: + """ + Launch attributes union; used as value field of cudaLaunchAttribute + + Attributes + ---------- + + pad : bytes + + + + accessPolicyWindow : cudaAccessPolicyWindow + Value of launch attribute cudaLaunchAttributeAccessPolicyWindow. + + + cooperative : int + Value of launch attribute cudaLaunchAttributeCooperative. Nonzero + indicates a cooperative kernel (see cudaLaunchCooperativeKernel). + + + syncPolicy : cudaSynchronizationPolicy + Value of launch attribute cudaLaunchAttributeSynchronizationPolicy. + cudaSynchronizationPolicy for work queued up in this stream. + + + clusterDim : anon_struct18 + Value of launch attribute cudaLaunchAttributeClusterDimension that + represents the desired cluster dimensions for the kernel. Opaque + type with the following fields: - `x` - The X dimension of the + cluster, in blocks. Must be a divisor of the grid X dimension. - + `y` - The Y dimension of the cluster, in blocks. Must be a divisor + of the grid Y dimension. - `z` - The Z dimension of the cluster, + in blocks. Must be a divisor of the grid Z dimension. + + + clusterSchedulingPolicyPreference : cudaClusterSchedulingPolicy + Value of launch attribute + cudaLaunchAttributeClusterSchedulingPolicyPreference. Cluster + scheduling policy preference for the kernel. + + + programmaticStreamSerializationAllowed : int + Value of launch attribute + cudaLaunchAttributeProgrammaticStreamSerialization. + + + programmaticEvent : anon_struct19 + Value of launch attribute cudaLaunchAttributeProgrammaticEvent with + the following fields: - `cudaEvent_t` event - Event to fire when + all blocks trigger it. - `int` flags; - Event record flags, see + cudaEventRecordWithFlags. Does not accept cudaEventRecordExternal. + - `int` triggerAtBlockStart - If this is set to non-0, each block + launch will automatically trigger the event. + + + priority : int + Value of launch attribute cudaLaunchAttributePriority. Execution + priority of the kernel. + + + memSyncDomainMap : cudaLaunchMemSyncDomainMap + Value of launch attribute cudaLaunchAttributeMemSyncDomainMap. See + cudaLaunchMemSyncDomainMap. + + + memSyncDomain : cudaLaunchMemSyncDomain + Value of launch attribute cudaLaunchAttributeMemSyncDomain. See + cudaLaunchMemSyncDomain. + + + preferredClusterDim : anon_struct20 + Value of launch attribute + cudaLaunchAttributePreferredClusterDimension that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + cudaLaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + cudaLaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + cudaLaunchAttributeValue::clusterDim. + + + launchCompletionEvent : anon_struct21 + Value of launch attribute cudaLaunchAttributeLaunchCompletionEvent + with the following fields: - `cudaEvent_t` event - Event to fire + when the last block launches. - `int` flags - Event record + flags, see cudaEventRecordWithFlags. Does not accept + cudaEventRecordExternal. + + + deviceUpdatableKernelNode : anon_struct22 + Value of launch attribute + cudaLaunchAttributeDeviceUpdatableKernelNode with the following + fields: - `int` deviceUpdatable - Whether or not the resulting + kernel node should be device-updatable. - + `cudaGraphDeviceNode_t` devNode - Returns a handle to pass to the + various device-side update functions. + + + sharedMemCarveout : unsigned int + Value of launch attribute + cudaLaunchAttributePreferredSharedMemoryCarveout. + + + nvlinkUtilCentricScheduling : unsigned int + Value of launch attribute + cudaLaunchAttributeNvlinkUtilCentricScheduling. + + + portableClusterSizeMode : cudaLaunchAttributePortableClusterMode + Value of launch attribute + cudaLaunchAttributePortableClusterSizeMode + + + sharedMemoryMode : cudaSharedMemoryMode + Value of launch attribute cudaLaunchAttributeSharedMemoryMode. See + cudaSharedMemoryMode for acceptable values. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaLaunchAttributeValue _pvt_val + cdef cyruntime.cudaLaunchAttributeValue* _pvt_ptr + + cdef cudaAccessPolicyWindow _accessPolicyWindow + + + cdef anon_struct18 _clusterDim + + + cdef anon_struct19 _programmaticEvent + + + cdef cudaLaunchMemSyncDomainMap _memSyncDomainMap + + + cdef anon_struct20 _preferredClusterDim + + + cdef anon_struct21 _launchCompletionEvent + + + cdef anon_struct22 _deviceUpdatableKernelNode + + +cdef class cudaLaunchAttribute_st: + """ + Launch attribute + + Attributes + ---------- + + id : cudaLaunchAttributeID + Attribute to set + + + val : cudaLaunchAttributeValue + Value of the attribute + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaLaunchAttribute_st _pvt_val + cdef cyruntime.cudaLaunchAttribute_st* _pvt_ptr + + cdef cudaLaunchAttributeValue _val + + +cdef class anon_struct23: + """ + Attributes + ---------- + + bytesOverBudget : unsigned long long + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaAsyncNotificationInfo* _pvt_ptr + +cdef class anon_union12: + """ + Attributes + ---------- + + overBudget : anon_struct23 + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaAsyncNotificationInfo* _pvt_ptr + + cdef anon_struct23 _overBudget + + +cdef class cudaAsyncNotificationInfo: + """ + Information describing an async notification event + + Attributes + ---------- + + type : cudaAsyncNotificationType + The type of notification being sent + + + info : anon_union12 + Information about the notification. `typename` must be checked in + order to interpret this field. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaAsyncNotificationInfo* _val_ptr + cdef cyruntime.cudaAsyncNotificationInfo* _pvt_ptr + + cdef anon_union12 _info + + +cdef class cudaTextureDesc: + """ + CUDA texture descriptor + + Attributes + ---------- + + addressMode : list[cudaTextureAddressMode] + Texture address mode for up to 3 dimensions + + + filterMode : cudaTextureFilterMode + Texture filter mode + + + readMode : cudaTextureReadMode + Texture read mode + + + sRGB : int + Perform sRGB->linear conversion during texture read + + + borderColor : list[float] + Texture Border Color + + + normalizedCoords : int + Indicates whether texture reads are normalized or not + + + maxAnisotropy : unsigned int + Limit to the anisotropy ratio + + + mipmapFilterMode : cudaTextureFilterMode + Mipmap filter mode + + + mipmapLevelBias : float + Offset applied to the supplied mipmap level + + + minMipmapLevelClamp : float + Lower end of the mipmap level range to clamp access to + + + maxMipmapLevelClamp : float + Upper end of the mipmap level range to clamp access to + + + disableTrilinearOptimization : int + Disable any trilinear filtering optimizations. + + + seamlessCubemap : int + Enable seamless cube map filtering. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaTextureDesc _pvt_val + cdef cyruntime.cudaTextureDesc* _pvt_ptr + +cdef class cudaGraphRecaptureCallbackData: + """ + Struct of user callback data that is invoked when node parameter + mismatches are detected while recapturing to an existing graph + + Attributes + ---------- + + callbackFunc : cudaGraphRecaptureCallback_t + Callback function that will be invoked + + + userData : Any + Generic pointer that is passed to the callback function + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaGraphRecaptureCallbackData _pvt_val + cdef cyruntime.cudaGraphRecaptureCallbackData* _pvt_ptr + + cdef cudaGraphRecaptureCallback_t _callbackFunc + + + cdef _HelperInputVoidPtr _cyuserData + + +cdef class cudaEglPlaneDesc_st: + """ + CUDA EGL Plane Descriptor - structure defining each plane of a CUDA + EGLFrame + + Attributes + ---------- + + width : unsigned int + Width of plane + + + height : unsigned int + Height of plane + + + depth : unsigned int + Depth of plane + + + pitch : unsigned int + Pitch of plane + + + numChannels : unsigned int + Number of channels for the plane + + + channelDesc : cudaChannelFormatDesc + Channel Format Descriptor + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaEglPlaneDesc_st _pvt_val + cdef cyruntime.cudaEglPlaneDesc_st* _pvt_ptr + + cdef cudaChannelFormatDesc _channelDesc + + +cdef class anon_union13: + """ + Attributes + ---------- + + pArray : list[cudaArray_t] + + + + pPitch : list[cudaPitchedPtr] + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaEglFrame_st* _pvt_ptr + +cdef class cudaEglFrame_st: + """ + CUDA EGLFrame Descriptor - structure defining one frame of EGL. + Each frame may contain one or more planes depending on whether the + surface is Multiplanar or not. Each plane of EGLFrame is + represented by cudaEglPlaneDesc which is defined as: + typedefstructcudaEglPlaneDesc_st unsignedintwidth; + unsignedintheight; unsignedintdepth; unsignedintpitch; + unsignedintnumChannels; structcudaChannelFormatDescchannelDesc; + unsignedintreserved[4]; cudaEglPlaneDesc; + + Attributes + ---------- + + frame : anon_union13 + + + + planeDesc : list[cudaEglPlaneDesc] + CUDA EGL Plane Descriptor cudaEglPlaneDesc + + + planeCount : unsigned int + Number of planes + + + frameType : cudaEglFrameType + Array or Pitch + + + eglColorFormat : cudaEglColorFormat + CUDA EGL Color Format + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaEglFrame_st* _val_ptr + cdef cyruntime.cudaEglFrame_st* _pvt_ptr + + cdef anon_union13 _frame + + +cdef class CUuuid(CUuuid_st): + """ + Attributes + ---------- + + bytes : bytes + < CUDA definition of UUID + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaUUID_t(CUuuid_st): + """ + Attributes + ---------- + + bytes : bytes + < CUDA definition of UUID + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaIpcEventHandle_t(cudaIpcEventHandle_st): + """ + CUDA IPC event handle + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaIpcMemHandle_t(cudaIpcMemHandle_st): + """ + CUDA IPC memory handle + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaMemFabricHandle_t(cudaMemFabricHandle_st): + """ + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaDevSmResourceGroupParams(cudaDevSmResourceGroupParams_st): + """ + Input data for splitting SMs + + Attributes + ---------- + + smCount : unsigned int + The amount of SMs available in this resource. + + + coscheduledSmCount : unsigned int + The amount of co-scheduled SMs grouped together for locality + purposes. + + + preferredCoscheduledSmCount : unsigned int + When possible, combine co-scheduled groups together into larger + groups of this size. + + + flags : unsigned int + Combination of `cudaDevSmResourceGroup_flags` values to indicate + this this group is created. + + + localityDomainId : unsigned int + Locality domain that the SM must be located on. Only valid if + cudaDevSmResourceGroupLocalityDomainId is set in flags + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaDevResource(cudaDevResource_st): + """ + A tagged union describing different resources identified by the + type field. This structure should not be directly modified outside + of the API that created it. struct enumcudaDevResourceTypetype; + union structcudaDevSmResourcesm; + structcudaDevWorkqueueConfigResourcewqConfig; + structcudaDevWorkqueueResourcewq; ; ; - If `typename` is + `cudaDevResourceTypeInvalid`, this resoure is not valid and cannot + be further accessed. - If `typename` is `cudaDevResourceTypeSm`, + the cudaDevSmResource structure `sm` is filled in. For example, + `sm.smCount` will reflect the amount of streaming multiprocessors + available in this resource. - If `typename` is + `cudaDevResourceTypeWorkqueueConfig`, the + cudaDevWorkqueueConfigResource structure `wqConfig` is filled in. + - If `typename` is `cudaDevResourceTypeWorkqueue`, the + cudaDevWorkqueueResource structure `wq` is filled in. + + Attributes + ---------- + + type : cudaDevResourceType + Type of resource, dictates which union field was last set + + + _internal_padding : bytes + + + + sm : cudaDevSmResource + Resource corresponding to cudaDevResourceTypeSm `typename`. + + + wqConfig : cudaDevWorkqueueConfigResource + Resource corresponding to cudaDevResourceTypeWorkqueueConfig + `typename`. + + + wq : cudaDevWorkqueueResource + Resource corresponding to cudaDevResourceTypeWorkqueue `typename`. + + + _oversize : bytes + + + + nextResource : cudaDevResource_st + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaGraphEdgeData(cudaGraphEdgeData_st): + """ + Optional annotation for edges in a CUDA graph. Note, all edges + implicitly have annotations and default to a zero-initialized value + if not specified. A zero-initialized struct indicates a standard + full serialization of two nodes with memory visibility. + + Attributes + ---------- + + from_port : bytes + This indicates when the dependency is triggered from the upstream + node on the edge. The meaning is specfic to the node type. A value + of 0 in all cases means full completion of the upstream node, with + memory visibility to the downstream node or portion thereof + (indicated by `to_port`). Only kernel nodes define non-zero + ports. A kernel node can use the following output port types: + cudaGraphKernelNodePortDefault, + cudaGraphKernelNodePortProgrammatic, or + cudaGraphKernelNodePortLaunchCompletion. + + + to_port : bytes + This indicates what portion of the downstream node is dependent on + the upstream node or portion thereof (indicated by `from_port`). + The meaning is specific to the node type. A value of 0 in all cases + means the entirety of the downstream node is dependent on the + upstream work. Currently no node types define non-zero ports. + Accordingly, this field must be set to zero. + + + type : bytes + This should be populated with a value from cudaGraphDependencyType. + (It is typed as char due to compiler-specific layout of bitfields.) + See cudaGraphDependencyType. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaGraphInstantiateParams(cudaGraphInstantiateParams_st): + """ + Graph instantiation parameters + + Attributes + ---------- + + flags : unsigned long long + Instantiation flags + + + uploadStream : cudaStream_t + Upload stream + + + errNode_out : cudaGraphNode_t + The node which caused instantiation to fail, if any + + + result_out : cudaGraphInstantiateResult + Whether instantiation was successful. If it failed, the reason why + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaGraphExecUpdateResultInfo(cudaGraphExecUpdateResultInfo_st): + """ + Result information returned by cudaGraphExecUpdate + + Attributes + ---------- + + result : cudaGraphExecUpdateResult + Gives more specific detail when a cuda graph update fails. + + + errorNode : cudaGraphNode_t + The "to node" of the error edge when the topologies do not match. + The error node when the error is associated with a specific node. + NULL when the error is generic. + + + errorFromNode : cudaGraphNode_t + The from node of error edge when the topologies do not match. + Otherwise NULL. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaLaunchMemSyncDomainMap(cudaLaunchMemSyncDomainMap_st): + """ + Memory Synchronization Domain map See cudaLaunchMemSyncDomain. By + default, kernels are launched in domain 0. Kernel launched with + cudaLaunchMemSyncDomainRemote will have a different domain ID. User + may also alter the domain ID with cudaLaunchMemSyncDomainMap for a + specific stream / graph node / kernel launch. See + cudaLaunchAttributeMemSyncDomainMap. Domain ID range is available + through cudaDevAttrMemSyncDomainCount. + + Attributes + ---------- + + default_ : bytes + The default domain ID to use for designated kernels + + + remote : bytes + The remote domain ID to use for designated kernels + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaLaunchAttribute(cudaLaunchAttribute_st): + """ + Launch attribute + + Attributes + ---------- + + id : cudaLaunchAttributeID + Attribute to set + + + val : cudaLaunchAttributeValue + Value of the attribute + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaAsyncNotificationInfo_t(cudaAsyncNotificationInfo): + """ + Information describing an async notification event + + Attributes + ---------- + + type : cudaAsyncNotificationType + The type of notification being sent + + + info : anon_union12 + Information about the notification. `typename` must be checked in + order to interpret this field. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaStreamAttrValue(cudaLaunchAttributeValue): + """ + Launch attributes union; used as value field of cudaLaunchAttribute + + Attributes + ---------- + + pad : bytes + + + + accessPolicyWindow : cudaAccessPolicyWindow + Value of launch attribute cudaLaunchAttributeAccessPolicyWindow. + + + cooperative : int + Value of launch attribute cudaLaunchAttributeCooperative. Nonzero + indicates a cooperative kernel (see cudaLaunchCooperativeKernel). + + + syncPolicy : cudaSynchronizationPolicy + Value of launch attribute cudaLaunchAttributeSynchronizationPolicy. + cudaSynchronizationPolicy for work queued up in this stream. + + + clusterDim : anon_struct18 + Value of launch attribute cudaLaunchAttributeClusterDimension that + represents the desired cluster dimensions for the kernel. Opaque + type with the following fields: - `x` - The X dimension of the + cluster, in blocks. Must be a divisor of the grid X dimension. - + `y` - The Y dimension of the cluster, in blocks. Must be a divisor + of the grid Y dimension. - `z` - The Z dimension of the cluster, + in blocks. Must be a divisor of the grid Z dimension. + + + clusterSchedulingPolicyPreference : cudaClusterSchedulingPolicy + Value of launch attribute + cudaLaunchAttributeClusterSchedulingPolicyPreference. Cluster + scheduling policy preference for the kernel. + + + programmaticStreamSerializationAllowed : int + Value of launch attribute + cudaLaunchAttributeProgrammaticStreamSerialization. + + + programmaticEvent : anon_struct19 + Value of launch attribute cudaLaunchAttributeProgrammaticEvent with + the following fields: - `cudaEvent_t` event - Event to fire when + all blocks trigger it. - `int` flags; - Event record flags, see + cudaEventRecordWithFlags. Does not accept cudaEventRecordExternal. + - `int` triggerAtBlockStart - If this is set to non-0, each block + launch will automatically trigger the event. + + + priority : int + Value of launch attribute cudaLaunchAttributePriority. Execution + priority of the kernel. + + + memSyncDomainMap : cudaLaunchMemSyncDomainMap + Value of launch attribute cudaLaunchAttributeMemSyncDomainMap. See + cudaLaunchMemSyncDomainMap. + + + memSyncDomain : cudaLaunchMemSyncDomain + Value of launch attribute cudaLaunchAttributeMemSyncDomain. See + cudaLaunchMemSyncDomain. + + + preferredClusterDim : anon_struct20 + Value of launch attribute + cudaLaunchAttributePreferredClusterDimension that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + cudaLaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + cudaLaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + cudaLaunchAttributeValue::clusterDim. + + + launchCompletionEvent : anon_struct21 + Value of launch attribute cudaLaunchAttributeLaunchCompletionEvent + with the following fields: - `cudaEvent_t` event - Event to fire + when the last block launches. - `int` flags - Event record + flags, see cudaEventRecordWithFlags. Does not accept + cudaEventRecordExternal. + + + deviceUpdatableKernelNode : anon_struct22 + Value of launch attribute + cudaLaunchAttributeDeviceUpdatableKernelNode with the following + fields: - `int` deviceUpdatable - Whether or not the resulting + kernel node should be device-updatable. - + `cudaGraphDeviceNode_t` devNode - Returns a handle to pass to the + various device-side update functions. + + + sharedMemCarveout : unsigned int + Value of launch attribute + cudaLaunchAttributePreferredSharedMemoryCarveout. + + + nvlinkUtilCentricScheduling : unsigned int + Value of launch attribute + cudaLaunchAttributeNvlinkUtilCentricScheduling. + + + portableClusterSizeMode : cudaLaunchAttributePortableClusterMode + Value of launch attribute + cudaLaunchAttributePortableClusterSizeMode + + + sharedMemoryMode : cudaSharedMemoryMode + Value of launch attribute cudaLaunchAttributeSharedMemoryMode. See + cudaSharedMemoryMode for acceptable values. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaKernelNodeAttrValue(cudaLaunchAttributeValue): + """ + Launch attributes union; used as value field of cudaLaunchAttribute + + Attributes + ---------- + + pad : bytes + + + + accessPolicyWindow : cudaAccessPolicyWindow + Value of launch attribute cudaLaunchAttributeAccessPolicyWindow. + + + cooperative : int + Value of launch attribute cudaLaunchAttributeCooperative. Nonzero + indicates a cooperative kernel (see cudaLaunchCooperativeKernel). + + + syncPolicy : cudaSynchronizationPolicy + Value of launch attribute cudaLaunchAttributeSynchronizationPolicy. + cudaSynchronizationPolicy for work queued up in this stream. + + + clusterDim : anon_struct18 + Value of launch attribute cudaLaunchAttributeClusterDimension that + represents the desired cluster dimensions for the kernel. Opaque + type with the following fields: - `x` - The X dimension of the + cluster, in blocks. Must be a divisor of the grid X dimension. - + `y` - The Y dimension of the cluster, in blocks. Must be a divisor + of the grid Y dimension. - `z` - The Z dimension of the cluster, + in blocks. Must be a divisor of the grid Z dimension. + + + clusterSchedulingPolicyPreference : cudaClusterSchedulingPolicy + Value of launch attribute + cudaLaunchAttributeClusterSchedulingPolicyPreference. Cluster + scheduling policy preference for the kernel. + + + programmaticStreamSerializationAllowed : int + Value of launch attribute + cudaLaunchAttributeProgrammaticStreamSerialization. + + + programmaticEvent : anon_struct19 + Value of launch attribute cudaLaunchAttributeProgrammaticEvent with + the following fields: - `cudaEvent_t` event - Event to fire when + all blocks trigger it. - `int` flags; - Event record flags, see + cudaEventRecordWithFlags. Does not accept cudaEventRecordExternal. + - `int` triggerAtBlockStart - If this is set to non-0, each block + launch will automatically trigger the event. + + + priority : int + Value of launch attribute cudaLaunchAttributePriority. Execution + priority of the kernel. + + + memSyncDomainMap : cudaLaunchMemSyncDomainMap + Value of launch attribute cudaLaunchAttributeMemSyncDomainMap. See + cudaLaunchMemSyncDomainMap. + + + memSyncDomain : cudaLaunchMemSyncDomain + Value of launch attribute cudaLaunchAttributeMemSyncDomain. See + cudaLaunchMemSyncDomain. + + + preferredClusterDim : anon_struct20 + Value of launch attribute + cudaLaunchAttributePreferredClusterDimension that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + cudaLaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + cudaLaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + cudaLaunchAttributeValue::clusterDim. + + + launchCompletionEvent : anon_struct21 + Value of launch attribute cudaLaunchAttributeLaunchCompletionEvent + with the following fields: - `cudaEvent_t` event - Event to fire + when the last block launches. - `int` flags - Event record + flags, see cudaEventRecordWithFlags. Does not accept + cudaEventRecordExternal. + + + deviceUpdatableKernelNode : anon_struct22 + Value of launch attribute + cudaLaunchAttributeDeviceUpdatableKernelNode with the following + fields: - `int` deviceUpdatable - Whether or not the resulting + kernel node should be device-updatable. - + `cudaGraphDeviceNode_t` devNode - Returns a handle to pass to the + various device-side update functions. + + + sharedMemCarveout : unsigned int + Value of launch attribute + cudaLaunchAttributePreferredSharedMemoryCarveout. + + + nvlinkUtilCentricScheduling : unsigned int + Value of launch attribute + cudaLaunchAttributeNvlinkUtilCentricScheduling. + + + portableClusterSizeMode : cudaLaunchAttributePortableClusterMode + Value of launch attribute + cudaLaunchAttributePortableClusterSizeMode + + + sharedMemoryMode : cudaSharedMemoryMode + Value of launch attribute cudaLaunchAttributeSharedMemoryMode. See + cudaSharedMemoryMode for acceptable values. + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaEglPlaneDesc(cudaEglPlaneDesc_st): + """ + CUDA EGL Plane Descriptor - structure defining each plane of a CUDA + EGLFrame + + Attributes + ---------- + + width : unsigned int + Width of plane + + + height : unsigned int + Height of plane + + + depth : unsigned int + Depth of plane + + + pitch : unsigned int + Pitch of plane + + + numChannels : unsigned int + Number of channels for the plane + + + channelDesc : cudaChannelFormatDesc + Channel Format Descriptor + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaEglFrame(cudaEglFrame_st): + """ + CUDA EGLFrame Descriptor - structure defining one frame of EGL. + Each frame may contain one or more planes depending on whether the + surface is Multiplanar or not. Each plane of EGLFrame is + represented by cudaEglPlaneDesc which is defined as: + typedefstructcudaEglPlaneDesc_st unsignedintwidth; + unsignedintheight; unsignedintdepth; unsignedintpitch; + unsignedintnumChannels; structcudaChannelFormatDescchannelDesc; + unsignedintreserved[4]; cudaEglPlaneDesc; + + Attributes + ---------- + + frame : anon_union13 + + + + planeDesc : list[cudaEglPlaneDesc] + CUDA EGL Plane Descriptor cudaEglPlaneDesc + + + planeCount : unsigned int + Number of planes + + + frameType : cudaEglFrameType + Array or Pitch + + + eglColorFormat : cudaEglColorFormat + CUDA EGL Color Format + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaStream_t(driver.CUstream): + """ + + CUDA stream + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + pass + +cdef class cudaEvent_t(driver.CUevent): + """ + + CUDA event types + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + pass + +cdef class cudaGraph_t(driver.CUgraph): + """ + + CUDA graph + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + pass + +cdef class cudaGraphNode_t(driver.CUgraphNode): + """ + + CUDA graph node. + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + pass + +cdef class cudaUserObject_t(driver.CUuserObject): + """ + + CUDA user object for graphs + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + pass + +cdef class cudaFunction_t(driver.CUfunction): + """ + + CUDA function + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + pass + +cdef class cudaMemPool_t(driver.CUmemoryPool): + """ + + CUDA memory pool + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + pass + +cdef class cudaGraphExec_t(driver.CUgraphExec): + """ + + CUDA executable (launchable) graph + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + pass + +cdef class cudaEglStreamConnection(driver.CUeglStreamConnection): + """ + + CUDA EGLSream Connection + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + pass + +cdef class cudaGraphConditionalHandle: + """ + + CUDA handle for conditional graph nodes + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaGraphConditionalHandle _pvt_val + cdef cyruntime.cudaGraphConditionalHandle* _pvt_ptr + +cdef class cudaLogIterator: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaLogIterator _pvt_val + cdef cyruntime.cudaLogIterator* _pvt_ptr + +cdef class cudaSurfaceObject_t: + """ + + An opaque value that represents a CUDA Surface object + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaSurfaceObject_t _pvt_val + cdef cyruntime.cudaSurfaceObject_t* _pvt_ptr + +cdef class cudaTextureObject_t: + """ + + An opaque value that represents a CUDA texture object + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaTextureObject_t _pvt_val + cdef cyruntime.cudaTextureObject_t* _pvt_ptr + +cdef class GLenum: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.GLenum _pvt_val + cdef cyruntime.GLenum* _pvt_ptr + +cdef class GLuint: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.GLuint _pvt_val + cdef cyruntime.GLuint* _pvt_ptr + +cdef class EGLint: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.EGLint _pvt_val + cdef cyruntime.EGLint* _pvt_ptr + +cdef class VdpDevice: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.VdpDevice _pvt_val + cdef cyruntime.VdpDevice* _pvt_ptr + +cdef class VdpGetProcAddress: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.VdpGetProcAddress _pvt_val + cdef cyruntime.VdpGetProcAddress* _pvt_ptr + +cdef class VdpVideoSurface: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.VdpVideoSurface _pvt_val + cdef cyruntime.VdpVideoSurface* _pvt_ptr + +cdef class VdpOutputSurface: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.VdpOutputSurface _pvt_val + cdef cyruntime.VdpOutputSurface* _pvt_ptr diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/utils/__init__.py b/hug/lib/python3.12/site-packages/cuda/bindings/utils/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..69618239d9159af550b758710c682c0ec98366d0 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/utils/__init__.py @@ -0,0 +1,36 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +from typing import Any, Callable + +from ._envvar import envvar_bool +from ._nvvm_utils import check_nvvm_compiler_options +from ._ptx_utils import get_minimal_required_cuda_ver_from_ptx_ver, get_ptx_ver +from ._version_check import warn_if_cuda_major_version_mismatch + +_handle_getters: dict[type, Callable[[Any], int]] = {} + + +def _add_cuda_native_handle_getter(t: type, getter: Callable[[Any], int]) -> None: + _handle_getters[t] = getter + + +def get_cuda_native_handle(obj: Any) -> int: + """Returns the address of the provided CUDA Python object as a Python int. + + Parameters + ---------- + obj : Any + CUDA Python object + + Returns + ------- + int : The object address. + """ + obj_type = type(obj) + try: + getter = _handle_getters[obj_type] + except KeyError: + raise TypeError("Unknown type: " + str(obj_type)) from None + # Deliberately outside the try: a KeyError raised by the getter itself is a + # bug in that getter, not an unregistered type. + return getter(obj) diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/utils/__pycache__/__init__.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/bindings/utils/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f371733bb5f2a328de1c839a936265ae45b698ef Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/bindings/utils/__pycache__/__init__.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/utils/__pycache__/_envvar.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/bindings/utils/__pycache__/_envvar.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5bda10118e6814e7de1eda5920a6a0d21b77a821 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/bindings/utils/__pycache__/_envvar.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/utils/__pycache__/_nvvm_utils.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/bindings/utils/__pycache__/_nvvm_utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d2759e91da1aff3df74c2b505890e3dcde6916de Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/bindings/utils/__pycache__/_nvvm_utils.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/utils/__pycache__/_ptx_utils.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/bindings/utils/__pycache__/_ptx_utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3c5e29c456cc9ba39580edfa0939a83e76eddc0d Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/bindings/utils/__pycache__/_ptx_utils.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/utils/__pycache__/_version_check.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/bindings/utils/__pycache__/_version_check.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b9c54402a83b033d5d0aee8c5566ada59f8b24a1 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/bindings/utils/__pycache__/_version_check.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/utils/_envvar.py b/hug/lib/python3.12/site-packages/cuda/bindings/utils/_envvar.py new file mode 100644 index 0000000000000000000000000000000000000000..16a812f0035d256a4c78d0d5fcad2033289ae6e6 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/utils/_envvar.py @@ -0,0 +1,35 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +import os + +_TRUE_VALUES = frozenset({"1", "true", "yes", "on"}) +_FALSE_VALUES = frozenset({"0", "false", "no", "off"}) + + +def envvar_bool(name: str, default: bool = False) -> bool: + """Read a bool-like environment variable. + + Unset, empty, or whitespace-only means ``default``. ``1/true/yes/on`` and + ``0/false/no/off`` are recognised case-insensitively, and any other integer + follows C truthiness, so ``2`` is true and ``-0`` is false. + + A value that is none of those keeps the historical set-means-true + behaviour rather than raising, because these variables are read during + import and a raise would turn a typo into an import failure. + """ + raw = os.environ.get(name) + if raw is None: + return default + raw = raw.strip() + if not raw: + return default + lowered = raw.lower() + if lowered in _TRUE_VALUES: + return True + if lowered in _FALSE_VALUES: + return False + try: + return int(raw, 0) != 0 + except ValueError: + return True diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/utils/_nvvm_utils.py b/hug/lib/python3.12/site-packages/cuda/bindings/utils/_nvvm_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..9ac37c3a23601fbed697f0cd919fd3fc3481e159 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/utils/_nvvm_utils.py @@ -0,0 +1,89 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +from typing import Sequence + +_PRECHECK_NVVM_IR = """target triple = "nvptx64-unknown-cuda" +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-i128:128:128-f32:32:32-f64:64:64-v16:16:16-v32:32:32-v64:64:64-v128:128:128-n16:32:64" + +define void @dummy_kernel() {{ +entry: + ret void +}} + +!nvvm.annotations = !{{!0}} +!0 = !{{void ()* @dummy_kernel, !"kernel", i32 1}} + +!nvvmir.version = !{{!1}} +!1 = !{{i32 {major}, i32 {minor}, i32 {debug_major}, i32 {debug_minor}}} +""" + + +def check_nvvm_compiler_options(options: Sequence[str]) -> bool: + """ + Abstracted from https://github.com/NVIDIA/numba-cuda/pull/681 + + Check if the specified options are supported by the current libNVVM version. + + The options are a list of strings, each representing a compiler option. + + If the test program fails to compile, the options are not supported and False + is returned. + + If the test program compiles successfully, True is returned. + + cuda.bindings.nvvm returns exceptions instead of return codes. + + Parameters + ---------- + options : Sequence[str] + List of compiler options as strings (e.g., ["-arch=compute_90", "-g"]). + + Returns + ------- + bool + True if the options are supported, False otherwise. + + Examples + -------- + >>> from cuda.bindings.utils import check_nvvm_compiler_options + >>> check_nvvm_compiler_options(["-arch=compute_90", "-g"]) + True + """ + try: + from cuda.bindings import nvvm + except ModuleNotFoundError as exc: + if exc.name == "nvvm": + return False + raise + + from cuda.bindings._internal.nvvm import _inspect_function_pointer + + if _inspect_function_pointer("__nvvmCreateProgram") == 0: + return False + + program = nvvm.create_program() + try: + major, minor, debug_major, debug_minor = nvvm.ir_version() + precheck_ir = _PRECHECK_NVVM_IR.format( + major=major, + minor=minor, + debug_major=debug_major, + debug_minor=debug_minor, + ) + precheck_ir_bytes = precheck_ir.encode("utf-8") + nvvm.add_module_to_program( + program, + precheck_ir_bytes, + len(precheck_ir_bytes), + "precheck.ll", + ) + try: + nvvm.compile_program(program, len(options), options) + except nvvm.nvvmError as e: + if e.status == nvvm.Result.ERROR_INVALID_OPTION: + return False + raise + finally: + nvvm.destroy_program(program) + return True diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/utils/_ptx_utils.py b/hug/lib/python3.12/site-packages/cuda/bindings/utils/_ptx_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..1395fdfd469df45904c87140c9c9a8b0503746a9 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/utils/_ptx_utils.py @@ -0,0 +1,135 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +import re + +# Mapping based on the official PTX ISA <-> CUDA Release table +# https://docs.nvidia.com/cuda/parallel-thread-execution/#release-notes-ptx-release-history +_ptx_to_cuda = { + "1.0": (1, 0), + "1.1": (1, 1), + "1.2": (2, 0), + "1.3": (2, 1), + "1.4": (2, 2), + "2.0": (3, 0), + "2.1": (3, 1), + "2.2": (3, 2), + "2.3": (4, 0), + "3.0": (4, 1), + "3.1": (5, 0), + "3.2": (5, 5), + "4.0": (6, 0), + "4.1": (6, 5), + "4.2": (7, 0), + "4.3": (7, 5), + "5.0": (8, 0), + "6.0": (9, 0), + "6.1": (9, 1), + "6.2": (9, 2), + "6.3": (10, 0), + "6.4": (10, 1), + "6.5": (10, 2), + "7.0": (11, 0), + "7.1": (11, 1), + "7.2": (11, 2), + "7.3": (11, 3), + "7.4": (11, 4), + "7.5": (11, 5), + "7.6": (11, 6), + "7.7": (11, 7), + "7.8": (11, 8), + "8.0": (12, 0), + "8.1": (12, 1), + "8.2": (12, 2), + "8.3": (12, 3), + "8.4": (12, 4), + "8.5": (12, 5), + "8.6": (12, 7), + "8.7": (12, 8), + "8.8": (12, 9), + "9.0": (13, 0), + "9.1": (13, 1), + "9.2": (13, 2), + "9.3": (13, 3), +} + + +def get_minimal_required_cuda_ver_from_ptx_ver(ptx_version: str) -> int: + """ + Maps the PTX ISA version to the minimal CUDA driver, nvPTXCompiler, or nvJitLink version + that is needed to load a PTX of the given ISA version. + + Parameters + ---------- + ptx_version : str + PTX ISA version as a string, e.g. "8.8" for PTX ISA 8.8. This is the ``.version`` + directive in the PTX header. + + Returns + ------- + int + Minimal CUDA version as 1000 * major + 10 * minor, e.g. 12090 for CUDA 12.9. + + Raises + ------ + ValueError + If the PTX version is unknown. + + Examples + -------- + >>> get_minimal_required_driver_ver_from_ptx_ver("8.8") + 12090 + >>> get_minimal_required_driver_ver_from_ptx_ver("7.0") + 11000 + """ + try: + major, minor = _ptx_to_cuda[ptx_version] + return 1000 * major + 10 * minor + except KeyError: + raise ValueError(f"Unknown or unsupported PTX ISA version: {ptx_version}") from None + + +# Regex pattern to match .version directive and capture the version number +# TODO: if import speed is a concern, consider lazy-initializing it. +_ptx_ver_pattern = re.compile(r"\.version\s+([0-9]+\.[0-9]+)") + + +def get_ptx_ver(ptx: str) -> str: + """ + Extract the PTX ISA version string from PTX source code. + + Parameters + ---------- + ptx : str + The PTX assembly source code as a string. + + Returns + ------- + str + The PTX ISA version string, e.g., "8.8". + + Raises + ------ + ValueError + If the .version directive is not found in the PTX source. + + Examples + -------- + >>> ptx = r''' + ... .version 8.8 + ... .target sm_86 + ... .address_size 64 + ... + ... .visible .entry test_kernel() + ... { + ... ret; + ... } + ... ''' + >>> get_ptx_ver(ptx) + '8.8' + """ + m = _ptx_ver_pattern.search(ptx) + if m: + return m.group(1) + else: + raise ValueError("No .version directive found in PTX source. Is it a valid PTX?") diff --git a/hug/lib/python3.12/site-packages/cuda/bindings/utils/_version_check.py b/hug/lib/python3.12/site-packages/cuda/bindings/utils/_version_check.py new file mode 100644 index 0000000000000000000000000000000000000000..d05c313b7a1169116b06dad199565c1a467a8346 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/bindings/utils/_version_check.py @@ -0,0 +1,65 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +import threading +import warnings + +from ._envvar import envvar_bool + +# Track whether we've already checked major version compatibility +_major_version_compatibility_checked = False +_lock = threading.Lock() + +_DISABLE_WARNING_ENV_VAR = "CUDA_PYTHON_DISABLE_MAJOR_VERSION_WARNING" + + +def warn_if_cuda_major_version_mismatch(): + """Warn if the CUDA driver major version is older than cuda-bindings compile-time version. + + This function compares the CUDA major version that cuda-bindings was compiled + against with the CUDA major version supported by the installed driver. If the + compile-time major version is greater than the driver's major version, a warning + is issued. + + The check runs only once per process. Subsequent calls are no-ops. + + The warning can be suppressed by setting the environment variable + ``CUDA_PYTHON_DISABLE_MAJOR_VERSION_WARNING=1``. Setting it to ``0`` (or + leaving it unset or empty) keeps the warning enabled. + """ + global _major_version_compatibility_checked + if _major_version_compatibility_checked: + return + with _lock: + if _major_version_compatibility_checked: + return + _major_version_compatibility_checked = True + + # Allow users to suppress the warning + if envvar_bool(_DISABLE_WARNING_ENV_VAR): + return + + # Import here to avoid circular imports and allow lazy loading + from cuda.bindings import driver + + # Get compile-time CUDA version from cuda-bindings + compile_version = driver.CUDA_VERSION # e.g., 13010 + compile_major = compile_version // 1000 + + # Get runtime driver version + err, runtime_version = driver.cuDriverGetVersion() + if err != driver.CUresult.CUDA_SUCCESS: + raise RuntimeError(f"Failed to query CUDA driver version: {err}") + + runtime_major = runtime_version // 1000 + + if compile_major > runtime_major: + warnings.warn( + f"cuda-bindings was built for CUDA major version {compile_major}, but the " + f"NVIDIA driver only supports up to CUDA {runtime_major}. Some cuda-bindings " + f"features may not work correctly. Consider updating your NVIDIA driver, " + f"or using a cuda-bindings version built for CUDA {runtime_major}. " + f"(Set {_DISABLE_WARNING_ENV_VAR}=1 to suppress this warning.)", + UserWarning, + stacklevel=3, + ) diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/README.md b/hug/lib/python3.12/site-packages/cuda/pathfinder/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c020fc6a233bcf1b1b893867200519d76e4ae8e3 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/README.md @@ -0,0 +1,3 @@ +### The `cuda.pathfinder` documentation was moved + +Please see https://nvidia.github.io/cuda-python/cuda-pathfinder/latest/ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/__init__.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a64b5ef64c78d663cdc1f2cb5454c0563a115471 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/__init__.py @@ -0,0 +1,95 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +"""cuda.pathfinder public APIs""" + +# NOTE: When adding or removing public APIs from this file, remember to update +# cuda_pathfinder/docs/source/api.rst +# to keep the documentation in sync. + +from cuda.pathfinder._binaries.find_nvidia_binary_utility import ( + find_nvidia_binary_utility as find_nvidia_binary_utility, +) +from cuda.pathfinder._binaries.supported_nvidia_binaries import SUPPORTED_BINARIES as _SUPPORTED_BINARIES +from cuda.pathfinder._dynamic_libs.load_dl_common import ( + DynamicLibNotAvailableError as DynamicLibNotAvailableError, +) +from cuda.pathfinder._dynamic_libs.load_dl_common import DynamicLibNotFoundError as DynamicLibNotFoundError +from cuda.pathfinder._dynamic_libs.load_dl_common import ( + DynamicLibUnknownError as DynamicLibUnknownError, +) +from cuda.pathfinder._dynamic_libs.load_dl_common import LoadedDL as LoadedDL +from cuda.pathfinder._dynamic_libs.load_nvidia_dynamic_lib import load_nvidia_dynamic_lib as load_nvidia_dynamic_lib +from cuda.pathfinder._dynamic_libs.supported_nvidia_libs import SUPPORTED_LIBNAMES as _SUPPORTED_NVIDIA_LIBNAMES +from cuda.pathfinder._headers.find_nvidia_headers import LocatedHeaderDir as LocatedHeaderDir +from cuda.pathfinder._headers.find_nvidia_headers import find_nvidia_header_directory as find_nvidia_header_directory +from cuda.pathfinder._headers.find_nvidia_headers import ( + locate_nvidia_header_directory as locate_nvidia_header_directory, +) +from cuda.pathfinder._headers.supported_nvidia_headers import SUPPORTED_HEADERS_CTK as _SUPPORTED_HEADERS_CTK +from cuda.pathfinder._static_libs.find_bitcode_lib import ( + SUPPORTED_BITCODE_LIBS as _SUPPORTED_BITCODE_LIBS, +) +from cuda.pathfinder._static_libs.find_bitcode_lib import ( + BitcodeLibNotFoundError as BitcodeLibNotFoundError, +) +from cuda.pathfinder._static_libs.find_bitcode_lib import ( + LocatedBitcodeLib as LocatedBitcodeLib, +) +from cuda.pathfinder._static_libs.find_bitcode_lib import ( + find_bitcode_lib as find_bitcode_lib, +) +from cuda.pathfinder._static_libs.find_bitcode_lib import ( + locate_bitcode_lib as locate_bitcode_lib, +) +from cuda.pathfinder._static_libs.find_static_lib import ( + SUPPORTED_STATIC_LIBS as _SUPPORTED_STATIC_LIBS, +) +from cuda.pathfinder._static_libs.find_static_lib import ( + LocatedStaticLib as LocatedStaticLib, +) +from cuda.pathfinder._static_libs.find_static_lib import ( + StaticLibNotFoundError as StaticLibNotFoundError, +) +from cuda.pathfinder._static_libs.find_static_lib import ( + find_static_lib as find_static_lib, +) +from cuda.pathfinder._static_libs.find_static_lib import ( + locate_static_lib as locate_static_lib, +) +from cuda.pathfinder._utils.env_vars import get_cuda_path_or_home as get_cuda_path_or_home +from cuda.pathfinder._utils.windows_arch import UnsupportedArchError as UnsupportedArchError + +from cuda.pathfinder._version import __version__ # isort: skip + +# Indirections to help Sphinx find the docstrings. +#: Mapping from short CUDA Toolkit (CTK) library names to their canonical +#: header basenames (used to validate a discovered include directory). +#: Example: ``"cublas" → "cublas.h"``. The key set is platform-aware +#: (e.g., ``"cufile"`` may be Linux-only). +SUPPORTED_HEADERS_CTK = _SUPPORTED_HEADERS_CTK + +#: Tuple of supported CUDA binary utility names that can be located +#: via ``find_nvidia_binary_utility()``. Platform-aware (e.g., some +#: utilities may be available only on Linux or Windows). +#: Example utilities: ``"nvdisasm"``, ``"cuobjdump"``, ``"nvcc"``. +SUPPORTED_BINARY_UTILITIES = _SUPPORTED_BINARIES + +#: Tuple of CUDA Toolkit dynamic library names supported by +#: :func:`load_nvidia_dynamic_lib` for the current operating system and +#: interpreter architecture. +SUPPORTED_NVIDIA_LIBNAMES = _SUPPORTED_NVIDIA_LIBNAMES + +#: Tuple of supported bitcode library names that can be resolved +#: via ``locate_bitcode_lib()`` and ``find_bitcode_lib()``. +#: Example value: ``"device"``. +SUPPORTED_BITCODE_LIBS = _SUPPORTED_BITCODE_LIBS + +#: Tuple of supported static library names that can be resolved +#: via ``locate_static_lib()`` and ``find_static_lib()``. +#: Example value: ``"cudadevrt"``. +SUPPORTED_STATIC_LIBS = _SUPPORTED_STATIC_LIBS + +# Backward compatibility: _find_nvidia_header_directory was added in release 1.2.2. +# It will be removed in release 1.2.4. +_find_nvidia_header_directory = find_nvidia_header_directory diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/__pycache__/__init__.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e29d2ee10320a7ba778ddbc1e70b43df1974008f Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/__pycache__/__init__.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/__pycache__/_optional_cuda_import.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/__pycache__/_optional_cuda_import.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9610c80830bf1c71088a048f21ad8cb3c46efae7 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/__pycache__/_optional_cuda_import.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/__pycache__/_version.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/__pycache__/_version.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..57ca42b9354896fecfca72adf25dd9d2acb558cd Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/__pycache__/_version.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_binaries/__pycache__/find_nvidia_binary_utility.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_binaries/__pycache__/find_nvidia_binary_utility.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..814800b35281f33759756befbfd58cdbaf1af36a Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_binaries/__pycache__/find_nvidia_binary_utility.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_binaries/__pycache__/supported_nvidia_binaries.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_binaries/__pycache__/supported_nvidia_binaries.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f7f6443fca6685f70fbe3a4264204c091236e2ce Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_binaries/__pycache__/supported_nvidia_binaries.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_binaries/__pycache__/windows_nsight.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_binaries/__pycache__/windows_nsight.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0d7d7573577808c396ac37b1e2a7a8d1e068aa5a Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_binaries/__pycache__/windows_nsight.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_binaries/find_nvidia_binary_utility.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_binaries/find_nvidia_binary_utility.py new file mode 100644 index 0000000000000000000000000000000000000000..42dcfda1cfb644e602aeefd237647db175e35e50 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_binaries/find_nvidia_binary_utility.py @@ -0,0 +1,239 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +import functools +import os +from collections.abc import Iterable + +from cuda.pathfinder._binaries import supported_nvidia_binaries, windows_nsight +from cuda.pathfinder._utils.ctk_root_canary import CTK_ROOT_CANARY_ANCHOR_LIBNAMES +from cuda.pathfinder._utils.env_vars import get_cuda_path_or_home +from cuda.pathfinder._utils.find_sub_dirs import find_sub_dirs_all_sitepackages +from cuda.pathfinder._utils.platform_aware import IS_WINDOWS + + +class UnsupportedBinaryError(Exception): + def __init__(self, utility: str) -> None: + super().__init__(utility) + self.utility = utility + + def __str__(self) -> str: + supported_utilities = ", ".join(supported_nvidia_binaries.SUPPORTED_BINARIES) + return f"Binary '{self.utility}' is not supported. Supported utilities are: {supported_utilities}" + + +def _normalize_utility_name(utility_name: str) -> str: + """Normalize utility name by adding .exe on Windows if needed.""" + if IS_WINDOWS and not utility_name.lower().endswith((".exe", ".bat", ".cmd")): + return f"{utility_name}.exe" + return utility_name + + +def _is_executable_candidate(path: str) -> bool: + if not os.path.isfile(path): + return False + if IS_WINDOWS: + return True + return os.access(path, os.X_OK) + + +def _ctk_bin_subdirs(root: str) -> list[str]: + if IS_WINDOWS: + return [ + os.path.join(root, "bin", "x64"), + os.path.join(root, "bin", "x86_64"), + os.path.join(root, "bin"), + ] + return [os.path.join(root, "bin")] + + +def _resolve_candidate_paths(candidates: Iterable[str]) -> str | None: + """Return the first executable candidate, preserving candidate order.""" + seen: set[str] = set() + for candidate in candidates: + if candidate in seen: + continue + seen.add(candidate) + if _is_executable_candidate(candidate): + return os.path.abspath(candidate) + return None + + +def _find_windows_compute_sanitizer(ctk_root: str) -> str | None: + return _resolve_candidate_paths( + ( + os.path.join(ctk_root, "bin", "compute-sanitizer.bat"), + os.path.join(ctk_root, "compute-sanitizer", "compute-sanitizer.exe"), + ) + ) + + +def _resolve_ctk_root_via_canary() -> str | None: + from cuda.pathfinder._dynamic_libs.load_nvidia_dynamic_lib import resolve_ctk_root_via_canary + + ctk_root: str | None = resolve_ctk_root_via_canary(CTK_ROOT_CANARY_ANCHOR_LIBNAMES[0]) + return ctk_root + + +def _resolve_in_trusted_dirs(normalized_name: str, dirs: list[str]) -> str | None: + """Resolve ``normalized_name`` against ``dirs`` in order.""" + seen: set[str] = set() + for directory in dirs: + if directory in seen: + continue + assert directory + seen.add(directory) + candidate = os.path.join(directory, normalized_name) + if _is_executable_candidate(candidate): + # Return an absolute path, as the docstring promises (a relative + # search dir would otherwise leak a relative result). + return os.path.abspath(candidate) + return None + + +def _resolve_names_in_trusted_dirs(candidate_names: tuple[str, ...], dirs: list[str]) -> str | None: + """Resolve ordered candidate names within each trusted directory.""" + seen: set[str] = set() + for directory in dirs: + if directory in seen: + continue + assert directory + seen.add(directory) + found = _resolve_candidate_paths(os.path.join(directory, name) for name in candidate_names) + if found is not None: + return found + return None + + +@functools.cache +def find_nvidia_binary_utility(utility_name: str) -> str | None: + """Locate a CUDA binary utility executable. + + Args: + utility_name (str): The name of the binary utility to find + (e.g., ``"nvdisasm"``, ``"cuobjdump"``). On Windows, the ``.exe`` + extension will be automatically appended if not present. The function + also recognizes ``.bat`` and ``.cmd`` files on Windows. + + Returns: + str or None: Absolute path to the discovered executable, or ``None`` + if the utility cannot be found. The returned path is normalized + (absolute and with resolved separators). + + Raises: + UnsupportedBinaryError: If ``utility_name`` is not in the supported set + (see ``SUPPORTED_BINARY_UTILITIES``). + RuntimeError: If a native Windows architecture needed for an + architecture-specific utility layout cannot be determined, or an + installed Nsight product has incomplete or invalid registry data. + + Windows on ARM (WoA) Note: + Binary utilities execute in separate processes and do not need to match + the Python process architecture. When choosing among architecture-specific + Windows layouts, this API deliberately targets the native machine + architecture rather than the Python interpreter architecture. For + example, standalone ``nsys`` and ``ncu`` discovery under x64 Python on an + Arm64 machine selects the Arm64 target. This differs from + ``load_nvidia_dynamic_lib`` and ``find_static_lib``, which target the + Python interpreter architecture. + + Search order: + 1. **NVIDIA Python wheels** + + - Scan installed distributions (``site-packages``) for binary layouts + shipped in NVIDIA wheels (e.g., ``cuda-nvcc``). + + 2. **Conda environments** + + - Check Conda-style installation prefixes via ``CONDA_PREFIX`` + environment variable, which use platform-specific bin directory + layouts (``Library/bin`` on Windows, ``bin`` on Linux). + + 3. **Library-specific standalone installations** + + - Search the installation paths for the CUDA Toolkit, Nsight Systems, + and Nsight Compute. + + 3.1. **Nsight installations**: On Windows, locate Nsight Systems and + Nsight Compute from their installer registry entries. Select + architecture-specific binaries using the native machine + architecture, independent of Python. Lookup of the standalone + ``nsys`` and ``ncu`` CLIs is terminal; a miss does not fall + through to CUDA Toolkit locations. + + 3.2. **CUDA Toolkit installation**: Use ``CUDA_PATH`` or ``CUDA_HOME`` + (in that order), searching ``bin/x64``, ``bin/x86_64``, and + ``bin`` subdirectories on Windows, or just ``bin`` on Linux. + + 4. **CTK-root canary fallback** + + - For utilities that reach this step after the earlier searches miss, + resolve the ``cudart`` library through the OS dynamic loader, derive + the CUDA Toolkit root from it, and search that root's bin layout. + + Note: + Results are cached using ``@functools.cache`` for performance. The cache + persists for the lifetime of the process. + + On Windows, executables are identified by their file extensions + (``.exe``, ``.bat``, ``.cmd``). On Unix-like systems, executables + are identified by the ``X_OK`` (execute) permission bit. + + Lookup is restricted to the trusted directories and the canary-derived + CTK root listed above. + + Example: + >>> from cuda.pathfinder import find_nvidia_binary_utility + >>> nvdisasm = find_nvidia_binary_utility("nvdisasm") + >>> if nvdisasm: + ... print(f"Found nvdisasm at: {nvdisasm}") + """ + if utility_name not in supported_nvidia_binaries.SUPPORTED_BINARIES: + raise UnsupportedBinaryError(utility_name) + + # 1. Search in site-packages (NVIDIA wheels) + candidate_dirs = supported_nvidia_binaries.SITE_PACKAGES_BINDIRS.get(utility_name, ()) + dirs = [] + + for sub_dir in candidate_dirs: + dirs.extend(find_sub_dirs_all_sitepackages(sub_dir.split(os.sep))) + + # 2. Search in Conda environment + if (conda_prefix := os.environ.get("CONDA_PREFIX")) is not None: + if IS_WINDOWS: + dirs.append(os.path.join(conda_prefix, "Library", "bin")) + else: + dirs.append(os.path.join(conda_prefix, "bin")) + + normalized_name = _normalize_utility_name(utility_name) + if IS_WINDOWS and utility_name in ("compute-sanitizer", "ncu"): + candidate_names = (f"{utility_name}.bat", normalized_name) + found = _resolve_names_in_trusted_dirs(candidate_names, dirs) + else: + found = _resolve_in_trusted_dirs(normalized_name, dirs) + if found is not None: + return found + + # 3. Search library-specific standalone installations. + # 3.1. Standalone Nsight CLI lookup is terminal; CTK does not contain nsys/ncu. + if IS_WINDOWS and utility_name == "nsys": + return _resolve_candidate_paths(windows_nsight.nsys_candidate_paths()) + if IS_WINDOWS and utility_name == "ncu": + return _resolve_candidate_paths(windows_nsight.ncu_candidate_paths()) + + # 3.2. Search in CUDA Toolkit (CUDA_PATH/CUDA_HOME). + if (cuda_path := get_cuda_path_or_home()) is not None: + if IS_WINDOWS and utility_name == "compute-sanitizer": + found = _find_windows_compute_sanitizer(cuda_path) + else: + found = _resolve_in_trusted_dirs(normalized_name, _ctk_bin_subdirs(cuda_path)) + if found is not None: + return found + + # 4. CTK-root canary fallback. + ctk_root = _resolve_ctk_root_via_canary() + if ctk_root is not None: + if IS_WINDOWS and utility_name == "compute-sanitizer": + return _find_windows_compute_sanitizer(ctk_root) + return _resolve_in_trusted_dirs(normalized_name, _ctk_bin_subdirs(ctk_root)) + return None diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_binaries/supported_nvidia_binaries.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_binaries/supported_nvidia_binaries.py new file mode 100644 index 0000000000000000000000000000000000000000..9839c03de3e8f8da5e9c1646ca5ed79c7086904b --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_binaries/supported_nvidia_binaries.py @@ -0,0 +1,35 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +import os + +# Site-packages bin directories where binaries might be found, in search order. +# Based on NVIDIA wheel layouts (same for Linux and Windows) +_CUDA_NVCC_BIN = os.path.join("nvidia", "cuda_nvcc", "bin") +_CUDA13_BIN = os.path.join("nvidia", "cu13", "bin") +_NSIGHT_SYSTEMS_BIN = os.path.join("nvidia", "nsight_systems", "bin") +_NSIGHT_COMPUTE_BIN = os.path.join("nvidia", "nsight_compute", "bin") + +# Common CUDA binary utilities available on both Linux and Windows +SITE_PACKAGES_BINDIRS = { + # Core compilation tools + "nvcc": (_CUDA13_BIN, _CUDA_NVCC_BIN), + "ptxas": (_CUDA13_BIN, _CUDA_NVCC_BIN), + "nvdisasm": (_CUDA13_BIN, _CUDA_NVCC_BIN), + "cuobjdump": (_CUDA13_BIN, _CUDA_NVCC_BIN), + "nvprune": (_CUDA_NVCC_BIN,), + "fatbinary": (_CUDA13_BIN, _CUDA_NVCC_BIN), + "bin2c": (_CUDA13_BIN, _CUDA_NVCC_BIN), + "nvlink": (_CUDA13_BIN, _CUDA_NVCC_BIN), + # Runtime/debugging tools + "cuda-gdb": (_CUDA_NVCC_BIN,), + "cuda-gdbserver": (_CUDA_NVCC_BIN,), + "compute-sanitizer": (_CUDA13_BIN, _CUDA_NVCC_BIN), + # Profiling tools + "nvprof": (_CUDA_NVCC_BIN,), + "nsys": (_NSIGHT_SYSTEMS_BIN,), + "nsight-sys": (_NSIGHT_SYSTEMS_BIN,), + "ncu": (_NSIGHT_COMPUTE_BIN,), + "nsight-compute": (_NSIGHT_COMPUTE_BIN,), +} + +SUPPORTED_BINARIES_ALL = SUPPORTED_BINARIES = tuple(SITE_PACKAGES_BINDIRS.keys()) diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_binaries/windows_nsight.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_binaries/windows_nsight.py new file mode 100644 index 0000000000000000000000000000000000000000..c5944c39e64d22000ab938fb628ad97d4b88ec9c --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_binaries/windows_nsight.py @@ -0,0 +1,74 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +import importlib +import os +from collections.abc import Iterator +from typing import Any + +from cuda.pathfinder._utils.windows_arch import windows_machine_arch + +_REGISTRY_ROOT = r"SOFTWARE\NVIDIA Corporation\Installed Products\Nsight" + +_NSYS_TARGET_DIR_BY_ARCH = { + "x64": "target-windows-x64", + "arm64": "target-windows-armv8", +} + +_NCU_TARGET_DIR_BY_ARCH = { + "x64": os.path.join("target", "windows-desktop-win7-x64"), + "arm64": os.path.join("target", "windows-desktop-win10-t23x-a64"), +} + + +def _installed_product_root(product: str) -> str | None: + """Return the active Nsight product installation recorded by its MSI.""" + # ``winreg`` attributes are absent from the type stubs on non-Windows hosts. + winreg: Any = importlib.import_module("winreg") + + access = winreg.KEY_READ | winreg.KEY_WOW64_64KEY + product_key_path = rf"{_REGISTRY_ROOT}\{product}" + try: + product_context = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, product_key_path, 0, access) + except FileNotFoundError: + return None + + try: + with product_context as product_key: + current_version, _ = winreg.QueryValueEx(product_key, "CurrentVersion") + if not isinstance(current_version, str) or not current_version.strip(): + raise RuntimeError( + f"Invalid CurrentVersion value {current_version!r} in " + f"Nsight {product!r} registry registration at {product_key_path!r}" + ) + with winreg.OpenKey(product_key, current_version, 0, access) as version_key: + install_root, _ = winreg.QueryValueEx(version_key, None) + except FileNotFoundError as exc: + raise RuntimeError(f"Incomplete Nsight {product!r} registry registration at {product_key_path!r}") from exc + + if not isinstance(install_root, str) or not install_root.strip(): + raise RuntimeError( + f"Invalid installation directory {install_root!r} in Nsight {product!r} " + f"registry registration at {product_key_path!r} version {current_version!r}" + ) + return install_root + + +def nsys_candidate_paths() -> Iterator[str]: + install_root = _installed_product_root("Systems") + if install_root is None: + return + + target_dir = _NSYS_TARGET_DIR_BY_ARCH[windows_machine_arch()] + yield os.path.join(install_root, target_dir, "nsys.exe") + + +def ncu_candidate_paths() -> Iterator[str]: + install_root = _installed_product_root("Compute") + if install_root is None: + return + + yield os.path.join(install_root, "ncu.bat") + + target_dir = _NCU_TARGET_DIR_BY_ARCH[windows_machine_arch()] + yield os.path.join(install_root, target_dir, "ncu.exe") diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/descriptor_catalog.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/descriptor_catalog.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9926e79798b446f99e1453c5937f06e61eac1f4c Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/descriptor_catalog.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/dynamic_lib_subprocess.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/dynamic_lib_subprocess.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b7888e84b2f8cd70d2ef61d419b9f985bf37ab3f Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/dynamic_lib_subprocess.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/lib_descriptor.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/lib_descriptor.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2c77e1c327423a0c8018405d391df46160dcf79d Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/lib_descriptor.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/load_dl_common.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/load_dl_common.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7accb60cc79e6db00a903858b0a826ba696fe4d0 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/load_dl_common.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/load_dl_linux.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/load_dl_linux.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..311ef4ddf4604efc139649049151f8f69463b894 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/load_dl_linux.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/load_dl_windows.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/load_dl_windows.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f53e74778693bebf5a05073da47df6a7159d58dc Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/load_dl_windows.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/load_nvidia_dynamic_lib.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/load_nvidia_dynamic_lib.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1e71e0458447091d02f668f57eb62086bc2adfda Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/load_nvidia_dynamic_lib.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/platform_loader.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/platform_loader.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a0f9774391693a26b837a5343b5a1837b4687b88 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/platform_loader.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/search_platform.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/search_platform.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bd1c4dee081d3c1baff89666b688d4a683c30e4b Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/search_platform.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/search_steps.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/search_steps.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d9f3c46217d63db84b7c81e31081164cf2c03010 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/search_steps.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/subprocess_protocol.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/subprocess_protocol.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..86891a141e5100fc0bb1c22b83cbd0a2919cc84f Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/subprocess_protocol.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/supported_nvidia_libs.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/supported_nvidia_libs.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b38aeb90a00e052cae8834fae71d82c6fe2d9111 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/supported_nvidia_libs.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/descriptor_catalog.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/descriptor_catalog.py new file mode 100644 index 0000000000000000000000000000000000000000..35a779d0e4dbf5596daf2173144bd68722ce2305 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/descriptor_catalog.py @@ -0,0 +1,604 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +"""Canonical authored descriptor catalog for dynamic libraries.""" + +from __future__ import annotations + +from dataclasses import dataclass +from pathlib import PurePosixPath +from typing import Literal + +from cuda.pathfinder._utils.ctk_root_canary import CTK_ROOT_CANARY_ANCHOR_LIBNAMES + +PackagedWith = Literal["ctk", "other", "driver"] +WindowsArch = Literal["x64", "arm64"] + + +@dataclass(frozen=True, slots=True) +class WindowsSearchDirs: + """Windows search locations, highest priority first, grouped by architecture.""" + + x64: tuple[str, ...] = () + arm64: tuple[str, ...] = () + + @classmethod + def x64_only(cls, *paths: str) -> WindowsSearchDirs: + return cls(x64=paths) + + @classmethod + def arm64_only(cls, *paths: str) -> WindowsSearchDirs: + return cls(arm64=paths) + + def for_arch(self, target_arch: str) -> tuple[str, ...]: + if target_arch == "x64": + return self.x64 + if target_arch == "arm64": + return self.arm64 + raise ValueError(f"Unsupported Windows target architecture: {target_arch!r}") + + +# Windows CTK before 13.4 was x64-only and used the common bin directory. +# Native ARM64 support starts with the architecture-qualified 13.4 layout. +DEFAULT_WINDOWS_CTK_ANCHOR_DIRS = WindowsSearchDirs( + x64=("bin/x64", "bin"), + arm64=("bin/arm64",), +) + + +def _ctk_windows_wheel_dirs(cuda13_bin_dir: str, cuda12_dir: str) -> WindowsSearchDirs: + """Search CUDA 13 first, with the x64-only CUDA 12 wheel as an x64 fallback.""" + cuda13_bin_path = PurePosixPath(cuda13_bin_dir) + return WindowsSearchDirs( + x64=((cuda13_bin_path / "x86_64").as_posix(), cuda12_dir), + arm64=((cuda13_bin_path / "arm64").as_posix(),), + ) + + +@dataclass(frozen=True, slots=True) +class DescriptorSpec: + """Dynamic-library metadata; ordered search candidates are tried first-to-last.""" + + name: str + packaged_with: PackagedWith + # Library filenames are authored in search/load preference order, most preferred first. + linux_sonames: tuple[str, ...] = () + windows_dlls: tuple[str, ...] = () + supported_windows_arch: tuple[WindowsArch, ...] = () + site_packages_linux: tuple[str, ...] = () + site_packages_windows: WindowsSearchDirs = WindowsSearchDirs() + dependencies: tuple[str, ...] = () + optional_dependencies: tuple[str, ...] = () + anchor_rel_dirs_linux: tuple[str, ...] = ("lib64", "lib") + anchor_rel_dirs_windows: WindowsSearchDirs = DEFAULT_WINDOWS_CTK_ANCHOR_DIRS + install_root_env_vars_linux: tuple[str, ...] = () + install_root_env_rel_dirs_linux: tuple[str, ...] = () + install_root_env_vars_windows: tuple[str, ...] = () + install_root_env_rel_dirs_windows: WindowsSearchDirs = WindowsSearchDirs() + program_files_root_globs_windows: WindowsSearchDirs = WindowsSearchDirs() + ctk_root_canary_anchor_libnames: tuple[str, ...] = () + requires_add_dll_directory: bool = False + requires_rtld_deepbind: bool = False + requires_windows_binary_arch_check: bool = False + + +DESCRIPTOR_CATALOG: tuple[DescriptorSpec, ...] = ( + # ----------------------------------------------------------------------- + # CTK (CUDA Toolkit) libraries + # ----------------------------------------------------------------------- + DescriptorSpec( + name="cudart", + packaged_with="ctk", + linux_sonames=("libcudart.so.13", "libcudart.so.12"), + windows_dlls=("cudart64_13.dll", "cudart64_12.dll"), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/cuda_runtime/lib"), + site_packages_windows=_ctk_windows_wheel_dirs("nvidia/cu13/bin", "nvidia/cuda_runtime/bin"), + ), + DescriptorSpec( + name="nvfatbin", + packaged_with="ctk", + linux_sonames=("libnvfatbin.so.13", "libnvfatbin.so.12"), + windows_dlls=("nvfatbin_130_0.dll", "nvfatbin_120_0.dll"), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/nvfatbin/lib"), + site_packages_windows=_ctk_windows_wheel_dirs("nvidia/cu13/bin", "nvidia/nvfatbin/bin"), + ), + DescriptorSpec( + name="nvJitLink", + packaged_with="ctk", + linux_sonames=("libnvJitLink.so.13", "libnvJitLink.so.12"), + windows_dlls=("nvJitLink_130_0.dll", "nvJitLink_120_0.dll"), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/nvjitlink/lib"), + site_packages_windows=_ctk_windows_wheel_dirs("nvidia/cu13/bin", "nvidia/nvjitlink/bin"), + ), + DescriptorSpec( + name="nvrtc", + packaged_with="ctk", + linux_sonames=("libnvrtc.so.13", "libnvrtc.so.12"), + windows_dlls=("nvrtc64_130_0.dll", "nvrtc64_120_0.dll"), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/cuda_nvrtc/lib"), + site_packages_windows=_ctk_windows_wheel_dirs("nvidia/cu13/bin", "nvidia/cuda_nvrtc/bin"), + requires_add_dll_directory=True, + ), + DescriptorSpec( + name="nvvm", + packaged_with="ctk", + linux_sonames=("libnvvm.so.4", "libnvvm.so"), + windows_dlls=("nvvm70.dll", "nvvm64_40_0.dll", "nvvm64.dll"), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/cuda_nvcc/nvvm/lib64"), + site_packages_windows=_ctk_windows_wheel_dirs("nvidia/cu13/bin", "nvidia/cuda_nvcc/nvvm/bin"), + anchor_rel_dirs_linux=("nvvm/lib64",), + # CTK 13.4 installs the ARM64 DLL directly in nvvm/bin, while x64 + # uses nvvm/bin/x64. Older x64 toolkits also used nvvm/bin, so the + # binary in the unqualified directory must be checked at runtime. + anchor_rel_dirs_windows=WindowsSearchDirs( + x64=("nvvm/bin/x64", "nvvm/bin"), + arm64=("nvvm/bin",), + ), + ctk_root_canary_anchor_libnames=CTK_ROOT_CANARY_ANCHOR_LIBNAMES, + # requires_windows_binary_arch_check disambiguates pre-13.4 x64 DLLs + # from 13.4+ Arm64 DLLs in nvvm/bin; see + # _utils/windows_arch.py for the validation. + requires_windows_binary_arch_check=True, + ), + DescriptorSpec( + name="cublas", + packaged_with="ctk", + linux_sonames=("libcublas.so.13", "libcublas.so.12"), + windows_dlls=("cublas64_13.dll", "cublas64_12.dll"), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/cublas/lib"), + site_packages_windows=_ctk_windows_wheel_dirs("nvidia/cu13/bin", "nvidia/cublas/bin"), + dependencies=("cublasLt",), + ), + DescriptorSpec( + name="cublasLt", + packaged_with="ctk", + linux_sonames=("libcublasLt.so.13", "libcublasLt.so.12"), + windows_dlls=("cublasLt64_13.dll", "cublasLt64_12.dll"), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/cublas/lib"), + site_packages_windows=_ctk_windows_wheel_dirs("nvidia/cu13/bin", "nvidia/cublas/bin"), + ), + DescriptorSpec( + name="cufft", + packaged_with="ctk", + linux_sonames=("libcufft.so.12", "libcufft.so.11"), + windows_dlls=("cufft64_12.dll", "cufft64_11.dll"), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/cufft/lib"), + site_packages_windows=_ctk_windows_wheel_dirs("nvidia/cu13/bin", "nvidia/cufft/bin"), + requires_add_dll_directory=True, + ), + DescriptorSpec( + name="cufftw", + packaged_with="ctk", + linux_sonames=("libcufftw.so.12", "libcufftw.so.11"), + windows_dlls=("cufftw64_12.dll", "cufftw64_11.dll"), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/cufft/lib"), + site_packages_windows=_ctk_windows_wheel_dirs("nvidia/cu13/bin", "nvidia/cufft/bin"), + dependencies=("cufft",), + ), + DescriptorSpec( + name="curand", + packaged_with="ctk", + linux_sonames=("libcurand.so.11", "libcurand.so.10"), + windows_dlls=("curand64_11.dll", "curand64_10.dll"), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/curand/lib"), + site_packages_windows=_ctk_windows_wheel_dirs("nvidia/cu13/bin", "nvidia/curand/bin"), + ), + DescriptorSpec( + name="cusolver", + packaged_with="ctk", + linux_sonames=("libcusolver.so.12", "libcusolver.so.11"), + windows_dlls=("cusolver64_12.dll", "cusolver64_11.dll"), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/cusolver/lib"), + site_packages_windows=_ctk_windows_wheel_dirs("nvidia/cu13/bin", "nvidia/cusolver/bin"), + dependencies=("nvJitLink", "cusparse", "cublasLt", "cublas"), + ), + DescriptorSpec( + name="cusolverMg", + packaged_with="ctk", + linux_sonames=("libcusolverMg.so.12", "libcusolverMg.so.11"), + windows_dlls=("cusolverMg64_12.dll", "cusolverMg64_11.dll"), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/cusolver/lib"), + site_packages_windows=_ctk_windows_wheel_dirs("nvidia/cu13/bin", "nvidia/cusolver/bin"), + dependencies=("nvJitLink", "cublasLt", "cublas"), + ), + DescriptorSpec( + name="cusparse", + packaged_with="ctk", + linux_sonames=("libcusparse.so.12",), + windows_dlls=("cusparse64_12.dll",), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/cusparse/lib"), + site_packages_windows=_ctk_windows_wheel_dirs("nvidia/cu13/bin", "nvidia/cusparse/bin"), + dependencies=("nvJitLink",), + ), + DescriptorSpec( + name="nppc", + packaged_with="ctk", + linux_sonames=("libnppc.so.13", "libnppc.so.12"), + windows_dlls=("nppc64_13.dll", "nppc64_12.dll"), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/npp/lib"), + site_packages_windows=_ctk_windows_wheel_dirs("nvidia/cu13/bin", "nvidia/npp/bin"), + ), + DescriptorSpec( + name="nppial", + packaged_with="ctk", + linux_sonames=("libnppial.so.13", "libnppial.so.12"), + windows_dlls=("nppial64_13.dll", "nppial64_12.dll"), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/npp/lib"), + site_packages_windows=_ctk_windows_wheel_dirs("nvidia/cu13/bin", "nvidia/npp/bin"), + dependencies=("nppc",), + ), + DescriptorSpec( + name="nppicc", + packaged_with="ctk", + linux_sonames=("libnppicc.so.13", "libnppicc.so.12"), + windows_dlls=("nppicc64_13.dll", "nppicc64_12.dll"), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/npp/lib"), + site_packages_windows=_ctk_windows_wheel_dirs("nvidia/cu13/bin", "nvidia/npp/bin"), + dependencies=("nppc",), + ), + DescriptorSpec( + name="nppidei", + packaged_with="ctk", + linux_sonames=("libnppidei.so.13", "libnppidei.so.12"), + windows_dlls=("nppidei64_13.dll", "nppidei64_12.dll"), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/npp/lib"), + site_packages_windows=_ctk_windows_wheel_dirs("nvidia/cu13/bin", "nvidia/npp/bin"), + dependencies=("nppc",), + ), + DescriptorSpec( + name="nppif", + packaged_with="ctk", + linux_sonames=("libnppif.so.13", "libnppif.so.12"), + windows_dlls=("nppif64_13.dll", "nppif64_12.dll"), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/npp/lib"), + site_packages_windows=_ctk_windows_wheel_dirs("nvidia/cu13/bin", "nvidia/npp/bin"), + dependencies=("nppc",), + ), + DescriptorSpec( + name="nppig", + packaged_with="ctk", + linux_sonames=("libnppig.so.13", "libnppig.so.12"), + windows_dlls=("nppig64_13.dll", "nppig64_12.dll"), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/npp/lib"), + site_packages_windows=_ctk_windows_wheel_dirs("nvidia/cu13/bin", "nvidia/npp/bin"), + dependencies=("nppc",), + ), + DescriptorSpec( + name="nppim", + packaged_with="ctk", + linux_sonames=("libnppim.so.13", "libnppim.so.12"), + windows_dlls=("nppim64_13.dll", "nppim64_12.dll"), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/npp/lib"), + site_packages_windows=_ctk_windows_wheel_dirs("nvidia/cu13/bin", "nvidia/npp/bin"), + dependencies=("nppc",), + ), + DescriptorSpec( + name="nppist", + packaged_with="ctk", + linux_sonames=("libnppist.so.13", "libnppist.so.12"), + windows_dlls=("nppist64_13.dll", "nppist64_12.dll"), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/npp/lib"), + site_packages_windows=_ctk_windows_wheel_dirs("nvidia/cu13/bin", "nvidia/npp/bin"), + dependencies=("nppc",), + ), + DescriptorSpec( + name="nppisu", + packaged_with="ctk", + linux_sonames=("libnppisu.so.13", "libnppisu.so.12"), + windows_dlls=("nppisu64_13.dll", "nppisu64_12.dll"), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/npp/lib"), + site_packages_windows=_ctk_windows_wheel_dirs("nvidia/cu13/bin", "nvidia/npp/bin"), + dependencies=("nppc",), + ), + DescriptorSpec( + name="nppitc", + packaged_with="ctk", + linux_sonames=("libnppitc.so.13", "libnppitc.so.12"), + windows_dlls=("nppitc64_13.dll", "nppitc64_12.dll"), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/npp/lib"), + site_packages_windows=_ctk_windows_wheel_dirs("nvidia/cu13/bin", "nvidia/npp/bin"), + dependencies=("nppc",), + ), + DescriptorSpec( + name="npps", + packaged_with="ctk", + linux_sonames=("libnpps.so.13", "libnpps.so.12"), + windows_dlls=("npps64_13.dll", "npps64_12.dll"), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/npp/lib"), + site_packages_windows=_ctk_windows_wheel_dirs("nvidia/cu13/bin", "nvidia/npp/bin"), + dependencies=("nppc",), + ), + DescriptorSpec( + name="nvblas", + packaged_with="ctk", + linux_sonames=("libnvblas.so.13", "libnvblas.so.12"), + windows_dlls=("nvblas64_13.dll", "nvblas64_12.dll"), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/cublas/lib"), + site_packages_windows=_ctk_windows_wheel_dirs("nvidia/cu13/bin", "nvidia/cublas/bin"), + dependencies=("cublas", "cublasLt"), + ), + DescriptorSpec( + name="nvjpeg", + packaged_with="ctk", + linux_sonames=("libnvjpeg.so.13", "libnvjpeg.so.12"), + windows_dlls=("nvjpeg64_13.dll", "nvjpeg64_12.dll"), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/nvjpeg/lib"), + site_packages_windows=_ctk_windows_wheel_dirs("nvidia/cu13/bin", "nvidia/nvjpeg/bin"), + ), + DescriptorSpec( + name="cufile", + packaged_with="ctk", + linux_sonames=("libcufile.so.0",), + site_packages_linux=("nvidia/cu13/lib", "nvidia/cufile/lib"), + ), + DescriptorSpec( + name="cupti", + packaged_with="ctk", + linux_sonames=("libcupti.so.13", "libcupti.so.12"), + windows_dlls=( + "cupti64_2026.3.1.dll", + "cupti64_2026.3.0.dll", + "cupti64_2026.2.1.dll", + "cupti64_2026.2.0.dll", + "cupti64_2026.1.1.dll", + "cupti64_2026.1.0.dll", + "cupti64_2025.4.1.dll", + "cupti64_2025.3.1.dll", + "cupti64_2025.2.1.dll", + "cupti64_2025.1.1.dll", + "cupti64_2024.3.2.dll", + "cupti64_2024.2.1.dll", + "cupti64_2024.1.1.dll", + "cupti64_2023.3.1.dll", + "cupti64_2023.2.2.dll", + "cupti64_2023.1.1.dll", + "cupti64_2022.4.1.dll", + ), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/cuda_cupti/lib"), + site_packages_windows=_ctk_windows_wheel_dirs("nvidia/cu13/bin", "nvidia/cuda_cupti/bin"), + anchor_rel_dirs_linux=("extras/CUPTI/lib64", "lib"), + # CTK 13.4 uses architecture-qualified CUPTI directories. Older + # Windows CUPTI toolkits were x64-only and used extras/CUPTI/lib64. + anchor_rel_dirs_windows=WindowsSearchDirs( + x64=("extras/CUPTI/lib/x64", "extras/CUPTI/lib64", "bin"), + arm64=("extras/CUPTI/lib/arm64",), + ), + ctk_root_canary_anchor_libnames=CTK_ROOT_CANARY_ANCHOR_LIBNAMES, + ), + DescriptorSpec( + name="cudla", + packaged_with="ctk", + linux_sonames=("libcudla.so.1",), + windows_dlls=("cudla.dll",), + supported_windows_arch=("arm64",), + site_packages_linux=("nvidia/cu13/lib",), + # No Windows pip wheel ships cudla.dll today; it is loaded from the local + # CUDA Toolkit only, so site_packages_windows is intentionally left empty. + anchor_rel_dirs_windows=WindowsSearchDirs.arm64_only("bin/arm64"), + ), + # ----------------------------------------------------------------------- + # Third-party / separately packaged libraries + # ----------------------------------------------------------------------- + DescriptorSpec( + name="cublasmp", + packaged_with="other", + linux_sonames=("libcublasmp.so.0",), + site_packages_linux=("nvidia/cublasmp/cu13/lib", "nvidia/cublasmp/cu12/lib"), + dependencies=("cublas", "cublasLt", "nvshmem_host"), + ), + DescriptorSpec( + name="cufftMp", + packaged_with="other", + linux_sonames=("libcufftMp.so.12", "libcufftMp.so.11"), + site_packages_linux=("nvidia/cufftmp/cu13/lib", "nvidia/cufftmp/cu12/lib"), + dependencies=("nvshmem_host",), + requires_rtld_deepbind=True, + ), + DescriptorSpec( + name="cudnn", + packaged_with="other", + linux_sonames=("libcudnn.so.9",), + windows_dlls=("cudnn64_9.dll",), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cudnn/lib",), + site_packages_windows=WindowsSearchDirs.x64_only("nvidia/cudnn/bin"), + dependencies=("cublasLt",), + optional_dependencies=("nvrtc",), + install_root_env_vars_linux=("CUDNN_PATH",), + install_root_env_rel_dirs_linux=("lib", "lib64"), + # The ARM64 layout is verified only for the standalone archive rooted + # at CUDNN_PATH, not for conda, CUDA_PATH, or Program Files installs. + anchor_rel_dirs_windows=WindowsSearchDirs.x64_only("bin/x64", "bin"), + install_root_env_vars_windows=("CUDNN_PATH",), + install_root_env_rel_dirs_windows=WindowsSearchDirs( + x64=("bin/x64", "bin"), + arm64=("bin/arm64",), + ), + program_files_root_globs_windows=WindowsSearchDirs.x64_only("NVIDIA/CUDNN/v9.*"), + requires_add_dll_directory=True, + ), + DescriptorSpec( + name="cusolverMp", + packaged_with="other", + linux_sonames=("libcusolverMp.so.0",), + site_packages_linux=("nvidia/cu13/lib", "nvidia/cu12/lib"), + dependencies=("cublas", "cudart", "cusolver", "nccl"), + ), + DescriptorSpec( + name="mathdx", + packaged_with="other", + linux_sonames=("libmathdx.so.0",), + windows_dlls=("mathdx64_0.dll",), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/cu12/lib"), + site_packages_windows=WindowsSearchDirs( + x64=("nvidia/cu13/bin", "nvidia/cu12/bin"), + arm64=("nvidia/cu13/bin", "nvidia/cu12/bin"), + ), + dependencies=("nvrtc",), + ), + DescriptorSpec( + name="cudss", + packaged_with="other", + linux_sonames=("libcudss.so.1", "libcudss.so.0"), + windows_dlls=("cudss64_1.dll", "cudss64_0.dll"), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/cu12/lib"), + site_packages_windows=WindowsSearchDirs( + x64=("nvidia/cu13/bin", "nvidia/cu12/bin"), + arm64=("nvidia/cu13/bin", "nvidia/cu12/bin"), + ), + dependencies=("cublas", "cublasLt"), + optional_dependencies=("nvrtc",), + ), + DescriptorSpec( + name="cusparseLt", + packaged_with="other", + linux_sonames=("libcusparseLt.so.0",), + windows_dlls=("cusparseLt_13.dll", "cusparseLt.dll"), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("nvidia/cu13/lib", "nvidia/cusparselt/lib"), + site_packages_windows=WindowsSearchDirs( + x64=("nvidia/cu13/bin/x64", "nvidia/cusparselt/bin"), + arm64=("nvidia/cu13/bin/arm64",), + ), + ), + DescriptorSpec( + name="cutensor", + packaged_with="other", + linux_sonames=("libcutensor.so.2",), + windows_dlls=("cutensor.dll",), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("cutensor/lib",), + site_packages_windows=WindowsSearchDirs(x64=("cutensor/bin",), arm64=("cutensor/bin",)), + dependencies=("cublasLt",), + ), + DescriptorSpec( + name="cutensorMg", + packaged_with="other", + linux_sonames=("libcutensorMg.so.2",), + windows_dlls=("cutensorMg.dll",), + supported_windows_arch=("x64", "arm64"), + site_packages_linux=("cutensor/lib",), + site_packages_windows=WindowsSearchDirs(x64=("cutensor/bin",), arm64=("cutensor/bin",)), + dependencies=("cutensor", "cublasLt"), + ), + DescriptorSpec( + name="cutensorMp", + packaged_with="other", + linux_sonames=("libcutensorMp.so.2",), + site_packages_linux=("cutensor/lib",), + dependencies=("cutensor", "cublasLt", "cudart", "nccl"), + ), + DescriptorSpec( + name="cudensitymat", + packaged_with="other", + linux_sonames=("libcudensitymat.so.0",), + site_packages_linux=("cuquantum/lib",), + dependencies=( + "cutensornet", + "cutensor", + "cusolver", + "cublasLt", + "cublas", + "curand", + "cusparse", + "nvJitLink", + ), + ), + DescriptorSpec( + name="cupauliprop", + packaged_with="other", + linux_sonames=("libcupauliprop.so.0",), + site_packages_linux=("cuquantum/lib",), + ), + DescriptorSpec( + name="cutensornet", + packaged_with="other", + linux_sonames=("libcutensornet.so.2",), + site_packages_linux=("cuquantum/lib",), + dependencies=("cutensor", "cublas", "cusolver"), + ), + DescriptorSpec( + name="custabilizer", + packaged_with="other", + linux_sonames=("libcustabilizer.so.0",), + site_packages_linux=("cuquantum/lib",), + ), + DescriptorSpec( + name="custatevec", + packaged_with="other", + linux_sonames=("libcustatevec.so.1",), + site_packages_linux=("cuquantum/lib",), + dependencies=("cublas", "cublasLt"), + ), + DescriptorSpec( + name="nccl", + packaged_with="other", + linux_sonames=("libnccl.so.2",), + site_packages_linux=("nvidia/nccl/lib",), + install_root_env_vars_linux=("NCCL_HOME",), + install_root_env_rel_dirs_linux=("lib", "lib64", "build/lib"), + ), + DescriptorSpec( + name="nvpl_fftw", + packaged_with="other", + linux_sonames=("libnvpl_fftw.so.0",), + site_packages_linux=("nvpl/lib",), + ), + DescriptorSpec( + name="nvshmem_host", + packaged_with="other", + linux_sonames=("libnvshmem_host.so.3",), + site_packages_linux=("nvidia/nvshmem/lib",), + ), + # ----------------------------------------------------------------------- + # Driver libraries (system-search only, no CTK cascade) + # ----------------------------------------------------------------------- + DescriptorSpec( + name="cuda", + packaged_with="driver", + linux_sonames=("libcuda.so.1",), + windows_dlls=("nvcuda.dll",), + supported_windows_arch=("x64", "arm64"), + ), + DescriptorSpec( + name="nvcudla", + packaged_with="driver", + linux_sonames=("libnvcudla.so",), + ), + DescriptorSpec( + name="nvml", + packaged_with="driver", + linux_sonames=("libnvidia-ml.so.1",), + windows_dlls=("nvml.dll",), + supported_windows_arch=("x64", "arm64"), + ), +) diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/dynamic_lib_subprocess.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/dynamic_lib_subprocess.py new file mode 100644 index 0000000000000000000000000000000000000000..ba5d05242f2f8913f9133cdfadfefd13ec7b4878 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/dynamic_lib_subprocess.py @@ -0,0 +1,127 @@ +#!/usr/bin/env python +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +import os +import sys +from collections.abc import Sequence + +from cuda.pathfinder._dynamic_libs.lib_descriptor import LIB_DESCRIPTORS +from cuda.pathfinder._dynamic_libs.load_dl_common import DynamicLibNotFoundError, LoadedDL +from cuda.pathfinder._dynamic_libs.platform_loader import LOADER +from cuda.pathfinder._dynamic_libs.subprocess_protocol import ( + MODE_CANARY, + MODE_LOAD, + STATUS_NOT_FOUND, + STATUS_OK, + VALID_MODES, + format_dynamic_lib_subprocess_payload, +) + +# NOTE: The main entrypoint (below) serves both production (canary probe) +# and tests (full loader). Keeping them together ensures a single subprocess +# protocol and CLI surface, so the test subprocess stays aligned with the +# production flow while avoiding a separate test-only module. +# Any production-code impact is negligible since the extra logic only runs +# in the subprocess entrypoint and only in test mode. + + +def _probe_canary_abs_path(libname: str) -> str | None: + desc = LIB_DESCRIPTORS.get(libname) + if desc is None: + raise ValueError(f"Unsupported canary library name: {libname!r}") + try: + loaded: LoadedDL | None = LOADER.load_with_system_search(desc) + except DynamicLibNotFoundError: + return None + if loaded is None: + return None + abs_path: str | None = loaded.abs_path + return abs_path + + +def _validate_abs_path(abs_path: str) -> None: + assert abs_path, f"empty path: {abs_path=!r}" + assert os.path.isabs(abs_path), f"not absolute: {abs_path=!r}" + assert os.path.isfile(abs_path), f"not a file: {abs_path=!r}" + + +def _load_nvidia_dynamic_lib_for_test(libname: str) -> str: + """Test-only loader used by the subprocess entrypoint.""" + # Keep imports inside the subprocess body so startup stays focused on the + # code under test rather than the parent test module. + from cuda.pathfinder import load_nvidia_dynamic_lib + from cuda.pathfinder._dynamic_libs.load_nvidia_dynamic_lib import _load_lib_no_cache + from cuda.pathfinder._dynamic_libs.supported_nvidia_libs import ( + SUPPORTED_LINUX_SONAMES, + SUPPORTED_WINDOWS_DLLS, + ) + from cuda.pathfinder._utils.platform_aware import IS_WINDOWS + + loaded_dl_fresh = load_nvidia_dynamic_lib(libname) + if loaded_dl_fresh.was_already_loaded_from_elsewhere: + raise RuntimeError("loaded_dl_fresh.was_already_loaded_from_elsewhere") + + abs_path = loaded_dl_fresh.abs_path + if not isinstance(abs_path, str): + raise RuntimeError(f"loaded_dl_fresh.abs_path is not a string: {abs_path!r}") + _validate_abs_path(abs_path) + assert loaded_dl_fresh.found_via is not None + + loaded_dl_from_cache = load_nvidia_dynamic_lib(libname) + if loaded_dl_from_cache is not loaded_dl_fresh: + raise RuntimeError("loaded_dl_from_cache is not loaded_dl_fresh") + + loaded_dl_no_cache = _load_lib_no_cache(libname) + supported_libs = SUPPORTED_WINDOWS_DLLS if IS_WINDOWS else SUPPORTED_LINUX_SONAMES + if not loaded_dl_no_cache.was_already_loaded_from_elsewhere and libname in supported_libs: + raise RuntimeError("not loaded_dl_no_cache.was_already_loaded_from_elsewhere") + abs_path_no_cache = loaded_dl_no_cache.abs_path + if not isinstance(abs_path_no_cache, str): + raise RuntimeError(f"loaded_dl_no_cache.abs_path is not a string: {abs_path_no_cache!r}") + if not os.path.samefile(abs_path_no_cache, abs_path): + raise RuntimeError(f"not os.path.samefile({abs_path_no_cache=!r}, {abs_path=!r})") + _validate_abs_path(abs_path_no_cache) + return abs_path + + +def probe_dynamic_lib_and_print_json(libname: str, mode: str) -> None: + if mode == MODE_CANARY: + abs_path = _probe_canary_abs_path(libname) + status = STATUS_OK if abs_path is not None else STATUS_NOT_FOUND + print(format_dynamic_lib_subprocess_payload(status, abs_path)) + return + + if mode == MODE_LOAD: + # Test-only path: exercises full loader behavior in isolation. + try: + abs_path = _load_nvidia_dynamic_lib_for_test(libname) + except DynamicLibNotFoundError as exc: + error = { + "type": exc.__class__.__name__, + "message": str(exc), + } + print(format_dynamic_lib_subprocess_payload(STATUS_NOT_FOUND, None, error=error)) + return + print(format_dynamic_lib_subprocess_payload(STATUS_OK, abs_path)) + return + + raise ValueError(f"Unsupported subprocess probe mode: {mode!r}") + + +def main(argv: Sequence[str] | None = None) -> int: + args = list(sys.argv[1:] if argv is None else argv) + if len(args) != 2 or args[0] not in VALID_MODES: + modes = ", ".join(VALID_MODES) + raise SystemExit( + f"Usage: python -m cuda.pathfinder._dynamic_libs.dynamic_lib_subprocess \nModes: {modes}" + ) + mode, libname = args + probe_dynamic_lib_and_print_json(libname, mode) + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/lib_descriptor.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/lib_descriptor.py new file mode 100644 index 0000000000000000000000000000000000000000..f5e643e28fae3d7d766dd7ee3acc3019933ed6dd --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/lib_descriptor.py @@ -0,0 +1,24 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +"""Per-library descriptor and registry. + +The canonical authored data lives in :mod:`descriptor_catalog`. This module +provides a name-keyed registry consumed by the runtime search/load path. +""" + +from __future__ import annotations + +from typing import TypeAlias + +from cuda.pathfinder._dynamic_libs.descriptor_catalog import ( + DESCRIPTOR_CATALOG, + DescriptorSpec, +) + +# Keep the historical type name for downstream imports. +LibDescriptor: TypeAlias = DescriptorSpec + + +#: Canonical registry of all known libraries. +LIB_DESCRIPTORS: dict[str, LibDescriptor] = {desc.name: desc for desc in DESCRIPTOR_CATALOG} diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/load_dl_common.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/load_dl_common.py new file mode 100644 index 0000000000000000000000000000000000000000..1dc47e4b52b775139c84b8fa15d18e0db67c7483 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/load_dl_common.py @@ -0,0 +1,51 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from collections.abc import Callable +from dataclasses import dataclass +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from cuda.pathfinder._dynamic_libs.lib_descriptor import LibDescriptor + + +class DynamicLibNotFoundError(RuntimeError): + pass + + +class DynamicLibNotAvailableError(DynamicLibNotFoundError): + pass + + +class DynamicLibUnknownError(DynamicLibNotFoundError): + pass + + +@dataclass +class LoadedDL: + abs_path: str | None + was_already_loaded_from_elsewhere: bool + _handle_uint: int # Platform-agnostic unsigned pointer value + found_via: str # "CUDA_PATH" covers both CUDA_PATH and CUDA_HOME env vars + + +def load_dependencies(desc: LibDescriptor, load_func: Callable[[str], LoadedDL]) -> None: + """Load required dependencies, then best-effort runtime dependencies. + + A plain ``DynamicLibNotFoundError`` from an optional dependency is + suppressed. More specific contract errors and failures while loading a + dependency that was found remain errors. + """ + for dep in desc.dependencies: + load_func(dep) + for dep in desc.optional_dependencies: + try: + load_func(dep) + except DynamicLibNotFoundError as exc: + # Both public contract errors inherit DynamicLibNotFoundError, but + # neither an unknown descriptor nor platform incompatibility means + # that an optional runtime component is simply absent. + if type(exc) is not DynamicLibNotFoundError: + raise diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/load_dl_linux.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/load_dl_linux.py new file mode 100644 index 0000000000000000000000000000000000000000..d9b6f2d8d9f467e4db52dd4465701727000d9462 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/load_dl_linux.py @@ -0,0 +1,223 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +import contextlib +import ctypes +import ctypes.util +import os +import sys +from typing import TYPE_CHECKING, cast + +from cuda.pathfinder._dynamic_libs.load_dl_common import LoadedDL + +if TYPE_CHECKING: + from cuda.pathfinder._dynamic_libs.lib_descriptor import LibDescriptor + +if sys.platform == "linux": + CDLL_MODE = os.RTLD_NOW | os.RTLD_GLOBAL +else: + CDLL_MODE = 0 + + +def _load_libdl() -> ctypes.CDLL: + # In normal glibc-based Linux environments, find_library("dl") should return + # something like "libdl.so.2". In minimal or stripped-down environments + # (no ldconfig/gcc, incomplete linker cache), this can return None even + # though libdl is present. In that case, we fall back to the stable SONAME. + name = ctypes.util.find_library("dl") or "libdl.so.2" + try: + return ctypes.CDLL(name) + except OSError as e: + raise RuntimeError(f"Could not load {name!r} (required for dlinfo/dlerror on Linux)") from e + + +LIBDL = _load_libdl() + +# dlinfo +LIBDL.dlinfo.argtypes = [ctypes.c_void_p, ctypes.c_int, ctypes.c_void_p] +LIBDL.dlinfo.restype = ctypes.c_int + +# dlerror (thread-local error string; cleared after read) +LIBDL.dlerror.argtypes = [] +LIBDL.dlerror.restype = ctypes.c_char_p + +# First appeared in 2004-era glibc. Universally correct on Linux for all practical purposes. +RTLD_DI_LINKMAP = 2 +RTLD_DI_ORIGIN = 6 + + +class _LinkMapLNameView(ctypes.Structure): + """ + Prefix-only view of glibc's `struct link_map` used **solely** to read `l_name`. + + Background: + - `dlinfo(handle, RTLD_DI_LINKMAP, ...)` returns a `struct link_map*`. + - The first few members of `struct link_map` (including `l_name`) have been + stable on glibc for decades and are documented as debugger-visible. + - We only need the offset/layout of `l_name`, not the full struct. + + Safety constraints: + - This is a **partial** definition (prefix). It must only be used via a pointer + returned by `dlinfo(...)`. + - Do **not** instantiate it or pass it **by value** to any C function. + - Do **not** access any members beyond those declared here. + - Do **not** rely on `ctypes.sizeof(LinkMapPrefix)` for allocation. + + Rationale: + - Defining only the leading fields avoids depending on internal/unstable + tail members while keeping code more readable than raw pointer arithmetic. + """ + + _fields_ = ( + ("l_addr", ctypes.c_void_p), # ElfW(Addr) + ("l_name", ctypes.c_char_p), # char* + ) + + +# Defensive assertions, mainly to document the invariants we depend on +assert _LinkMapLNameView.l_addr.offset == 0 +assert _LinkMapLNameView.l_name.offset == ctypes.sizeof(ctypes.c_void_p) + + +def _dl_last_error() -> str | None: + msg_bytes = cast(bytes | None, LIBDL.dlerror()) + if not msg_bytes: + return None # no pending error + # Never raises; undecodable bytes are mapped to U+DC80..U+DCFF + return msg_bytes.decode("utf-8", "surrogateescape") + + +def l_name_for_dynamic_library(libname: str, handle: ctypes.CDLL) -> str: + lm_view = ctypes.POINTER(_LinkMapLNameView)() + rc = LIBDL.dlinfo(ctypes.c_void_p(handle._handle), RTLD_DI_LINKMAP, ctypes.byref(lm_view)) + if rc != 0: + err = _dl_last_error() + raise OSError(f"dlinfo failed for {libname=!r} (rc={rc})" + (f": {err}" if err else "")) + if not lm_view: # NULL link_map** + raise OSError(f"dlinfo returned NULL link_map pointer for {libname=!r}") + + l_name_bytes = lm_view.contents.l_name + if not l_name_bytes: + raise OSError(f"dlinfo returned empty link_map->l_name for {libname=!r}") + + path = os.fsdecode(l_name_bytes) + if not path: + raise OSError(f"dlinfo returned empty l_name string for {libname=!r}") + + return path + + +def l_origin_for_dynamic_library(libname: str, handle: ctypes.CDLL) -> str: + l_origin_buf = ctypes.create_string_buffer(4096) + rc = LIBDL.dlinfo(ctypes.c_void_p(handle._handle), RTLD_DI_ORIGIN, l_origin_buf) + if rc != 0: + err = _dl_last_error() + raise OSError(f"dlinfo failed for {libname=!r} (rc={rc})" + (f": {err}" if err else "")) + + path = os.fsdecode(l_origin_buf.value) + if not path: + raise OSError(f"dlinfo returned empty l_origin string for {libname=!r}") + + return path + + +def abs_path_for_dynamic_library(libname: str, handle: ctypes.CDLL) -> str: + l_name = l_name_for_dynamic_library(libname, handle) + l_origin = l_origin_for_dynamic_library(libname, handle) + return os.path.join(l_origin, os.path.basename(l_name)) + + +if sys.platform == "linux": + + def check_if_already_loaded_from_elsewhere(desc: LibDescriptor) -> LoadedDL | None: + for soname in desc.linux_sonames: + try: + handle = ctypes.CDLL(soname, mode=os.RTLD_NOLOAD) + except OSError: + continue + else: + return LoadedDL( + abs_path_for_dynamic_library(desc.name, handle), + True, + handle._handle, + "was-already-loaded-from-elsewhere", + ) + return None + + def _load_lib(desc: LibDescriptor, filename: str) -> ctypes.CDLL: + cdll_mode = CDLL_MODE + if desc.requires_rtld_deepbind: + cdll_mode |= os.RTLD_DEEPBIND + return ctypes.CDLL(filename, cdll_mode) +else: + + def check_if_already_loaded_from_elsewhere(_desc: LibDescriptor) -> LoadedDL | None: + raise RuntimeError(f"check_if_already_loaded_from_elsewhere() is not supported on platform {sys.platform!r}") + + def _load_lib(_desc: LibDescriptor, _filename: str) -> ctypes.CDLL: + raise RuntimeError(f"_load_lib() is not supported on platform {sys.platform!r}") + + +def load_with_system_search(desc: LibDescriptor) -> LoadedDL | None: + """Try to load a library using the native Linux dynamic-loader search path. + + Args: + desc: Descriptor for the library to load + + Returns: + A LoadedDL object if successful, None if the library cannot be loaded + + """ + for soname in desc.linux_sonames: + try: + handle = _load_lib(desc, soname) + except OSError: + pass + else: + abs_path = abs_path_for_dynamic_library(desc.name, handle) + assert abs_path + return LoadedDL(abs_path, False, handle._handle, "system-search") + return None + + +def _work_around_known_bugs(libname: str, found_path: str) -> None: + if libname == "nvrtc": + # Work around bug/oversight in + # nvidia_cuda_nvrtc-13.0.48-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl + # Issue: libnvrtc.so.13 RUNPATH is not set. + # This workaround is highly specific + # - for simplicity. + # - to not mask bugs in future nvidia-cuda-nvrtc releases. + # - because a more general workaround is complicated. + dirname, basename = os.path.split(found_path) + if basename == "libnvrtc.so.13": + dep_basename = "libnvrtc-builtins.so.13.0" + dep_path = os.path.join(dirname, dep_basename) + if os.path.isfile(dep_path): + # In case of failure, defer to primary load, which is almost certain to fail, too. + with contextlib.suppress(OSError): + ctypes.CDLL(dep_path, CDLL_MODE) + + +def load_with_abs_path(desc: LibDescriptor, found_path: str, found_via: str | None = None) -> LoadedDL: + """Load a dynamic library from the given path. + + Args: + desc: Descriptor for the library to load. + found_path: The absolute path to the library file. + found_via: Label indicating how the path was discovered. + + Returns: + A LoadedDL object representing the loaded library. + + Raises: + RuntimeError: If the library cannot be loaded. + """ + _work_around_known_bugs(desc.name, found_path) + try: + handle = _load_lib(desc, found_path) + except OSError as e: + raise RuntimeError(f"Failed to dlopen {found_path}: {e}") from e + return LoadedDL(found_path, False, handle._handle, found_via) diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/load_dl_windows.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/load_dl_windows.py new file mode 100644 index 0000000000000000000000000000000000000000..a659409fc8348613248bf5ca395a7228653c7b4e --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/load_dl_windows.py @@ -0,0 +1,184 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +import ctypes +import ctypes.wintypes +import os +import struct +import sys +import warnings +from typing import TYPE_CHECKING + +from cuda.pathfinder._dynamic_libs.load_dl_common import LoadedDL + +if TYPE_CHECKING: + from cuda.pathfinder._dynamic_libs.lib_descriptor import LibDescriptor + +# Mirrors WinBase.h (unfortunately not defined already elsewhere) +WINBASE_LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR = 0x00000100 +WINBASE_LOAD_LIBRARY_SEARCH_DEFAULT_DIRS = 0x00001000 + +POINTER_ADDRESS_SPACE = 2 ** (struct.calcsize("P") * 8) + +# Set up kernel32 functions with proper types +windll = getattr(ctypes, "windll", None) +if windll is None: + raise RuntimeError("ctypes.windll is required on Windows") +kernel32 = windll.kernel32 + +# GetModuleHandleW +kernel32.GetModuleHandleW.argtypes = [ctypes.wintypes.LPCWSTR] +kernel32.GetModuleHandleW.restype = ctypes.wintypes.HMODULE + +# LoadLibraryExW +kernel32.LoadLibraryExW.argtypes = [ + ctypes.wintypes.LPCWSTR, # lpLibFileName + ctypes.wintypes.HANDLE, # hFile (reserved, must be NULL) + ctypes.wintypes.DWORD, # dwFlags +] +kernel32.LoadLibraryExW.restype = ctypes.wintypes.HMODULE + +# GetModuleFileNameW +kernel32.GetModuleFileNameW.argtypes = [ + ctypes.wintypes.HMODULE, # hModule + ctypes.wintypes.LPWSTR, # lpFilename + ctypes.wintypes.DWORD, # nSize +] +kernel32.GetModuleFileNameW.restype = ctypes.wintypes.DWORD + + +# GetLastError +kernel32.GetLastError.argtypes = [] +kernel32.GetLastError.restype = ctypes.wintypes.DWORD + + +def ctypes_handle_to_unsigned_int(handle: ctypes.wintypes.HMODULE) -> int: + """Convert ctypes HMODULE to unsigned int.""" + handle_uint = int(handle) + if handle_uint < 0: + # Convert from signed to unsigned representation + handle_uint += POINTER_ADDRESS_SPACE + return handle_uint + + +def add_dll_directory(dll_abs_path: str) -> None: + """Add a DLL directory to the search path and update PATH environment variable. + + Args: + dll_abs_path: Absolute path to the DLL file + + Raises: + AssertionError: If the directory containing the DLL does not exist + """ + dirpath = os.path.dirname(dll_abs_path) + assert os.path.isdir(dirpath), dll_abs_path + + # Add the DLL directory to the native search path via the stdlib wrapper + # around AddDllDirectory. This only affects the LOAD_LIBRARY_SEARCH_USER_DIRS + # search; PATH is updated unconditionally below to also cover legacy + # dependent-DLL resolution. The returned handle is intentionally discarded: + # the directory must stay on the search path for the process lifetime, and + # the handle has no finalizer, so dropping it does not remove the directory. + try: + if sys.platform == "win32": + os.add_dll_directory(dirpath) + except OSError as e: + # Warn instead of failing silently; the PATH update below is a weaker + # fallback that newer loaders may ignore. + warnings.warn( + f"os.add_dll_directory({dirpath!r}) failed ({e}); " + "falling back to process-global PATH mutation for dependent-DLL resolution.", + RuntimeWarning, + stacklevel=2, + ) + + # Update PATH as a fallback for dependent DLL resolution + curr_path = os.environ.get("PATH") + os.environ["PATH"] = dirpath if curr_path is None else os.pathsep.join((curr_path, dirpath)) + + +def abs_path_for_dynamic_library(libname: str, handle: ctypes.wintypes.HMODULE) -> str: + """Get the absolute path of a loaded dynamic library on Windows.""" + # Create buffer for the path + buffer = ctypes.create_unicode_buffer(260) # MAX_PATH + length = kernel32.GetModuleFileNameW(handle, buffer, len(buffer)) + + if length == 0: + error_code = kernel32.GetLastError() + raise RuntimeError(f"GetModuleFileNameW failed for {libname!r} (error code: {error_code})") + + # If buffer was too small, try with larger buffer + if length == len(buffer): + buffer = ctypes.create_unicode_buffer(32768) # Extended path length + length = kernel32.GetModuleFileNameW(handle, buffer, len(buffer)) + if length == 0: + error_code = kernel32.GetLastError() + raise RuntimeError(f"GetModuleFileNameW failed for {libname!r} (error code: {error_code})") + + return buffer.value + + +def check_if_already_loaded_from_elsewhere(desc: LibDescriptor) -> LoadedDL | None: + for dll_name in desc.windows_dlls: + handle = kernel32.GetModuleHandleW(dll_name) + if handle: + abs_path = abs_path_for_dynamic_library(desc.name, handle) + if desc.requires_add_dll_directory: + # Match load_with_abs_path(): lazy component DLLs need the directory + # of the module that is actually loaded, regardless of how it arrived. + add_dll_directory(abs_path) + return LoadedDL(abs_path, True, ctypes_handle_to_unsigned_int(handle), "was-already-loaded-from-elsewhere") + return None + + +def load_with_system_search(desc: LibDescriptor) -> LoadedDL | None: + """Try to load a DLL using the native Windows process DLL search path. + + This calls ``LoadLibraryExW(dll_name, NULL, 0)`` directly. Under Python + 3.8+, CPython configures the process with + ``SetDefaultDllDirectories(LOAD_LIBRARY_SEARCH_DEFAULT_DIRS)``, so this + search does **not** include the system ``PATH``. Directories added via + ``AddDllDirectory()`` still participate. + + Args: + desc: Descriptor for the library to load + + Returns: + A LoadedDL object if successful, None if the library cannot be loaded + """ + for dll_name in desc.windows_dlls: + handle = kernel32.LoadLibraryExW(dll_name, None, 0) + if handle: + abs_path = abs_path_for_dynamic_library(desc.name, handle) + return LoadedDL(abs_path, False, ctypes_handle_to_unsigned_int(handle), "system-search") + + return None + + +def load_with_abs_path(desc: LibDescriptor, found_path: str, found_via: str | None = None) -> LoadedDL: + """Load a dynamic library from the given path. + + Args: + desc: Descriptor for the library to load. + found_path: The absolute path to the DLL file. + found_via: Label indicating how the path was discovered. + + Returns: + A LoadedDL object representing the loaded library. + + Raises: + RuntimeError: If the DLL cannot be loaded. + """ + if desc.requires_add_dll_directory: + add_dll_directory(found_path) + + flags = WINBASE_LOAD_LIBRARY_SEARCH_DEFAULT_DIRS | WINBASE_LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR + handle = kernel32.LoadLibraryExW(found_path, None, flags) + + if not handle: + error_code = kernel32.GetLastError() + raise RuntimeError(f"Failed to load DLL at {found_path}: Windows error {error_code}") + + return LoadedDL(found_path, False, ctypes_handle_to_unsigned_int(handle), found_via) diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/load_nvidia_dynamic_lib.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/load_nvidia_dynamic_lib.py new file mode 100644 index 0000000000000000000000000000000000000000..2b0761be1a6e8a086097f362c138145180d69f95 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/load_nvidia_dynamic_lib.py @@ -0,0 +1,330 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +import functools +import struct +import subprocess +import sys +from typing import TYPE_CHECKING + +from cuda.pathfinder._dynamic_libs.lib_descriptor import LIB_DESCRIPTORS +from cuda.pathfinder._dynamic_libs.load_dl_common import ( + DynamicLibNotAvailableError, + DynamicLibNotFoundError, + DynamicLibUnknownError, + LoadedDL, + load_dependencies, +) +from cuda.pathfinder._dynamic_libs.platform_loader import LOADER +from cuda.pathfinder._dynamic_libs.search_steps import ( + EARLY_FIND_STEPS, + LATE_FIND_STEPS, + SearchContext, + derive_ctk_root, + find_via_ctk_root, + run_find_steps, +) +from cuda.pathfinder._dynamic_libs.subprocess_protocol import ( + DYNAMIC_LIB_SUBPROCESS_CWD, + MODE_CANARY, + STATUS_OK, + DynamicLibSubprocessPayload, + build_dynamic_lib_subprocess_command, + parse_dynamic_lib_subprocess_payload, +) +from cuda.pathfinder._dynamic_libs.supported_nvidia_libs import ALL_AVAILABLE_LIBNAMES +from cuda.pathfinder._utils.platform_aware import IS_WINDOWS + +if TYPE_CHECKING: + from cuda.pathfinder._dynamic_libs.lib_descriptor import LibDescriptor + +# All libnames recognized by load_nvidia_dynamic_lib, across all categories +# (CTK, third-party, driver). +_ALL_KNOWN_LIBNAMES: frozenset[str] = frozenset(LIB_DESCRIPTORS) +_PLATFORM_NAME = "Windows" if IS_WINDOWS else "Linux" +_CANARY_PROBE_TIMEOUT_SECONDS = 10.0 + +# Driver libraries: shipped with the NVIDIA display driver, always on the +# system linker path. These skip all CTK search steps (site-packages, +# conda, CUDA_PATH, canary) and go straight to system search. +_DRIVER_ONLY_LIBNAMES = frozenset(name for name, desc in LIB_DESCRIPTORS.items() if desc.packaged_with == "driver") + + +def _load_driver_lib_no_cache(desc: LibDescriptor) -> LoadedDL: + """Load an NVIDIA driver library (system-search only). + + Driver libs (libcuda, libnvidia-ml) are part of the display driver, not + the CUDA Toolkit. They are expected to be discoverable via the platform's + native loader mechanisms, so the full CTK search cascade (site-packages, + conda, CUDA_PATH, canary) is unnecessary. + """ + loaded = LOADER.check_if_already_loaded_from_elsewhere(desc) + if loaded is not None: + return loaded + loaded = LOADER.load_with_system_search(desc) + if loaded is not None: + return loaded + raise DynamicLibNotFoundError( + f'"{desc.name}" is an NVIDIA driver library and can only be found via' + f" system search. Ensure the NVIDIA display driver is installed." + ) + + +def _coerce_subprocess_output(output: str | bytes | None) -> str: + if isinstance(output, bytes): + return output.decode(errors="replace") + return "" if output is None else output + + +def _raise_canary_probe_child_process_error( + *, + returncode: int | None = None, + timeout: float | None = None, + stderr: str | bytes | None = None, +) -> None: + if timeout is None: + error_line = f"Canary probe child process exited with code {returncode}." + else: + error_line = f"Canary probe child process timed out after {timeout} seconds." + raise ChildProcessError( + f"{error_line}\n" + "--- stderr-from-child-process ---\n" + f"{_coerce_subprocess_output(stderr)}" + "\n" + ) + + +@functools.cache +def _resolve_system_loaded_abs_path_in_subprocess( + libname: str, + *, + timeout: float = _CANARY_PROBE_TIMEOUT_SECONDS, +) -> str | None: + """Resolve a canary library's absolute path in a fresh Python subprocess.""" + try: + result = subprocess.run( # noqa: S603 - trusted argv: current interpreter + internal probe module + build_dynamic_lib_subprocess_command(MODE_CANARY, libname), + capture_output=True, + text=True, + timeout=timeout, + check=False, + cwd=DYNAMIC_LIB_SUBPROCESS_CWD, + ) + except subprocess.TimeoutExpired as exc: + _raise_canary_probe_child_process_error(timeout=exc.timeout, stderr=exc.stderr) + + if result.returncode != 0: + _raise_canary_probe_child_process_error(returncode=result.returncode, stderr=result.stderr) + + payload: DynamicLibSubprocessPayload = parse_dynamic_lib_subprocess_payload( + result.stdout, + libname=libname, + error_label="Canary probe child process", + ) + abs_path: str | None = payload.abs_path + if payload.status == STATUS_OK: + return abs_path + return None + + +def _loadable_via_canary_subprocess(libname: str, *, timeout: float = _CANARY_PROBE_TIMEOUT_SECONDS) -> bool: + """Return True if the canary subprocess can resolve ``libname`` via system search.""" + return _resolve_system_loaded_abs_path_in_subprocess(libname, timeout=timeout) is not None + + +def resolve_ctk_root_via_canary(canary_libname: str) -> str | None: + """Resolve the CUDA Toolkit root from a system-loadable canary library. + + The canary library's absolute path is resolved by the OS dynamic loader in + an isolated subprocess, which honors ``LD_LIBRARY_PATH`` on Linux and the + native DLL search on Windows. The toolkit root is then derived from that + path. Returns ``None`` if the canary cannot be resolved or no root can be + derived. + """ + canary_abs_path = _resolve_system_loaded_abs_path_in_subprocess(canary_libname) + if canary_abs_path is None: + return None + ctk_root: str | None = derive_ctk_root(canary_abs_path) + return ctk_root + + +def _try_ctk_root_canary(ctx: SearchContext) -> str | None: + """Try CTK-root canary fallback for descriptor-configured libraries.""" + for canary_libname in ctx.desc.ctk_root_canary_anchor_libnames: + ctk_root = resolve_ctk_root_via_canary(canary_libname) + if ctk_root is None: + continue + find = find_via_ctk_root(ctx, ctk_root) + if find is not None: + return str(find.abs_path) + return None + + +def _load_lib_no_cache(libname: str) -> LoadedDL: + desc = LIB_DESCRIPTORS[libname] + + if libname in _DRIVER_ONLY_LIBNAMES: + return _load_driver_lib_no_cache(desc) + + ctx = SearchContext(desc) + + # Phase 1: Try to find the library file on disk (pip wheels, conda). + find = run_find_steps(ctx, EARLY_FIND_STEPS) + + # Phase 2: Cross-cutting — already-loaded check and dependency loading. + loaded = LOADER.check_if_already_loaded_from_elsewhere(desc) + load_dependencies(desc, load_nvidia_dynamic_lib) + if loaded is not None: + return loaded + + # Phase 3: Load from found path, or fall back to system search + late find. + if find is not None: + return LOADER.load_with_abs_path(desc, find.abs_path, find.found_via) + + loaded = LOADER.load_with_system_search(desc) + if loaded is not None: + return loaded + + find = run_find_steps(ctx, LATE_FIND_STEPS) + if find is not None: + return LOADER.load_with_abs_path(desc, find.abs_path, find.found_via) + + if desc.ctk_root_canary_anchor_libnames: + canary_abs_path = _try_ctk_root_canary(ctx) + if canary_abs_path is not None: + return LOADER.load_with_abs_path(desc, canary_abs_path, "system-ctk-root") + + ctx.raise_not_found() + + +@functools.cache +def load_nvidia_dynamic_lib(libname: str) -> LoadedDL: + """Load an NVIDIA dynamic library by name. + + Args: + libname (str): The short name of the library to load (e.g., ``"cudart"``, + ``"nvvm"``, etc.). + + Returns: + LoadedDL: Object containing the OS library handle and absolute path. + + **Important:** + + **Never close the returned handle.** Do **not** call ``dlclose`` (Linux) or + ``FreeLibrary`` (Windows) on the ``LoadedDL._handle_uint``. + + **Why:** the return value is cached (``functools.cache``) and shared across the + process. Closing the handle can unload the module while other code still uses + it, leading to crashes or subtle failures. + + This applies to Linux and Windows. For context, see issue #1011: + https://github.com/NVIDIA/cuda-python/issues/1011 + + Raises: + DynamicLibUnknownError: If ``libname`` is not a recognized library name. + DynamicLibNotAvailableError: If ``libname`` is recognized but not + supported on this platform. + DynamicLibNotFoundError: If the library cannot be found or loaded. + RuntimeError: If Python is not 64-bit. + + Windows on ARM (WoA) Note: + On Windows, this API aims to load a dynamic library whose architecture + matches the Python interpreter architecture. For example, x64 Python + running on an Arm64 machine targets an x64 DLL, while native Arm64 Python + targets an Arm64 DLL. A library loaded into the Python process must be + compatible with that process. This differs from + ``find_nvidia_binary_utility``, which targets the native machine + architecture when selecting architecture-specific executables. + + Search order: + 0. **Already loaded in the current process** + + - If a matching library is already loaded by some other component, + return its absolute path and handle and skip the rest of the search. + + 1. **NVIDIA Python wheels** + + - Scan installed distributions (``site-packages``) to find libraries + shipped in NVIDIA wheels. + + 2. **Conda environment** + + - Conda installations are discovered via ``CONDA_PREFIX``, which is + defined automatically in activated conda environments (see + https://docs.conda.io/projects/conda-build/en/stable/user-guide/environment-variables.html). + + 3. **OS default mechanisms** + + - Fall back to the native loader: + + - Linux: ``dlopen()`` + + - Windows: ``LoadLibraryExW()`` + + On Linux, CUDA Toolkit (CTK) system installs with system config updates are + usually discovered via ``/etc/ld.so.conf.d/*cuda*.conf``. + + On Windows, under Python 3.8+, CPython configures the process with + ``SetDefaultDllDirectories(LOAD_LIBRARY_SEARCH_DEFAULT_DIRS)``. + As a result, the native DLL search used here does **not** include + the system ``PATH``. + + 4. **Environment variables** + + - First search library-specific roots declared by the descriptor, + such as ``CUDNN_PATH`` and ``NCCL_HOME``, using their + platform-specific product layouts. Then use ``CUDA_PATH`` or + ``CUDA_HOME`` (in that order). + On Windows, ``CUDA_PATH`` is the typical way system-installed CTK + DLLs are located. Note that the NVIDIA CTK installer automatically + adds ``CUDA_PATH`` to the system-wide environment. + + 5. **Windows Program Files (configured libraries only)** + + - Search descriptor-configured standalone installation roots, such + as versioned x64 cuDNN directories under ``ProgramFiles``, using + the general per-library anchor layout. + + 6. **CTK root canary probe (discoverable libs only)** + + - For selected libraries whose shared object doesn't reside on the + standard linker path (currently ``nvvm``), attempt to derive CTK + root by system-loading a well-known CTK canary library in a + subprocess and then searching relative to that root. On Windows, + the canary uses the same native ``LoadLibraryExW`` semantics as + step 3, so there is also no ``PATH``-based discovery. + + **Driver libraries** (``"cuda"``, ``"nvml"``): + + These are part of the NVIDIA display driver (not the CUDA Toolkit) and + are expected to be reachable via the native OS loader path. For these + libraries the search is simplified to: + + 0. Already loaded in the current process + 1. OS default mechanisms (``dlopen`` / ``LoadLibraryExW``) + + The non-driver steps (site-packages, conda, environment roots, + ``ProgramFiles``, and canary probe) are skipped entirely. + + Notes: + The search is performed **per library**. There is currently no mechanism to + guarantee that multiple libraries are all resolved from the same location. + + """ + pointer_size_bits = struct.calcsize("P") * 8 + if pointer_size_bits != 64: + raise RuntimeError( + f"cuda.pathfinder.load_nvidia_dynamic_lib() requires 64-bit Python." + f" Currently running: {pointer_size_bits}-bit Python" + f" {sys.version_info.major}.{sys.version_info.minor}" + ) + if libname not in _ALL_KNOWN_LIBNAMES: + raise DynamicLibUnknownError(f"Unknown library name: {libname!r}. Known names: {sorted(_ALL_KNOWN_LIBNAMES)}") + if libname not in ALL_AVAILABLE_LIBNAMES: + raise DynamicLibNotAvailableError( + f"Library name {libname!r} is known but not available on {_PLATFORM_NAME}. " + f"Supported names on {_PLATFORM_NAME}: {sorted(ALL_AVAILABLE_LIBNAMES)}" + ) + return _load_lib_no_cache(libname) diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/platform_loader.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/platform_loader.py new file mode 100644 index 0000000000000000000000000000000000000000..1d65f696f046a8c5772fa2d86e3d6926330736c7 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/platform_loader.py @@ -0,0 +1,41 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +"""Platform loader seam for OS-specific dynamic linking. + +This module provides a small interface that hides the Linux vs Windows +implementation details of: + +- already-loaded checks +- system-search loading +- absolute-path loading + +The orchestration logic in :mod:`load_nvidia_dynamic_lib` should not need to +branch on platform; it calls through the loader instance exported here. +""" + +from __future__ import annotations + +import sys +from typing import Protocol + +from cuda.pathfinder._dynamic_libs.lib_descriptor import LibDescriptor +from cuda.pathfinder._dynamic_libs.load_dl_common import LoadedDL + + +class PlatformLoader(Protocol): + def check_if_already_loaded_from_elsewhere(self, desc: LibDescriptor) -> LoadedDL | None: ... + + def load_with_system_search(self, desc: LibDescriptor) -> LoadedDL | None: ... + + def load_with_abs_path(self, desc: LibDescriptor, found_path: str, found_via: str | None = None) -> LoadedDL: ... + + +if sys.platform == "win32": + from cuda.pathfinder._dynamic_libs import load_dl_windows as _impl +else: + from cuda.pathfinder._dynamic_libs import load_dl_linux as _impl + +# The platform modules already expose functions matching the PlatformLoader +# protocol. Wrap in a simple namespace so callers use LOADER.method() syntax. +LOADER: PlatformLoader = _impl diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/search_platform.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/search_platform.py new file mode 100644 index 0000000000000000000000000000000000000000..71a92b00924130a69718c33f6621434ed20d301a --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/search_platform.py @@ -0,0 +1,269 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +"""Platform abstraction for filesystem search steps. + +The goal is to keep :mod:`search_steps` platform-agnostic: it should not branch +on OS flags like ``IS_WINDOWS``. Instead, it calls through the single +``PLATFORM`` instance exported here. +""" + +from __future__ import annotations + +import os +from collections.abc import Sequence +from dataclasses import dataclass +from pathlib import PurePath +from typing import Protocol, cast + +from cuda.pathfinder._dynamic_libs.lib_descriptor import LibDescriptor +from cuda.pathfinder._dynamic_libs.supported_nvidia_libs import is_suppressed_dll_file +from cuda.pathfinder._utils.find_sub_dirs import find_sub_dirs_all_sitepackages +from cuda.pathfinder._utils.platform_aware import IS_WINDOWS +from cuda.pathfinder._utils.windows_arch import windows_pe_matches_arch, windows_python_arch + + +def _no_such_file_in_sub_dirs( + sub_dirs: Sequence[str], file_description: str, error_messages: list[str], attachments: list[str] +) -> None: + error_messages.append(f"No such file: {file_description}") + for sub_dir in find_sub_dirs_all_sitepackages(sub_dirs): + attachments.append(f' listdir("{sub_dir}"):') + for node in sorted(os.listdir(sub_dir)): + attachments.append(f" {node}") + + +def _find_descriptor_so_under_dir(dirpath: str, desc: LibDescriptor) -> str | None: + for soname in desc.linux_sonames: + path = os.path.join(dirpath, soname) + if os.path.isfile(path): + return path + return None + + +def _find_so_in_rel_dirs( + rel_dirs: tuple[str, ...], + desc: LibDescriptor, + file_description: str, + error_messages: list[str], + attachments: list[str], +) -> str | None: + sub_dirs_searched: list[tuple[str, ...]] = [] + for rel_dir in rel_dirs: + sub_dir = PurePath(rel_dir).parts + for abs_dir in find_sub_dirs_all_sitepackages(sub_dir): + so_path = _find_descriptor_so_under_dir(abs_dir, desc) + if so_path is not None: + return so_path + sub_dirs_searched.append(sub_dir) + for sub_dir in sub_dirs_searched: + _no_such_file_in_sub_dirs(sub_dir, file_description, error_messages, attachments) + return None + + +def _find_descriptor_dll_under_dir( + dirpath: str, + desc: LibDescriptor, + target_arch: str | None = None, +) -> str | None: + def candidate_is_usable(path: str) -> bool: + if not os.path.isfile(path): + return False + if is_suppressed_dll_file(os.path.basename(path)): + return False + return target_arch is None or windows_pe_matches_arch(path, target_arch) + + for dll_basename in desc.windows_dlls: + path = os.path.join(dirpath, dll_basename) + if candidate_is_usable(path): + return path + return None + + +def _find_dll_in_rel_dirs( + rel_dirs: tuple[str, ...], + desc: LibDescriptor, + target_arch: str, + lib_searched_for: str, + error_messages: list[str], + attachments: list[str], +) -> str | None: + sub_dirs_searched: list[tuple[str, ...]] = [] + checked_arch = target_arch if desc.requires_windows_binary_arch_check else None + for rel_dir in rel_dirs: + sub_dir = PurePath(rel_dir).parts + for abs_dir in find_sub_dirs_all_sitepackages(sub_dir): + dll_name = _find_descriptor_dll_under_dir(abs_dir, desc, checked_arch) + if dll_name is not None: + return dll_name + sub_dirs_searched.append(sub_dir) + for sub_dir in sub_dirs_searched: + _no_such_file_in_sub_dirs(sub_dir, lib_searched_for, error_messages, attachments) + return None + + +class SearchPlatform(Protocol): + def lib_searched_for(self, desc: LibDescriptor) -> str: ... + + def site_packages_rel_dirs(self, desc: LibDescriptor) -> tuple[str, ...]: ... + + def conda_anchor_point(self, conda_prefix: str) -> str: ... + + def anchor_rel_dirs(self, desc: LibDescriptor) -> tuple[str, ...]: ... + + def install_root_env_vars(self, desc: LibDescriptor) -> tuple[str, ...]: ... + + def install_root_env_rel_dirs(self, desc: LibDescriptor) -> tuple[str, ...]: ... + + def program_files_root_globs(self, desc: LibDescriptor) -> tuple[str, ...]: ... + + def find_in_site_packages( + self, + rel_dirs: tuple[str, ...], + desc: LibDescriptor, + error_messages: list[str], + attachments: list[str], + ) -> str | None: ... + + def find_in_lib_dir( + self, + lib_dir: str, + desc: LibDescriptor, + error_messages: list[str], + attachments: list[str], + ) -> str | None: ... + + +@dataclass(frozen=True, slots=True) +class LinuxSearchPlatform: + def lib_searched_for(self, desc: LibDescriptor) -> str: + return " or ".join(desc.linux_sonames) + + def site_packages_rel_dirs(self, desc: LibDescriptor) -> tuple[str, ...]: + return cast(tuple[str, ...], desc.site_packages_linux) + + def conda_anchor_point(self, conda_prefix: str) -> str: + return conda_prefix + + def anchor_rel_dirs(self, desc: LibDescriptor) -> tuple[str, ...]: + return cast(tuple[str, ...], desc.anchor_rel_dirs_linux) + + def install_root_env_vars(self, desc: LibDescriptor) -> tuple[str, ...]: + return cast(tuple[str, ...], desc.install_root_env_vars_linux) + + def install_root_env_rel_dirs(self, desc: LibDescriptor) -> tuple[str, ...]: + return cast(tuple[str, ...], desc.install_root_env_rel_dirs_linux) + + def program_files_root_globs(self, _desc: LibDescriptor) -> tuple[str, ...]: + return () + + def find_in_site_packages( + self, + rel_dirs: tuple[str, ...], + desc: LibDescriptor, + error_messages: list[str], + attachments: list[str], + ) -> str | None: + return _find_so_in_rel_dirs(rel_dirs, desc, self.lib_searched_for(desc), error_messages, attachments) + + def find_in_lib_dir( + self, + lib_dir: str, + desc: LibDescriptor, + error_messages: list[str], + attachments: list[str], + ) -> str | None: + so_path = _find_descriptor_so_under_dir(lib_dir, desc) + if so_path is not None: + return so_path + error_messages.append(f"No such file: {self.lib_searched_for(desc)}") + attachments.append(f' listdir("{lib_dir}"):') + if not os.path.isdir(lib_dir): + attachments.append(" DIRECTORY DOES NOT EXIST") + else: + for node in sorted(os.listdir(lib_dir)): + attachments.append(f" {node}") + return None + + +@dataclass(frozen=True, slots=True) +class WindowsSearchPlatform: + target_arch: str + + def lib_searched_for(self, desc: LibDescriptor) -> str: + return f"known {desc.name} DLL" + + def site_packages_rel_dirs(self, desc: LibDescriptor) -> tuple[str, ...]: + return cast(tuple[str, ...], desc.site_packages_windows.for_arch(self.target_arch)) + + def conda_anchor_point(self, conda_prefix: str) -> str: + return os.path.join(conda_prefix, "Library") + + def anchor_rel_dirs(self, desc: LibDescriptor) -> tuple[str, ...]: + return cast(tuple[str, ...], desc.anchor_rel_dirs_windows.for_arch(self.target_arch)) + + def install_root_env_vars(self, desc: LibDescriptor) -> tuple[str, ...]: + if self.target_arch not in desc.supported_windows_arch: + return () + return cast(tuple[str, ...], desc.install_root_env_vars_windows) + + def install_root_env_rel_dirs(self, desc: LibDescriptor) -> tuple[str, ...]: + if self.target_arch not in desc.supported_windows_arch: + return () + return cast(tuple[str, ...], desc.install_root_env_rel_dirs_windows.for_arch(self.target_arch)) + + def program_files_root_globs(self, desc: LibDescriptor) -> tuple[str, ...]: + program_files = os.environ.get("PROGRAMW6432") or os.environ.get("PROGRAMFILES") + if not program_files: + return () + rel_globs = desc.program_files_root_globs_windows.for_arch(self.target_arch) + return tuple(os.path.join(program_files, rel_glob) for rel_glob in rel_globs) + + def find_in_site_packages( + self, + rel_dirs: tuple[str, ...], + desc: LibDescriptor, + error_messages: list[str], + attachments: list[str], + ) -> str | None: + return _find_dll_in_rel_dirs( + rel_dirs, + desc, + self.target_arch, + self.lib_searched_for(desc), + error_messages, + attachments, + ) + + def find_in_lib_dir( + self, + lib_dir: str, + desc: LibDescriptor, + error_messages: list[str], + attachments: list[str], + ) -> str | None: + target_arch = self.target_arch if desc.requires_windows_binary_arch_check else None + dll_name = _find_descriptor_dll_under_dir(lib_dir, desc, target_arch) + if dll_name is not None: + return dll_name + lib_searched_for = self.lib_searched_for(desc) + if target_arch is None: + error_messages.append(f"No such file: {lib_searched_for}") + else: + error_messages.append(f"No {target_arch}-compatible PE file: {lib_searched_for}") + attachments.append(f' listdir("{lib_dir}"):') + if not os.path.isdir(lib_dir): + attachments.append(" DIRECTORY DOES NOT EXIST") + else: + for node in sorted(os.listdir(lib_dir)): + attachments.append(f" {node}") + return None + + +def _platform_for_current_system() -> SearchPlatform: + if IS_WINDOWS: + return WindowsSearchPlatform(target_arch=windows_python_arch()) + return LinuxSearchPlatform() + + +PLATFORM = _platform_for_current_system() diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/search_steps.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/search_steps.py new file mode 100644 index 0000000000000000000000000000000000000000..80779f72ae291b592438b1c685db5c1ae1eb488d --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/search_steps.py @@ -0,0 +1,282 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +"""Composable search steps for locating NVIDIA libraries. + +Each find step is a callable with signature:: + + (SearchContext) -> FindResult | None + +Find steps locate a library file on disk without loading it. The +orchestrator in :mod:`load_nvidia_dynamic_lib` handles loading, the +already-loaded check, and dependency resolution. + +Step sequences are defined per search strategy so that adding a new +step or strategy only requires adding a function and a tuple entry. + +This module is intentionally platform-agnostic: it does not branch on the +current operating system. Platform differences are routed through the +:data:`~cuda.pathfinder._dynamic_libs.search_platform.PLATFORM` instance. +""" + +import glob +import os +from collections.abc import Callable, Iterator +from dataclasses import dataclass, field +from typing import NoReturn, cast + +from cuda.pathfinder._dynamic_libs.lib_descriptor import LibDescriptor +from cuda.pathfinder._dynamic_libs.load_dl_common import DynamicLibNotFoundError +from cuda.pathfinder._dynamic_libs.search_platform import PLATFORM, SearchPlatform +from cuda.pathfinder._utils.env_vars import get_cuda_path_or_home +from cuda.pathfinder._utils.path_sort import numeric_aware_path_sort_key + +# --------------------------------------------------------------------------- +# Data types +# --------------------------------------------------------------------------- + + +@dataclass +class FindResult: + """A library file located on disk (not yet loaded).""" + + abs_path: str + found_via: str + + +@dataclass +class SearchContext: + """Mutable state accumulated during the search cascade.""" + + desc: LibDescriptor + platform: SearchPlatform = PLATFORM + error_messages: list[str] = field(default_factory=list) + attachments: list[str] = field(default_factory=list) + + @property + def libname(self) -> str: + return self.desc.name # type: ignore[no-any-return] # mypy can't resolve new sibling module + + @property + def lib_searched_for(self) -> str: + return cast(str, self.platform.lib_searched_for(self.desc)) + + def raise_not_found(self) -> NoReturn: + err = ", ".join(self.error_messages) + att = "\n".join(self.attachments) + raise DynamicLibNotFoundError(f'Failure finding "{self.lib_searched_for}": {err}\n{att}') + + +#: Type alias for a find step callable. +FindStep = Callable[[SearchContext], FindResult | None] + + +def _iter_lib_dirs(root: str, rel_dirs: tuple[str, ...]) -> Iterator[str]: + """Yield existing library directories under *root* in descriptor order.""" + for rel_path in rel_dirs: + for dirname in sorted(glob.glob(os.path.join(root, rel_path))): + if os.path.isdir(dirname): + yield os.path.normpath(dirname) + + +def _iter_lib_dirs_using_anchor( + desc: LibDescriptor, + platform: SearchPlatform, + anchor_point: str, +) -> Iterator[str]: + """Yield existing library directories under *anchor_point* in descriptor order.""" + yield from _iter_lib_dirs(anchor_point, platform.anchor_rel_dirs(desc)) + + +def _find_lib_dir_using_anchor(desc: LibDescriptor, platform: SearchPlatform, anchor_point: str) -> str | None: + """Find the first library directory under *anchor_point*.""" + return next(_iter_lib_dirs_using_anchor(desc, platform, anchor_point), None) + + +def _find_using_lib_dir(ctx: SearchContext, lib_dir: str | None) -> str | None: + """Find a library file in a resolved lib directory.""" + if lib_dir is None: + return None + return cast( + str | None, + ctx.platform.find_in_lib_dir( + lib_dir, + ctx.desc, + ctx.error_messages, + ctx.attachments, + ), + ) + + +def _find_under_root( + ctx: SearchContext, + root: str, + rel_dirs: tuple[str, ...], + found_via: str, +) -> FindResult | None: + """Resolve *rel_dirs* under *root*, then find the requested library.""" + for lib_dir in _iter_lib_dirs(root, rel_dirs): + abs_path = _find_using_lib_dir(ctx, lib_dir) + if abs_path is not None: + return FindResult(abs_path, found_via) + return None + + +def _find_under_anchor_root(ctx: SearchContext, root: str, found_via: str) -> FindResult | None: + """Resolve the descriptor's general anchors under *root*.""" + return _find_under_root(ctx, root, ctx.platform.anchor_rel_dirs(ctx.desc), found_via) + + +def _derive_ctk_root_linux(resolved_lib_path: str) -> str | None: + """Derive CTK root from Linux canary path. + + Supports: + - ``$CTK_ROOT/lib64/libfoo.so.*`` + - ``$CTK_ROOT/lib/libfoo.so.*`` + - ``$CTK_ROOT/targets//lib64/libfoo.so.*`` + - ``$CTK_ROOT/targets//lib/libfoo.so.*`` + """ + lib_dir = os.path.dirname(resolved_lib_path) + basename = os.path.basename(lib_dir) + if basename in ("lib64", "lib"): + parent = os.path.dirname(lib_dir) + grandparent = os.path.dirname(parent) + if os.path.basename(grandparent) == "targets": + return os.path.dirname(grandparent) + return parent + return None + + +def _derive_ctk_root_windows(resolved_lib_path: str) -> str | None: + """Derive CTK root from Windows canary path. + + Supports: + - ``$CTK_ROOT/bin/x64/foo.dll`` (CTK 13 style) + - ``$CTK_ROOT/bin/arm64/foo.dll`` (Windows on Arm CTK 13 style) + - ``$CTK_ROOT/bin/foo.dll`` (CTK 12 style) + """ + import ntpath + + lib_dir = ntpath.dirname(resolved_lib_path) + basename = ntpath.basename(lib_dir).lower() + if basename in ("x64", "arm64"): + parent = ntpath.dirname(lib_dir) + if ntpath.basename(parent).lower() == "bin": + return ntpath.dirname(parent) + elif basename == "bin": + return ntpath.dirname(lib_dir) + return None + + +def derive_ctk_root(resolved_lib_path: str) -> str | None: + """Derive CTK root from a resolved canary library path.""" + ctk_root = _derive_ctk_root_linux(resolved_lib_path) + if ctk_root is not None: + return ctk_root + return _derive_ctk_root_windows(resolved_lib_path) + + +def find_via_ctk_root(ctx: SearchContext, ctk_root: str) -> FindResult | None: + """Find a library under a previously derived CTK root.""" + return _find_under_anchor_root(ctx, ctk_root, "system-ctk-root") + + +# --------------------------------------------------------------------------- +# Find steps +# --------------------------------------------------------------------------- + + +def find_in_site_packages(ctx: SearchContext) -> FindResult | None: + """Search pip wheel install locations.""" + rel_dirs = ctx.platform.site_packages_rel_dirs(ctx.desc) + if not rel_dirs: + return None + abs_path = ctx.platform.find_in_site_packages( + rel_dirs, + ctx.desc, + ctx.error_messages, + ctx.attachments, + ) + if abs_path is not None: + return FindResult(abs_path, "site-packages") + return None + + +def find_in_conda(ctx: SearchContext) -> FindResult | None: + """Search ``$CONDA_PREFIX``.""" + conda_prefix = os.environ.get("CONDA_PREFIX") + if not conda_prefix: + return None + anchor = ctx.platform.conda_anchor_point(conda_prefix) + return _find_under_anchor_root(ctx, anchor, "conda") + + +def find_in_install_root_env_vars(ctx: SearchContext) -> FindResult | None: + """Search installation roots named by descriptor-specific environment variables.""" + rel_dirs = ctx.platform.install_root_env_rel_dirs(ctx.desc) + for env_var in ctx.platform.install_root_env_vars(ctx.desc): + root = os.environ.get(env_var) + if not root: + continue + result = _find_under_root(ctx, root, rel_dirs, env_var) + if result is not None: + return result + return None + + +def find_in_cuda_path(ctx: SearchContext) -> FindResult | None: + """Search ``$CUDA_PATH`` / ``$CUDA_HOME``. + + On Windows, this is the normal fallback for system-installed CTK DLLs when + they are not already discoverable via the native ``LoadLibraryExW(..., 0)`` + path used by :func:`cuda.pathfinder._dynamic_libs.load_dl_windows.load_with_system_search`. + Python 3.8+ does not include ``PATH`` in that native DLL search. + + The returned ``found_via`` is always ``"CUDA_PATH"`` regardless of which + environment variable actually provided the value. + """ + cuda_home = get_cuda_path_or_home() + if cuda_home is None: + return None + return _find_under_anchor_root(ctx, cuda_home, "CUDA_PATH") + + +def find_in_program_files_roots(ctx: SearchContext) -> FindResult | None: + """Search descriptor-configured installation roots under Program Files.""" + for root_glob in ctx.platform.program_files_root_globs(ctx.desc): + for root in sorted(glob.glob(root_glob), key=numeric_aware_path_sort_key, reverse=True): + if not os.path.isdir(root): + continue + result = _find_under_anchor_root(ctx, os.path.normpath(root), "ProgramFiles") + if result is not None: + return result + return None + + +# --------------------------------------------------------------------------- +# Step sequences per strategy +# --------------------------------------------------------------------------- + +#: Find steps that run before the already-loaded check and system search. +EARLY_FIND_STEPS: tuple[FindStep, ...] = (find_in_site_packages, find_in_conda) + +#: Find steps that run after system search fails. +LATE_FIND_STEPS: tuple[FindStep, ...] = ( + find_in_install_root_env_vars, + find_in_cuda_path, + find_in_program_files_roots, +) + + +# --------------------------------------------------------------------------- +# Cascade runner +# --------------------------------------------------------------------------- + + +def run_find_steps(ctx: SearchContext, steps: tuple[FindStep, ...]) -> FindResult | None: + """Run find steps in order, returning the first hit.""" + for step in steps: + result = step(ctx) + if result is not None: + return result + return None diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/subprocess_protocol.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/subprocess_protocol.py new file mode 100644 index 0000000000000000000000000000000000000000..4404d667f5f756df15f1233dd12cde794b41d112 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/subprocess_protocol.py @@ -0,0 +1,71 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +import json +import sys +from dataclasses import dataclass +from pathlib import Path +from typing import Literal + +MODE_CANARY: Literal["canary"] = "canary" +MODE_LOAD: Literal["load"] = "load" +VALID_MODES: tuple[Literal["canary"], Literal["load"]] = (MODE_CANARY, MODE_LOAD) + +STATUS_OK: Literal["ok"] = "ok" +STATUS_NOT_FOUND: Literal["not-found"] = "not-found" + +DYNAMIC_LIB_SUBPROCESS_MODULE = "cuda.pathfinder._dynamic_libs.dynamic_lib_subprocess" +DYNAMIC_LIB_SUBPROCESS_CWD = Path(__file__).resolve().parents[3] + + +@dataclass(frozen=True) +class DynamicLibSubprocessPayload: + status: Literal["ok", "not-found"] + abs_path: str | None + + +def format_dynamic_lib_subprocess_payload( + status: Literal["ok", "not-found"], + abs_path: str | None, + *, + error: dict[str, str] | None = None, +) -> str: + payload: dict[str, object] = {"status": status, "abs_path": abs_path} + if error is not None: + payload["error"] = error + return json.dumps(payload) + + +def build_dynamic_lib_subprocess_command(mode: str, libname: str) -> list[str]: + return [sys.executable, "-m", DYNAMIC_LIB_SUBPROCESS_MODULE, mode, libname] + + +def parse_dynamic_lib_subprocess_payload( + stdout: str, + *, + libname: str, + error_label: str, +) -> DynamicLibSubprocessPayload: + # Use the final non-empty line in case earlier output lines are emitted. + lines = [line for line in stdout.splitlines() if line.strip()] + if not lines: + raise RuntimeError(f"{error_label} produced no stdout payload for {libname!r}") + try: + payload = json.loads(lines[-1]) + except json.JSONDecodeError: + raise RuntimeError(f"{error_label} emitted invalid JSON payload for {libname!r}: {lines[-1]!r}") from None + if not isinstance(payload, dict): + raise RuntimeError(f"{error_label} emitted unexpected payload for {libname!r}: {payload!r}") + status = payload.get("status") + abs_path = payload.get("abs_path") + if status == STATUS_OK: + if not isinstance(abs_path, str): + raise RuntimeError(f"{error_label} emitted unexpected payload for {libname!r}: {payload!r}") + return DynamicLibSubprocessPayload(status=STATUS_OK, abs_path=abs_path) + if status == STATUS_NOT_FOUND: + if abs_path is not None: + raise RuntimeError(f"{error_label} emitted unexpected payload for {libname!r}: {payload!r}") + return DynamicLibSubprocessPayload(status=STATUS_NOT_FOUND, abs_path=None) + raise RuntimeError(f"{error_label} emitted unexpected payload for {libname!r}: {payload!r}") diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/supported_nvidia_libs.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/supported_nvidia_libs.py new file mode 100644 index 0000000000000000000000000000000000000000..02951cba52eba4f7f7cfbf05ef5fa23a8d860431 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/supported_nvidia_libs.py @@ -0,0 +1,139 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +"""Legacy table exports derived from the authored descriptor catalog. + +The canonical data entry point is :mod:`descriptor_catalog`. This module keeps +historical constant names for backward compatibility by deriving them from the +catalog. + +The unsuffixed ``SUPPORTED_LIBNAMES_WINDOWS`` and +``SITE_PACKAGES_LIBDIRS_WINDOWS*`` constants retain their historical x64 +meaning for compatibility, but are not recommended for new code. Use the +explicit ``*_X64`` or ``*_ARM64`` projection instead. Never combine the two +architecture projections. +""" + +from __future__ import annotations + +from cuda.pathfinder._dynamic_libs.descriptor_catalog import DESCRIPTOR_CATALOG +from cuda.pathfinder._utils.platform_aware import IS_WINDOWS, IS_WINDOWS_ARM64, IS_WINDOWS_X64 + +_CTK_DESCRIPTORS = tuple(desc for desc in DESCRIPTOR_CATALOG if desc.packaged_with == "ctk") +_OTHER_DESCRIPTORS = tuple(desc for desc in DESCRIPTOR_CATALOG if desc.packaged_with == "other") +_DRIVER_DESCRIPTORS = tuple(desc for desc in DESCRIPTOR_CATALOG if desc.packaged_with == "driver") +_NON_CTK_DESCRIPTORS = _OTHER_DESCRIPTORS + _DRIVER_DESCRIPTORS + + +def _legacy_least_preferred_first(names: tuple[str, ...]) -> tuple[str, ...]: + """Preserve the historical ordering of legacy filename projections.""" + return tuple(reversed(names)) + + +SUPPORTED_LIBNAMES_COMMON = tuple(desc.name for desc in _CTK_DESCRIPTORS if desc.linux_sonames and desc.windows_dlls) +SUPPORTED_LIBNAMES_LINUX_ONLY = tuple( + desc.name for desc in _CTK_DESCRIPTORS if desc.linux_sonames and not desc.windows_dlls +) +SUPPORTED_LIBNAMES_WINDOWS_ONLY = tuple( + desc.name for desc in _CTK_DESCRIPTORS if desc.windows_dlls and not desc.linux_sonames +) + +if not IS_WINDOWS: + ALL_AVAILABLE_LIBNAMES = frozenset(desc.name for desc in DESCRIPTOR_CATALOG if desc.linux_sonames) +else: + assert IS_WINDOWS_X64 != IS_WINDOWS_ARM64 + _current_windows_arch = "x64" if IS_WINDOWS_X64 else "arm64" + ALL_AVAILABLE_LIBNAMES = frozenset( + desc.name for desc in DESCRIPTOR_CATALOG if _current_windows_arch in desc.supported_windows_arch + ) + +SUPPORTED_LIBNAMES_LINUX = SUPPORTED_LIBNAMES_COMMON + SUPPORTED_LIBNAMES_LINUX_ONLY +SUPPORTED_LIBNAMES_WINDOWS_X64 = tuple(desc.name for desc in _CTK_DESCRIPTORS if "x64" in desc.supported_windows_arch) +SUPPORTED_LIBNAMES_WINDOWS_ARM64 = tuple( + desc.name for desc in _CTK_DESCRIPTORS if "arm64" in desc.supported_windows_arch +) +# Backward-compatible alias preserves the historical x64 meaning. +SUPPORTED_LIBNAMES_WINDOWS = SUPPORTED_LIBNAMES_WINDOWS_X64 +SUPPORTED_LIBNAMES_ALL = SUPPORTED_LIBNAMES_COMMON + SUPPORTED_LIBNAMES_LINUX_ONLY + SUPPORTED_LIBNAMES_WINDOWS_ONLY +if not IS_WINDOWS: + SUPPORTED_LIBNAMES = SUPPORTED_LIBNAMES_LINUX +elif IS_WINDOWS_X64: + SUPPORTED_LIBNAMES = SUPPORTED_LIBNAMES_WINDOWS_X64 +else: + assert IS_WINDOWS_ARM64 + SUPPORTED_LIBNAMES = SUPPORTED_LIBNAMES_WINDOWS_ARM64 + +DIRECT_DEPENDENCIES_CTK = {desc.name: desc.dependencies for desc in _CTK_DESCRIPTORS if desc.dependencies} +DIRECT_DEPENDENCIES = {desc.name: desc.dependencies for desc in DESCRIPTOR_CATALOG if desc.dependencies} + +SUPPORTED_LINUX_SONAMES_CTK = { + desc.name: _legacy_least_preferred_first(desc.linux_sonames) for desc in _CTK_DESCRIPTORS if desc.linux_sonames +} +SUPPORTED_LINUX_SONAMES_OTHER = { + desc.name: _legacy_least_preferred_first(desc.linux_sonames) for desc in _OTHER_DESCRIPTORS if desc.linux_sonames +} +SUPPORTED_LINUX_SONAMES_DRIVER = { + desc.name: _legacy_least_preferred_first(desc.linux_sonames) for desc in _DRIVER_DESCRIPTORS if desc.linux_sonames +} +SUPPORTED_LINUX_SONAMES = SUPPORTED_LINUX_SONAMES_CTK | SUPPORTED_LINUX_SONAMES_OTHER | SUPPORTED_LINUX_SONAMES_DRIVER + +SUPPORTED_WINDOWS_DLLS_CTK = { + desc.name: _legacy_least_preferred_first(desc.windows_dlls) for desc in _CTK_DESCRIPTORS if desc.windows_dlls +} +SUPPORTED_WINDOWS_DLLS_OTHER = { + desc.name: _legacy_least_preferred_first(desc.windows_dlls) for desc in _OTHER_DESCRIPTORS if desc.windows_dlls +} +SUPPORTED_WINDOWS_DLLS_DRIVER = { + desc.name: _legacy_least_preferred_first(desc.windows_dlls) for desc in _DRIVER_DESCRIPTORS if desc.windows_dlls +} +SUPPORTED_WINDOWS_DLLS = SUPPORTED_WINDOWS_DLLS_CTK | SUPPORTED_WINDOWS_DLLS_OTHER | SUPPORTED_WINDOWS_DLLS_DRIVER + +LIBNAMES_REQUIRING_OS_ADD_DLL_DIRECTORY = tuple( + desc.name for desc in DESCRIPTOR_CATALOG if desc.requires_add_dll_directory and desc.windows_dlls +) +LIBNAMES_REQUIRING_RTLD_DEEPBIND = tuple( + desc.name for desc in DESCRIPTOR_CATALOG if desc.requires_rtld_deepbind and desc.linux_sonames +) + +SITE_PACKAGES_LIBDIRS_LINUX_CTK = { + desc.name: desc.site_packages_linux for desc in _CTK_DESCRIPTORS if desc.site_packages_linux +} +SITE_PACKAGES_LIBDIRS_LINUX_OTHER = { + desc.name: desc.site_packages_linux for desc in _NON_CTK_DESCRIPTORS if desc.site_packages_linux +} +SITE_PACKAGES_LIBDIRS_LINUX = SITE_PACKAGES_LIBDIRS_LINUX_CTK | SITE_PACKAGES_LIBDIRS_LINUX_OTHER + +# Architecture-specific Windows projections. Keep these separate: combining +# them would make the table unsafe to consume for either process ABI. +SITE_PACKAGES_LIBDIRS_WINDOWS_CTK_X64 = { + desc.name: desc.site_packages_windows.x64 for desc in _CTK_DESCRIPTORS if desc.site_packages_windows.x64 +} +SITE_PACKAGES_LIBDIRS_WINDOWS_CTK_ARM64 = { + desc.name: desc.site_packages_windows.arm64 for desc in _CTK_DESCRIPTORS if desc.site_packages_windows.arm64 +} +SITE_PACKAGES_LIBDIRS_WINDOWS_OTHER_X64 = { + desc.name: desc.site_packages_windows.x64 for desc in _NON_CTK_DESCRIPTORS if desc.site_packages_windows.x64 +} +SITE_PACKAGES_LIBDIRS_WINDOWS_OTHER_ARM64 = { + desc.name: desc.site_packages_windows.arm64 for desc in _NON_CTK_DESCRIPTORS if desc.site_packages_windows.arm64 +} +SITE_PACKAGES_LIBDIRS_WINDOWS_X64 = SITE_PACKAGES_LIBDIRS_WINDOWS_CTK_X64 | SITE_PACKAGES_LIBDIRS_WINDOWS_OTHER_X64 +SITE_PACKAGES_LIBDIRS_WINDOWS_ARM64 = ( + SITE_PACKAGES_LIBDIRS_WINDOWS_CTK_ARM64 | SITE_PACKAGES_LIBDIRS_WINDOWS_OTHER_ARM64 +) + +# Backward-compatible aliases preserve the historical x64 meaning. +SITE_PACKAGES_LIBDIRS_WINDOWS_CTK = SITE_PACKAGES_LIBDIRS_WINDOWS_CTK_X64 +SITE_PACKAGES_LIBDIRS_WINDOWS_OTHER = SITE_PACKAGES_LIBDIRS_WINDOWS_OTHER_X64 +SITE_PACKAGES_LIBDIRS_WINDOWS = SITE_PACKAGES_LIBDIRS_WINDOWS_X64 + + +def is_suppressed_dll_file(path_basename: str) -> bool: + if path_basename.startswith("nvrtc"): + # nvidia_cuda_nvrtc_cu12-12.8.93-py3-none-win_amd64.whl: + # nvidia\cuda_nvrtc\bin\ + # nvrtc-builtins64_128.dll + # nvrtc64_120_0.alt.dll + # nvrtc64_120_0.dll + return path_basename.endswith(".alt.dll") or "-builtins" in path_basename + return path_basename.startswith(("cudart32_", "nvvm32")) diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_headers/__pycache__/find_nvidia_headers.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_headers/__pycache__/find_nvidia_headers.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9ec2490102157bda5db56ba735b65e630b0997c8 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_headers/__pycache__/find_nvidia_headers.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_headers/__pycache__/header_descriptor.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_headers/__pycache__/header_descriptor.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..406f8a18a52d0a620e58a9b07a73b51ec44c36d4 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_headers/__pycache__/header_descriptor.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_headers/__pycache__/header_descriptor_catalog.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_headers/__pycache__/header_descriptor_catalog.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..eb45ef5abaf19ff24d4ec33b21fc4d0ffc83466a Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_headers/__pycache__/header_descriptor_catalog.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_headers/__pycache__/supported_nvidia_headers.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_headers/__pycache__/supported_nvidia_headers.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f9b1022aeafd822049755eaf25a42285319bad09 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_headers/__pycache__/supported_nvidia_headers.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_headers/find_nvidia_headers.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_headers/find_nvidia_headers.py new file mode 100644 index 0000000000000000000000000000000000000000..86a86b2999c8ef2e0010004220c4200f05b636f2 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_headers/find_nvidia_headers.py @@ -0,0 +1,244 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +import functools +import glob +import os +from collections.abc import Callable +from dataclasses import dataclass +from typing import TYPE_CHECKING + +from cuda.pathfinder._dynamic_libs.load_nvidia_dynamic_lib import ( + _resolve_system_loaded_abs_path_in_subprocess, +) +from cuda.pathfinder._dynamic_libs.search_steps import derive_ctk_root +from cuda.pathfinder._headers.header_descriptor import ( + HEADER_DESCRIPTORS, + platform_include_subdirs, + resolve_conda_anchor, + system_install_dir_patterns, +) +from cuda.pathfinder._utils.ctk_root_canary import CTK_ROOT_CANARY_ANCHOR_LIBNAMES +from cuda.pathfinder._utils.env_vars import get_cuda_path_or_home +from cuda.pathfinder._utils.find_sub_dirs import find_sub_dirs_all_sitepackages +from cuda.pathfinder._utils.path_sort import numeric_aware_path_sort_key + +if TYPE_CHECKING: + from cuda.pathfinder._headers.header_descriptor import HeaderDescriptor + +# --------------------------------------------------------------------------- +# Data types +# --------------------------------------------------------------------------- + + +@dataclass +class LocatedHeaderDir: + abs_path: str | None + found_via: str + + def __post_init__(self) -> None: + self.abs_path = _abs_norm(self.abs_path) + + +#: Type alias for a header find step callable. +HeaderFindStep = Callable[["HeaderDescriptor"], LocatedHeaderDir | None] + +# --------------------------------------------------------------------------- +# Helpers +# --------------------------------------------------------------------------- + + +def _abs_norm(path: str | None) -> str | None: + if path: + return os.path.normpath(os.path.abspath(path)) + return None + + +def _joined_isfile(dirpath: str, basename: str) -> bool: + return os.path.isfile(os.path.join(dirpath, basename)) + + +def _locate_in_anchor_layout(desc: HeaderDescriptor, anchor_point: str) -> str | None: + """Search for a header under *anchor_point* using the descriptor's layout fields.""" + h_basename = desc.header_basename + for rel_dir in desc.anchor_include_rel_dirs: + idir = os.path.join(anchor_point, rel_dir) + for subdir in platform_include_subdirs(desc): + cdir = os.path.join(idir, subdir) + if _joined_isfile(cdir, h_basename): + return cdir + if _joined_isfile(idir, h_basename): + return idir + return None + + +# --------------------------------------------------------------------------- +# Find steps +# --------------------------------------------------------------------------- + + +def find_in_site_packages(desc: HeaderDescriptor) -> LocatedHeaderDir | None: + """Search pip wheel install locations.""" + for sub_dir in desc.site_packages_dirs: + hdr_dir: str # help mypy + for hdr_dir in find_sub_dirs_all_sitepackages(tuple(sub_dir.split("/"))): + if _joined_isfile(hdr_dir, desc.header_basename): + return LocatedHeaderDir(abs_path=hdr_dir, found_via="site-packages") + return None + + +def find_in_conda(desc: HeaderDescriptor) -> LocatedHeaderDir | None: + """Search ``$CONDA_PREFIX``.""" + conda_prefix = os.environ.get("CONDA_PREFIX") + if not conda_prefix: + return None + anchor_point = resolve_conda_anchor(desc, conda_prefix) + if anchor_point is None: + return None + found_header_path = _locate_in_anchor_layout(desc, anchor_point) + if found_header_path: + return LocatedHeaderDir(abs_path=found_header_path, found_via="conda") + return None + + +def find_in_product_roots(desc: HeaderDescriptor) -> LocatedHeaderDir | None: + """Search roots supplied through product-specific environment variables.""" + for env_var in desc.product_root_env_vars: + root = os.environ.get(env_var) + if not root: + continue + result = _locate_in_anchor_layout(desc, root) + if result is not None: + return LocatedHeaderDir(abs_path=result, found_via=env_var) + return None + + +def find_in_cuda_path(desc: HeaderDescriptor) -> LocatedHeaderDir | None: + """Search ``$CUDA_PATH`` / ``$CUDA_HOME``.""" + cuda_home = get_cuda_path_or_home() + if cuda_home is None: + return None + result = _locate_in_anchor_layout(desc, cuda_home) + if result is not None: + return LocatedHeaderDir(abs_path=result, found_via="CUDA_PATH") + return None + + +def find_via_ctk_root_canary(desc: HeaderDescriptor) -> LocatedHeaderDir | None: + """Try CTK header lookup via CTK-root canary probing. + + Skips immediately if the descriptor does not opt in (``use_ctk_root_canary``). + Otherwise, system-loads ``cudart`` in a fully isolated Python subprocess, derives + CTK root from the resolved library path, and searches the expected include + layout under that root. + """ + if not desc.use_ctk_root_canary: + return None + canary_abs_path = _resolve_system_loaded_abs_path_in_subprocess(CTK_ROOT_CANARY_ANCHOR_LIBNAMES[0]) + if canary_abs_path is None: + return None + ctk_root = derive_ctk_root(canary_abs_path) + if ctk_root is None: + return None + result = _locate_in_anchor_layout(desc, ctk_root) + if result is not None: + return LocatedHeaderDir(abs_path=result, found_via="system-ctk-root") + return None + + +def find_in_system_install_dirs(desc: HeaderDescriptor) -> LocatedHeaderDir | None: + """Search system install directories (glob patterns).""" + for pattern in system_install_dir_patterns(desc): + for hdr_dir in sorted(glob.glob(pattern), key=numeric_aware_path_sort_key, reverse=True): + if _joined_isfile(hdr_dir, desc.header_basename): + return LocatedHeaderDir(abs_path=hdr_dir, found_via="supported_install_dir") + return None + + +# --------------------------------------------------------------------------- +# Step sequence and cascade runner +# --------------------------------------------------------------------------- + +#: Unified find steps — each step self-gates based on descriptor fields. +FIND_STEPS: tuple[HeaderFindStep, ...] = ( + find_in_site_packages, + find_in_conda, + find_in_product_roots, + find_in_cuda_path, + find_via_ctk_root_canary, + find_in_system_install_dirs, +) + + +def run_find_steps(desc: HeaderDescriptor, steps: tuple[HeaderFindStep, ...]) -> LocatedHeaderDir | None: + """Run find steps in order, returning the first hit.""" + for step in steps: + result = step(desc) + if result is not None: + return result + return None + + +# --------------------------------------------------------------------------- +# Public API +# --------------------------------------------------------------------------- + + +@functools.cache +def locate_nvidia_header_directory(libname: str) -> LocatedHeaderDir | None: + """Locate the header directory for a supported NVIDIA library. + + Args: + libname (str): The short name of the library whose headers are needed + (e.g., ``"nvrtc"``, ``"cusolver"``, ``"nvshmem"``). + + Returns: + LocatedHeaderDir or None: A LocatedHeaderDir object containing the absolute path + to the discovered header directory and information about where it was found, + or ``None`` if the headers cannot be found. + + Raises: + RuntimeError: If ``libname`` is not in the supported set. + + Search order: + 1. **NVIDIA Python wheels** — site-packages directories from the descriptor. + 2. **Conda environments** — platform-specific conda include layouts. + 3. **Product environment variables** — for example, ``CUDNN_PATH``. + 4. **CUDA Toolkit environment variables** — ``CUDA_PATH`` / ``CUDA_HOME``. + 5. **CTK root canary probe** — subprocess canary (descriptors with + ``use_ctk_root_canary=True`` only). + 6. **System install directories** — glob patterns from the descriptor. + """ + desc = HEADER_DESCRIPTORS.get(libname) + if desc is None: + raise RuntimeError(f"UNKNOWN {libname=}") + return run_find_steps(desc, FIND_STEPS) + + +def find_nvidia_header_directory(libname: str) -> str | None: + """Locate the header directory for a supported NVIDIA library. + + Args: + libname (str): The short name of the library whose headers are needed + (e.g., ``"nvrtc"``, ``"cusolver"``, ``"nvshmem"``). + + Returns: + str or None: Absolute path to the discovered header directory, or ``None`` + if the headers cannot be found. + + Raises: + RuntimeError: If ``libname`` is not in the supported set. + + Search order: + 1. **NVIDIA Python wheels** — site-packages directories from the descriptor. + 2. **Conda environments** — platform-specific conda include layouts. + 3. **Product environment variables** — for example, ``CUDNN_PATH``. + 4. **CUDA Toolkit environment variables** — ``CUDA_PATH`` / ``CUDA_HOME``. + 5. **CTK root canary probe** — subprocess canary (descriptors with + ``use_ctk_root_canary=True`` only). + 6. **System install directories** — glob patterns from the descriptor. + """ + found = locate_nvidia_header_directory(libname) + return found.abs_path if found else None diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_headers/header_descriptor.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_headers/header_descriptor.py new file mode 100644 index 0000000000000000000000000000000000000000..3b108f618a5c45a9f07946848996fb01d56f7904 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_headers/header_descriptor.py @@ -0,0 +1,69 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +"""Per-header descriptor, registry, and platform-aware accessors. + +The canonical authored data lives in :mod:`header_descriptor_catalog`. This +module provides a name-keyed registry and platform-dispatch helpers consumed +by the runtime search path — keeping the search code itself platform-agnostic. +""" + +from __future__ import annotations + +import glob +import os +import sysconfig +from typing import TypeAlias, cast + +from cuda.pathfinder._headers.header_descriptor_catalog import ( + HEADER_DESCRIPTOR_CATALOG, + HeaderDescriptorSpec, +) +from cuda.pathfinder._utils.platform_aware import IS_WINDOWS + +HeaderDescriptor: TypeAlias = HeaderDescriptorSpec + +#: Canonical registry of all known header libraries. +HEADER_DESCRIPTORS: dict[str, HeaderDescriptor] = {desc.name: desc for desc in HEADER_DESCRIPTOR_CATALOG} + + +def platform_include_subdirs(desc: HeaderDescriptor) -> tuple[str, ...]: + """Return the effective include subdirectory search list for the current platform. + + On Windows, Windows-specific subdirs are checked first, followed by the + common subdirs. On Linux, only the common subdirs are returned. + """ + if IS_WINDOWS: + return cast(tuple[str, ...], desc.include_subdirs_windows + desc.include_subdirs) + return cast(tuple[str, ...], desc.include_subdirs) + + +def system_install_dir_patterns(desc: HeaderDescriptor) -> tuple[str, ...]: + """Return platform-aware, expanded system include-directory patterns.""" + patterns: list[str] = [] + if IS_WINDOWS: + patterns.extend(os.path.expandvars(pattern) for pattern in desc.system_install_dirs_windows) + return tuple(patterns) + if desc.use_linux_multiarch_include_dir: + multiarch = sysconfig.get_config_var("MULTIARCH") + if isinstance(multiarch, str) and multiarch: + patterns.append(os.path.join("/usr/include", multiarch)) + patterns.extend(os.path.expandvars(pattern) for pattern in desc.system_install_dirs) + return tuple(patterns) + + +def resolve_conda_anchor(desc: HeaderDescriptor, conda_prefix: str) -> str | None: + """Resolve the conda anchor point for header search on the current platform. + + Returns the directory that ``_locate_in_anchor_layout`` should use as + *anchor_point*, or ``None`` if the conda layout is not usable. + """ + if IS_WINDOWS: + anchor = os.path.join(conda_prefix, "Library") + return anchor if os.path.isdir(anchor) else None + if desc.conda_targets_layout: + targets_include_path = glob.glob(os.path.join(conda_prefix, "targets", "*", "include")) + if not targets_include_path or len(targets_include_path) != 1: + return None + return os.path.dirname(targets_include_path[0]) + return conda_prefix diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_headers/header_descriptor_catalog.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_headers/header_descriptor_catalog.py new file mode 100644 index 0000000000000000000000000000000000000000..66570bd264d0ba487626fe0022a54df6bef485db --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_headers/header_descriptor_catalog.py @@ -0,0 +1,292 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +"""Canonical authored descriptor catalog for header directories.""" + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Literal + +HeaderPackagedWith = Literal["ctk", "other"] + + +@dataclass(frozen=True, slots=True) +class HeaderDescriptorSpec: + """Header metadata with ordered alternatives searched first-to-last.""" + + name: str + packaged_with: HeaderPackagedWith + header_basename: str + site_packages_dirs: tuple[str, ...] = () + available_on_linux: bool = True + available_on_windows: bool = True + # Relative path(s) from anchor point to the include directory. + anchor_include_rel_dirs: tuple[str, ...] = ("include",) + # Product-specific environment variables whose values are anchor points. + product_root_env_vars: tuple[str, ...] = () + # Subdirectories within the include dir to check before the include dir itself. + include_subdirs: tuple[str, ...] = () + # Windows-only additional subdirectories within the include dir. + include_subdirs_windows: tuple[str, ...] = () + # Linux system install directories (glob patterns; environment variables are expanded). + system_install_dirs: tuple[str, ...] = () + # Windows system install directories (glob patterns; environment variables are expanded). + system_install_dirs_windows: tuple[str, ...] = () + # Whether to search /usr/include/ before system_install_dirs. + use_linux_multiarch_include_dir: bool = False + # Whether to use targets//include layout for conda on Linux. + conda_targets_layout: bool = True + # Whether to attempt CTK-root canary probing (spawns a subprocess). + use_ctk_root_canary: bool = True + + +HEADER_DESCRIPTOR_CATALOG: tuple[HeaderDescriptorSpec, ...] = ( + # ----------------------------------------------------------------------- + # CTK (CUDA Toolkit) headers + # ----------------------------------------------------------------------- + HeaderDescriptorSpec( + name="cccl", + packaged_with="ctk", + header_basename="cuda/std/version", + site_packages_dirs=( + "nvidia/cu13/include/cccl", # cuda-toolkit[cccl]==13.* + "nvidia/cuda_cccl/include", # cuda-toolkit[cccl]==12.* + ), + include_subdirs=("cccl",), + include_subdirs_windows=("targets/x64/cccl", "targets/x64"), + ), + HeaderDescriptorSpec( + name="cublas", + packaged_with="ctk", + header_basename="cublas.h", + site_packages_dirs=("nvidia/cu13/include", "nvidia/cublas/include"), + ), + HeaderDescriptorSpec( + name="cudart", + packaged_with="ctk", + header_basename="cuda_runtime.h", + site_packages_dirs=("nvidia/cu13/include", "nvidia/cuda_runtime/include"), + ), + HeaderDescriptorSpec( + name="cufft", + packaged_with="ctk", + header_basename="cufft.h", + site_packages_dirs=("nvidia/cu13/include", "nvidia/cufft/include"), + ), + HeaderDescriptorSpec( + name="cufile", + packaged_with="ctk", + header_basename="cufile.h", + site_packages_dirs=("nvidia/cu13/include", "nvidia/cufile/include"), + available_on_windows=False, + ), + HeaderDescriptorSpec( + name="curand", + packaged_with="ctk", + header_basename="curand.h", + site_packages_dirs=("nvidia/cu13/include", "nvidia/curand/include"), + ), + HeaderDescriptorSpec( + name="cusolver", + packaged_with="ctk", + header_basename="cusolverDn.h", + site_packages_dirs=("nvidia/cu13/include", "nvidia/cusolver/include"), + ), + HeaderDescriptorSpec( + name="cusparse", + packaged_with="ctk", + header_basename="cusparse.h", + site_packages_dirs=("nvidia/cu13/include", "nvidia/cusparse/include"), + ), + HeaderDescriptorSpec( + name="npp", + packaged_with="ctk", + header_basename="npp.h", + site_packages_dirs=("nvidia/cu13/include", "nvidia/npp/include"), + ), + HeaderDescriptorSpec( + name="profiler", + packaged_with="ctk", + header_basename="cuda_profiler_api.h", + site_packages_dirs=("nvidia/cu13/include", "nvidia/cuda_profiler_api/include"), + ), + HeaderDescriptorSpec( + name="nvcc", + packaged_with="ctk", + header_basename="fatbinary_section.h", + site_packages_dirs=("nvidia/cu13/include", "nvidia/cuda_nvcc/include"), + ), + HeaderDescriptorSpec( + name="nvfatbin", + packaged_with="ctk", + header_basename="nvFatbin.h", + site_packages_dirs=("nvidia/cu13/include", "nvidia/nvfatbin/include"), + ), + HeaderDescriptorSpec( + name="nvjitlink", + packaged_with="ctk", + header_basename="nvJitLink.h", + site_packages_dirs=("nvidia/cu13/include", "nvidia/nvjitlink/include"), + ), + HeaderDescriptorSpec( + name="nvjpeg", + packaged_with="ctk", + header_basename="nvjpeg.h", + site_packages_dirs=("nvidia/cu13/include", "nvidia/nvjpeg/include"), + ), + HeaderDescriptorSpec( + name="nvrtc", + packaged_with="ctk", + header_basename="nvrtc.h", + site_packages_dirs=("nvidia/cu13/include", "nvidia/cuda_nvrtc/include"), + ), + HeaderDescriptorSpec( + name="nvvm", + packaged_with="ctk", + header_basename="nvvm.h", + site_packages_dirs=("nvidia/cu13/include", "nvidia/cuda_nvcc/nvvm/include"), + anchor_include_rel_dirs=("nvvm/include",), + ), + HeaderDescriptorSpec( + name="cudla", + packaged_with="ctk", + header_basename="cudla.h", + site_packages_dirs=("nvidia/cu13/include",), + available_on_windows=False, + ), + # ----------------------------------------------------------------------- + # Third-party / separately packaged headers + # ----------------------------------------------------------------------- + HeaderDescriptorSpec( + name="cudnn", + packaged_with="other", + header_basename="cudnn.h", + site_packages_dirs=("nvidia/cudnn/include",), + product_root_env_vars=("CUDNN_PATH",), + system_install_dirs=( + "/usr/include", + "/usr/local/include", + ), + system_install_dirs_windows=("${ProgramFiles}/NVIDIA/CUDNN/v9.*/include",), + use_linux_multiarch_include_dir=True, + conda_targets_layout=False, + use_ctk_root_canary=False, + ), + HeaderDescriptorSpec( + name="cusolverMp", + packaged_with="other", + header_basename="cusolverMp.h", + site_packages_dirs=("nvidia/cu13/include", "nvidia/cu12/include"), + available_on_windows=False, + conda_targets_layout=False, + use_ctk_root_canary=False, + ), + HeaderDescriptorSpec( + name="cusparseLt", + packaged_with="other", + header_basename="cusparseLt.h", + site_packages_dirs=("nvidia/cu13/include", "nvidia/cusparselt/include"), + conda_targets_layout=False, + use_ctk_root_canary=False, + ), + HeaderDescriptorSpec( + name="cute", + packaged_with="other", + header_basename="cute/tensor.hpp", + site_packages_dirs=("cutlass_library/source/include",), + conda_targets_layout=False, + use_ctk_root_canary=False, + ), + HeaderDescriptorSpec( + name="cutensor", + packaged_with="other", + header_basename="cutensor.h", + site_packages_dirs=("cutensor/include",), + conda_targets_layout=False, + use_ctk_root_canary=False, + ), + HeaderDescriptorSpec( + name="cudensitymat", + packaged_with="other", + header_basename="cudensitymat.h", + site_packages_dirs=("cuquantum/include",), + available_on_windows=False, + conda_targets_layout=False, + use_ctk_root_canary=False, + ), + HeaderDescriptorSpec( + name="cupauliprop", + packaged_with="other", + header_basename="cupauliprop.h", + site_packages_dirs=("cuquantum/include",), + available_on_windows=False, + conda_targets_layout=False, + use_ctk_root_canary=False, + ), + HeaderDescriptorSpec( + name="cutensornet", + packaged_with="other", + header_basename="cutensornet.h", + site_packages_dirs=("cuquantum/include",), + available_on_windows=False, + conda_targets_layout=False, + use_ctk_root_canary=False, + ), + HeaderDescriptorSpec( + name="custabilizer", + packaged_with="other", + header_basename="custabilizer.h", + site_packages_dirs=("cuquantum/include",), + available_on_windows=False, + conda_targets_layout=False, + use_ctk_root_canary=False, + ), + HeaderDescriptorSpec( + name="custatevec", + packaged_with="other", + header_basename="custatevec.h", + site_packages_dirs=("cuquantum/include",), + available_on_windows=False, + conda_targets_layout=False, + use_ctk_root_canary=False, + ), + HeaderDescriptorSpec( + name="cutlass", + packaged_with="other", + header_basename="cutlass/cutlass.h", + site_packages_dirs=("cutlass_library/source/include",), + conda_targets_layout=False, + use_ctk_root_canary=False, + ), + HeaderDescriptorSpec( + name="mathdx", + packaged_with="other", + header_basename="libmathdx.h", + site_packages_dirs=("nvidia/cu13/include", "nvidia/cu12/include"), + conda_targets_layout=False, + use_ctk_root_canary=False, + ), + HeaderDescriptorSpec( + name="nccl", + packaged_with="other", + header_basename="nccl.h", + site_packages_dirs=("nvidia/nccl/include",), + available_on_windows=False, + anchor_include_rel_dirs=("include", "build/include"), + product_root_env_vars=("NCCL_HOME",), + system_install_dirs=("/usr/include", "/usr/local/include"), + conda_targets_layout=False, + use_ctk_root_canary=False, + ), + HeaderDescriptorSpec( + name="nvshmem", + packaged_with="other", + header_basename="nvshmem.h", + site_packages_dirs=("nvidia/nvshmem/include",), + available_on_windows=False, + system_install_dirs=("/usr/include/nvshmem_*",), + conda_targets_layout=False, + use_ctk_root_canary=False, + ), +) diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_headers/supported_nvidia_headers.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_headers/supported_nvidia_headers.py new file mode 100644 index 0000000000000000000000000000000000000000..34736baad8db4a3f8e6946dd7c02258c384e5d4d --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_headers/supported_nvidia_headers.py @@ -0,0 +1,82 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +"""Legacy table exports derived from the authored header descriptor catalog. + +The canonical data entry point is :mod:`header_descriptor_catalog`. This module +keeps historical constant names for backward compatibility by deriving them +from the catalog. +""" + +from __future__ import annotations + +from typing import Final + +from cuda.pathfinder._headers.header_descriptor import system_install_dir_patterns +from cuda.pathfinder._headers.header_descriptor_catalog import HEADER_DESCRIPTOR_CATALOG +from cuda.pathfinder._utils.platform_aware import IS_WINDOWS + +_CTK_DESCRIPTORS = tuple(desc for desc in HEADER_DESCRIPTOR_CATALOG if desc.packaged_with == "ctk") +_NON_CTK_DESCRIPTORS = tuple(desc for desc in HEADER_DESCRIPTOR_CATALOG if desc.packaged_with == "other") + +SUPPORTED_HEADERS_CTK_COMMON: Final[dict[str, str]] = { + desc.name: desc.header_basename + for desc in _CTK_DESCRIPTORS + if desc.available_on_linux and desc.available_on_windows +} +SUPPORTED_HEADERS_CTK_LINUX_ONLY: Final[dict[str, str]] = { + desc.name: desc.header_basename + for desc in _CTK_DESCRIPTORS + if desc.available_on_linux and not desc.available_on_windows +} +SUPPORTED_HEADERS_CTK_WINDOWS_ONLY: Final[dict[str, str]] = { + desc.name: desc.header_basename + for desc in _CTK_DESCRIPTORS + if desc.available_on_windows and not desc.available_on_linux +} + +SUPPORTED_HEADERS_CTK_LINUX = SUPPORTED_HEADERS_CTK_COMMON | SUPPORTED_HEADERS_CTK_LINUX_ONLY +SUPPORTED_HEADERS_CTK_WINDOWS = SUPPORTED_HEADERS_CTK_COMMON | SUPPORTED_HEADERS_CTK_WINDOWS_ONLY +SUPPORTED_HEADERS_CTK_ALL = ( + SUPPORTED_HEADERS_CTK_COMMON | SUPPORTED_HEADERS_CTK_LINUX_ONLY | SUPPORTED_HEADERS_CTK_WINDOWS_ONLY +) +SUPPORTED_HEADERS_CTK: Final[dict[str, str]] = ( + SUPPORTED_HEADERS_CTK_WINDOWS if IS_WINDOWS else SUPPORTED_HEADERS_CTK_LINUX +) + +SUPPORTED_SITE_PACKAGE_HEADER_DIRS_CTK: Final[dict[str, tuple[str, ...]]] = { + desc.name: desc.site_packages_dirs for desc in _CTK_DESCRIPTORS if desc.site_packages_dirs +} + +SUPPORTED_HEADERS_NON_CTK_COMMON: Final[dict[str, str]] = { + desc.name: desc.header_basename + for desc in _NON_CTK_DESCRIPTORS + if desc.available_on_linux and desc.available_on_windows +} +SUPPORTED_HEADERS_NON_CTK_LINUX_ONLY: Final[dict[str, str]] = { + desc.name: desc.header_basename + for desc in _NON_CTK_DESCRIPTORS + if desc.available_on_linux and not desc.available_on_windows +} +SUPPORTED_HEADERS_NON_CTK_WINDOWS_ONLY: Final[dict[str, str]] = { + desc.name: desc.header_basename + for desc in _NON_CTK_DESCRIPTORS + if desc.available_on_windows and not desc.available_on_linux +} + +SUPPORTED_HEADERS_NON_CTK_LINUX = SUPPORTED_HEADERS_NON_CTK_COMMON | SUPPORTED_HEADERS_NON_CTK_LINUX_ONLY +SUPPORTED_HEADERS_NON_CTK_WINDOWS = SUPPORTED_HEADERS_NON_CTK_COMMON | SUPPORTED_HEADERS_NON_CTK_WINDOWS_ONLY +SUPPORTED_HEADERS_NON_CTK_ALL = ( + SUPPORTED_HEADERS_NON_CTK_COMMON | SUPPORTED_HEADERS_NON_CTK_LINUX_ONLY | SUPPORTED_HEADERS_NON_CTK_WINDOWS_ONLY +) +SUPPORTED_HEADERS_NON_CTK: Final[dict[str, str]] = ( + SUPPORTED_HEADERS_NON_CTK_WINDOWS if IS_WINDOWS else SUPPORTED_HEADERS_NON_CTK_LINUX +) + +SUPPORTED_SITE_PACKAGE_HEADER_DIRS_NON_CTK: Final[dict[str, tuple[str, ...]]] = { + desc.name: desc.site_packages_dirs for desc in _NON_CTK_DESCRIPTORS if desc.site_packages_dirs +} + +SUPPORTED_INSTALL_DIRS_NON_CTK: Final[dict[str, tuple[str, ...]]] = { + desc.name: patterns for desc in _NON_CTK_DESCRIPTORS if (patterns := system_install_dir_patterns(desc)) +} diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_optional_cuda_import.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_optional_cuda_import.py new file mode 100644 index 0000000000000000000000000000000000000000..0a3cc27b5956d5321cec3a5aaa7ea264f7631321 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_optional_cuda_import.py @@ -0,0 +1,43 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +import importlib +from collections.abc import Callable +from types import ModuleType + +from cuda.pathfinder._dynamic_libs.load_dl_common import DynamicLibNotFoundError + + +def _optional_cuda_import( + fully_qualified_modname: str, + *, + probe_function: Callable[[ModuleType], object] | None = None, +) -> ModuleType | None: + """Import an optional CUDA module without masking unrelated import bugs. + + Returns: + The imported module if available and the optional probe succeeds, + otherwise ``None`` when the requested module is unavailable. + + Raises: + ModuleNotFoundError: If the import fails because a dependency of the + target module is missing (instead of the target module itself). + Exception: Any exception raised by ``probe_function`` except + :class:`DynamicLibNotFoundError`, which is treated as "unavailable". + """ + try: + module = importlib.import_module(fully_qualified_modname) + except ModuleNotFoundError as err: + if err.name != fully_qualified_modname: + raise + return None + + if probe_function is not None: + try: + probe_function(module) + except DynamicLibNotFoundError: + return None + + return module diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_static_libs/__pycache__/find_bitcode_lib.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_static_libs/__pycache__/find_bitcode_lib.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f855c912eaa0984b85b7d6eb189649c21834d417 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_static_libs/__pycache__/find_bitcode_lib.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_static_libs/__pycache__/find_static_lib.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_static_libs/__pycache__/find_static_lib.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2645090d00967698fd319afafb5f623bae28f91f Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_static_libs/__pycache__/find_static_lib.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_static_libs/find_bitcode_lib.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_static_libs/find_bitcode_lib.py new file mode 100644 index 0000000000000000000000000000000000000000..fd9f3cdfe55073a823e47f73599b446c22230ab6 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_static_libs/find_bitcode_lib.py @@ -0,0 +1,184 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +import functools +import os +from dataclasses import dataclass +from pathlib import Path +from typing import NoReturn, TypedDict + +from cuda.pathfinder._utils.env_vars import get_cuda_path_or_home +from cuda.pathfinder._utils.find_sub_dirs import find_sub_dirs_all_sitepackages +from cuda.pathfinder._utils.platform_aware import IS_WINDOWS + + +class BitcodeLibNotFoundError(RuntimeError): + """Raised when a bitcode library cannot be found.""" + + +@dataclass(frozen=True) +class LocatedBitcodeLib: + """Information about a located bitcode library.""" + + name: str + abs_path: str + filename: str + found_via: str + + +class _BitcodeLibInfo(TypedDict): + """Bitcode-library metadata with ordered alternatives searched first-to-last.""" + + filename: str + rel_path: str + site_packages_dirs: tuple[str, ...] + available_on_windows: bool + + +_SUPPORTED_BITCODE_LIBS_INFO: dict[str, _BitcodeLibInfo] = { + "device": { + "filename": "libdevice.10.bc", + "rel_path": "nvvm/libdevice", + "site_packages_dirs": ( + "nvidia/cu13/nvvm/libdevice", + "nvidia/cuda_nvcc/nvvm/libdevice", + ), + "available_on_windows": True, + }, + "nccl_device": { + "filename": "libnccl_device.bc", + "rel_path": "lib", + "site_packages_dirs": ("nvidia/nccl/lib",), + "available_on_windows": False, + }, + "nvshmem_device": { + "filename": "libnvshmem_device.bc", + "rel_path": "lib", + "site_packages_dirs": ("nvidia/nvshmem/lib",), + "available_on_windows": False, + }, +} + +# Public API: just the supported library names +SUPPORTED_BITCODE_LIBS: tuple[str, ...] = tuple( + sorted( + name for name, info in _SUPPORTED_BITCODE_LIBS_INFO.items() if not IS_WINDOWS or info["available_on_windows"] + ) +) + + +def _no_such_file_in_dir(directory: Path, filename: str, error_messages: list[str], attachments: list[str]) -> None: + error_messages.append(f"No such file: {directory / filename}") + if directory.is_dir(): + attachments.append(f' listdir("{directory}"):') + for node in sorted(node_path.name for node_path in directory.iterdir()): + attachments.append(f" {node}") + else: + attachments.append(f' Directory does not exist: "{directory}"') + + +class _FindBitcodeLib: + def __init__(self, name: str) -> None: + if name not in _SUPPORTED_BITCODE_LIBS_INFO: # Updated reference + raise ValueError(f"Unknown bitcode library: '{name}'. Supported: {', '.join(SUPPORTED_BITCODE_LIBS)}") + self.name: str = name + self.config: _BitcodeLibInfo = _SUPPORTED_BITCODE_LIBS_INFO[name] # Updated reference + self.filename: str = self.config["filename"] + self.rel_path: str = self.config["rel_path"] + self.site_packages_dirs: tuple[str, ...] = self.config["site_packages_dirs"] + self.error_messages: list[str] = [] + self.attachments: list[str] = [] + + def try_site_packages(self) -> Path | None: + for rel_dir in self.site_packages_dirs: + sub_dir = tuple(rel_dir.split("/")) + for abs_dir in find_sub_dirs_all_sitepackages(sub_dir): + file_path = Path(abs_dir, self.filename) + if file_path.is_file(): + return file_path + return None + + def try_with_conda_prefix(self) -> Path | None: + conda_prefix = os.environ.get("CONDA_PREFIX") + if not conda_prefix: + return None + + anchor = Path(conda_prefix, "Library") if IS_WINDOWS else Path(conda_prefix) + file_path = anchor / self.rel_path / self.filename + if file_path.is_file(): + return file_path + return None + + def try_with_cuda_home(self) -> Path | None: + cuda_home = get_cuda_path_or_home() + if cuda_home is None: + self.error_messages.append("CUDA_HOME/CUDA_PATH not set") + return None + + anchor = Path(cuda_home) + file_path = anchor / self.rel_path / self.filename + if file_path.is_file(): + return file_path + + _no_such_file_in_dir( + anchor / self.rel_path, + self.filename, + self.error_messages, + self.attachments, + ) + return None + + def raise_not_found_error(self) -> NoReturn: + err = ", ".join(self.error_messages) if self.error_messages else "No search paths available" + att = "\n".join(self.attachments) if self.attachments else "" + raise BitcodeLibNotFoundError(f'Failure finding "{self.filename}": {err}\n{att}') + + +def locate_bitcode_lib(name: str) -> LocatedBitcodeLib: + """Locate a bitcode library by name. + + Raises: + ValueError: If ``name`` is not a supported bitcode library. + BitcodeLibNotFoundError: If the bitcode library cannot be found. + """ + finder = _FindBitcodeLib(name) + + abs_path = finder.try_site_packages() + if abs_path is not None: + return LocatedBitcodeLib( + name=name, + abs_path=str(abs_path), + filename=finder.filename, + found_via="site-packages", + ) + + abs_path = finder.try_with_conda_prefix() + if abs_path is not None: + return LocatedBitcodeLib( + name=name, + abs_path=str(abs_path), + filename=finder.filename, + found_via="conda", + ) + + abs_path = finder.try_with_cuda_home() + if abs_path is not None: + return LocatedBitcodeLib( + name=name, + abs_path=str(abs_path), + filename=finder.filename, + found_via="CUDA_PATH", + ) + + finder.raise_not_found_error() + + +@functools.cache +def find_bitcode_lib(name: str) -> str: + """Find the absolute path to a bitcode library. + + Raises: + ValueError: If ``name`` is not a supported bitcode library. + BitcodeLibNotFoundError: If the bitcode library cannot be found. + """ + return locate_bitcode_lib(name).abs_path diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_static_libs/find_static_lib.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_static_libs/find_static_lib.py new file mode 100644 index 0000000000000000000000000000000000000000..f0f1c85f538ed9bde05528efdac02a794014cae9 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_static_libs/find_static_lib.py @@ -0,0 +1,191 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +import functools +import os +from dataclasses import dataclass +from pathlib import Path +from typing import NoReturn, TypedDict + +from cuda.pathfinder._utils.env_vars import get_cuda_path_or_home +from cuda.pathfinder._utils.find_sub_dirs import find_sub_dirs_all_sitepackages +from cuda.pathfinder._utils.platform_aware import IS_WINDOWS +from cuda.pathfinder._utils.windows_arch import windows_python_arch + + +class StaticLibNotFoundError(RuntimeError): + """Raised when a static library cannot be found.""" + + +@dataclass(frozen=True) +class LocatedStaticLib: + """Information about a located static library.""" + + name: str + abs_path: str + filename: str + found_via: str + + +class _StaticLibInfo(TypedDict): + """Static-library metadata with ordered alternatives searched first-to-last.""" + + filename: str + ctk_rel_paths: tuple[str, ...] + conda_rel_paths: tuple[str, ...] + site_packages_dirs: tuple[str, ...] + + +def _cudadevrt_info() -> _StaticLibInfo: + if not IS_WINDOWS: + return { + "filename": "libcudadevrt.a", + "ctk_rel_paths": ("lib64", "lib"), + "conda_rel_paths": ("lib",), + "site_packages_dirs": ("nvidia/cu13/lib", "nvidia/cuda_runtime/lib"), + } + + arch_dir = windows_python_arch() + component_wheel_dirs = ("nvidia/cuda_runtime/lib/x64",) if arch_dir == "x64" else () + conda_fallback_dirs = ("lib",) if arch_dir == "x64" else () + return { + "filename": "cudadevrt.lib", + "ctk_rel_paths": (str(Path("lib", arch_dir)),), + "conda_rel_paths": (str(Path("lib", arch_dir)), *conda_fallback_dirs), + "site_packages_dirs": (f"nvidia/cu13/lib/{arch_dir}", *component_wheel_dirs), + } + + +_SUPPORTED_STATIC_LIBS_INFO: dict[str, _StaticLibInfo] = { + "cudadevrt": _cudadevrt_info(), +} + +SUPPORTED_STATIC_LIBS: tuple[str, ...] = tuple(sorted(_SUPPORTED_STATIC_LIBS_INFO.keys())) + + +def _no_such_file_in_dir(directory: Path, filename: str, error_messages: list[str], attachments: list[str]) -> None: + error_messages.append(f"No such file: {directory / filename}") + if directory.is_dir(): + attachments.append(f' listdir("{directory}"):') + for node in sorted(node_path.name for node_path in directory.iterdir()): + attachments.append(f" {node}") + else: + attachments.append(f' Directory does not exist: "{directory}"') + + +class _FindStaticLib: + def __init__(self, name: str) -> None: + if name not in _SUPPORTED_STATIC_LIBS_INFO: + raise ValueError(f"Unknown static library: '{name}'. Supported: {', '.join(SUPPORTED_STATIC_LIBS)}") + self.name: str = name + self.config: _StaticLibInfo = _SUPPORTED_STATIC_LIBS_INFO[name] + self.filename: str = self.config["filename"] + self.ctk_rel_paths: tuple[str, ...] = self.config["ctk_rel_paths"] + self.conda_rel_paths: tuple[str, ...] = self.config["conda_rel_paths"] + self.site_packages_dirs: tuple[str, ...] = self.config["site_packages_dirs"] + self.error_messages: list[str] = [] + self.attachments: list[str] = [] + + def try_site_packages(self) -> Path | None: + for rel_dir in self.site_packages_dirs: + sub_dir = tuple(rel_dir.split("/")) + for abs_dir in find_sub_dirs_all_sitepackages(sub_dir): + file_path = Path(abs_dir, self.filename) + if file_path.is_file(): + return file_path + return None + + def try_with_conda_prefix(self) -> Path | None: + conda_prefix = os.environ.get("CONDA_PREFIX") + if not conda_prefix: + return None + + anchor = Path(conda_prefix, "Library") if IS_WINDOWS else Path(conda_prefix) + for rel_path in self.conda_rel_paths: + file_path = anchor / rel_path / self.filename + if file_path.is_file(): + return file_path + return None + + def try_with_cuda_home(self) -> Path | None: + cuda_home = get_cuda_path_or_home() + if cuda_home is None: + self.error_messages.append("CUDA_HOME/CUDA_PATH not set") + return None + + anchor = Path(cuda_home) + for rel_path in self.ctk_rel_paths: + file_path = anchor / rel_path / self.filename + if file_path.is_file(): + return file_path + + _no_such_file_in_dir( + anchor / self.ctk_rel_paths[0], + self.filename, + self.error_messages, + self.attachments, + ) + return None + + def raise_not_found_error(self) -> NoReturn: + err = ", ".join(self.error_messages) if self.error_messages else "No search paths available" + att = "\n".join(self.attachments) if self.attachments else "" + raise StaticLibNotFoundError(f'Failure finding "{self.filename}": {err}\n{att}') + + +def locate_static_lib(name: str) -> LocatedStaticLib: + """Locate a static library by name. + + Raises: + ValueError: If ``name`` is not a supported static library. + StaticLibNotFoundError: If the static library cannot be found. + """ + finder = _FindStaticLib(name) + + abs_path = finder.try_site_packages() + if abs_path is not None: + return LocatedStaticLib( + name=name, + abs_path=str(abs_path), + filename=finder.filename, + found_via="site-packages", + ) + + abs_path = finder.try_with_conda_prefix() + if abs_path is not None: + return LocatedStaticLib( + name=name, + abs_path=str(abs_path), + filename=finder.filename, + found_via="conda", + ) + + abs_path = finder.try_with_cuda_home() + if abs_path is not None: + return LocatedStaticLib( + name=name, + abs_path=str(abs_path), + filename=finder.filename, + found_via="CUDA_PATH", + ) + + finder.raise_not_found_error() + + +@functools.cache +def find_static_lib(name: str) -> str: + """Find the absolute path to a static library. + + Raises: + ValueError: If ``name`` is not a supported static library. + StaticLibNotFoundError: If the static library cannot be found. + + Windows on ARM (WoA) Note: + On Windows, this API aims to return the path to a static library whose + architecture matches the Python interpreter architecture. For example, + x64 Python running on an Arm64 machine targets the x64 library, while + native Arm64 Python targets the Arm64 library. This differs from + ``find_nvidia_binary_utility``, which targets the native machine + architecture when selecting architecture-specific executables. + """ + return locate_static_lib(name).abs_path diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/ctk_root_canary.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/ctk_root_canary.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fe5ee6910348ec86f930eac8c914b5065693f336 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/ctk_root_canary.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/driver_info.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/driver_info.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4d0c03369ea138cd2c3d20f8d055045cd9199004 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/driver_info.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/env_vars.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/env_vars.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..252a7540c59a9b603b4931ac99d325f87952a78e Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/env_vars.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/find_site_packages_dll.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/find_site_packages_dll.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a9c2681e67a49bb32ab8a4701a7f263a850ce280 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/find_site_packages_dll.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/find_site_packages_so.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/find_site_packages_so.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4c79c82f4572e09e63b3321f42ec47ff1d757a71 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/find_site_packages_so.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/find_sub_dirs.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/find_sub_dirs.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c0e77d4792693dc40492d74bf312997a4c538f1b Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/find_sub_dirs.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/path_sort.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/path_sort.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..80ee73527f210160422e58a3b9445e72a75d8bd8 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/path_sort.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/platform_aware.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/platform_aware.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b1662713872602525c58b0258ddb0f39bc81ff9f Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/platform_aware.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/windows_arch.cpython-312.pyc b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/windows_arch.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..efa643afccc6a5fb9575e1edbb53c2f66ff9ef66 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/windows_arch.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/ctk_root_canary.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/ctk_root_canary.py new file mode 100644 index 0000000000000000000000000000000000000000..80122f517ee1062ffa8adf081b945f0b3bea0113 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/ctk_root_canary.py @@ -0,0 +1,4 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +CTK_ROOT_CANARY_ANCHOR_LIBNAMES = ("cudart",) diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/driver_info.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/driver_info.py new file mode 100644 index 0000000000000000000000000000000000000000..d07c4b861d348bbf93d5e2e7c8f901df29c99432 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/driver_info.py @@ -0,0 +1,80 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +import ctypes +import functools +import sys +from collections.abc import Callable +from dataclasses import dataclass + +from cuda.pathfinder._dynamic_libs.load_nvidia_dynamic_lib import ( + load_nvidia_dynamic_lib as _load_nvidia_dynamic_lib, +) + + +class QueryDriverCudaVersionError(RuntimeError): + """Raised when ``query_driver_cuda_version()`` cannot determine the CUDA driver version.""" + + +@dataclass(frozen=True, slots=True) +class DriverCudaVersion: + """ + CUDA-facing driver version reported by ``cuDriverGetVersion()``. + + The name ``DriverCudaVersion`` is intentionally specific: this dataclass + models the version shown as ``CUDA Version`` in ``nvidia-smi``, not the + graphics driver release shown as ``Driver Version``. More specifically, + it reflects the CUDA user-mode driver (UMD) interface version reported by + ``cuDriverGetVersion()``, not the kernel-mode driver (KMD) package + version. + + Example ``nvidia-smi`` output:: + + +---------------------------------------------------------------------+ + | NVIDIA-SMI 595.58.03 Driver Version: 595.58.03 CUDA Version: 13.2 | + +---------------------------------------------------------------------+ + + For the example above, ``DriverCudaVersion(encoded=13020, major=13, + minor=2)`` corresponds to ``CUDA Version: 13.2``. It does not correspond + to ``Driver Version: 595.58.03``. + """ + + encoded: int + major: int + minor: int + + +@functools.cache +def query_driver_cuda_version() -> DriverCudaVersion: + """Return the CUDA driver version parsed into its major/minor components.""" + try: + encoded = _query_driver_cuda_version_int() + return DriverCudaVersion( + encoded=encoded, + major=encoded // 1000, + minor=(encoded % 1000) // 10, + ) + except Exception as exc: + raise QueryDriverCudaVersionError("Failed to query the CUDA driver version.") from exc + + +if sys.platform == "win32": + _DRIVER_LIB_LOADER: Callable[[str], ctypes.CDLL] = ctypes.WinDLL +else: + _DRIVER_LIB_LOADER = ctypes.CDLL + + +def _query_driver_cuda_version_int() -> int: + """Return the encoded CUDA driver version from ``cuDriverGetVersion()``.""" + loaded_cuda = _load_nvidia_dynamic_lib("cuda") + driver_lib = _DRIVER_LIB_LOADER(loaded_cuda.abs_path) + cu_driver_get_version = driver_lib.cuDriverGetVersion + cu_driver_get_version.argtypes = [ctypes.POINTER(ctypes.c_int)] + cu_driver_get_version.restype = ctypes.c_int + version = ctypes.c_int() + status = cu_driver_get_version(ctypes.byref(version)) + if status != 0: + raise RuntimeError(f"Failed to query CUDA driver version via cuDriverGetVersion() (status={status}).") + return version.value diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/env_vars.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/env_vars.py new file mode 100644 index 0000000000000000000000000000000000000000..12198ac9f7f8714f399e7de68bc7fc4c9594134d --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/env_vars.py @@ -0,0 +1,105 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +"""Centralized CUDA environment variable handling. + +This module defines the canonical search order for CUDA Toolkit environment variables +used throughout cuda-python packages (cuda.pathfinder, cuda.core, cuda.bindings). + +Search Order Priority: + 1. CUDA_PATH (higher priority) + 2. CUDA_HOME (lower priority) + +If both are set and differ, CUDA_PATH takes precedence and a warning is issued. + +Important Note on Caching: + The result of get_cuda_path_or_home() is cached for the process lifetime. The first + call determines the CUDA Toolkit path, and all subsequent calls return the cached + value, even if environment variables change later. This ensures consistent behavior + throughout the application lifecycle. +""" + +import functools +import os +import warnings + +_CUDA_PATH_ENV_VARS_ORDERED = ("CUDA_PATH", "CUDA_HOME") + + +def _paths_differ(a: str, b: str) -> bool: + """ + Return True if paths are observably different. + + Strategy: + 1) Compare os.path.normcase(os.path.normpath(...)) for quick, robust textual equality. + - Handles trailing slashes and case-insensitivity on Windows. + 2) If still different AND both exist, use os.path.samefile to resolve symlinks/junctions. + 3) Otherwise (nonexistent paths or samefile unavailable), treat as different. + """ + norm_a = os.path.normcase(os.path.normpath(a)) + norm_b = os.path.normcase(os.path.normpath(b)) + if norm_a == norm_b: + return False + + try: + if os.path.exists(a) and os.path.exists(b): + # samefile raises on non-existent paths; only call when both exist. + return not os.path.samefile(a, b) + except OSError: + # Fall through to "different" if samefile isn't applicable/available. + pass + + # If normalized strings differ and we couldn't prove they're the same entry, treat as different. + return True + + +@functools.cache +def get_cuda_path_or_home() -> str | None: + """Get CUDA Toolkit path from environment variables. + + Returns the value of CUDA_PATH or CUDA_HOME. If both are set and differ, + CUDA_PATH takes precedence and a warning is issued. + + The result is cached for the process lifetime. The first call determines the CUDA + Toolkit path, and subsequent calls return the cached value. + + Returns: + Path to CUDA Toolkit, or None if neither variable is set or all are empty. + + Warnings: + UserWarning: If multiple CUDA environment variables are set but point to + different locations (only on the first call). + + """ + # Collect non-empty environment variables in priority order. + # Empty strings are treated as undefined — no valid CUDA path is empty. + set_vars = {} + for var in _CUDA_PATH_ENV_VARS_ORDERED: + val = os.environ.get(var) + if val: + set_vars[var] = val + + if not set_vars: + return None + + # If multiple variables are set, check if they differ and warn + if len(set_vars) > 1: + values = list(set_vars.items()) + values_differ = False + for i in range(len(values) - 1): + if _paths_differ(values[i][1], values[i + 1][1]): + values_differ = True + break + + if values_differ: + var_list = "\n".join(f" {var}={val}" for var, val in set_vars.items()) + warnings.warn( + f"Multiple CUDA environment variables are set but differ:\n" + f"{var_list}\n" + f"Using {_CUDA_PATH_ENV_VARS_ORDERED[0]} (highest priority).", + UserWarning, + stacklevel=2, + ) + + # Return the first (highest priority) set variable + return next(iter(set_vars.values())) diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/find_site_packages_dll.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/find_site_packages_dll.py new file mode 100644 index 0000000000000000000000000000000000000000..507355727f98ece01d53398d0154113abe8061f5 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/find_site_packages_dll.py @@ -0,0 +1,31 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +import collections +import functools +import importlib.metadata + + +@functools.cache +def find_all_dll_files_via_metadata() -> dict[str, tuple[str, ...]]: + results: collections.defaultdict[str, list[str]] = collections.defaultdict(list) + + # sort dists for deterministic output + + for dist in sorted( + importlib.metadata.distributions(), + # `get` exists before 3.12, even though the hints only exist for Python >=3.12 + key=lambda d: (d.metadata.get("Name", ""), d.version), # type: ignore[attr-defined] + ): + files = dist.files + if not files: + continue + for relpath in sorted(files, key=lambda p: str(p)): # deterministic + relname = relpath.name.lower() + if not relname.endswith(".dll"): + continue + abs_path = str(dist.locate_file(relpath)) + results[relname].append(abs_path) + + # plain dicts; sort inner list for stability + return {k: tuple(sorted(v)) for k, v in results.items()} diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/find_site_packages_so.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/find_site_packages_so.py new file mode 100644 index 0000000000000000000000000000000000000000..33ee1f1bcfb07cc22000b732090ecb535f5335a7 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/find_site_packages_so.py @@ -0,0 +1,43 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +import collections +import functools +import importlib.metadata +import re + +_SO_RE = re.compile(r"\.so(?:$|\.)") # matches libfoo.so or libfoo.so.1.2.3 + + +def split_so_version_suffix(so_filename: str) -> tuple[str, str]: + idx = so_filename.rfind(".so") + assert idx > 0, so_filename + idx += 3 + return (so_filename[:idx], so_filename[idx:]) + + +@functools.cache +def find_all_so_files_via_metadata() -> dict[str, dict[str, tuple[str, ...]]]: + results: collections.defaultdict[str, collections.defaultdict[str, list[str]]] = collections.defaultdict( + lambda: collections.defaultdict(list) + ) + + # sort dists for deterministic output + for dist in sorted( + importlib.metadata.distributions(), + # `get` exists before 3.12, even though the hints only exist for Python >=3.12 + key=lambda d: (d.metadata.get("Name", ""), d.version), # type: ignore[attr-defined] + ): + files = dist.files + if not files: + continue + for relpath in sorted(files, key=lambda p: str(p)): # deterministic + relname = relpath.name + if not _SO_RE.search(relname): + continue + so_basename, so_version_suffix = split_so_version_suffix(relname) + abs_path = str(dist.locate_file(relpath)) + results[so_basename][so_version_suffix].append(abs_path) + + # plain dicts; sort inner lists for stability + return {k: {kk: tuple(sorted(vv)) for kk, vv in v.items()} for k, v in results.items()} diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/find_sub_dirs.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/find_sub_dirs.py new file mode 100644 index 0000000000000000000000000000000000000000..ebb7b13f488f25432c014d16b44811b31a3d0254 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/find_sub_dirs.py @@ -0,0 +1,65 @@ +# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +import functools +import os +import site +import sys +from collections.abc import Sequence + + +def find_sub_dirs_no_cache(parent_dirs: Sequence[str], sub_dirs: Sequence[str]) -> list[str]: + results = [] + for base in parent_dirs: + stack = [(base, 0)] # (current_path, index into sub_dirs) + while stack: + current_path, idx = stack.pop() + if idx == len(sub_dirs): + if os.path.isdir(current_path): + results.append(current_path) + continue + + sub = sub_dirs[idx] + if sub == "*": + try: + entries = sorted(os.listdir(current_path)) + except OSError: + continue + for entry in entries: + entry_path = os.path.join(current_path, entry) + if os.path.isdir(entry_path): + stack.append((entry_path, idx + 1)) + else: + next_path = os.path.join(current_path, sub) + if os.path.isdir(next_path): + stack.append((next_path, idx + 1)) + return results + + +@functools.cache +def find_sub_dirs_cached(parent_dirs: Sequence[str], sub_dirs: Sequence[str]) -> list[str]: + return find_sub_dirs_no_cache(parent_dirs, sub_dirs) + + +def find_sub_dirs(parent_dirs: Sequence[str], sub_dirs: Sequence[str]) -> list[str]: + return find_sub_dirs_cached(tuple(parent_dirs), tuple(sub_dirs)) + + +def find_sub_dirs_sys_path(sub_dirs: Sequence[str]) -> list[str]: + return find_sub_dirs(sys.path, sub_dirs) + + +def find_sub_dirs_all_sitepackages(sub_dirs: Sequence[str]) -> list[str]: + parent_dirs = list(site.getsitepackages()) + if site.ENABLE_USER_SITE: + user_site = site.getusersitepackages() + if user_site: + # Determine insertion index based on whether we're in a virtual environment (fixes #1716): + # - In venv (PEP 405): venv site-packages should come first, then user-site-packages, + # then system site-packages. Insert at index 1 (after venv, before system). + # - Not in venv (PEP 370): user-site-packages should come before system site-packages. + # Insert at index 0. + # Detect venv by checking if sys.prefix differs from sys.base_prefix + insert_idx = 1 if sys.prefix != sys.base_prefix else 0 + parent_dirs.insert(insert_idx, user_site) + return find_sub_dirs(parent_dirs, sub_dirs) diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/path_sort.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/path_sort.py new file mode 100644 index 0000000000000000000000000000000000000000..183c9123aaa1bc0b2a8033fb1be856ecd9d037b5 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/path_sort.py @@ -0,0 +1,23 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +"""Deterministic path ordering helpers.""" + +from __future__ import annotations + +import os +import re + +_DIGIT_RUN = re.compile(r"(\d+)") + + +def numeric_aware_path_sort_key(path: str) -> tuple[tuple[int, int, str], ...]: + """Return a key that compares embedded digit runs by numeric value.""" + key: list[tuple[int, int, str]] = [] + for part in _DIGIT_RUN.split(os.path.normcase(path)): + if part.isdigit(): + normalized = part.lstrip("0") or "0" + key.append((1, len(normalized), normalized)) + else: + key.append((0, 0, part)) + return tuple(key) diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/platform_aware.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/platform_aware.py new file mode 100644 index 0000000000000000000000000000000000000000..af0610a6cdbc42f283c71b56c30ba2ac87778193 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/platform_aware.py @@ -0,0 +1,30 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +import sys + +IS_WINDOWS = sys.platform == "win32" +_WINDOWS_PYTHON_ARCH: str | None + +if IS_WINDOWS: + from cuda.pathfinder._utils.windows_arch import windows_python_arch + + _WINDOWS_PYTHON_ARCH = windows_python_arch() +else: + _WINDOWS_PYTHON_ARCH = None + +# These describe the Python process ABI, not the Windows host architecture. +IS_WINDOWS_X64 = _WINDOWS_PYTHON_ARCH == "x64" +IS_WINDOWS_ARM64 = _WINDOWS_PYTHON_ARCH == "arm64" + + +def quote_for_shell(s: str) -> str: + if IS_WINDOWS: + # This is a relatively heavy import; keep pathfinder lean if possible. + from subprocess import list2cmdline + + return list2cmdline([s]) + else: + import shlex + + return shlex.quote(s) diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/windows_arch.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/windows_arch.py new file mode 100644 index 0000000000000000000000000000000000000000..fc802db370fc5bf4d7df40bba4609a0ca5857194 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_utils/windows_arch.py @@ -0,0 +1,138 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +import platform +import sysconfig + +WINDOWS_PE_MACHINE_BY_ARCH = { + "x64": 0x8664, + "arm64": 0xAA64, +} + +_WINDOWS_ARCH_BY_PE_MACHINE = {machine: arch for arch, machine in WINDOWS_PE_MACHINE_BY_ARCH.items()} + + +class UnsupportedArchError(RuntimeError): + """Raised when Python reports an unsupported Windows architecture.""" + + def __init__(self, platform_tag: str) -> None: + self.platform_tag = platform_tag + super().__init__( + f"Unsupported Windows Python platform tag: {platform_tag!r}; expected 'win-amd64' or 'win-arm64'" + ) + + +def windows_python_arch() -> str: + """Return the current Windows Python interpreter architecture.""" + raw_platform_tag = sysconfig.get_platform() + platform_tag = raw_platform_tag.lower().replace("_", "-") + + if platform_tag == "win-arm64": + return "arm64" + + if platform_tag == "win-amd64": + return "x64" + + raise UnsupportedArchError(raw_platform_tag) + + +def _windows_machine_arch_from_platform() -> str: + """Return the Windows architecture reported by Python's platform module.""" + raw_machine = platform.machine() + machine = raw_machine.lower().replace("_", "-") + + if machine in ("amd64", "x86-64"): + return "x64" + + if machine in ("arm64", "aarch64"): + return "arm64" + + raise RuntimeError(f"Unsupported Windows machine architecture: {raw_machine!r}") + + +def _windows_native_machine() -> int | None: + """Return the native Windows PE machine type, or None on older Windows.""" + import ctypes + from ctypes import wintypes + + try: + # These ctypes attributes are absent from the type stubs on non-Windows hosts. + kernel32 = ctypes.WinDLL("kernel32", use_last_error=True) # type: ignore[attr-defined, unused-ignore] + except OSError as exc: + raise RuntimeError("Failed to load kernel32 while detecting the native Windows architecture") from exc + + get_current_process = kernel32.GetCurrentProcess + try: + is_wow64_process2 = kernel32.IsWow64Process2 + except AttributeError: + return None + + get_current_process.argtypes = () + get_current_process.restype = wintypes.HANDLE + is_wow64_process2.argtypes = ( + wintypes.HANDLE, + ctypes.POINTER(wintypes.USHORT), + ctypes.POINTER(wintypes.USHORT), + ) + is_wow64_process2.restype = wintypes.BOOL + + process_machine = wintypes.USHORT() + native_machine = wintypes.USHORT() + if not is_wow64_process2( + get_current_process(), + ctypes.byref(process_machine), + ctypes.byref(native_machine), + ): + error_code = ctypes.get_last_error() # type: ignore[attr-defined, unused-ignore] + error = ctypes.WinError(error_code) # type: ignore[attr-defined, unused-ignore] + raise RuntimeError( + f"IsWow64Process2 failed while detecting the native Windows architecture " + f"(Windows error {error_code}): {error}" + ) from error + return native_machine.value + + +def windows_machine_arch() -> str: + """Return the native Windows machine architecture, ignoring process emulation.""" + native_machine = _windows_native_machine() + if native_machine is None: + # IsWow64Process2 predates x64-on-Arm emulation, so this fallback is only + # needed on older Windows versions where platform.machine() is sufficient. + return _windows_machine_arch_from_platform() + + try: + return _WINDOWS_ARCH_BY_PE_MACHINE[native_machine] + except KeyError: + raise RuntimeError(f"Unsupported native Windows PE machine type: 0x{native_machine:04x}") from None + + +def windows_pe_matches_arch(path: str, target_arch: str) -> bool: + """Return whether a Windows Portable Executable (PE) targets the requested architecture. + + PE is the file format used for Windows executables and DLLs. This reads the + PE/COFF header's machine field to distinguish x64 images from Arm64 images. + """ + expected_machine = WINDOWS_PE_MACHINE_BY_ARCH.get(target_arch) + if expected_machine is None: + raise ValueError(f"Unsupported Windows target architecture: {target_arch!r}") + + try: + with open(path, "rb") as stream: + if stream.read(2) != b"MZ": + return False + stream.seek(0x3C) + pe_offset_bytes = stream.read(4) + if len(pe_offset_bytes) != 4: + return False + stream.seek(int.from_bytes(pe_offset_bytes, "little")) + if stream.read(4) != b"PE\0\0": + return False + machine_bytes = stream.read(2) + if len(machine_bytes) != 2: + return False + except OSError: + return False + + return int.from_bytes(machine_bytes, "little") == expected_machine diff --git a/hug/lib/python3.12/site-packages/cuda/pathfinder/_version.py b/hug/lib/python3.12/site-packages/cuda/pathfinder/_version.py new file mode 100644 index 0000000000000000000000000000000000000000..1a093bbbfa24ef5396cdff70670588c44c3d3eef --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda/pathfinder/_version.py @@ -0,0 +1,24 @@ +# file generated by vcs-versioning +# don't change, don't track in version control +from __future__ import annotations + +__all__ = [ + "__version__", + "__version_tuple__", + "version", + "version_tuple", + "__commit_id__", + "commit_id", +] + +version: str +__version__: str +__version_tuple__: tuple[int | str, ...] +version_tuple: tuple[int | str, ...] +commit_id: str | None +__commit_id__: str | None + +__version__ = version = '1.8.4' +__version_tuple__ = version_tuple = (1, 8, 4) + +__commit_id__ = commit_id = 'gafa624948' diff --git a/hug/lib/python3.12/site-packages/cuda_bindings-13.4.4.dist-info/INSTALLER b/hug/lib/python3.12/site-packages/cuda_bindings-13.4.4.dist-info/INSTALLER new file mode 100644 index 0000000000000000000000000000000000000000..a1b589e38a32041e49332e5e81c2d363dc418d68 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda_bindings-13.4.4.dist-info/INSTALLER @@ -0,0 +1 @@ +pip diff --git a/hug/lib/python3.12/site-packages/cuda_bindings-13.4.4.dist-info/METADATA b/hug/lib/python3.12/site-packages/cuda_bindings-13.4.4.dist-info/METADATA new file mode 100644 index 0000000000000000000000000000000000000000..f44f1041df049e49ac22ce1e5ce85d0159f98672 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda_bindings-13.4.4.dist-info/METADATA @@ -0,0 +1,47 @@ +Metadata-Version: 2.4 +Name: cuda-bindings +Version: 13.4.4 +Summary: Python bindings for CUDA +Author-email: NVIDIA Corporation +License-Expression: Apache-2.0 +Project-URL: Repository, https://github.com/NVIDIA/cuda-python +Project-URL: Documentation, https://nvidia.github.io/cuda-python/ +Classifier: Intended Audience :: Developers +Classifier: Topic :: Scientific/Engineering +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 +Classifier: Programming Language :: Python :: 3.14 +Classifier: Environment :: GPU :: NVIDIA CUDA +Requires-Python: >=3.10 +Description-Content-Type: text/x-rst +License-File: LICENSE +Requires-Dist: cuda-pathfinder>=1.4.2 +Provides-Extra: all +Requires-Dist: cuda-toolkit[nvfatbin,nvjitlink,nvrtc,nvvm]==13.*; extra == "all" +Requires-Dist: cuda-toolkit[cufile]==13.*; sys_platform == "linux" and extra == "all" +Requires-Dist: cuda-toolkit==13.*; extra == "all" +Requires-Dist: nvidia-cudla==13.*; (platform_system == "Linux" and platform_machine == "aarch64") and extra == "all" +Dynamic: license-file + +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 + +**************************************** +cuda-bindings: Low-level CUDA interfaces +**************************************** + +.. image:: https://img.shields.io/badge/NVIDIA-black?logo=nvidia + :target: https://www.nvidia.com/ + :alt: NVIDIA + +`cuda.bindings `_ is a standard set of low-level interfaces, providing full coverage of and 1:1 access to the CUDA host APIs from Python. Checkout the `Overview `_ for the workflow and performance results. + +* `Repository `_ +* `Documentation `_ +* `Examples `_ +* `Issue tracker `_ + +For the installation instruction, please refer to the `Installation `_ page. diff --git a/hug/lib/python3.12/site-packages/cuda_bindings-13.4.4.dist-info/RECORD b/hug/lib/python3.12/site-packages/cuda_bindings-13.4.4.dist-info/RECORD new file mode 100644 index 0000000000000000000000000000000000000000..f28c6d2cde4838bb317c143dd6f7c1e849aad532 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda_bindings-13.4.4.dist-info/RECORD @@ -0,0 +1,105 @@ +cuda/bindings/__init__.pxd,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +cuda/bindings/__init__.py,sha256=kzLGhm5Cww0tu0i6-IBAxNLoD73HnrNZ1Ifj24__G5w,222 +cuda/bindings/__pycache__/__init__.cpython-312.pyc,, +cuda/bindings/__pycache__/_version.cpython-312.pyc,, +cuda/bindings/_example_helpers/__init__.py,sha256=3QbQQD50iNeO34VB4kbad_bEuzTVbkrJ0Jq9yPi1nCI,622 +cuda/bindings/_example_helpers/__pycache__/__init__.cpython-312.pyc,, +cuda/bindings/_example_helpers/__pycache__/common.cpython-312.pyc,, +cuda/bindings/_example_helpers/__pycache__/helper_cuda.cpython-312.pyc,, +cuda/bindings/_example_helpers/__pycache__/helper_string.cpython-312.pyc,, +cuda/bindings/_example_helpers/common.py,sha256=sC7--2jLiYoX0rElgXvke7Bm1JxZ0AtX3f0VeH0ZUWI,3077 +cuda/bindings/_example_helpers/helper_cuda.py,sha256=46kcYaD4XSkRyUO9d9EyLOufz4IvgEvb4x1oCO5wPrY,1547 +cuda/bindings/_example_helpers/helper_string.py,sha256=glNP5u4N5I2ZzQEgMtDdmGWcupU1sORXY-kpJz8Xy20,467 +cuda/bindings/_internal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +cuda/bindings/_internal/__pycache__/__init__.cpython-312.pyc,, +cuda/bindings/_internal/__pycache__/_fast_enum.cpython-312.pyc,, +cuda/bindings/_internal/_fast_enum.py,sha256=awswm0NHOLQjW6j1YbpsQIrFm91p-bADsxIKSA3Y4uc,2298 +cuda/bindings/_internal/cudla.cpython-312-x86_64-linux-gnu.so,sha256=pebMQ745c_VNUfJ_b0gfnb4fVgWz_9BZ_lLDh5j2GQ0,82640 +cuda/bindings/_internal/cudla.pxd,sha256=dhgwnpJwnUl32XAusmSPULclOfaRTAKgY0xUMnPJrng,2842 +cuda/bindings/_internal/cufile.cpython-312-x86_64-linux-gnu.so,sha256=hHLYFZQ-T7tT_A_VhzCvb4oJaW7c32gxfepdrmJtJoE,111664 +cuda/bindings/_internal/cufile.pxd,sha256=EbvGEbi1r13HyQgBzbP887ud-MHyS_pONWUWFPLs42k,6447 +cuda/bindings/_internal/driver.cpython-312-x86_64-linux-gnu.so,sha256=mc5iVwpPAfp4M8yCwfRhJ_OzoalOcHbpZsrF-nY9ewg,590672 +cuda/bindings/_internal/driver.pxd,sha256=C8335_YqnxVNwMHPv6uGI8GFznA8kD574LqmmCZoRvg,73090 +cuda/bindings/_internal/nvfatbin.cpython-312-x86_64-linux-gnu.so,sha256=RP-H5YMacw5XAJ5Gl1oy0h9lVMi396eb1g4XPI2dwe4,82640 +cuda/bindings/_internal/nvfatbin.pxd,sha256=0X9P47SXLgIn_qj2TyNUjZQnPVGzDAuND-Z5QEsoDxw,2467 +cuda/bindings/_internal/nvjitlink.cpython-312-x86_64-linux-gnu.so,sha256=AcXQVMYYvYDJvcqQWvnrp9fodHxMpT4Z3zPLJdHkM4g,86736 +cuda/bindings/_internal/nvjitlink.pxd,sha256=QVfSBvygQQo-FEmtoLXmjFlpawX_qoP4d4Dy2_SxI2M,2963 +cuda/bindings/_internal/nvml.cpython-312-x86_64-linux-gnu.so,sha256=qBPrWwSQtX_qJjT1u8AtvoyaKKSAmsKeGKxNdTjuIBo,458320 +cuda/bindings/_internal/nvml.pxd,sha256=fF3uqcPV0hBB8n6MwWh7O4KOw9PqBLfuH_vdkdYObFk,60665 +cuda/bindings/_internal/nvrtc.cpython-312-x86_64-linux-gnu.so,sha256=5Lhs8B0Mo6Bw0D7tuuzPOzmIaiZggENaS0WXlD0rNMQ,99024 +cuda/bindings/_internal/nvrtc.pxd,sha256=l30flbUkAp564NhHxy0J-Rr14sov_vnFoGg-b_uuf2k,3980 +cuda/bindings/_internal/nvvm.cpython-312-x86_64-linux-gnu.so,sha256=K4K2VuUIXVBw4DSJaCpZdXc78T3jOTJVlfXfEyU4kFc,82640 +cuda/bindings/_internal/nvvm.pxd,sha256=GJYWK2EUkgr6OYgXKmuiJpP59rCZK-uR9FuGFzgTKXU,2322 +cuda/bindings/_internal/runtime.cpython-312-x86_64-linux-gnu.so,sha256=EfitdMiXyrS7yIp-gmwkAfhWW3EdXa71xnW54Ku0N20,970800 +cuda/bindings/_internal/runtime.pxd,sha256=y0klhx9JLuW8eukUOYIKu4fqGjIbsAr_wEPhtX2orCo,51913 +cuda/bindings/_internal/runtime_ptds.cpython-312-x86_64-linux-gnu.so,sha256=oe0ar-hcjt5DMPOEty3zRg6kdBmq6xJ-ui8aXBb3Tto,816240 +cuda/bindings/_internal/runtime_ptds.pxd,sha256=JHSsNtfQe5fnKbA-wOUoAJlPvsyjVBXfI1IsxPYDAZM,51669 +cuda/bindings/_internal/utils.cpython-312-x86_64-linux-gnu.so,sha256=yFORvWYpS_frqDyTZV5CcJiMekuucxo_jcvspFB4K4I,128072 +cuda/bindings/_internal/utils.pxd,sha256=EcWaSrPQEiEbCob6zc4LI7_dCOBbrYDzx7Uq284kiRg,4645 +cuda/bindings/_lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +cuda/bindings/_lib/__pycache__/__init__.cpython-312.pyc,, +cuda/bindings/_lib/cyruntime/cyruntime.pxd,sha256=OIZMfT525EouV-zhrqRsk1gVWwPwzZm9kvuykQjsqHs,4404 +cuda/bindings/_lib/cyruntime/cyruntime.pxi,sha256=vZ-EOC92P9-sRGDJEH0mbN0cFaAiU38Ivv76431CvaY,97083 +cuda/bindings/_lib/dlfcn.pxd,sha256=v0RZppr3hdRi311F19rhYQw3D5RRx3TYoXH8k5uZJTg,382 +cuda/bindings/_lib/param_packer.h,sha256=gsmfPGAu0alFHmZFY4UuqG6kk6Ur9WZoOf5wKw36Iow,7000 +cuda/bindings/_lib/param_packer.pxd,sha256=Z4f7OgzL0wN7E_98_ubuEE1jgzGfhe6yOrURMG82vcs,636 +cuda/bindings/_lib/utils.pxd,sha256=JwAopY4nDZpsDqfNPeGt1wi7OOAQZJ_2ph8zFHSsaq4,4210 +cuda/bindings/_lib/utils.pxi,sha256=sTgUsxYQ9gmItEVsTv-4ljlWrirvm7AQikbYdYoCkwI,38605 +cuda/bindings/_lib/windll.pxd,sha256=uNUf4TjvYMYARO0fqyJVRduwMusDzMtuTnaMW_1ij0w,1409 +cuda/bindings/_v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +cuda/bindings/_v2/__pycache__/__init__.cpython-312.pyc,, +cuda/bindings/_v2/nvrtc.cpython-312-x86_64-linux-gnu.so,sha256=W12wvrnlDf90l1FHlvzAVXhF4g7GbjRSmPV1KtGo5fo,326472 +cuda/bindings/_v2/nvrtc.pxd,sha256=ehhUSgy6GPc6F9gB1utLxLRIuNahIQLle1SNNi39Xqg,2569 +cuda/bindings/_version.py,sha256=gO8yQ9-3wwjeKGLSTIIHoYDP-eKPjJOmR6lQuNL2NMc,530 +cuda/bindings/cudla.cpython-312-x86_64-linux-gnu.so,sha256=xnaaADMpyfGuc84qFQJfRpM_z3cutHGLDohSmUWP4LM,475632 +cuda/bindings/cudla.pxd,sha256=yZuzvLAenNYUdtIM_WEtulO9AEzlkwkVBLUHgjqdlTw,2471 +cuda/bindings/cufile.cpython-312-x86_64-linux-gnu.so,sha256=jwU8DG4vjOY_MTvyMi7W_lr3NKjkJOeu9Q5ugQGxGcE,841552 +cuda/bindings/cufile.pxd,sha256=O5QHML2dN9iQGb4uUEHvAp77AGf9CHypYtrEpBOTGNk,4094 +cuda/bindings/cycudla.cpython-312-x86_64-linux-gnu.so,sha256=mmqFghi5zcOKCJSnV9AMcSjfozQo8gS3hrGsCc2Pi20,23424 +cuda/bindings/cycudla.pxd,sha256=nzXqIzdy9E9lDSzO6DIPN8nRLa5PX8t-ZAP7irY11lU,8529 +cuda/bindings/cycufile.cpython-312-x86_64-linux-gnu.so,sha256=la9cA9jyLVM5JojSfy0aEL2tHZQ282qVf2_eYrQGrVs,32352 +cuda/bindings/cycufile.pxd,sha256=Qt2TcAjXhVIAUJHlxRod8tfq5Aa8E2iQDsHrmo6KQ9s,19777 +cuda/bindings/cydriver.cpython-312-x86_64-linux-gnu.so,sha256=Se1_KcoHksCCHDYPm8AY5IVSN84BQZv1SsF0TYII7FI,171104 +cuda/bindings/cydriver.pxd,sha256=mVlsXF9m2cbmU1fazlQFk1kI8gzz8304M7PLSP8BjNQ,190793 +cuda/bindings/cynvfatbin.cpython-312-x86_64-linux-gnu.so,sha256=unv9iqmJ4os4fd0dnhFK28Y5pTN3JuL67-Fae65eTWE,23424 +cuda/bindings/cynvfatbin.pxd,sha256=mhHoaP48pcXN8C3bJr67pXRYjfu1yPpqu6ysmtaK6p8,4032 +cuda/bindings/cynvjitlink.cpython-312-x86_64-linux-gnu.so,sha256=iSIU9bZmGUHMLzeeDdILtNWlmpAnygBMBW3If3B7PQc,27520 +cuda/bindings/cynvjitlink.pxd,sha256=C8W217djuPr-yHi5zCW5gV6I5FCiBrH6RBdxbNafn_E,5098 +cuda/bindings/cynvml.cpython-312-x86_64-linux-gnu.so,sha256=6OiJHsp-toFqpSIgRxWm4o3h7Vo0rqMYAU0E8ANER6w,127648 +cuda/bindings/cynvml.pxd,sha256=xtyjWmm90hhB86g6OYU8iyETU39yoYBMl4KA2SYziHA,177809 +cuda/bindings/cynvrtc.cpython-312-x86_64-linux-gnu.so,sha256=DLU2-yI2brtrgUWQ2FQAyDoo5ZYPwBlr2vdzUJ8Huvg,31616 +cuda/bindings/cynvrtc.pxd,sha256=8_JKSbLYxyE00M3SSB645zugcJTLGowFa7vo7tcS0KI,5207 +cuda/bindings/cynvvm.cpython-312-x86_64-linux-gnu.so,sha256=ESCj9ChH2udyUFB3mo0okEdUQgloqmySDlz5k2GnTzE,23424 +cuda/bindings/cynvvm.pxd,sha256=BNlGMf2BgNj70RPk_PpBuyLYsYAdb-OV2aDGGYUSFSA,3321 +cuda/bindings/cyruntime.cpython-312-x86_64-linux-gnu.so,sha256=PtDg0j0jzSaqYF4GCJN8S5MW1lUXNh0rZlopST5uwUU,119040 +cuda/bindings/cyruntime.pxd,sha256=92ytfM0CGbi-IywdCHFQq4d2EZsA9y62ENirEskIN9M,133157 +cuda/bindings/driver.cpython-312-x86_64-linux-gnu.so,sha256=Ji_AHgPOQQdhnYq9HU8co3-uwEl_56T2GPHzH6G_1ao,7499496 +cuda/bindings/driver.pxd,sha256=kz-DwsT0bLZZJQmXtr-iuFEm4BqGLGBtlprQhggJJcM,227952 +cuda/bindings/nvfatbin.cpython-312-x86_64-linux-gnu.so,sha256=2IMtoBOqGjNtfSb41WEef9yVsUV31CppyHDQiUvTrFY,124304 +cuda/bindings/nvfatbin.pxd,sha256=p5fk8AksFmFw5vkH5x7q-YFjgxpmtW5d5WfJNu7bZ5s,1711 +cuda/bindings/nvjitlink.cpython-312-x86_64-linux-gnu.so,sha256=r5rz14gRovw2YG-xJKg0DwpQf1xFlZmYjUPiSjv2gBI,128528 +cuda/bindings/nvjitlink.pxd,sha256=COp-J-d2PjE4ZITRXJqQFkO3ucln9V8ocqxSwk56Sc8,1942 +cuda/bindings/nvml.cpython-312-x86_64-linux-gnu.so,sha256=IXIl8tfpxTDQymHyhe2eCf3TNY2JHpzI_l3Eza-Lq7E,5837648 +cuda/bindings/nvml.pxd,sha256=QKkihOfNyKMk6wYxMdLSRB7RWxErYd5MubQoYYXunsE,28951 +cuda/bindings/nvrtc.cpython-312-x86_64-linux-gnu.so,sha256=wMVLCMvbpcafZSf-upzcO_IOI5WdKwiLq3IxIGMWoHw,442344 +cuda/bindings/nvrtc.pxd,sha256=EVLLoIxrolHIBawaPFuoNsAUg9SL2S7S_9exDhiAmPU,1656 +cuda/bindings/nvvm.cpython-312-x86_64-linux-gnu.so,sha256=otkbVugKIpyxrhDFaCR6YwHD8J3PjfpEcnnQ8gIwrdw,116176 +cuda/bindings/nvvm.pxd,sha256=ykIhHBEg98564FIcpuJbifBXUljVA3920mR4Sb3MRfY,1750 +cuda/bindings/runtime.cpython-312-x86_64-linux-gnu.so,sha256=vdBhKU3Q1ZXfKAqnkx4SXRNW6AAWdR6uwAn18vLFflk,5332200 +cuda/bindings/runtime.pxd,sha256=LzEyzjHrepMPtDqJrgV2O3VVpDDSZzE_h82Hxm8givI,113186 +cuda/bindings/utils/__init__.py,sha256=eDO0jXWPeDYgfRGlNEmtnWMeLdeeuz9i_UiFOhRQnx8,1161 +cuda/bindings/utils/__pycache__/__init__.cpython-312.pyc,, +cuda/bindings/utils/__pycache__/_envvar.cpython-312.pyc,, +cuda/bindings/utils/__pycache__/_nvvm_utils.cpython-312.pyc,, +cuda/bindings/utils/__pycache__/_ptx_utils.cpython-312.pyc,, +cuda/bindings/utils/__pycache__/_version_check.cpython-312.pyc,, +cuda/bindings/utils/_envvar.py,sha256=wQNZ4W1ComNO_lkUhKzQBdH8kTVT4q2cQ9w2DZIK6lE,1162 +cuda/bindings/utils/_nvvm_utils.py,sha256=K14A7dtTiOAd5m0QYvLJIotslD4MGzPb6NBSRnZypqI,2688 +cuda/bindings/utils/_ptx_utils.py,sha256=WfzrgCwkrPx6bfqAGSq06OGbm5lntFVA-CHUoocckAY,3226 +cuda/bindings/utils/_version_check.py,sha256=5HUgMoyb3lnOboDNTY4oWxLxb44xehyk6q9HijR6DFk,2519 +cuda_bindings-13.4.4.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +cuda_bindings-13.4.4.dist-info/METADATA,sha256=wAxhSOL8cR4aDCrBRmXtKOOWbrYJJBumXs5cfjp2ess,2425 +cuda_bindings-13.4.4.dist-info/RECORD,, +cuda_bindings-13.4.4.dist-info/WHEEL,sha256=i_r_22nkFZ6fvmbWDSs9_qoJHXxyjKurorRBH4KsNxw,152 +cuda_bindings-13.4.4.dist-info/licenses/LICENSE,sha256=3JRGWk1UD3dkkOS3pz1xfQn_-7HVp6bqq0egym9mJKs,11436 +cuda_bindings-13.4.4.dist-info/top_level.txt,sha256=U5vpnvwNpaJF8bl4KnoUluMDTRt0J972FipwXjgNQ3A,5 diff --git a/hug/lib/python3.12/site-packages/cuda_bindings-13.4.4.dist-info/WHEEL b/hug/lib/python3.12/site-packages/cuda_bindings-13.4.4.dist-info/WHEEL new file mode 100644 index 0000000000000000000000000000000000000000..74ed4b096ce315c7b17163b9ab190a4734d10a6b --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda_bindings-13.4.4.dist-info/WHEEL @@ -0,0 +1,6 @@ +Wheel-Version: 1.0 +Generator: setuptools (13.4.4) +Root-Is-Purelib: false +Tag: cp312-cp312-manylinux_2_24_x86_64 +Tag: cp312-cp312-manylinux_2_28_x86_64 + diff --git a/hug/lib/python3.12/site-packages/cuda_bindings-13.4.4.dist-info/licenses/LICENSE b/hug/lib/python3.12/site-packages/cuda_bindings-13.4.4.dist-info/licenses/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..f3fe76ecadf88e6fa1f23005a590a7f0f3500cfe --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda_bindings-13.4.4.dist-info/licenses/LICENSE @@ -0,0 +1,203 @@ +Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/hug/lib/python3.12/site-packages/cuda_bindings-13.4.4.dist-info/top_level.txt b/hug/lib/python3.12/site-packages/cuda_bindings-13.4.4.dist-info/top_level.txt new file mode 100644 index 0000000000000000000000000000000000000000..089f044f442ab95aabf9de9eb52b63efbac9f7b9 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda_bindings-13.4.4.dist-info/top_level.txt @@ -0,0 +1 @@ +cuda diff --git a/hug/lib/python3.12/site-packages/cuda_pathfinder-1.8.4.dist-info/INSTALLER b/hug/lib/python3.12/site-packages/cuda_pathfinder-1.8.4.dist-info/INSTALLER new file mode 100644 index 0000000000000000000000000000000000000000..a1b589e38a32041e49332e5e81c2d363dc418d68 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda_pathfinder-1.8.4.dist-info/INSTALLER @@ -0,0 +1 @@ +pip diff --git a/hug/lib/python3.12/site-packages/cuda_pathfinder-1.8.4.dist-info/METADATA b/hug/lib/python3.12/site-packages/cuda_pathfinder-1.8.4.dist-info/METADATA new file mode 100644 index 0000000000000000000000000000000000000000..bded3c602bb9d4fd5699ea5ea7829431994d9010 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda_pathfinder-1.8.4.dist-info/METADATA @@ -0,0 +1,48 @@ +Metadata-Version: 2.4 +Name: cuda-pathfinder +Version: 1.8.4 +Summary: Pathfinder for CUDA components +Author-email: NVIDIA Corporation +License-Expression: Apache-2.0 +Project-URL: Repository, https://github.com/NVIDIA/cuda-python +Project-URL: Documentation, https://nvidia.github.io/cuda-python/ +Requires-Python: >=3.11 +Description-Content-Type: text/x-rst +License-File: LICENSE +Dynamic: description +Dynamic: license-file + +.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 + +******************************************************* +cuda-pathfinder: Utilities for locating CUDA components +******************************************************* + +.. image:: https://img.shields.io/badge/NVIDIA-black?logo=nvidia + :target: https://www.nvidia.com/ + :alt: NVIDIA + +`cuda.pathfinder `_ +aims to be a one-stop solution for locating CUDA components. Currently +it supports locating and loading dynamic libraries (``.so``, ``.dll``), and +locating CTK header directories. Support for other artifacts is in progress. + +* `Documentation `_ +* `Releases `_ +* `Repository `_ +* `Issue tracker `_ (select component ``cuda.pathfinder``) + +``cuda.pathfinder`` is under active development. Feedback and suggestions are welcome. + + +Installation +============ + +.. code-block:: bash + + pip install cuda-pathfinder + +``cuda-pathfinder`` is `CUDA Toolkit (CTK) `_ +version-agnostic. It follows the general CUDA Toolkit support policy: the +two most recent major versions are supported simultaneously. diff --git a/hug/lib/python3.12/site-packages/cuda_pathfinder-1.8.4.dist-info/RECORD b/hug/lib/python3.12/site-packages/cuda_pathfinder-1.8.4.dist-info/RECORD new file mode 100644 index 0000000000000000000000000000000000000000..509b8e8de416ce474f74583e9c9792ec52721c35 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda_pathfinder-1.8.4.dist-info/RECORD @@ -0,0 +1,73 @@ +cuda/pathfinder/README.md,sha256=JPbUfq3xYFMGa1ZlnpHkKsGXjJi4Zr1nNU3SzWJIviw,123 +cuda/pathfinder/__init__.py,sha256=TqJsP287s8fS3HJb6r_ZyzdeERQv-aR3KQ65sib9lUM,4505 +cuda/pathfinder/__pycache__/__init__.cpython-312.pyc,, +cuda/pathfinder/__pycache__/_optional_cuda_import.cpython-312.pyc,, +cuda/pathfinder/__pycache__/_version.cpython-312.pyc,, +cuda/pathfinder/_binaries/__pycache__/find_nvidia_binary_utility.cpython-312.pyc,, +cuda/pathfinder/_binaries/__pycache__/supported_nvidia_binaries.cpython-312.pyc,, +cuda/pathfinder/_binaries/__pycache__/windows_nsight.cpython-312.pyc,, +cuda/pathfinder/_binaries/find_nvidia_binary_utility.py,sha256=omYqUqfX_IShS7C0tKRNNVvKc51Q5E1Bfhw3K3ScpwQ,9830 +cuda/pathfinder/_binaries/supported_nvidia_binaries.py,sha256=hw8OMFaiNLZNrI1N6aBGsbkz2gR3nFK_5xvyTdeVJmA,1483 +cuda/pathfinder/_binaries/windows_nsight.py,sha256=muXZQdkMgSg-RoJSu9IGBs4KlSP4AJgKn6ET0tBPdLI,2827 +cuda/pathfinder/_dynamic_libs/__pycache__/descriptor_catalog.cpython-312.pyc,, +cuda/pathfinder/_dynamic_libs/__pycache__/dynamic_lib_subprocess.cpython-312.pyc,, +cuda/pathfinder/_dynamic_libs/__pycache__/lib_descriptor.cpython-312.pyc,, +cuda/pathfinder/_dynamic_libs/__pycache__/load_dl_common.cpython-312.pyc,, +cuda/pathfinder/_dynamic_libs/__pycache__/load_dl_linux.cpython-312.pyc,, +cuda/pathfinder/_dynamic_libs/__pycache__/load_dl_windows.cpython-312.pyc,, +cuda/pathfinder/_dynamic_libs/__pycache__/load_nvidia_dynamic_lib.cpython-312.pyc,, +cuda/pathfinder/_dynamic_libs/__pycache__/platform_loader.cpython-312.pyc,, +cuda/pathfinder/_dynamic_libs/__pycache__/search_platform.cpython-312.pyc,, +cuda/pathfinder/_dynamic_libs/__pycache__/search_steps.cpython-312.pyc,, +cuda/pathfinder/_dynamic_libs/__pycache__/subprocess_protocol.cpython-312.pyc,, +cuda/pathfinder/_dynamic_libs/__pycache__/supported_nvidia_libs.cpython-312.pyc,, +cuda/pathfinder/_dynamic_libs/descriptor_catalog.py,sha256=nB9AgMR7fxbMRheaIofPmLLNmtcYkIHwIsaUFyIsvTU,25150 +cuda/pathfinder/_dynamic_libs/dynamic_lib_subprocess.py,sha256=-jgshHMUUXwvPt49K1R4GcXMK0XhgNRRtyKKFczsoIc,5165 +cuda/pathfinder/_dynamic_libs/lib_descriptor.py,sha256=4TuEXVowm8Oq149M_tQvTgjWJGTQ_AJgouLz-x0I-Wg,753 +cuda/pathfinder/_dynamic_libs/load_dl_common.py,sha256=x21jPb3Y9NAllIvKvWFhB7qaJWh-TpuUMy_BW-ihX-M,1670 +cuda/pathfinder/_dynamic_libs/load_dl_linux.py,sha256=S1rRH6dVjUywmZOIjVZ2sLUxBNPI1qeDlSaSNHt2aAg,8227 +cuda/pathfinder/_dynamic_libs/load_dl_windows.py,sha256=HugGOvaeNH9gBbrheLspOF8IIeECN6tc-JfNti8F1Uo,6986 +cuda/pathfinder/_dynamic_libs/load_nvidia_dynamic_lib.py,sha256=mh3l2tyi39CKjq8zxOzVfmXt20peyI_mWdeDbBtoXJA,13173 +cuda/pathfinder/_dynamic_libs/platform_loader.py,sha256=GAsqwVMUjMsuX3jNuMiDnRVvoXWcbOjLIsU6h99mXAw,1437 +cuda/pathfinder/_dynamic_libs/search_platform.py,sha256=IN-TlsFdh3hNyQLy2HNIrHxNLXzACQonwgsjIYxwXec,9748 +cuda/pathfinder/_dynamic_libs/search_steps.py,sha256=CJTuKtCkcr4GrsrQq6g-zqU5OFMES28QxNFkc8HOq8M,10057 +cuda/pathfinder/_dynamic_libs/subprocess_protocol.py,sha256=bieP_U7UujgbePzxvykszai1Xpn9tueO_qVv62_8CQA,2713 +cuda/pathfinder/_dynamic_libs/supported_nvidia_libs.py,sha256=BVpsu6pQZHqHBLy72P4vrkabPjduoBp0oRjSTN4M47E,6842 +cuda/pathfinder/_headers/__pycache__/find_nvidia_headers.cpython-312.pyc,, +cuda/pathfinder/_headers/__pycache__/header_descriptor.cpython-312.pyc,, +cuda/pathfinder/_headers/__pycache__/header_descriptor_catalog.cpython-312.pyc,, +cuda/pathfinder/_headers/__pycache__/supported_nvidia_headers.cpython-312.pyc,, +cuda/pathfinder/_headers/find_nvidia_headers.py,sha256=4kAT_AfuJMNlJiNSS6cHxeKBHg9GoGhPBxzBZFRzDUo,9330 +cuda/pathfinder/_headers/header_descriptor.py,sha256=8YNEX32s8XENUmUCa2XhhWqitr0e-WmzQ92HORBURg4,2865 +cuda/pathfinder/_headers/header_descriptor_catalog.py,sha256=9aH1HJNYYIFm-xHrAQB0RWOlhf1jRV76fDGEuCa0q3k,10466 +cuda/pathfinder/_headers/supported_nvidia_headers.py,sha256=l4xg52qPI8WN0F3dYzaVDhhzsDl77R39T_Ob8hALLNo,3609 +cuda/pathfinder/_optional_cuda_import.py,sha256=1Vjsv3DvBmz7-yqeaxHD-TDe-Fzwdyu88S1df-CfRBo,1424 +cuda/pathfinder/_static_libs/__pycache__/find_bitcode_lib.cpython-312.pyc,, +cuda/pathfinder/_static_libs/__pycache__/find_static_lib.cpython-312.pyc,, +cuda/pathfinder/_static_libs/find_bitcode_lib.py,sha256=fWYZ5PsPVgd0GZ39ajCBbAFHhXu6S_Pd591pZxeTxMc,6098 +cuda/pathfinder/_static_libs/find_static_lib.py,sha256=_VpEZgUFqtla8-P2dEfcULj6dVr8kRje-V256Z9aREI,6822 +cuda/pathfinder/_utils/__pycache__/ctk_root_canary.cpython-312.pyc,, +cuda/pathfinder/_utils/__pycache__/driver_info.cpython-312.pyc,, +cuda/pathfinder/_utils/__pycache__/env_vars.cpython-312.pyc,, +cuda/pathfinder/_utils/__pycache__/find_site_packages_dll.cpython-312.pyc,, +cuda/pathfinder/_utils/__pycache__/find_site_packages_so.cpython-312.pyc,, +cuda/pathfinder/_utils/__pycache__/find_sub_dirs.cpython-312.pyc,, +cuda/pathfinder/_utils/__pycache__/path_sort.cpython-312.pyc,, +cuda/pathfinder/_utils/__pycache__/platform_aware.cpython-312.pyc,, +cuda/pathfinder/_utils/__pycache__/windows_arch.cpython-312.pyc,, +cuda/pathfinder/_utils/ctk_root_canary.py,sha256=fMwpBqFBgOkLCwiqAR85aA9de9A23Wkha6PGAHrzI0g,184 +cuda/pathfinder/_utils/driver_info.py,sha256=nLaEKH2s4kf8jnHHmvdXEmyhYhznw1TQuSYQsuqSMLQ,2900 +cuda/pathfinder/_utils/env_vars.py,sha256=9VspktZnl7oQyGHVP85n61Snj6eXSqbqs6aiQsYxzqg,3813 +cuda/pathfinder/_utils/find_site_packages_dll.py,sha256=HixAy-Ubd5Gu9DZwCLAu2jvlEr1nfolOSZ_7GX3ZgbM,1143 +cuda/pathfinder/_utils/find_site_packages_so.py,sha256=_udOAI8RtTXRJWz-X6TUy-g9W_nW8PeAcG61k1AVSLw,1638 +cuda/pathfinder/_utils/find_sub_dirs.py,sha256=lr2Ls7COGIorf8H3snxLm66ClXkPNYb5f7g5ZBl5yBQ,2614 +cuda/pathfinder/_utils/path_sort.py,sha256=cNro8dbQAJYCW9qYBajpOE1n28E88uPevz6UC7rudkw,740 +cuda/pathfinder/_utils/platform_aware.py,sha256=W04KlnGkhnUM26ygF54BiRuNcMA-FUKNpMKbTWZFp5M,847 +cuda/pathfinder/_utils/windows_arch.py,sha256=_Kzg0hvJsKBCPV0PPccwqqDYDcfzX1TUpP0eo-DfToQ,4914 +cuda/pathfinder/_version.py,sha256=r5gGgkJ3OvPnDVkg89UHgAoVMXwcY4QcZ0mEoYF_4YM,528 +cuda_pathfinder-1.8.4.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +cuda_pathfinder-1.8.4.dist-info/METADATA,sha256=2eNnosb48BuzWF4HDF8B41gyyGWLJHw_d2uqVO11O0A,1945 +cuda_pathfinder-1.8.4.dist-info/RECORD,, +cuda_pathfinder-1.8.4.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91 +cuda_pathfinder-1.8.4.dist-info/licenses/LICENSE,sha256=3JRGWk1UD3dkkOS3pz1xfQn_-7HVp6bqq0egym9mJKs,11436 +cuda_pathfinder-1.8.4.dist-info/top_level.txt,sha256=U5vpnvwNpaJF8bl4KnoUluMDTRt0J972FipwXjgNQ3A,5 diff --git a/hug/lib/python3.12/site-packages/cuda_pathfinder-1.8.4.dist-info/WHEEL b/hug/lib/python3.12/site-packages/cuda_pathfinder-1.8.4.dist-info/WHEEL new file mode 100644 index 0000000000000000000000000000000000000000..d31999332c3abbaf2e0d6018b33f2f8e7e29c0bb --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda_pathfinder-1.8.4.dist-info/WHEEL @@ -0,0 +1,5 @@ +Wheel-Version: 1.0 +Generator: setuptools (84.2.1) +Root-Is-Purelib: true +Tag: py3-none-any + diff --git a/hug/lib/python3.12/site-packages/cuda_pathfinder-1.8.4.dist-info/licenses/LICENSE b/hug/lib/python3.12/site-packages/cuda_pathfinder-1.8.4.dist-info/licenses/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..f3fe76ecadf88e6fa1f23005a590a7f0f3500cfe --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda_pathfinder-1.8.4.dist-info/licenses/LICENSE @@ -0,0 +1,203 @@ +Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/hug/lib/python3.12/site-packages/cuda_pathfinder-1.8.4.dist-info/top_level.txt b/hug/lib/python3.12/site-packages/cuda_pathfinder-1.8.4.dist-info/top_level.txt new file mode 100644 index 0000000000000000000000000000000000000000..089f044f442ab95aabf9de9eb52b63efbac9f7b9 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda_pathfinder-1.8.4.dist-info/top_level.txt @@ -0,0 +1 @@ +cuda diff --git a/hug/lib/python3.12/site-packages/cuda_toolkit-13.2.2.dist-info/INSTALLER b/hug/lib/python3.12/site-packages/cuda_toolkit-13.2.2.dist-info/INSTALLER new file mode 100644 index 0000000000000000000000000000000000000000..a1b589e38a32041e49332e5e81c2d363dc418d68 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda_toolkit-13.2.2.dist-info/INSTALLER @@ -0,0 +1 @@ +pip diff --git a/hug/lib/python3.12/site-packages/cuda_toolkit-13.2.2.dist-info/METADATA b/hug/lib/python3.12/site-packages/cuda_toolkit-13.2.2.dist-info/METADATA new file mode 100644 index 0000000000000000000000000000000000000000..178afbf53a9b61b9ef0bfcca625b793977dbea9f --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda_toolkit-13.2.2.dist-info/METADATA @@ -0,0 +1,179 @@ +Metadata-Version: 2.4 +Name: cuda-toolkit +Version: 13.2.2 +Summary: CUDA Toolkit meta-package +Project-URL: homepage, https://developer.nvidia.com/cuda-toolkit +Project-URL: documentation, https://docs.nvidia.com/cuda/ +Author-email: NVIDIA Kitmaker Team +Keywords: cuda,nvidia +Classifier: Development Status :: 6 - Mature +Classifier: Environment :: GPU +Classifier: Environment :: GPU :: NVIDIA CUDA +Provides-Extra: all +Requires-Dist: nvidia-cublas==13.4.1.3.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'all' +Requires-Dist: nvidia-cuda-cccl==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'all' +Requires-Dist: nvidia-cuda-crt==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'all' +Requires-Dist: nvidia-cuda-culibos==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64') and extra == 'all' +Requires-Dist: nvidia-cuda-cuobjdump==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'all' +Requires-Dist: nvidia-cuda-cupti==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'all' +Requires-Dist: nvidia-cuda-cuxxfilt==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'all' +Requires-Dist: nvidia-cuda-nvcc==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'all' +Requires-Dist: nvidia-cuda-nvdisasm==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'all' +Requires-Dist: nvidia-cuda-nvrtc==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'all' +Requires-Dist: nvidia-cuda-opencl==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'all' +Requires-Dist: nvidia-cuda-profiler-api==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'all' +Requires-Dist: nvidia-cuda-runtime==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'all' +Requires-Dist: nvidia-cuda-sanitizer-api==13.2.87.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'all' +Requires-Dist: nvidia-cuda-tileiras==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'all' +Requires-Dist: nvidia-cudla==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64') and extra == 'all' +Requires-Dist: nvidia-cufft==12.2.0.57.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'all' +Requires-Dist: nvidia-cufile==1.17.1.22.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64') and extra == 'all' +Requires-Dist: nvidia-curand==10.4.2.66.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'all' +Requires-Dist: nvidia-cusolver==12.2.0.11.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'all' +Requires-Dist: nvidia-cusparse==12.7.10.12.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'all' +Requires-Dist: nvidia-npp==13.1.0.59.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'all' +Requires-Dist: nvidia-nvfatbin==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'all' +Requires-Dist: nvidia-nvjitlink<14,>=13.2.86; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'all' +Requires-Dist: nvidia-nvjpeg==13.1.0.59.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'all' +Requires-Dist: nvidia-nvml-dev==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'all' +Requires-Dist: nvidia-nvptxcompiler==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'all' +Requires-Dist: nvidia-nvtx==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'all' +Requires-Dist: nvidia-nvvm==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'all' +Provides-Extra: cccl +Requires-Dist: nvidia-cuda-cccl==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'cccl' +Provides-Extra: crt +Requires-Dist: nvidia-cuda-crt==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'crt' +Provides-Extra: cublas +Requires-Dist: nvidia-cublas==13.4.1.3.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'cublas' +Requires-Dist: nvidia-cuda-nvrtc==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'cublas' +Provides-Extra: cudart +Requires-Dist: nvidia-cuda-runtime==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'cudart' +Provides-Extra: cudla +Requires-Dist: nvidia-cudla==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64') and extra == 'cudla' +Provides-Extra: cufft +Requires-Dist: nvidia-cufft==12.2.0.57.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'cufft' +Requires-Dist: nvidia-nvjitlink<14,>=13.2.86; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'cufft' +Provides-Extra: cufile +Requires-Dist: nvidia-cufile==1.17.1.22.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64') and extra == 'cufile' +Provides-Extra: culibos +Requires-Dist: nvidia-cuda-culibos==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64') and extra == 'culibos' +Provides-Extra: cuobjdump +Requires-Dist: nvidia-cuda-cuobjdump==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'cuobjdump' +Provides-Extra: cupti +Requires-Dist: nvidia-cuda-cupti==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'cupti' +Provides-Extra: curand +Requires-Dist: nvidia-curand==10.4.2.66.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'curand' +Provides-Extra: cusolver +Requires-Dist: nvidia-cublas==13.4.1.3.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'cusolver' +Requires-Dist: nvidia-cusolver==12.2.0.11.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'cusolver' +Requires-Dist: nvidia-cusparse==12.7.10.12.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'cusolver' +Requires-Dist: nvidia-nvjitlink<14,>=13.2.86; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'cusolver' +Provides-Extra: cusparse +Requires-Dist: nvidia-cusparse==12.7.10.12.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'cusparse' +Requires-Dist: nvidia-nvjitlink<14,>=13.2.86; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'cusparse' +Provides-Extra: cuxxfilt +Requires-Dist: nvidia-cuda-cuxxfilt==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'cuxxfilt' +Provides-Extra: npp +Requires-Dist: nvidia-npp==13.1.0.59.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'npp' +Provides-Extra: nvcc +Requires-Dist: nvidia-cuda-crt==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'nvcc' +Requires-Dist: nvidia-cuda-nvcc==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'nvcc' +Requires-Dist: nvidia-cuda-runtime==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'nvcc' +Requires-Dist: nvidia-nvvm==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'nvcc' +Provides-Extra: nvdisasm +Requires-Dist: nvidia-cuda-nvdisasm==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'nvdisasm' +Provides-Extra: nvfatbin +Requires-Dist: nvidia-nvfatbin==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'nvfatbin' +Provides-Extra: nvjitlink +Requires-Dist: nvidia-nvjitlink<14,>=13.2.86; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'nvjitlink' +Provides-Extra: nvjpeg +Requires-Dist: nvidia-nvjpeg==13.1.0.59.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'nvjpeg' +Provides-Extra: nvml +Requires-Dist: nvidia-nvml-dev==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'nvml' +Provides-Extra: nvptxcompiler +Requires-Dist: nvidia-nvptxcompiler==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'nvptxcompiler' +Provides-Extra: nvrtc +Requires-Dist: nvidia-cuda-nvrtc==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'nvrtc' +Provides-Extra: nvtx +Requires-Dist: nvidia-nvtx==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'nvtx' +Provides-Extra: nvvm +Requires-Dist: nvidia-nvvm==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'nvvm' +Provides-Extra: opencl +Requires-Dist: nvidia-cuda-opencl==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'opencl' +Provides-Extra: profiler +Requires-Dist: nvidia-cuda-profiler-api==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'profiler' +Provides-Extra: sanitizer +Requires-Dist: nvidia-cuda-sanitizer-api==13.2.87.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'sanitizer' +Provides-Extra: tileiras +Requires-Dist: nvidia-cuda-nvcc==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'tileiras' +Requires-Dist: nvidia-cuda-tileiras==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'tileiras' +Requires-Dist: nvidia-nvjitlink<14,>=13.2.86; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'tileiras' +Requires-Dist: nvidia-nvvm==13.2.86.*; (sys_platform == 'linux' and platform_machine == 'aarch64' or sys_platform == 'linux' and platform_machine == 'x86_64' or sys_platform == 'win32' and platform_machine == 'AMD64') and extra == 'tileiras' +Description-Content-Type: text/markdown + +# cuda-toolkit 13.2.2 + +### [NVIDIA CUDA Toolkit](https://developer.nvidia.com/cuda-toolkit) + +> The NVIDIA CUDA Toolkit provides a development environment for creating high-performance, GPU-accelerated applications. With it, you can develop, optimize, and deploy your applications on GPU-accelerated embedded systems, desktop workstations, enterprise data centers, cloud-based platforms, and supercomputers. The toolkit includes GPU-accelerated libraries, debugging and optimization tools, a C/C++ compiler, and a runtime library. + +### `cuda-toolkit` package + +The `cuda-toolkit` package is a meta-package (a package that contains no software and only installs other packages) to install all or part of the NVIDIA CUDA Toolkit. + +For instructions on how to use the `cuda-toolkit` package, please refer to the [NVIDIA CUDA Toolkit documentation](https://docs.nvidia.com/cuda/) and follow the installation guide for your platform. A summary of usage is also available below. + +### Using the `cuda-toolkit` package + +The `cuda-toolkit` package uses package extras to install all or part of the CUDA Toolkit. +Some examples of using the `cuda-toolkit` meta-package with extras: + +Install all of the CUDA Toolkit +``` +pip install cuda-toolkit[all] +``` + +Install just the CUDA Runtime +``` +pip install cuda-toolkit[cudart] +``` + +Install cuBLAS, cuSOLVER, and cuSPARSE +``` +pip install cuda-toolkit[cublas,cusolver,cusparse] +``` + +### Available extras + +| Extra | Package | Version | +|-------|---------|---------| +| `all` | All packages below | | +| cccl | nvidia-cuda-cccl | 13.2.86. | +| crt | nvidia-cuda-crt | 13.2.86. | +| cublas | nvidia-cublas | 13.4.1.3. | +| cudart | nvidia-cuda-runtime | 13.2.86. | +| cudla | nvidia-cudla | 13.2.86. | +| cufft | nvidia-cufft | 12.2.0.57. | +| cufile | nvidia-cufile | 1.17.1.22. | +| culibos | nvidia-cuda-culibos | 13.2.86. | +| cuobjdump | nvidia-cuda-cuobjdump | 13.2.86. | +| cupti | nvidia-cuda-cupti | 13.2.86. | +| curand | nvidia-curand | 10.4.2.66. | +| cusolver | nvidia-cusolver | 12.2.0.11. | +| cusparse | nvidia-cusparse | 12.7.10.12. | +| cuxxfilt | nvidia-cuda-cuxxfilt | 13.2.86. | +| npp | nvidia-npp | 13.1.0.59. | +| nvcc | nvidia-cuda-nvcc | 13.2.86. | +| nvdisasm | nvidia-cuda-nvdisasm | 13.2.86. | +| nvfatbin | nvidia-nvfatbin | 13.2.86. | +| nvjitlink | nvidia-nvjitlink | 13.2.86 | +| nvjpeg | nvidia-nvjpeg | 13.1.0.59. | +| nvml | nvidia-nvml-dev | 13.2.86. | +| nvptxcompiler | nvidia-nvptxcompiler | 13.2.86. | +| nvrtc | nvidia-cuda-nvrtc | 13.2.86. | +| nvtx | nvidia-nvtx | 13.2.86. | +| nvvm | nvidia-nvvm | 13.2.86. | +| opencl | nvidia-cuda-opencl | 13.2.86. | +| profiler | nvidia-cuda-profiler-api | 13.2.86. | +| sanitizer | nvidia-cuda-sanitizer-api | 13.2.87. | +| tileiras | nvidia-cuda-tileiras | 13.2.86. | \ No newline at end of file diff --git a/hug/lib/python3.12/site-packages/cuda_toolkit-13.2.2.dist-info/RECORD b/hug/lib/python3.12/site-packages/cuda_toolkit-13.2.2.dist-info/RECORD new file mode 100644 index 0000000000000000000000000000000000000000..e7a9ea30cf97038e50bd178dea3c2ec8815e7d73 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda_toolkit-13.2.2.dist-info/RECORD @@ -0,0 +1,4 @@ +cuda_toolkit-13.2.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +cuda_toolkit-13.2.2.dist-info/METADATA,sha256=WggQWDeQ-8GBxebznEW2IFDM16tR32y-uxeVy4SPffs,20448 +cuda_toolkit-13.2.2.dist-info/RECORD,, +cuda_toolkit-13.2.2.dist-info/WHEEL,sha256=VX-VJ7c6dw9Ge3EqJIbA6W3pOUbz24SnnGGFNr55jY4,105 diff --git a/hug/lib/python3.12/site-packages/cuda_toolkit-13.2.2.dist-info/WHEEL b/hug/lib/python3.12/site-packages/cuda_toolkit-13.2.2.dist-info/WHEEL new file mode 100644 index 0000000000000000000000000000000000000000..fc0bc4408f5c1aa81574c357dede18a17d12cbc4 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cuda_toolkit-13.2.2.dist-info/WHEEL @@ -0,0 +1,5 @@ +Wheel-Version: 1.0 +Generator: hatchling 1.30.1 +Root-Is-Purelib: true +Tag: py2-none-any +Tag: py3-none-any diff --git a/hug/lib/python3.12/site-packages/cv2/Error/__init__.pyi b/hug/lib/python3.12/site-packages/cv2/Error/__init__.pyi new file mode 100644 index 0000000000000000000000000000000000000000..5dac858f382c3247ff0ce2b204af1ddcd10dace5 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/Error/__init__.pyi @@ -0,0 +1,118 @@ +__all__: list[str] = [] + +# Enumerations +StsOk: int +STS_OK: int +StsBackTrace: int +STS_BACK_TRACE: int +StsError: int +STS_ERROR: int +StsInternal: int +STS_INTERNAL: int +StsNoMem: int +STS_NO_MEM: int +StsBadArg: int +STS_BAD_ARG: int +StsBadFunc: int +STS_BAD_FUNC: int +StsNoConv: int +STS_NO_CONV: int +StsAutoTrace: int +STS_AUTO_TRACE: int +HeaderIsNull: int +HEADER_IS_NULL: int +BadImageSize: int +BAD_IMAGE_SIZE: int +BadOffset: int +BAD_OFFSET: int +BadDataPtr: int +BAD_DATA_PTR: int +BadStep: int +BAD_STEP: int +BadModelOrChSeq: int +BAD_MODEL_OR_CH_SEQ: int +BadNumChannels: int +BAD_NUM_CHANNELS: int +BadNumChannel1U: int +BAD_NUM_CHANNEL1U: int +BadDepth: int +BAD_DEPTH: int +BadAlphaChannel: int +BAD_ALPHA_CHANNEL: int +BadOrder: int +BAD_ORDER: int +BadOrigin: int +BAD_ORIGIN: int +BadAlign: int +BAD_ALIGN: int +BadCallBack: int +BAD_CALL_BACK: int +BadTileSize: int +BAD_TILE_SIZE: int +BadCOI: int +BAD_COI: int +BadROISize: int +BAD_ROISIZE: int +MaskIsTiled: int +MASK_IS_TILED: int +StsNullPtr: int +STS_NULL_PTR: int +StsVecLengthErr: int +STS_VEC_LENGTH_ERR: int +StsFilterStructContentErr: int +STS_FILTER_STRUCT_CONTENT_ERR: int +StsKernelStructContentErr: int +STS_KERNEL_STRUCT_CONTENT_ERR: int +StsFilterOffsetErr: int +STS_FILTER_OFFSET_ERR: int +StsBadSize: int +STS_BAD_SIZE: int +StsDivByZero: int +STS_DIV_BY_ZERO: int +StsInplaceNotSupported: int +STS_INPLACE_NOT_SUPPORTED: int +StsObjectNotFound: int +STS_OBJECT_NOT_FOUND: int +StsUnmatchedFormats: int +STS_UNMATCHED_FORMATS: int +StsBadFlag: int +STS_BAD_FLAG: int +StsBadPoint: int +STS_BAD_POINT: int +StsBadMask: int +STS_BAD_MASK: int +StsUnmatchedSizes: int +STS_UNMATCHED_SIZES: int +StsUnsupportedFormat: int +STS_UNSUPPORTED_FORMAT: int +StsOutOfRange: int +STS_OUT_OF_RANGE: int +StsParseError: int +STS_PARSE_ERROR: int +StsNotImplemented: int +STS_NOT_IMPLEMENTED: int +StsBadMemBlock: int +STS_BAD_MEM_BLOCK: int +StsAssert: int +STS_ASSERT: int +GpuNotSupported: int +GPU_NOT_SUPPORTED: int +GpuApiCallError: int +GPU_API_CALL_ERROR: int +OpenGlNotSupported: int +OPEN_GL_NOT_SUPPORTED: int +OpenGlApiCallError: int +OPEN_GL_API_CALL_ERROR: int +OpenCLApiCallError: int +OPEN_CLAPI_CALL_ERROR: int +OpenCLDoubleNotSupported: int +OPEN_CLDOUBLE_NOT_SUPPORTED: int +OpenCLInitError: int +OPEN_CLINIT_ERROR: int +OpenCLNoAMDBlasFft: int +OPEN_CLNO_AMDBLAS_FFT: int +Code = int +"""One of [StsOk, STS_OK, StsBackTrace, STS_BACK_TRACE, StsError, STS_ERROR, StsInternal, STS_INTERNAL, StsNoMem, STS_NO_MEM, StsBadArg, STS_BAD_ARG, StsBadFunc, STS_BAD_FUNC, StsNoConv, STS_NO_CONV, StsAutoTrace, STS_AUTO_TRACE, HeaderIsNull, HEADER_IS_NULL, BadImageSize, BAD_IMAGE_SIZE, BadOffset, BAD_OFFSET, BadDataPtr, BAD_DATA_PTR, BadStep, BAD_STEP, BadModelOrChSeq, BAD_MODEL_OR_CH_SEQ, BadNumChannels, BAD_NUM_CHANNELS, BadNumChannel1U, BAD_NUM_CHANNEL1U, BadDepth, BAD_DEPTH, BadAlphaChannel, BAD_ALPHA_CHANNEL, BadOrder, BAD_ORDER, BadOrigin, BAD_ORIGIN, BadAlign, BAD_ALIGN, BadCallBack, BAD_CALL_BACK, BadTileSize, BAD_TILE_SIZE, BadCOI, BAD_COI, BadROISize, BAD_ROISIZE, MaskIsTiled, MASK_IS_TILED, StsNullPtr, STS_NULL_PTR, StsVecLengthErr, STS_VEC_LENGTH_ERR, StsFilterStructContentErr, STS_FILTER_STRUCT_CONTENT_ERR, StsKernelStructContentErr, STS_KERNEL_STRUCT_CONTENT_ERR, StsFilterOffsetErr, STS_FILTER_OFFSET_ERR, StsBadSize, STS_BAD_SIZE, StsDivByZero, STS_DIV_BY_ZERO, StsInplaceNotSupported, STS_INPLACE_NOT_SUPPORTED, StsObjectNotFound, STS_OBJECT_NOT_FOUND, StsUnmatchedFormats, STS_UNMATCHED_FORMATS, StsBadFlag, STS_BAD_FLAG, StsBadPoint, STS_BAD_POINT, StsBadMask, STS_BAD_MASK, StsUnmatchedSizes, STS_UNMATCHED_SIZES, StsUnsupportedFormat, STS_UNSUPPORTED_FORMAT, StsOutOfRange, STS_OUT_OF_RANGE, StsParseError, STS_PARSE_ERROR, StsNotImplemented, STS_NOT_IMPLEMENTED, StsBadMemBlock, STS_BAD_MEM_BLOCK, StsAssert, STS_ASSERT, GpuNotSupported, GPU_NOT_SUPPORTED, GpuApiCallError, GPU_API_CALL_ERROR, OpenGlNotSupported, OPEN_GL_NOT_SUPPORTED, OpenGlApiCallError, OPEN_GL_API_CALL_ERROR, OpenCLApiCallError, OPEN_CLAPI_CALL_ERROR, OpenCLDoubleNotSupported, OPEN_CLDOUBLE_NOT_SUPPORTED, OpenCLInitError, OPEN_CLINIT_ERROR, OpenCLNoAMDBlasFft, OPEN_CLNO_AMDBLAS_FFT]""" + + + diff --git a/hug/lib/python3.12/site-packages/cv2/LICENSE-3RD-PARTY.txt b/hug/lib/python3.12/site-packages/cv2/LICENSE-3RD-PARTY.txt new file mode 100644 index 0000000000000000000000000000000000000000..1f06ebe0179f7680a98dd399ccae18d6cb7bf0a2 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/LICENSE-3RD-PARTY.txt @@ -0,0 +1,3617 @@ +OpenCV library is redistributed within opencv-python package. +This license applies to OpenCV binary in the directory cv2/. + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +------------------------------------------------------------------------------ +libvpx is redistributed within all opencv-python Linux packages. +This license applies to libvpx binary in the directory cv2/. + +Copyright (c) 2010, The WebM Project authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + * Neither the name of Google, nor the WebM Project, nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ +FFmpeg is redistributed within all opencv-python packages. + +Libbluray, libgnutls, libnettle, libhogweed, libintl, libmp3lame, libp11, +librtmp, libsoxr and libtasn1 are redistributed within all opencv-python macOS packages. + +This license applies to the above library binaries in the directory cv2/. + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + +------------------------------------------------------------------------------ +Qt 5 is redistributed within non-headless opencv-python Linux and macOS packages. +libgmp is redistributed within opencv-python macOS packages. +libidn2 is redistributed within opencv-python macOS packages. +libunistring is redistributed within opencv-python macOS packages. +This license applies to the above binaries in the directory cv2/. + + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. + +------------------------------------------------------------------------------ +bzip2 is redistributed within all opencv-python Linux packages. +This license applies to libbz2 binary in the directory cv2/. + +This program, "bzip2", the associated library "libbzip2", and all +documentation, are copyright (C) 1996-2010 Julian R Seward. All +rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. The origin of this software must not be misrepresented; you must + not claim that you wrote the original software. If you use this + software in a product, an acknowledgment in the product + documentation would be appreciated but is not required. + +3. Altered source versions must be plainly marked as such, and must + not be misrepresented as being the original software. + +4. The name of the author may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Julian Seward, jseward@bzip.org +bzip2/libbzip2 version 1.0.6 of 6 September 2010 + +------------------------------------------------------------------------------ +libcrypto and libssl are redistributed within all opencv-python Linux and macOS packages. +libopencore-amrnb and libopencore-amrwb are redistributed within all opencv-python Linux and macOS packages. +This license applies to above binaries in the directory cv2/. + + LICENSE ISSUES + ============== + + The OpenSSL toolkit stays under a double license, i.e. both the conditions of + the OpenSSL License and the original SSLeay license apply to the toolkit. + See below for the actual license texts. + + OpenSSL License + --------------- + +/* ==================================================================== + * Copyright (c) 1998-2019 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * ==================================================================== + * + * This product includes cryptographic software written by Eric Young + * (eay@cryptsoft.com). This product includes software written by Tim + * Hudson (tjh@cryptsoft.com). + * + */ + + Original SSLeay License + ----------------------- + +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are adhered to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the routines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publicly available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] + */ + +------------------------------------------------------------------------------ +libfontconfig is redistributed within all opencv-python macOS packages. +This license applies to libfontconfig binary in the directory cv2/. + +Copyright © 2000,2001,2002,2003,2004,2006,2007 Keith Packard +Copyright © 2005 Patrick Lam +Copyright © 2009 Roozbeh Pournader +Copyright © 2008,2009 Red Hat, Inc. +Copyright © 2008 Danilo Šegan +Copyright © 2012 Google, Inc. + + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of the author(s) not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. The authors make no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------------------ +libfreetype is redistributed within opencv-python Linux and macOS packages. +This license applies to libfreetype binary in the directory cv2/. + + The FreeType Project LICENSE + ---------------------------- + + 2006-Jan-27 + + Copyright 1996-2002, 2006 by + David Turner, Robert Wilhelm, and Werner Lemberg + + + +Introduction +============ + + The FreeType Project is distributed in several archive packages; + some of them may contain, in addition to the FreeType font engine, + various tools and contributions which rely on, or relate to, the + FreeType Project. + + This license applies to all files found in such packages, and + which do not fall under their own explicit license. The license + affects thus the FreeType font engine, the test programs, + documentation and makefiles, at the very least. + + This license was inspired by the BSD, Artistic, and IJG + (Independent JPEG Group) licenses, which all encourage inclusion + and use of free software in commercial and freeware products + alike. As a consequence, its main points are that: + + o We don't promise that this software works. However, we will be + interested in any kind of bug reports. (`as is' distribution) + + o You can use this software for whatever you want, in parts or + full form, without having to pay us. (`royalty-free' usage) + + o You may not pretend that you wrote this software. If you use + it, or only parts of it, in a program, you must acknowledge + somewhere in your documentation that you have used the + FreeType code. (`credits') + + We specifically permit and encourage the inclusion of this + software, with or without modifications, in commercial products. + We disclaim all warranties covering The FreeType Project and + assume no liability related to The FreeType Project. + + + Finally, many people asked us for a preferred form for a + credit/disclaimer to use in compliance with this license. We thus + encourage you to use the following text: + + """ + Portions of this software are copyright © The FreeType + Project (www.freetype.org). All rights reserved. + """ + + Please replace with the value from the FreeType version you + actually use. + + +Legal Terms +=========== + +0. Definitions +-------------- + + Throughout this license, the terms `package', `FreeType Project', + and `FreeType archive' refer to the set of files originally + distributed by the authors (David Turner, Robert Wilhelm, and + Werner Lemberg) as the `FreeType Project', be they named as alpha, + beta or final release. + + `You' refers to the licensee, or person using the project, where + `using' is a generic term including compiling the project's source + code as well as linking it to form a `program' or `executable'. + This program is referred to as `a program using the FreeType + engine'. + + This license applies to all files distributed in the original + FreeType Project, including all source code, binaries and + documentation, unless otherwise stated in the file in its + original, unmodified form as distributed in the original archive. + If you are unsure whether or not a particular file is covered by + this license, you must contact us to verify this. + + The FreeType Project is copyright (C) 1996-2000 by David Turner, + Robert Wilhelm, and Werner Lemberg. All rights reserved except as + specified below. + +1. No Warranty +-------------- + + THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY + KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO + USE, OF THE FREETYPE PROJECT. + +2. Redistribution +----------------- + + This license grants a worldwide, royalty-free, perpetual and + irrevocable right and license to use, execute, perform, compile, + display, copy, create derivative works of, distribute and + sublicense the FreeType Project (in both source and object code + forms) and derivative works thereof for any purpose; and to + authorize others to exercise some or all of the rights granted + herein, subject to the following conditions: + + o Redistribution of source code must retain this license file + (`FTL.TXT') unaltered; any additions, deletions or changes to + the original files must be clearly indicated in accompanying + documentation. The copyright notices of the unaltered, + original files must be preserved in all copies of source + files. + + o Redistribution in binary form must provide a disclaimer that + states that the software is based in part of the work of the + FreeType Team, in the distribution documentation. We also + encourage you to put an URL to the FreeType web page in your + documentation, though this isn't mandatory. + + These conditions apply to any software derived from or based on + the FreeType Project, not just the unmodified files. If you use + our work, you must acknowledge us. However, no fee need be paid + to us. + +3. Advertising +-------------- + + Neither the FreeType authors and contributors nor you shall use + the name of the other for commercial, advertising, or promotional + purposes without specific prior written permission. + + We suggest, but do not require, that you use one or more of the + following phrases to refer to this software in your documentation + or advertising materials: `FreeType Project', `FreeType Engine', + `FreeType library', or `FreeType Distribution'. + + As you have not signed this license, you are not required to + accept it. However, as the FreeType Project is copyrighted + material, only this license, or another one contracted with the + authors, grants you the right to use, distribute, and modify it. + Therefore, by using, distributing, or modifying the FreeType + Project, you indicate that you understand and accept all the terms + of this license. + +4. Contacts +----------- + + There are two mailing lists related to FreeType: + + o freetype@nongnu.org + + Discusses general use and applications of FreeType, as well as + future and wanted additions to the library and distribution. + If you are looking for support, start in this list if you + haven't found anything to help you in the documentation. + + o freetype-devel@nongnu.org + + Discusses bugs, as well as engine internals, design issues, + specific licenses, porting, etc. + + Our home page can be found at + + https://www.freetype.org + +------------------------------------------------------------------------------ +libpng is redistributed within all opencv-python Linux and macOS packages. +This license applies to libpng binary in the directory cv2/. + +PNG Reference Library License version 2 +--------------------------------------- + + * Copyright (c) 1995-2019 The PNG Reference Library Authors. + * Copyright (c) 2018-2019 Cosmin Truta. + * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson. + * Copyright (c) 1996-1997 Andreas Dilger. + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + +The software is supplied "as is", without warranty of any kind, +express or implied, including, without limitation, the warranties +of merchantability, fitness for a particular purpose, title, and +non-infringement. In no event shall the Copyright owners, or +anyone distributing the software, be liable for any damages or +other liability, whether in contract, tort or otherwise, arising +from, out of, or in connection with the software, or the use or +other dealings in the software, even if advised of the possibility +of such damage. + +Permission is hereby granted to use, copy, modify, and distribute +this software, or portions hereof, for any purpose, without fee, +subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you + must not claim that you wrote the original software. If you + use this software in a product, an acknowledgment in the product + documentation would be appreciated, but is not required. + + 2. Altered source versions must be plainly marked as such, and must + not be misrepresented as being the original software. + + 3. This Copyright notice may not be removed or altered from any + source or altered source distribution. + + +PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35) +----------------------------------------------------------------------- + +libpng versions 1.0.7, July 1, 2000, through 1.6.35, July 15, 2018 are +Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are +derived from libpng-1.0.6, and are distributed according to the same +disclaimer and license as libpng-1.0.6 with the following individuals +added to the list of Contributing Authors: + + Simon-Pierre Cadieux + Eric S. Raymond + Mans Rullgard + Cosmin Truta + Gilles Vollant + James Yu + Mandar Sahastrabuddhe + Google Inc. + Vadim Barkov + +and with the following additions to the disclaimer: + + There is no warranty against interference with your enjoyment of + the library or against infringement. There is no warranty that our + efforts or the library will fulfill any of your particular purposes + or needs. This library is provided with all faults, and the entire + risk of satisfactory quality, performance, accuracy, and effort is + with the user. + +Some files in the "contrib" directory and some configure-generated +files that are distributed with libpng have other copyright owners, and +are released under other open source licenses. + +libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are +Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from +libpng-0.96, and are distributed according to the same disclaimer and +license as libpng-0.96, with the following individuals added to the +list of Contributing Authors: + + Tom Lane + Glenn Randers-Pehrson + Willem van Schaik + +libpng versions 0.89, June 1996, through 0.96, May 1997, are +Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88, +and are distributed according to the same disclaimer and license as +libpng-0.88, with the following individuals added to the list of +Contributing Authors: + + John Bowler + Kevin Bracey + Sam Bushell + Magnus Holmgren + Greg Roelofs + Tom Tanner + +Some files in the "scripts" directory have other copyright owners, +but are released under this license. + +libpng versions 0.5, May 1995, through 0.88, January 1996, are +Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + +For the purposes of this copyright and license, "Contributing Authors" +is defined as the following set of individuals: + + Andreas Dilger + Dave Martindale + Guy Eric Schalnat + Paul Schmidt + Tim Wegner + +The PNG Reference Library is supplied "AS IS". The Contributing +Authors and Group 42, Inc. disclaim all warranties, expressed or +implied, including, without limitation, the warranties of +merchantability and of fitness for any purpose. The Contributing +Authors and Group 42, Inc. assume no liability for direct, indirect, +incidental, special, exemplary, or consequential damages, which may +result from the use of the PNG Reference Library, even if advised of +the possibility of such damage. + +Permission is hereby granted to use, copy, modify, and distribute this +source code, or portions hereof, for any purpose, without fee, subject +to the following restrictions: + + 1. The origin of this source code must not be misrepresented. + + 2. Altered versions must be plainly marked as such and must not + be misrepresented as being the original source. + + 3. This Copyright notice may not be removed or altered from any + source or altered source distribution. + +The Contributing Authors and Group 42, Inc. specifically permit, +without fee, and encourage the use of this source code as a component +to supporting the PNG file format in commercial products. If you use +this source code in a product, acknowledgment is not required but would +be appreciated. + +------------------------------------------------------------------------------ +libz is redistributed within all opencv-python Linux packages. +This license applies to libz binary in the directory cv2/. + + Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + +------------------------------------------------------------------------------ +libdav1d is redistributed within opencv-python macOS packages. +This license applies to libdav1d binary in the directory cv2/. + +Copyright © 2018-2019, VideoLAN and dav1d authors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ +libffi is redistributed within opencv-python macOS packages. +This license applies to libffi binary in the directory cv2/. + +libffi - Copyright (c) 1996-2020 Anthony Green, Red Hat, Inc and others. +See source files for details. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +``Software''), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------------------ +libogg is redistributed within opencv-python macOS packages. +This license applies to libogg binary in the directory cv2/. + +Copyright (c) 2002, Xiph.org Foundation + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +- Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +- Neither the name of the Xiph.org Foundation nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ +libopenjp2 is redistributed within opencv-python macOS packages. +This license applies to libopenjp2 binary in the directory cv2/. + +The copyright in this software is being made available under the 2-clauses +BSD License, included below. This software may be subject to other third +party and contributor rights, including patent rights, and no such rights +are granted under this license. + +Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium +Copyright (c) 2002-2014, Professor Benoit Macq +Copyright (c) 2003-2014, Antonin Descampe +Copyright (c) 2003-2009, Francois-Olivier Devaux +Copyright (c) 2005, Herve Drolon, FreeImage Team +Copyright (c) 2002-2003, Yannick Verschueren +Copyright (c) 2001-2003, David Janssens +Copyright (c) 2011-2012, Centre National d'Etudes Spatiales (CNES), France +Copyright (c) 2012, CS Systemes d'Information, France + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ +libopus is redistributed within opencv-python macOS packages. +This license applies to libopus binary in the directory cv2/. + +Copyright 2001-2011 Xiph.Org, Skype Limited, Octasic, + Jean-Marc Valin, Timothy B. Terriberry, + CSIRO, Gregory Maxwell, Mark Borgerding, + Erik de Castro Lopo + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +- Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +- Neither the name of Internet Society, IETF or IETF Trust, nor the +names of specific contributors, may be used to endorse or promote +products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Opus is subject to the royalty-free patent licenses which are +specified at: + +Xiph.Org Foundation: +https://datatracker.ietf.org/ipr/1524/ + +Microsoft Corporation: +https://datatracker.ietf.org/ipr/1914/ + +Broadcom Corporation: +https://datatracker.ietf.org/ipr/1526/ + +------------------------------------------------------------------------------ +librav1e is redistributed within opencv-python macOS packages. +This license applies to librav1e binary in the directory cv2/. + +BSD 2-Clause License + +Copyright (c) 2017-2020, the rav1e contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ +libsnappy is redistributed within opencv-python macOS packages. +This license applies to libsnappy binary in the directory cv2/. + +Copyright 2011, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ +libspeex is redistributed within opencv-python macOS packages. +This license applies to libspeex binary in the directory cv2/. + +Copyright 2002-2008 Xiph.org Foundation +Copyright 2002-2008 Jean-Marc Valin +Copyright 2005-2007 Analog Devices Inc. +Copyright 2005-2008 Commonwealth Scientific and Industrial Research + Organisation (CSIRO) +Copyright 1993, 2002, 2006 David Rowe +Copyright 2003 EpicGames +Copyright 1992-1994 Jutta Degener, Carsten Bormann + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +- Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +- Neither the name of the Xiph.org Foundation nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ +libsrt is redistributed within opencv-python macOS packages. +This license applies to libsrt binary in the directory cv2/. + +/* + * + * Copyright (c) 2001-2017 Cisco Systems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * Neither the name of the Cisco Systems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + + Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. + +------------------------------------------------------------------------------ +libtheoradec and libtheoraenc are redistributed within opencv-python macOS packages. +This license applies to libtheoradec and libtheoraenc binaries in the directory cv2/. + + Copyright (C) 2002-2009 Xiph.org Foundation + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +- Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +- Neither the name of the Xiph.org Foundation nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ +libwebp and libwebpmux are redistributed within all opencv-python packages. +This license applies to libwebp and libwebpmux binaries in the directory cv2/. + +Copyright (c) 2010, Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + * Neither the name of Google nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ +libvorbis and libvorbisenc are redistributed within opencv-python macOS packages. +This license applies to libvorbis and libvorbisenc binaries in the directory cv2/. + +Copyright (c) 2002-2020 Xiph.org Foundation + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +- Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +- Neither the name of the Xiph.org Foundation nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ +Libxcb utility libraries are redistributed within opencv-python non-headless Linux packages. +This license applies to libxcb related binaries in the directory cv2/. + +Copyright (C) 2001-2006 Bart Massey, Jamey Sharp, and Josh Triplett. +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall +be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the names of the authors +or their institutions shall not be used in advertising or +otherwise to promote the sale, use or other dealings in this +Software without prior written authorization from the +authors. + +------------------------------------------------------------------------------ +Libxcb-image is redistributed within opencv-python non-headless Linux packages. +This license applies to libxcb-image binary in the directory cv2/. + +Copyright © 2007-2008 Bart Massey +Copyright © 2008 Julien Danjou +Copyright © 2008 Keith Packard + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, copy, +modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the names of the authors or +their institutions shall not be used in advertising or otherwise to +promote the sale, use or other dealings in this Software without +prior written authorization from the authors. + +------------------------------------------------------------------------------ +Libxcb-util is redistributed within opencv-python non-headless Linux packages. +This license applies to libxcb-util binary in the directory cv2/. + +Copyright © 2008 Bart Massey +Copyright © 2008 Ian Osgood +Copyright © 2008 Jamey Sharp +Copyright © 2008 Josh Triplett +Copyright © 2008-2009 Julien Danjou + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, copy, +modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the names of the authors or +their institutions shall not be used in advertising or otherwise to +promote the sale, use or other dealings in this Software without +prior written authorization from the authors. + +------------------------------------------------------------------------------ +Libxcb-render-util is redistributed within opencv-python non-headless Linux packages. +This license applies to libxcb-render-util binary in the directory cv2/. + +Copyright © 2000 Keith Packard + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of Keith Packard not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Keith Packard makes no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + +Copyright © 2006 Jamey Sharp. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the names of the authors or their +institutions shall not be used in advertising or otherwise to promote the +sale, use or other dealings in this Software without prior written +authorization from the authors. + +Copyright © 2006 Ian Osgood + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the names of the authors or their +institutions shall not be used in advertising or otherwise to promote the +sale, use or other dealings in this Software without prior written +authorization from the authors. + +------------------------------------------------------------------------------ +Libxcb-icccm is redistributed within opencv-python non-headless Linux packages. +This license applies to Libxcb-icccm binary in the directory cv2/. + +Copyright © 2008-2011 Arnaud Fontaine +Copyright © 2007-2008 Vincent Torri + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, copy, +modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the names of the authors or +their institutions shall not be used in advertising or otherwise to +promote the sale, use or other dealings in this Software without +prior written authorization from the authors. + +------------------------------------------------------------------------------ +libXau is redistributed within opencv-python non-headless Linux packages. +This license applies to libXau binary in the directory cv2/. + +Copyright 1988, 1993, 1994, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +------------------------------------------------------------------------------ +Vulkan headers are redistributed within all opencv-python packages. +This license applies to Vulkan headers in the directory 3rdparty/include/vulkan. + +Copyright (c) 2015-2018 The Khronos Group Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +------------------------------------------------------------------------------ +Libjpeg-turbo is redistributed within all opencv-python packages as build option. + +libjpeg-turbo Licenses +====================== + +libjpeg-turbo is covered by three compatible BSD-style open source licenses: + +- The IJG (Independent JPEG Group) License, which is listed in + [README.ijg](README.ijg) + + This license applies to the libjpeg API library and associated programs + (any code inherited from libjpeg, and any modifications to that code.) + +- The Modified (3-clause) BSD License, which is listed below + + This license covers the TurboJPEG API library and associated programs, as + well as the build system. + +- The [zlib License](https://opensource.org/licenses/Zlib) + + This license is a subset of the other two, and it covers the libjpeg-turbo + SIMD extensions. + + +Complying with the libjpeg-turbo Licenses +========================================= + +This section provides a roll-up of the libjpeg-turbo licensing terms, to the +best of our understanding. + +1. If you are distributing a modified version of the libjpeg-turbo source, + then: + + 1. You cannot alter or remove any existing copyright or license notices + from the source. + + **Origin** + - Clause 1 of the IJG License + - Clause 1 of the Modified BSD License + - Clauses 1 and 3 of the zlib License + + 2. You must add your own copyright notice to the header of each source + file you modified, so others can tell that you modified that file (if + there is not an existing copyright header in that file, then you can + simply add a notice stating that you modified the file.) + + **Origin** + - Clause 1 of the IJG License + - Clause 2 of the zlib License + + 3. You must include the IJG README file, and you must not alter any of the + copyright or license text in that file. + + **Origin** + - Clause 1 of the IJG License + +2. If you are distributing only libjpeg-turbo binaries without the source, or + if you are distributing an application that statically links with + libjpeg-turbo, then: + + 1. Your product documentation must include a message stating: + + This software is based in part on the work of the Independent JPEG + Group. + + **Origin** + - Clause 2 of the IJG license + + 2. If your binary distribution includes or uses the TurboJPEG API, then + your product documentation must include the text of the Modified BSD + License (see below.) + + **Origin** + - Clause 2 of the Modified BSD License + +3. You cannot use the name of the IJG or The libjpeg-turbo Project or the + contributors thereof in advertising, publicity, etc. + + **Origin** + - IJG License + - Clause 3 of the Modified BSD License + +4. The IJG and The libjpeg-turbo Project do not warrant libjpeg-turbo to be + free of defects, nor do we accept any liability for undesirable + consequences resulting from your use of the software. + + **Origin** + - IJG License + - Modified BSD License + - zlib License + + +The Modified (3-clause) BSD License +=================================== + +Copyright (C)2009-2022 D. R. Commander. All Rights Reserved.
+Copyright (C)2015 Viktor Szathmáry. All Rights Reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +- Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +- Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +- Neither the name of the libjpeg-turbo Project nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS", +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + +Why Three Licenses? +=================== + +The zlib License could have been used instead of the Modified (3-clause) BSD +License, and since the IJG License effectively subsumes the distribution +conditions of the zlib License, this would have effectively placed +libjpeg-turbo binary distributions under the IJG License. However, the IJG +License specifically refers to the Independent JPEG Group and does not extend +attribution and endorsement protections to other entities. Thus, it was +desirable to choose a license that granted us the same protections for new code +that were granted to the IJG for code derived from their software. + +------------------------------------------------------------------------------ +Libspng is redistributed within all opencv-python packages as build option. + +BSD 2-Clause License + +Copyright (c) 2018-2022, Randy +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ +QUIRC library is redistributed within all opencv-python packages. + +quirc -- QR-code recognition library +Copyright (C) 2010-2012 Daniel Beer + +Permission to use, copy, modify, and/or distribute this software for +any purpose with or without fee is hereby granted, provided that the +above copyright notice and this permission notice appear in all +copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------------------ +Flatbuffers library is redistributed within all opencv-python packages. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +------------------------------------------------------------------------------ +Protobuf library is redistributed within all opencv-python packages. + +Copyright 2008 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Code generated by the Protocol Buffer compiler is owned by the owner +of the input file used when generating it. This code is not +standalone and requires a support library to be linked with it. This +support library is itself covered by the above license. + +------------------------------------------------------------------------------ +OpenJPEG library is redistributed within all opencv-python packages. + +/* + * The copyright in this software is being made available under the 2-clauses + * BSD License, included below. This software may be subject to other third + * party and contributor rights, including patent rights, and no such rights + * are granted under this license. + * + * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2014, Professor Benoit Macq + * Copyright (c) 2003-2014, Antonin Descampe + * Copyright (c) 2003-2009, Francois-Olivier Devaux + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2011-2012, Centre National d'Etudes Spatiales (CNES), France + * Copyright (c) 2012, CS Systemes d'Information, France + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +------------------------------------------------------------------------------ +TIFF library is redistributed within all opencv-python packages. + +Copyright (c) 1988-1997 Sam Leffler +Copyright (c) 1991-1997 Silicon Graphics, Inc. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, provided +that (i) the above copyright notices and this permission notice appear in +all copies of the software and related documentation, and (ii) the names of +Sam Leffler and Silicon Graphics may not be used in any advertising or +publicity relating to the software without the specific, prior written +permission of Sam Leffler and Silicon Graphics. + +THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + +IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +OF THIS SOFTWARE. + +------------------------------------------------------------------------------ +Intel(R) IPP ICV library statically linked within x86 and x86_64 opencv-python packages. + +Intel(R) Integrated Performance Primitives 2021 Update 10 + +Intel Simplified Software License (Version October 2022) + +Intel(R) Integrated Performance Primitives (Intel(R) IPP) : Copyright (C) 1997 Intel Corporation + +Use and Redistribution. You may use and redistribute the software, which is +provided in binary form only, (the "Software"), without modification, +provided the following conditions are met: + +* Redistributions must reproduce the above copyright notice and these + terms of use in the Software and in the documentation and/or other materials + provided with the distribution. +* Neither the name of Intel nor the names of its suppliers may be used to + endorse or promote products derived from this Software without specific + prior written permission. +* No reverse engineering, decompilation, or disassembly of the Software is + permitted, nor any modification or alteration of the Software or its operation + at any time, including during execution. + +No other licenses. Except as provided in the preceding section, Intel grants no +licenses or other rights by implication, estoppel or otherwise to, patent, +copyright, trademark, trade name, service mark or other intellectual property +licenses or rights of Intel. + +Third party software. "Third Party Software" means the files (if any) listed +in the "third-party-software.txt" or other similarly-named text file that may +be included with the Software. Third Party Software, even if included with the +distribution of the Software, may be governed by separate license terms, including +without limitation, third party license terms, open source software notices and +terms, and/or other Intel software license terms. These separate license terms +solely govern Your use of the Third Party Software. + +DISCLAIMER. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT ARE +DISCLAIMED. THIS SOFTWARE IS NOT INTENDED FOR USE IN SYSTEMS OR APPLICATIONS +WHERE FAILURE OF THE SOFTWARE MAY CAUSE PERSONAL INJURY OR DEATH AND YOU AGREE +THAT YOU ARE FULLY RESPONSIBLE FOR ANY CLAIMS, COSTS, DAMAGES, EXPENSES, AND +ATTORNEYS' FEES ARISING OUT OF ANY SUCH USE, EVEN IF ANY CLAIM ALLEGES THAT +INTEL WAS NEGLIGENT REGARDING THE DESIGN OR MANUFACTURE OF THE SOFTWARE. + +LIMITATION OF LIABILITY. IN NO EVENT WILL INTEL BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +No support. Intel may make changes to the Software, at any time without notice, +and is not obligated to support, update or provide training for the Software. + +Termination. Your right to use the Software is terminated in the event of your +breach of this license. + +Feedback. Should you provide Intel with comments, modifications, corrections, +enhancements or other input ("Feedback") related to the Software, Intel will be +free to use, disclose, reproduce, license or otherwise distribute or exploit the +Feedback in its sole discretion without any obligations or restrictions of any +kind, including without limitation, intellectual property rights or licensing +obligations. + +Compliance with laws. You agree to comply with all relevant laws and regulations +governing your use, transfer, import or export (or prohibition thereof) of the +Software. + +Governing law. All disputes will be governed by the laws of the United States of +America and the State of Delaware without reference to conflict of law +principles and subject to the exclusive jurisdiction of the state or federal +courts sitting in the State of Delaware, and each party agrees that it submits +to the personal jurisdiction and venue of those courts and waives any +objections. THE UNITED NATIONS CONVENTION ON CONTRACTS FOR THE INTERNATIONAL +SALE OF GOODS (1980) IS SPECIFICALLY EXCLUDED AND WILL NOT APPLY TO THE SOFTWARE. + +------------------------------------------------------------------------------ +Orbbec SDK distributed with arm64 MacOS packages. + +MIT License + +Copyright (c) 2023 OrbbecDeveloper + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +------------------------------------------------------------------------------ + +libavif library and it's dependnecies are redistributed within all opencv-python packages. + +Copyright 2019 Joe Drago. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ + +Files: src/obu.c + +Copyright © 2018-2019, VideoLAN and dav1d authors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ + +Files: third_party/iccjpeg/* + +In plain English: + +1. We don't promise that this software works. (But if you find any bugs, + please let us know!) +2. You can use this software for whatever you want. You don't have to pay us. +3. You may not pretend that you wrote this software. If you use it in a + program, you must acknowledge somewhere in your documentation that + you've used the IJG code. + +In legalese: + +The authors make NO WARRANTY or representation, either express or implied, +with respect to this software, its quality, accuracy, merchantability, or +fitness for a particular purpose. This software is provided "AS IS", and you, +its user, assume the entire risk as to its quality and accuracy. + +This software is copyright (C) 1991-2013, Thomas G. Lane, Guido Vollbeding. +All Rights Reserved except as specified below. + +Permission is hereby granted to use, copy, modify, and distribute this +software (or portions thereof) for any purpose, without fee, subject to these +conditions: +(1) If any part of the source code for this software is distributed, then this +README file must be included, with this copyright and no-warranty notice +unaltered; and any additions, deletions, or changes to the original files +must be clearly indicated in accompanying documentation. +(2) If only executable code is distributed, then the accompanying +documentation must state that "this software is based in part on the work of +the Independent JPEG Group". +(3) Permission for use of this software is granted only if the user accepts +full responsibility for any undesirable consequences; the authors accept +NO LIABILITY for damages of any kind. + +These conditions apply to any software derived from or based on the IJG code, +not just to the unmodified library. If you use our work, you ought to +acknowledge us. + +Permission is NOT granted for the use of any IJG author's name or company name +in advertising or publicity relating to this software or products derived from +it. This software may be referred to only as "the Independent JPEG Group's +software". + +We specifically permit and encourage the use of this software as the basis of +commercial products, provided that all warranty or liability claims are +assumed by the product vendor. + + +The Unix configuration script "configure" was produced with GNU Autoconf. +It is copyright by the Free Software Foundation but is freely distributable. +The same holds for its supporting scripts (config.guess, config.sub, +ltmain.sh). Another support script, install-sh, is copyright by X Consortium +but is also freely distributable. + +The IJG distribution formerly included code to read and write GIF files. +To avoid entanglement with the Unisys LZW patent, GIF reading support has +been removed altogether, and the GIF writer has been simplified to produce +"uncompressed GIFs". This technique does not use the LZW algorithm; the +resulting GIF files are larger than usual, but are readable by all standard +GIF decoders. + +We are required to state that + "The Graphics Interchange Format(c) is the Copyright property of + CompuServe Incorporated. GIF(sm) is a Service Mark property of + CompuServe Incorporated." + +------------------------------------------------------------------------------ + +Files: contrib/gdk-pixbuf/* + +Copyright 2020 Emmanuel Gil Peyrot. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ + +Files: android_jni/gradlew* + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +------------------------------------------------------------------------------ + +Files: third_party/libyuv/* + +Copyright 2011 The LibYuv Project Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + * Neither the name of Google nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ + +aom library and it's dependnecies are redistributed within all opencv-python packages. + +Copyright (c) 2016, Alliance for Open Media. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ + +KAZE Features library is redistributed within all opencv-python packages. + +Copyright (c) 2012, Pablo Fernández Alcantarilla +All Rights Reserved + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the copyright holders nor the names of its contributors + may be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY +WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ + +AKAZE Features library is redistributed within all opencv-python packages. + +Copyright (c) 2014, Pablo Fernandez Alcantarilla, Jesus Nuevo +All Rights Reserved + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the copyright holders nor the names of its contributors + may be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY +WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ + +MLAS library is redistributed within all opencv-python packages. + +MIT License + +Copyright (c) Microsoft Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +------------------------------------------------------------------------------ + +CLapack library is redistributed within opencv-python packages for Windows. + +Copyright (c) 1992-2017 The University of Tennessee and The University + of Tennessee Research Foundation. All rights + reserved. +Copyright (c) 2000-2017 The University of California Berkeley. All + rights reserved. +Copyright (c) 2006-2017 The University of Colorado Denver. All rights + reserved. + +$COPYRIGHT$ + +Additional copyrights may follow + +$HEADER$ + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +- Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer listed + in this license in the documentation and/or other materials + provided with the distribution. + +- Neither the name of the copyright holders nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +The copyright holders provide no reassurances that the source code +provided does not infringe any patent, copyright, or any other +intellectual property rights of third parties. The copyright holders +disclaim any liability to any recipient for claims brought against +recipient by any third party for infringement of that parties +intellectual property rights. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/hug/lib/python3.12/site-packages/cv2/LICENSE.txt b/hug/lib/python3.12/site-packages/cv2/LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..328bf50632a988cf1cc494d557936d84fec16335 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Olli-Pekka Heinisuo + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/hug/lib/python3.12/site-packages/cv2/__init__.py b/hug/lib/python3.12/site-packages/cv2/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..11994a2cd322552641131a3f49b03748279cb49a --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/__init__.py @@ -0,0 +1,181 @@ +''' +OpenCV Python binary extension loader +''' +import os +import importlib +import sys + +__all__ = [] + +try: + import numpy + import numpy.core.multiarray +except ImportError: + print('OpenCV bindings requires "numpy" package.') + print('Install it via command:') + print(' pip install numpy') + raise + +# TODO +# is_x64 = sys.maxsize > 2**32 + + +def __load_extra_py_code_for_module(base, name, enable_debug_print=False): + module_name = "{}.{}".format(__name__, name) + export_module_name = "{}.{}".format(base, name) + native_module = sys.modules.pop(module_name, None) + try: + py_module = importlib.import_module(module_name) + except (ImportError, AttributeError) as err: + if enable_debug_print: + print("Can't load Python code for module:", module_name, + ". Reason:", err) + # Extension doesn't contain extra py code + return False + + if base in sys.modules and not hasattr(sys.modules[base], name): + setattr(sys.modules[base], name, py_module) + sys.modules[export_module_name] = py_module + # If it is C extension module it is already loaded by cv2 package + if native_module: + setattr(py_module, "_native", native_module) + for k, v in filter(lambda kv: not hasattr(py_module, kv[0]), + native_module.__dict__.items()): + if enable_debug_print: print(' symbol({}): {} = {}'.format(name, k, v)) + setattr(py_module, k, v) + return True + + +def __collect_extra_submodules(enable_debug_print=False): + def modules_filter(module): + return all(( + # module is not internal + not module.startswith("_"), + not module.startswith("python-"), + # it is not a file + os.path.isdir(os.path.join(_extra_submodules_init_path, module)) + )) + if sys.version_info[0] < 3: + if enable_debug_print: + print("Extra submodules is loaded only for Python 3") + return [] + + __INIT_FILE_PATH = os.path.abspath(__file__) + _extra_submodules_init_path = os.path.dirname(__INIT_FILE_PATH) + return filter(modules_filter, os.listdir(_extra_submodules_init_path)) + + +def bootstrap(): + import sys + + import copy + save_sys_path = copy.copy(sys.path) + + if hasattr(sys, 'OpenCV_LOADER'): + print(sys.path) + raise ImportError('ERROR: recursion is detected during loading of "cv2" binary extensions. Check OpenCV installation.') + sys.OpenCV_LOADER = True + + DEBUG = False + if hasattr(sys, 'OpenCV_LOADER_DEBUG'): + DEBUG = True + + import platform + if DEBUG: print('OpenCV loader: os.name="{}" platform.system()="{}"'.format(os.name, str(platform.system()))) + + LOADER_DIR = os.path.dirname(os.path.abspath(os.path.realpath(__file__))) + + PYTHON_EXTENSIONS_PATHS = [] + BINARIES_PATHS = [] + + g_vars = globals() + l_vars = locals().copy() + + if sys.version_info[:2] < (3, 0): + from . load_config_py2 import exec_file_wrapper + else: + from . load_config_py3 import exec_file_wrapper + + def load_first_config(fnames, required=True): + for fname in fnames: + fpath = os.path.join(LOADER_DIR, fname) + if not os.path.exists(fpath): + if DEBUG: print('OpenCV loader: config not found, skip: {}'.format(fpath)) + continue + if DEBUG: print('OpenCV loader: loading config: {}'.format(fpath)) + exec_file_wrapper(fpath, g_vars, l_vars) + return True + if required: + raise ImportError('OpenCV loader: missing configuration file: {}. Check OpenCV installation.'.format(fnames)) + + load_first_config(['config.py'], True) + load_first_config([ + 'config-{}.{}.py'.format(sys.version_info[0], sys.version_info[1]), + 'config-{}.py'.format(sys.version_info[0]) + ], True) + + if DEBUG: print('OpenCV loader: PYTHON_EXTENSIONS_PATHS={}'.format(str(l_vars['PYTHON_EXTENSIONS_PATHS']))) + if DEBUG: print('OpenCV loader: BINARIES_PATHS={}'.format(str(l_vars['BINARIES_PATHS']))) + + applySysPathWorkaround = False + if hasattr(sys, 'OpenCV_REPLACE_SYS_PATH_0'): + applySysPathWorkaround = True + else: + try: + BASE_DIR = os.path.dirname(LOADER_DIR) + if sys.path[0] == BASE_DIR or os.path.realpath(sys.path[0]) == BASE_DIR: + applySysPathWorkaround = True + except: + if DEBUG: print('OpenCV loader: exception during checking workaround for sys.path[0]') + pass # applySysPathWorkaround is False + + for p in reversed(l_vars['PYTHON_EXTENSIONS_PATHS']): + sys.path.insert(1 if not applySysPathWorkaround else 0, p) + + if os.name == 'nt': + if sys.version_info[:2] >= (3, 8): # https://github.com/python/cpython/pull/12302 + for p in l_vars['BINARIES_PATHS']: + try: + os.add_dll_directory(p) + except Exception as e: + if DEBUG: print('Failed os.add_dll_directory(): '+ str(e)) + pass + os.environ['PATH'] = ';'.join(l_vars['BINARIES_PATHS']) + ';' + os.environ.get('PATH', '') + if DEBUG: print('OpenCV loader: PATH={}'.format(str(os.environ['PATH']))) + else: + # amending of LD_LIBRARY_PATH works for sub-processes only + os.environ['LD_LIBRARY_PATH'] = ':'.join(l_vars['BINARIES_PATHS']) + ':' + os.environ.get('LD_LIBRARY_PATH', '') + + if DEBUG: print("Relink everything from native cv2 module to cv2 package") + + py_module = sys.modules.pop("cv2") + + native_module = importlib.import_module("cv2") + + sys.modules["cv2"] = py_module + setattr(py_module, "_native", native_module) + + for item_name, item in filter(lambda kv: kv[0] not in ("__file__", "__loader__", "__spec__", + "__name__", "__package__"), + native_module.__dict__.items()): + if item_name not in g_vars: + g_vars[item_name] = item + + sys.path = save_sys_path # multiprocessing should start from bootstrap code (https://github.com/opencv/opencv/issues/18502) + + try: + del sys.OpenCV_LOADER + except Exception as e: + if DEBUG: + print("Exception during delete OpenCV_LOADER:", e) + + if DEBUG: print('OpenCV loader: binary extension... OK') + + for submodule in __collect_extra_submodules(DEBUG): + if __load_extra_py_code_for_module("cv2", submodule, DEBUG): + if DEBUG: print("Extra Python code for", submodule, "is loaded") + + if DEBUG: print('OpenCV loader: DONE') + + +bootstrap() diff --git a/hug/lib/python3.12/site-packages/cv2/__init__.pyi b/hug/lib/python3.12/site-packages/cv2/__init__.pyi new file mode 100644 index 0000000000000000000000000000000000000000..7e45a1905e14fcda0293b9393669d05d0d5cc576 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/__init__.pyi @@ -0,0 +1,6858 @@ +__all__: list[str] = [] + +import cv2.aruco +import cv2.cuda +import cv2.detail +import cv2.dnn +import cv2.typing +import numpy +import os +import typing as _typing + + +from cv2 import Error as Error +from cv2 import aruco as aruco +from cv2 import barcode as barcode +from cv2 import ccm as ccm +from cv2 import cuda as cuda +from cv2 import detail as detail +from cv2 import dnn as dnn +from cv2 import fisheye as fisheye +from cv2 import flann as flann +from cv2 import instr as instr +from cv2 import ipp as ipp +from cv2 import mcc as mcc +from cv2 import ocl as ocl +from cv2 import ogl as ogl +from cv2 import parallel as parallel +from cv2 import samples as samples +from cv2 import segmentation as segmentation +from cv2 import typing as typing +from cv2 import utils as utils +from cv2 import videoio_registry as videoio_registry +from cv2.mat_wrapper import Mat as Mat + + +# Enumerations +SORT_EVERY_ROW: int +SORT_EVERY_COLUMN: int +SORT_ASCENDING: int +SORT_DESCENDING: int +SortFlags = int +"""One of [SORT_EVERY_ROW, SORT_EVERY_COLUMN, SORT_ASCENDING, SORT_DESCENDING]""" + +COVAR_SCRAMBLED: int +COVAR_NORMAL: int +COVAR_USE_AVG: int +COVAR_SCALE: int +COVAR_ROWS: int +COVAR_COLS: int +CovarFlags = int +"""One of [COVAR_SCRAMBLED, COVAR_NORMAL, COVAR_USE_AVG, COVAR_SCALE, COVAR_ROWS, COVAR_COLS]""" + +REDUCE_SUM: int +REDUCE_AVG: int +REDUCE_MAX: int +REDUCE_MIN: int +REDUCE_SUM2: int +ReduceTypes = int +"""One of [REDUCE_SUM, REDUCE_AVG, REDUCE_MAX, REDUCE_MIN, REDUCE_SUM2]""" + +ROTATE_90_CLOCKWISE: int +ROTATE_180: int +ROTATE_90_COUNTERCLOCKWISE: int +RotateFlags = int +"""One of [ROTATE_90_CLOCKWISE, ROTATE_180, ROTATE_90_COUNTERCLOCKWISE]""" + +KMEANS_RANDOM_CENTERS: int +KMEANS_PP_CENTERS: int +KMEANS_USE_INITIAL_LABELS: int +KmeansFlags = int +"""One of [KMEANS_RANDOM_CENTERS, KMEANS_PP_CENTERS, KMEANS_USE_INITIAL_LABELS]""" + +Param_INT: int +PARAM_INT: int +Param_BOOLEAN: int +PARAM_BOOLEAN: int +Param_REAL: int +PARAM_REAL: int +Param_STRING: int +PARAM_STRING: int +Param_MAT: int +PARAM_MAT: int +Param_MAT_VECTOR: int +PARAM_MAT_VECTOR: int +Param_ALGORITHM: int +PARAM_ALGORITHM: int +Param_FLOAT: int +PARAM_FLOAT: int +Param_UNSIGNED_INT: int +PARAM_UNSIGNED_INT: int +Param_UINT64: int +PARAM_UINT64: int +Param_UCHAR: int +PARAM_UCHAR: int +Param_SCALAR: int +PARAM_SCALAR: int +Param = int +"""One of [Param_INT, PARAM_INT, Param_BOOLEAN, PARAM_BOOLEAN, Param_REAL, PARAM_REAL, Param_STRING, PARAM_STRING, Param_MAT, PARAM_MAT, Param_MAT_VECTOR, PARAM_MAT_VECTOR, Param_ALGORITHM, PARAM_ALGORITHM, Param_FLOAT, PARAM_FLOAT, Param_UNSIGNED_INT, PARAM_UNSIGNED_INT, Param_UINT64, PARAM_UINT64, Param_UCHAR, PARAM_UCHAR, Param_SCALAR, PARAM_SCALAR]""" + +DECOMP_LU: int +DECOMP_SVD: int +DECOMP_EIG: int +DECOMP_CHOLESKY: int +DECOMP_QR: int +DECOMP_NORMAL: int +DecompTypes = int +"""One of [DECOMP_LU, DECOMP_SVD, DECOMP_EIG, DECOMP_CHOLESKY, DECOMP_QR, DECOMP_NORMAL]""" + +NORM_INF: int +NORM_L1: int +NORM_L2: int +NORM_L2SQR: int +NORM_HAMMING: int +NORM_HAMMING2: int +NORM_TYPE_MASK: int +NORM_RELATIVE: int +NORM_MINMAX: int +NormTypes = int +"""One of [NORM_INF, NORM_L1, NORM_L2, NORM_L2SQR, NORM_HAMMING, NORM_HAMMING2, NORM_TYPE_MASK, NORM_RELATIVE, NORM_MINMAX]""" + +CMP_EQ: int +CMP_GT: int +CMP_GE: int +CMP_LT: int +CMP_LE: int +CMP_NE: int +CmpTypes = int +"""One of [CMP_EQ, CMP_GT, CMP_GE, CMP_LT, CMP_LE, CMP_NE]""" + +GEMM_1_T: int +GEMM_2_T: int +GEMM_3_T: int +GemmFlags = int +"""One of [GEMM_1_T, GEMM_2_T, GEMM_3_T]""" + +DFT_INVERSE: int +DFT_SCALE: int +DFT_ROWS: int +DFT_COMPLEX_OUTPUT: int +DFT_REAL_OUTPUT: int +DFT_COMPLEX_INPUT: int +DCT_INVERSE: int +DCT_ROWS: int +DftFlags = int +"""One of [DFT_INVERSE, DFT_SCALE, DFT_ROWS, DFT_COMPLEX_OUTPUT, DFT_REAL_OUTPUT, DFT_COMPLEX_INPUT, DCT_INVERSE, DCT_ROWS]""" + +BORDER_CONSTANT: int +BORDER_REPLICATE: int +BORDER_REFLECT: int +BORDER_WRAP: int +BORDER_REFLECT_101: int +BORDER_TRANSPARENT: int +BORDER_REFLECT101: int +BORDER_DEFAULT: int +BORDER_ISOLATED: int +BorderTypes = int +"""One of [BORDER_CONSTANT, BORDER_REPLICATE, BORDER_REFLECT, BORDER_WRAP, BORDER_REFLECT_101, BORDER_TRANSPARENT, BORDER_REFLECT101, BORDER_DEFAULT, BORDER_ISOLATED]""" + +ACCESS_READ: int +ACCESS_WRITE: int +ACCESS_RW: int +ACCESS_MASK: int +ACCESS_FAST: int +AccessFlag = int +"""One of [ACCESS_READ, ACCESS_WRITE, ACCESS_RW, ACCESS_MASK, ACCESS_FAST]""" + +DATA_LAYOUT_UNKNOWN: int +DATA_LAYOUT_ND: int +DATA_LAYOUT_NCHW: int +DATA_LAYOUT_NCDHW: int +DATA_LAYOUT_NHWC: int +DATA_LAYOUT_NDHWC: int +DATA_LAYOUT_PLANAR: int +DATA_LAYOUT_BLOCK: int +DNN_LAYOUT_UNKNOWN: int +DNN_LAYOUT_ND: int +DNN_LAYOUT_NCHW: int +DNN_LAYOUT_NCDHW: int +DNN_LAYOUT_NHWC: int +DNN_LAYOUT_NDHWC: int +DNN_LAYOUT_PLANAR: int +DNN_LAYOUT_BLOCK: int +DataLayout = int +"""One of [DATA_LAYOUT_UNKNOWN, DATA_LAYOUT_ND, DATA_LAYOUT_NCHW, DATA_LAYOUT_NCDHW, DATA_LAYOUT_NHWC, DATA_LAYOUT_NDHWC, DATA_LAYOUT_PLANAR, DATA_LAYOUT_BLOCK, DNN_LAYOUT_UNKNOWN, DNN_LAYOUT_ND, DNN_LAYOUT_NCHW, DNN_LAYOUT_NCDHW, DNN_LAYOUT_NHWC, DNN_LAYOUT_NDHWC, DNN_LAYOUT_PLANAR, DNN_LAYOUT_BLOCK]""" + +USAGE_DEFAULT: int +USAGE_ALLOCATE_HOST_MEMORY: int +USAGE_ALLOCATE_DEVICE_MEMORY: int +USAGE_ALLOCATE_SHARED_MEMORY: int +__UMAT_USAGE_FLAGS_32BIT: int +UMatUsageFlags = int +"""One of [USAGE_DEFAULT, USAGE_ALLOCATE_HOST_MEMORY, USAGE_ALLOCATE_DEVICE_MEMORY, USAGE_ALLOCATE_SHARED_MEMORY, __UMAT_USAGE_FLAGS_32BIT]""" + +SOLVELP_LOST: int +SOLVELP_UNBOUNDED: int +SOLVELP_UNFEASIBLE: int +SOLVELP_SINGLE: int +SOLVELP_MULTI: int +SolveLPResult = int +"""One of [SOLVELP_LOST, SOLVELP_UNBOUNDED, SOLVELP_UNFEASIBLE, SOLVELP_SINGLE, SOLVELP_MULTI]""" + +QUAT_ASSUME_NOT_UNIT: int +QUAT_ASSUME_UNIT: int +QuatAssumeType = int +"""One of [QUAT_ASSUME_NOT_UNIT, QUAT_ASSUME_UNIT]""" + +ALGO_HINT_DEFAULT: int +ALGO_HINT_ACCURATE: int +ALGO_HINT_APPROX: int +AlgorithmHint = int +"""One of [ALGO_HINT_DEFAULT, ALGO_HINT_ACCURATE, ALGO_HINT_APPROX]""" + +INTERSECT_NONE: int +INTERSECT_PARTIAL: int +INTERSECT_FULL: int +RectanglesIntersectTypes = int +"""One of [INTERSECT_NONE, INTERSECT_PARTIAL, INTERSECT_FULL]""" + +DIST_USER: int +DIST_L1: int +DIST_L2: int +DIST_C: int +DIST_L12: int +DIST_FAIR: int +DIST_WELSCH: int +DIST_HUBER: int +DistanceTypes = int +"""One of [DIST_USER, DIST_L1, DIST_L2, DIST_C, DIST_L12, DIST_FAIR, DIST_WELSCH, DIST_HUBER]""" + +LMEDS: int +RANSAC: int +RHO: int +USAC_DEFAULT: int +USAC_PARALLEL: int +USAC_FM_8PTS: int +USAC_FAST: int +USAC_ACCURATE: int +USAC_PROSAC: int +USAC_MAGSAC: int +FM_7POINT: int +FM_8POINT: int +FM_LMEDS: int +FM_RANSAC: int +INPAINT_NS: int +INPAINT_TELEA: int +LDR_SIZE: int +RECURS_FILTER: int +NORMCONV_FILTER: int +STEREO_ZERO_DISPARITY: int +CALIB_CB_ADAPTIVE_THRESH: int +CALIB_CB_NORMALIZE_IMAGE: int +CALIB_CB_FILTER_QUADS: int +CALIB_CB_FAST_CHECK: int +CALIB_CB_EXHAUSTIVE: int +CALIB_CB_ACCURACY: int +CALIB_CB_LARGER: int +CALIB_CB_MARKER: int +CALIB_CB_PLAIN: int +CALIB_CB_SYMMETRIC_GRID: int +CALIB_CB_ASYMMETRIC_GRID: int +CALIB_CB_CLUSTERING: int +OPTFLOW_USE_INITIAL_FLOW: int +OPTFLOW_LK_GET_MIN_EIGENVALS: int +OPTFLOW_FARNEBACK_GAUSSIAN: int +MOTION_TRANSLATION: int +MOTION_EUCLIDEAN: int +MOTION_AFFINE: int +MOTION_HOMOGRAPHY: int +CAP_PROP_DC1394_OFF: int +CAP_PROP_DC1394_MODE_MANUAL: int +CAP_PROP_DC1394_MODE_AUTO: int +CAP_PROP_DC1394_MODE_ONE_PUSH_AUTO: int +CAP_PROP_DC1394_MAX: int +CAP_OPENNI_DEPTH_GENERATOR: int +CAP_OPENNI_IMAGE_GENERATOR: int +CAP_OPENNI_IR_GENERATOR: int +CAP_OPENNI_GENERATORS_MASK: int +CAP_PROP_OPENNI_OUTPUT_MODE: int +CAP_PROP_OPENNI_FRAME_MAX_DEPTH: int +CAP_PROP_OPENNI_BASELINE: int +CAP_PROP_OPENNI_FOCAL_LENGTH: int +CAP_PROP_OPENNI_REGISTRATION: int +CAP_PROP_OPENNI_REGISTRATION_ON: int +CAP_PROP_OPENNI_APPROX_FRAME_SYNC: int +CAP_PROP_OPENNI_MAX_BUFFER_SIZE: int +CAP_PROP_OPENNI_CIRCLE_BUFFER: int +CAP_PROP_OPENNI_MAX_TIME_DURATION: int +CAP_PROP_OPENNI_GENERATOR_PRESENT: int +CAP_PROP_OPENNI2_SYNC: int +CAP_PROP_OPENNI2_MIRROR: int +CAP_OPENNI_IMAGE_GENERATOR_PRESENT: int +CAP_OPENNI_IMAGE_GENERATOR_OUTPUT_MODE: int +CAP_OPENNI_DEPTH_GENERATOR_PRESENT: int +CAP_OPENNI_DEPTH_GENERATOR_BASELINE: int +CAP_OPENNI_DEPTH_GENERATOR_FOCAL_LENGTH: int +CAP_OPENNI_DEPTH_GENERATOR_REGISTRATION: int +CAP_OPENNI_DEPTH_GENERATOR_REGISTRATION_ON: int +CAP_OPENNI_IR_GENERATOR_PRESENT: int +CAP_OPENNI_DEPTH_MAP: int +CAP_OPENNI_POINT_CLOUD_MAP: int +CAP_OPENNI_DISPARITY_MAP: int +CAP_OPENNI_DISPARITY_MAP_32F: int +CAP_OPENNI_VALID_DEPTH_MASK: int +CAP_OPENNI_BGR_IMAGE: int +CAP_OPENNI_GRAY_IMAGE: int +CAP_OPENNI_IR_IMAGE: int +CAP_OPENNI_VGA_30HZ: int +CAP_OPENNI_SXGA_15HZ: int +CAP_OPENNI_SXGA_30HZ: int +CAP_OPENNI_QVGA_30HZ: int +CAP_OPENNI_QVGA_60HZ: int +CAP_PROP_GSTREAMER_QUEUE_LENGTH: int +CAP_PROP_PVAPI_MULTICASTIP: int +CAP_PROP_PVAPI_FRAMESTARTTRIGGERMODE: int +CAP_PROP_PVAPI_DECIMATIONHORIZONTAL: int +CAP_PROP_PVAPI_DECIMATIONVERTICAL: int +CAP_PROP_PVAPI_BINNINGX: int +CAP_PROP_PVAPI_BINNINGY: int +CAP_PROP_PVAPI_PIXELFORMAT: int +CAP_PVAPI_FSTRIGMODE_FREERUN: int +CAP_PVAPI_FSTRIGMODE_SYNCIN1: int +CAP_PVAPI_FSTRIGMODE_SYNCIN2: int +CAP_PVAPI_FSTRIGMODE_FIXEDRATE: int +CAP_PVAPI_FSTRIGMODE_SOFTWARE: int +CAP_PVAPI_DECIMATION_OFF: int +CAP_PVAPI_DECIMATION_2OUTOF4: int +CAP_PVAPI_DECIMATION_2OUTOF8: int +CAP_PVAPI_DECIMATION_2OUTOF16: int +CAP_PVAPI_PIXELFORMAT_MONO8: int +CAP_PVAPI_PIXELFORMAT_MONO16: int +CAP_PVAPI_PIXELFORMAT_BAYER8: int +CAP_PVAPI_PIXELFORMAT_BAYER16: int +CAP_PVAPI_PIXELFORMAT_RGB24: int +CAP_PVAPI_PIXELFORMAT_BGR24: int +CAP_PVAPI_PIXELFORMAT_RGBA32: int +CAP_PVAPI_PIXELFORMAT_BGRA32: int +CAP_PROP_XI_DOWNSAMPLING: int +CAP_PROP_XI_DATA_FORMAT: int +CAP_PROP_XI_OFFSET_X: int +CAP_PROP_XI_OFFSET_Y: int +CAP_PROP_XI_TRG_SOURCE: int +CAP_PROP_XI_TRG_SOFTWARE: int +CAP_PROP_XI_GPI_SELECTOR: int +CAP_PROP_XI_GPI_MODE: int +CAP_PROP_XI_GPI_LEVEL: int +CAP_PROP_XI_GPO_SELECTOR: int +CAP_PROP_XI_GPO_MODE: int +CAP_PROP_XI_LED_SELECTOR: int +CAP_PROP_XI_LED_MODE: int +CAP_PROP_XI_MANUAL_WB: int +CAP_PROP_XI_AUTO_WB: int +CAP_PROP_XI_AEAG: int +CAP_PROP_XI_EXP_PRIORITY: int +CAP_PROP_XI_AE_MAX_LIMIT: int +CAP_PROP_XI_AG_MAX_LIMIT: int +CAP_PROP_XI_AEAG_LEVEL: int +CAP_PROP_XI_TIMEOUT: int +CAP_PROP_XI_EXPOSURE: int +CAP_PROP_XI_EXPOSURE_BURST_COUNT: int +CAP_PROP_XI_GAIN_SELECTOR: int +CAP_PROP_XI_GAIN: int +CAP_PROP_XI_DOWNSAMPLING_TYPE: int +CAP_PROP_XI_BINNING_SELECTOR: int +CAP_PROP_XI_BINNING_VERTICAL: int +CAP_PROP_XI_BINNING_HORIZONTAL: int +CAP_PROP_XI_BINNING_PATTERN: int +CAP_PROP_XI_DECIMATION_SELECTOR: int +CAP_PROP_XI_DECIMATION_VERTICAL: int +CAP_PROP_XI_DECIMATION_HORIZONTAL: int +CAP_PROP_XI_DECIMATION_PATTERN: int +CAP_PROP_XI_TEST_PATTERN_GENERATOR_SELECTOR: int +CAP_PROP_XI_TEST_PATTERN: int +CAP_PROP_XI_IMAGE_DATA_FORMAT: int +CAP_PROP_XI_SHUTTER_TYPE: int +CAP_PROP_XI_SENSOR_TAPS: int +CAP_PROP_XI_AEAG_ROI_OFFSET_X: int +CAP_PROP_XI_AEAG_ROI_OFFSET_Y: int +CAP_PROP_XI_AEAG_ROI_WIDTH: int +CAP_PROP_XI_AEAG_ROI_HEIGHT: int +CAP_PROP_XI_BPC: int +CAP_PROP_XI_WB_KR: int +CAP_PROP_XI_WB_KG: int +CAP_PROP_XI_WB_KB: int +CAP_PROP_XI_WIDTH: int +CAP_PROP_XI_HEIGHT: int +CAP_PROP_XI_REGION_SELECTOR: int +CAP_PROP_XI_REGION_MODE: int +CAP_PROP_XI_LIMIT_BANDWIDTH: int +CAP_PROP_XI_SENSOR_DATA_BIT_DEPTH: int +CAP_PROP_XI_OUTPUT_DATA_BIT_DEPTH: int +CAP_PROP_XI_IMAGE_DATA_BIT_DEPTH: int +CAP_PROP_XI_OUTPUT_DATA_PACKING: int +CAP_PROP_XI_OUTPUT_DATA_PACKING_TYPE: int +CAP_PROP_XI_IS_COOLED: int +CAP_PROP_XI_COOLING: int +CAP_PROP_XI_TARGET_TEMP: int +CAP_PROP_XI_CHIP_TEMP: int +CAP_PROP_XI_HOUS_TEMP: int +CAP_PROP_XI_HOUS_BACK_SIDE_TEMP: int +CAP_PROP_XI_SENSOR_BOARD_TEMP: int +CAP_PROP_XI_CMS: int +CAP_PROP_XI_APPLY_CMS: int +CAP_PROP_XI_IMAGE_IS_COLOR: int +CAP_PROP_XI_COLOR_FILTER_ARRAY: int +CAP_PROP_XI_GAMMAY: int +CAP_PROP_XI_GAMMAC: int +CAP_PROP_XI_SHARPNESS: int +CAP_PROP_XI_CC_MATRIX_00: int +CAP_PROP_XI_CC_MATRIX_01: int +CAP_PROP_XI_CC_MATRIX_02: int +CAP_PROP_XI_CC_MATRIX_03: int +CAP_PROP_XI_CC_MATRIX_10: int +CAP_PROP_XI_CC_MATRIX_11: int +CAP_PROP_XI_CC_MATRIX_12: int +CAP_PROP_XI_CC_MATRIX_13: int +CAP_PROP_XI_CC_MATRIX_20: int +CAP_PROP_XI_CC_MATRIX_21: int +CAP_PROP_XI_CC_MATRIX_22: int +CAP_PROP_XI_CC_MATRIX_23: int +CAP_PROP_XI_CC_MATRIX_30: int +CAP_PROP_XI_CC_MATRIX_31: int +CAP_PROP_XI_CC_MATRIX_32: int +CAP_PROP_XI_CC_MATRIX_33: int +CAP_PROP_XI_DEFAULT_CC_MATRIX: int +CAP_PROP_XI_TRG_SELECTOR: int +CAP_PROP_XI_ACQ_FRAME_BURST_COUNT: int +CAP_PROP_XI_DEBOUNCE_EN: int +CAP_PROP_XI_DEBOUNCE_T0: int +CAP_PROP_XI_DEBOUNCE_T1: int +CAP_PROP_XI_DEBOUNCE_POL: int +CAP_PROP_XI_LENS_MODE: int +CAP_PROP_XI_LENS_APERTURE_VALUE: int +CAP_PROP_XI_LENS_FOCUS_MOVEMENT_VALUE: int +CAP_PROP_XI_LENS_FOCUS_MOVE: int +CAP_PROP_XI_LENS_FOCUS_DISTANCE: int +CAP_PROP_XI_LENS_FOCAL_LENGTH: int +CAP_PROP_XI_LENS_FEATURE_SELECTOR: int +CAP_PROP_XI_LENS_FEATURE: int +CAP_PROP_XI_DEVICE_MODEL_ID: int +CAP_PROP_XI_DEVICE_SN: int +CAP_PROP_XI_IMAGE_DATA_FORMAT_RGB32_ALPHA: int +CAP_PROP_XI_IMAGE_PAYLOAD_SIZE: int +CAP_PROP_XI_TRANSPORT_PIXEL_FORMAT: int +CAP_PROP_XI_SENSOR_CLOCK_FREQ_HZ: int +CAP_PROP_XI_SENSOR_CLOCK_FREQ_INDEX: int +CAP_PROP_XI_SENSOR_OUTPUT_CHANNEL_COUNT: int +CAP_PROP_XI_FRAMERATE: int +CAP_PROP_XI_COUNTER_SELECTOR: int +CAP_PROP_XI_COUNTER_VALUE: int +CAP_PROP_XI_ACQ_TIMING_MODE: int +CAP_PROP_XI_AVAILABLE_BANDWIDTH: int +CAP_PROP_XI_BUFFER_POLICY: int +CAP_PROP_XI_LUT_EN: int +CAP_PROP_XI_LUT_INDEX: int +CAP_PROP_XI_LUT_VALUE: int +CAP_PROP_XI_TRG_DELAY: int +CAP_PROP_XI_TS_RST_MODE: int +CAP_PROP_XI_TS_RST_SOURCE: int +CAP_PROP_XI_IS_DEVICE_EXIST: int +CAP_PROP_XI_ACQ_BUFFER_SIZE: int +CAP_PROP_XI_ACQ_BUFFER_SIZE_UNIT: int +CAP_PROP_XI_ACQ_TRANSPORT_BUFFER_SIZE: int +CAP_PROP_XI_BUFFERS_QUEUE_SIZE: int +CAP_PROP_XI_ACQ_TRANSPORT_BUFFER_COMMIT: int +CAP_PROP_XI_RECENT_FRAME: int +CAP_PROP_XI_DEVICE_RESET: int +CAP_PROP_XI_COLUMN_FPN_CORRECTION: int +CAP_PROP_XI_ROW_FPN_CORRECTION: int +CAP_PROP_XI_SENSOR_MODE: int +CAP_PROP_XI_HDR: int +CAP_PROP_XI_HDR_KNEEPOINT_COUNT: int +CAP_PROP_XI_HDR_T1: int +CAP_PROP_XI_HDR_T2: int +CAP_PROP_XI_KNEEPOINT1: int +CAP_PROP_XI_KNEEPOINT2: int +CAP_PROP_XI_IMAGE_BLACK_LEVEL: int +CAP_PROP_XI_HW_REVISION: int +CAP_PROP_XI_DEBUG_LEVEL: int +CAP_PROP_XI_AUTO_BANDWIDTH_CALCULATION: int +CAP_PROP_XI_FFS_FILE_ID: int +CAP_PROP_XI_FFS_FILE_SIZE: int +CAP_PROP_XI_FREE_FFS_SIZE: int +CAP_PROP_XI_USED_FFS_SIZE: int +CAP_PROP_XI_FFS_ACCESS_KEY: int +CAP_PROP_XI_SENSOR_FEATURE_SELECTOR: int +CAP_PROP_XI_SENSOR_FEATURE_VALUE: int +CAP_PROP_ARAVIS_AUTOTRIGGER: int +CAP_PROP_ANDROID_DEVICE_TORCH: int +CAP_PROP_IOS_DEVICE_FOCUS: int +CAP_PROP_IOS_DEVICE_EXPOSURE: int +CAP_PROP_IOS_DEVICE_FLASH: int +CAP_PROP_IOS_DEVICE_WHITEBALANCE: int +CAP_PROP_IOS_DEVICE_TORCH: int +CAP_PROP_GIGA_FRAME_OFFSET_X: int +CAP_PROP_GIGA_FRAME_OFFSET_Y: int +CAP_PROP_GIGA_FRAME_WIDTH_MAX: int +CAP_PROP_GIGA_FRAME_HEIGHT_MAX: int +CAP_PROP_GIGA_FRAME_SENS_WIDTH: int +CAP_PROP_GIGA_FRAME_SENS_HEIGHT: int +CAP_PROP_INTELPERC_PROFILE_COUNT: int +CAP_PROP_INTELPERC_PROFILE_IDX: int +CAP_PROP_INTELPERC_DEPTH_LOW_CONFIDENCE_VALUE: int +CAP_PROP_INTELPERC_DEPTH_SATURATION_VALUE: int +CAP_PROP_INTELPERC_DEPTH_CONFIDENCE_THRESHOLD: int +CAP_PROP_INTELPERC_DEPTH_FOCAL_LENGTH_HORZ: int +CAP_PROP_INTELPERC_DEPTH_FOCAL_LENGTH_VERT: int +CAP_INTELPERC_DEPTH_GENERATOR: int +CAP_INTELPERC_IMAGE_GENERATOR: int +CAP_INTELPERC_IR_GENERATOR: int +CAP_INTELPERC_GENERATORS_MASK: int +CAP_INTELPERC_DEPTH_MAP: int +CAP_INTELPERC_UVDEPTH_MAP: int +CAP_INTELPERC_IR_MAP: int +CAP_INTELPERC_IMAGE: int +CAP_PROP_GPHOTO2_PREVIEW: int +CAP_PROP_GPHOTO2_WIDGET_ENUMERATE: int +CAP_PROP_GPHOTO2_RELOAD_CONFIG: int +CAP_PROP_GPHOTO2_RELOAD_ON_CHANGE: int +CAP_PROP_GPHOTO2_COLLECT_MSGS: int +CAP_PROP_GPHOTO2_FLUSH_MSGS: int +CAP_PROP_SPEED: int +CAP_PROP_APERTURE: int +CAP_PROP_EXPOSUREPROGRAM: int +CAP_PROP_VIEWFINDER: int +CAP_PROP_IMAGES_BASE: int +CAP_PROP_IMAGES_LAST: int +CALIB_USE_INTRINSIC_GUESS: int +CALIB_FIX_ASPECT_RATIO: int +CALIB_FIX_PRINCIPAL_POINT: int +CALIB_ZERO_TANGENT_DIST: int +CALIB_FIX_FOCAL_LENGTH: int +CALIB_FIX_K1: int +CALIB_FIX_K2: int +CALIB_FIX_K3: int +CALIB_FIX_K4: int +CALIB_FIX_K5: int +CALIB_FIX_K6: int +CALIB_RATIONAL_MODEL: int +CALIB_THIN_PRISM_MODEL: int +CALIB_FIX_S1_S2_S3_S4: int +CALIB_TILTED_MODEL: int +CALIB_FIX_TAUX_TAUY: int +CALIB_USE_QR: int +CALIB_FIX_TANGENT_DIST: int +CALIB_FIX_INTRINSIC: int +CALIB_SAME_FOCAL_LENGTH: int +CALIB_ZERO_DISPARITY: int +CALIB_USE_LU: int +CALIB_DISABLE_SCHUR_COMPLEMENT: int +CALIB_USE_EXTRINSIC_GUESS: int +CALIB_RECOMPUTE_EXTRINSIC: int +CALIB_CHECK_COND: int +CALIB_FIX_SKEW: int +CALIB_STEREO_REGISTRATION: int + +SOLVEPNP_ITERATIVE: int +SOLVEPNP_EPNP: int +SOLVEPNP_P3P: int +SOLVEPNP_AP3P: int +SOLVEPNP_IPPE: int +SOLVEPNP_IPPE_SQUARE: int +SOLVEPNP_SQPNP: int +SOLVEPNP_MAX_COUNT: int +SolvePnPMethod = int +"""One of [SOLVEPNP_ITERATIVE, SOLVEPNP_EPNP, SOLVEPNP_P3P, SOLVEPNP_AP3P, SOLVEPNP_IPPE, SOLVEPNP_IPPE_SQUARE, SOLVEPNP_SQPNP, SOLVEPNP_MAX_COUNT]""" + +SAMPLING_UNIFORM: int +SAMPLING_PROGRESSIVE_NAPSAC: int +SAMPLING_NAPSAC: int +SAMPLING_PROSAC: int +SamplingMethod = int +"""One of [SAMPLING_UNIFORM, SAMPLING_PROGRESSIVE_NAPSAC, SAMPLING_NAPSAC, SAMPLING_PROSAC]""" + +LOCAL_OPTIM_NULL: int +LOCAL_OPTIM_INNER_LO: int +LOCAL_OPTIM_INNER_AND_ITER_LO: int +LOCAL_OPTIM_GC: int +LOCAL_OPTIM_SIGMA: int +LocalOptimMethod = int +"""One of [LOCAL_OPTIM_NULL, LOCAL_OPTIM_INNER_LO, LOCAL_OPTIM_INNER_AND_ITER_LO, LOCAL_OPTIM_GC, LOCAL_OPTIM_SIGMA]""" + +SCORE_METHOD_RANSAC: int +SCORE_METHOD_MSAC: int +SCORE_METHOD_MAGSAC: int +SCORE_METHOD_LMEDS: int +ScoreMethod = int +"""One of [SCORE_METHOD_RANSAC, SCORE_METHOD_MSAC, SCORE_METHOD_MAGSAC, SCORE_METHOD_LMEDS]""" + +NEIGH_FLANN_KNN: int +NEIGH_GRID: int +NEIGH_FLANN_RADIUS: int +NeighborSearchMethod = int +"""One of [NEIGH_FLANN_KNN, NEIGH_GRID, NEIGH_FLANN_RADIUS]""" + +NONE_POLISHER: int +LSQ_POLISHER: int +MAGSAC: int +COV_POLISHER: int +PolishingMethod = int +"""One of [NONE_POLISHER, LSQ_POLISHER, MAGSAC, COV_POLISHER]""" + +MatrixType_AUTO: int +MATRIX_TYPE_AUTO: int +MatrixType_DENSE: int +MATRIX_TYPE_DENSE: int +MatrixType_SPARSE: int +MATRIX_TYPE_SPARSE: int +MatrixType = int +"""One of [MatrixType_AUTO, MATRIX_TYPE_AUTO, MatrixType_DENSE, MATRIX_TYPE_DENSE, MatrixType_SPARSE, MATRIX_TYPE_SPARSE]""" + +VariableType_LINEAR: int +VARIABLE_TYPE_LINEAR: int +VariableType_SO3: int +VARIABLE_TYPE_SO3: int +VariableType_SE3: int +VARIABLE_TYPE_SE3: int +VariableType = int +"""One of [VariableType_LINEAR, VARIABLE_TYPE_LINEAR, VariableType_SO3, VARIABLE_TYPE_SO3, VariableType_SE3, VARIABLE_TYPE_SE3]""" + +MST_PRIM: int +MST_KRUSKAL: int +MSTAlgorithm = int +"""One of [MST_PRIM, MST_KRUSKAL]""" + +SAC_METHOD_RANSAC: int +SacMethod = int +"""One of [SAC_METHOD_RANSAC]""" + +SAC_MODEL_PLANE: int +SAC_MODEL_SPHERE: int +SacModelType = int +"""One of [SAC_MODEL_PLANE, SAC_MODEL_SPHERE]""" + +FILTER_SCHARR: int +SpecialFilter = int +"""One of [FILTER_SCHARR]""" + +MORPH_ERODE: int +MORPH_DILATE: int +MORPH_OPEN: int +MORPH_CLOSE: int +MORPH_GRADIENT: int +MORPH_TOPHAT: int +MORPH_BLACKHAT: int +MORPH_HITMISS: int +MorphTypes = int +"""One of [MORPH_ERODE, MORPH_DILATE, MORPH_OPEN, MORPH_CLOSE, MORPH_GRADIENT, MORPH_TOPHAT, MORPH_BLACKHAT, MORPH_HITMISS]""" + +MORPH_RECT: int +MORPH_CROSS: int +MORPH_ELLIPSE: int +MORPH_DIAMOND: int +MorphShapes = int +"""One of [MORPH_RECT, MORPH_CROSS, MORPH_ELLIPSE, MORPH_DIAMOND]""" + +INTER_NEAREST: int +INTER_LINEAR: int +INTER_CUBIC: int +INTER_AREA: int +INTER_LANCZOS4: int +INTER_LINEAR_EXACT: int +INTER_NEAREST_EXACT: int +INTER_MAX: int +WARP_FILL_OUTLIERS: int +WARP_INVERSE_MAP: int +WARP_RELATIVE_MAP: int +InterpolationFlags = int +"""One of [INTER_NEAREST, INTER_LINEAR, INTER_CUBIC, INTER_AREA, INTER_LANCZOS4, INTER_LINEAR_EXACT, INTER_NEAREST_EXACT, INTER_MAX, WARP_FILL_OUTLIERS, WARP_INVERSE_MAP, WARP_RELATIVE_MAP]""" + +WARP_POLAR_LINEAR: int +WARP_POLAR_LOG: int +WarpPolarMode = int +"""One of [WARP_POLAR_LINEAR, WARP_POLAR_LOG]""" + +INTER_BITS: int +INTER_BITS2: int +INTER_TAB_SIZE: int +INTER_TAB_SIZE2: int +InterpolationMasks = int +"""One of [INTER_BITS, INTER_BITS2, INTER_TAB_SIZE, INTER_TAB_SIZE2]""" + +DIST_MASK_3: int +DIST_MASK_5: int +DIST_MASK_PRECISE: int +DistanceTransformMasks = int +"""One of [DIST_MASK_3, DIST_MASK_5, DIST_MASK_PRECISE]""" + +THRESH_BINARY: int +THRESH_BINARY_INV: int +THRESH_TRUNC: int +THRESH_TOZERO: int +THRESH_TOZERO_INV: int +THRESH_MASK: int +THRESH_OTSU: int +THRESH_TRIANGLE: int +THRESH_DRYRUN: int +ThresholdTypes = int +"""One of [THRESH_BINARY, THRESH_BINARY_INV, THRESH_TRUNC, THRESH_TOZERO, THRESH_TOZERO_INV, THRESH_MASK, THRESH_OTSU, THRESH_TRIANGLE, THRESH_DRYRUN]""" + +ADAPTIVE_THRESH_MEAN_C: int +ADAPTIVE_THRESH_GAUSSIAN_C: int +AdaptiveThresholdTypes = int +"""One of [ADAPTIVE_THRESH_MEAN_C, ADAPTIVE_THRESH_GAUSSIAN_C]""" + +GC_BGD: int +GC_FGD: int +GC_PR_BGD: int +GC_PR_FGD: int +GrabCutClasses = int +"""One of [GC_BGD, GC_FGD, GC_PR_BGD, GC_PR_FGD]""" + +GC_INIT_WITH_RECT: int +GC_INIT_WITH_MASK: int +GC_EVAL: int +GC_EVAL_FREEZE_MODEL: int +GrabCutModes = int +"""One of [GC_INIT_WITH_RECT, GC_INIT_WITH_MASK, GC_EVAL, GC_EVAL_FREEZE_MODEL]""" + +DIST_LABEL_CCOMP: int +DIST_LABEL_PIXEL: int +DistanceTransformLabelTypes = int +"""One of [DIST_LABEL_CCOMP, DIST_LABEL_PIXEL]""" + +FLOODFILL_FIXED_RANGE: int +FLOODFILL_MASK_ONLY: int +FloodFillFlags = int +"""One of [FLOODFILL_FIXED_RANGE, FLOODFILL_MASK_ONLY]""" + +CC_STAT_LEFT: int +CC_STAT_TOP: int +CC_STAT_WIDTH: int +CC_STAT_HEIGHT: int +CC_STAT_AREA: int +CC_STAT_MAX: int +ConnectedComponentsTypes = int +"""One of [CC_STAT_LEFT, CC_STAT_TOP, CC_STAT_WIDTH, CC_STAT_HEIGHT, CC_STAT_AREA, CC_STAT_MAX]""" + +CCL_DEFAULT: int +CCL_WU: int +CCL_GRANA: int +CCL_BOLELLI: int +CCL_SAUF: int +CCL_BBDT: int +CCL_SPAGHETTI: int +ConnectedComponentsAlgorithmsTypes = int +"""One of [CCL_DEFAULT, CCL_WU, CCL_GRANA, CCL_BOLELLI, CCL_SAUF, CCL_BBDT, CCL_SPAGHETTI]""" + +RETR_EXTERNAL: int +RETR_LIST: int +RETR_CCOMP: int +RETR_TREE: int +RETR_FLOODFILL: int +RetrievalModes = int +"""One of [RETR_EXTERNAL, RETR_LIST, RETR_CCOMP, RETR_TREE, RETR_FLOODFILL]""" + +CHAIN_CODE: int +CHAIN_APPROX_NONE: int +CHAIN_APPROX_SIMPLE: int +CHAIN_APPROX_TC89_L1: int +CHAIN_APPROX_TC89_KCOS: int +LINK_RUNS: int +ContourApproximationModes = int +"""One of [CHAIN_CODE, CHAIN_APPROX_NONE, CHAIN_APPROX_SIMPLE, CHAIN_APPROX_TC89_L1, CHAIN_APPROX_TC89_KCOS, LINK_RUNS]""" + +CONTOURS_MATCH_I1: int +CONTOURS_MATCH_I2: int +CONTOURS_MATCH_I3: int +ShapeMatchModes = int +"""One of [CONTOURS_MATCH_I1, CONTOURS_MATCH_I2, CONTOURS_MATCH_I3]""" + +HOUGH_STANDARD: int +HOUGH_PROBABILISTIC: int +HOUGH_MULTI_SCALE: int +HOUGH_GRADIENT: int +HOUGH_GRADIENT_ALT: int +HoughModes = int +"""One of [HOUGH_STANDARD, HOUGH_PROBABILISTIC, HOUGH_MULTI_SCALE, HOUGH_GRADIENT, HOUGH_GRADIENT_ALT]""" + +HISTCMP_CORREL: int +HISTCMP_CHISQR: int +HISTCMP_INTERSECT: int +HISTCMP_BHATTACHARYYA: int +HISTCMP_HELLINGER: int +HISTCMP_CHISQR_ALT: int +HISTCMP_KL_DIV: int +HistCompMethods = int +"""One of [HISTCMP_CORREL, HISTCMP_CHISQR, HISTCMP_INTERSECT, HISTCMP_BHATTACHARYYA, HISTCMP_HELLINGER, HISTCMP_CHISQR_ALT, HISTCMP_KL_DIV]""" + +LSD_REFINE_NONE: int +LSD_REFINE_STD: int +LSD_REFINE_ADV: int +LineSegmentDetectorModes = int +"""One of [LSD_REFINE_NONE, LSD_REFINE_STD, LSD_REFINE_ADV]""" + +COLOR_BGR2BGRA: int +COLOR_RGB2RGBA: int +COLOR_BGRA2BGR: int +COLOR_RGBA2RGB: int +COLOR_BGR2RGBA: int +COLOR_RGB2BGRA: int +COLOR_RGBA2BGR: int +COLOR_BGRA2RGB: int +COLOR_BGR2RGB: int +COLOR_RGB2BGR: int +COLOR_BGRA2RGBA: int +COLOR_RGBA2BGRA: int +COLOR_BGR2GRAY: int +COLOR_RGB2GRAY: int +COLOR_GRAY2BGR: int +COLOR_GRAY2RGB: int +COLOR_GRAY2BGRA: int +COLOR_GRAY2RGBA: int +COLOR_BGRA2GRAY: int +COLOR_RGBA2GRAY: int +COLOR_BGR2BGR565: int +COLOR_RGB2BGR565: int +COLOR_BGR5652BGR: int +COLOR_BGR5652RGB: int +COLOR_BGRA2BGR565: int +COLOR_RGBA2BGR565: int +COLOR_BGR5652BGRA: int +COLOR_BGR5652RGBA: int +COLOR_GRAY2BGR565: int +COLOR_BGR5652GRAY: int +COLOR_BGR2BGR555: int +COLOR_RGB2BGR555: int +COLOR_BGR5552BGR: int +COLOR_BGR5552RGB: int +COLOR_BGRA2BGR555: int +COLOR_RGBA2BGR555: int +COLOR_BGR5552BGRA: int +COLOR_BGR5552RGBA: int +COLOR_GRAY2BGR555: int +COLOR_BGR5552GRAY: int +COLOR_BGR2XYZ: int +COLOR_RGB2XYZ: int +COLOR_XYZ2BGR: int +COLOR_XYZ2RGB: int +COLOR_BGR2YCrCb: int +COLOR_BGR2YCR_CB: int +COLOR_RGB2YCrCb: int +COLOR_RGB2YCR_CB: int +COLOR_YCrCb2BGR: int +COLOR_YCR_CB2BGR: int +COLOR_YCrCb2RGB: int +COLOR_YCR_CB2RGB: int +COLOR_BGR2HSV: int +COLOR_RGB2HSV: int +COLOR_BGR2Lab: int +COLOR_BGR2LAB: int +COLOR_RGB2Lab: int +COLOR_RGB2LAB: int +COLOR_BGR2Luv: int +COLOR_BGR2LUV: int +COLOR_RGB2Luv: int +COLOR_RGB2LUV: int +COLOR_BGR2HLS: int +COLOR_RGB2HLS: int +COLOR_HSV2BGR: int +COLOR_HSV2RGB: int +COLOR_Lab2BGR: int +COLOR_LAB2BGR: int +COLOR_Lab2RGB: int +COLOR_LAB2RGB: int +COLOR_Luv2BGR: int +COLOR_LUV2BGR: int +COLOR_Luv2RGB: int +COLOR_LUV2RGB: int +COLOR_HLS2BGR: int +COLOR_HLS2RGB: int +COLOR_BGR2HSV_FULL: int +COLOR_RGB2HSV_FULL: int +COLOR_BGR2HLS_FULL: int +COLOR_RGB2HLS_FULL: int +COLOR_HSV2BGR_FULL: int +COLOR_HSV2RGB_FULL: int +COLOR_HLS2BGR_FULL: int +COLOR_HLS2RGB_FULL: int +COLOR_LBGR2Lab: int +COLOR_LBGR2LAB: int +COLOR_LRGB2Lab: int +COLOR_LRGB2LAB: int +COLOR_LBGR2Luv: int +COLOR_LBGR2LUV: int +COLOR_LRGB2Luv: int +COLOR_LRGB2LUV: int +COLOR_Lab2LBGR: int +COLOR_LAB2LBGR: int +COLOR_Lab2LRGB: int +COLOR_LAB2LRGB: int +COLOR_Luv2LBGR: int +COLOR_LUV2LBGR: int +COLOR_Luv2LRGB: int +COLOR_LUV2LRGB: int +COLOR_BGR2YUV: int +COLOR_RGB2YUV: int +COLOR_YUV2BGR: int +COLOR_YUV2RGB: int +COLOR_YUV2RGB_NV12: int +COLOR_YUV2BGR_NV12: int +COLOR_YUV2RGB_NV21: int +COLOR_YUV2BGR_NV21: int +COLOR_YUV420sp2RGB: int +COLOR_YUV420SP2RGB: int +COLOR_YUV420sp2BGR: int +COLOR_YUV420SP2BGR: int +COLOR_YUV2RGBA_NV12: int +COLOR_YUV2BGRA_NV12: int +COLOR_YUV2RGBA_NV21: int +COLOR_YUV2BGRA_NV21: int +COLOR_YUV420sp2RGBA: int +COLOR_YUV420SP2RGBA: int +COLOR_YUV420sp2BGRA: int +COLOR_YUV420SP2BGRA: int +COLOR_YUV2RGB_YV12: int +COLOR_YUV2BGR_YV12: int +COLOR_YUV2RGB_IYUV: int +COLOR_YUV2BGR_IYUV: int +COLOR_YUV2RGB_I420: int +COLOR_YUV2BGR_I420: int +COLOR_YUV420p2RGB: int +COLOR_YUV420P2RGB: int +COLOR_YUV420p2BGR: int +COLOR_YUV420P2BGR: int +COLOR_YUV2RGBA_YV12: int +COLOR_YUV2BGRA_YV12: int +COLOR_YUV2RGBA_IYUV: int +COLOR_YUV2BGRA_IYUV: int +COLOR_YUV2RGBA_I420: int +COLOR_YUV2BGRA_I420: int +COLOR_YUV420p2RGBA: int +COLOR_YUV420P2RGBA: int +COLOR_YUV420p2BGRA: int +COLOR_YUV420P2BGRA: int +COLOR_YUV2GRAY_420: int +COLOR_YUV2GRAY_NV21: int +COLOR_YUV2GRAY_NV12: int +COLOR_YUV2GRAY_YV12: int +COLOR_YUV2GRAY_IYUV: int +COLOR_YUV2GRAY_I420: int +COLOR_YUV420sp2GRAY: int +COLOR_YUV420SP2GRAY: int +COLOR_YUV420p2GRAY: int +COLOR_YUV420P2GRAY: int +COLOR_YUV2RGB_UYVY: int +COLOR_YUV2BGR_UYVY: int +COLOR_YUV2RGB_Y422: int +COLOR_YUV2BGR_Y422: int +COLOR_YUV2RGB_UYNV: int +COLOR_YUV2BGR_UYNV: int +COLOR_YUV2RGBA_UYVY: int +COLOR_YUV2BGRA_UYVY: int +COLOR_YUV2RGBA_Y422: int +COLOR_YUV2BGRA_Y422: int +COLOR_YUV2RGBA_UYNV: int +COLOR_YUV2BGRA_UYNV: int +COLOR_YUV2RGB_YUY2: int +COLOR_YUV2BGR_YUY2: int +COLOR_YUV2RGB_YVYU: int +COLOR_YUV2BGR_YVYU: int +COLOR_YUV2RGB_YUYV: int +COLOR_YUV2BGR_YUYV: int +COLOR_YUV2RGB_YUNV: int +COLOR_YUV2BGR_YUNV: int +COLOR_YUV2RGBA_YUY2: int +COLOR_YUV2BGRA_YUY2: int +COLOR_YUV2RGBA_YVYU: int +COLOR_YUV2BGRA_YVYU: int +COLOR_YUV2RGBA_YUYV: int +COLOR_YUV2BGRA_YUYV: int +COLOR_YUV2RGBA_YUNV: int +COLOR_YUV2BGRA_YUNV: int +COLOR_YUV2GRAY_UYVY: int +COLOR_YUV2GRAY_YUY2: int +COLOR_YUV2GRAY_Y422: int +COLOR_YUV2GRAY_UYNV: int +COLOR_YUV2GRAY_YVYU: int +COLOR_YUV2GRAY_YUYV: int +COLOR_YUV2GRAY_YUNV: int +COLOR_RGBA2mRGBA: int +COLOR_RGBA2M_RGBA: int +COLOR_mRGBA2RGBA: int +COLOR_M_RGBA2RGBA: int +COLOR_RGB2YUV_I420: int +COLOR_BGR2YUV_I420: int +COLOR_RGB2YUV_IYUV: int +COLOR_BGR2YUV_IYUV: int +COLOR_RGBA2YUV_I420: int +COLOR_BGRA2YUV_I420: int +COLOR_RGBA2YUV_IYUV: int +COLOR_BGRA2YUV_IYUV: int +COLOR_RGB2YUV_YV12: int +COLOR_BGR2YUV_YV12: int +COLOR_RGBA2YUV_YV12: int +COLOR_BGRA2YUV_YV12: int +COLOR_BayerBG2BGR: int +COLOR_BAYER_BG2BGR: int +COLOR_BayerGB2BGR: int +COLOR_BAYER_GB2BGR: int +COLOR_BayerRG2BGR: int +COLOR_BAYER_RG2BGR: int +COLOR_BayerGR2BGR: int +COLOR_BAYER_GR2BGR: int +COLOR_BayerRGGB2BGR: int +COLOR_BAYER_RGGB2BGR: int +COLOR_BayerGRBG2BGR: int +COLOR_BAYER_GRBG2BGR: int +COLOR_BayerBGGR2BGR: int +COLOR_BAYER_BGGR2BGR: int +COLOR_BayerGBRG2BGR: int +COLOR_BAYER_GBRG2BGR: int +COLOR_BayerRGGB2RGB: int +COLOR_BAYER_RGGB2RGB: int +COLOR_BayerGRBG2RGB: int +COLOR_BAYER_GRBG2RGB: int +COLOR_BayerBGGR2RGB: int +COLOR_BAYER_BGGR2RGB: int +COLOR_BayerGBRG2RGB: int +COLOR_BAYER_GBRG2RGB: int +COLOR_BayerBG2RGB: int +COLOR_BAYER_BG2RGB: int +COLOR_BayerGB2RGB: int +COLOR_BAYER_GB2RGB: int +COLOR_BayerRG2RGB: int +COLOR_BAYER_RG2RGB: int +COLOR_BayerGR2RGB: int +COLOR_BAYER_GR2RGB: int +COLOR_BayerBG2GRAY: int +COLOR_BAYER_BG2GRAY: int +COLOR_BayerGB2GRAY: int +COLOR_BAYER_GB2GRAY: int +COLOR_BayerRG2GRAY: int +COLOR_BAYER_RG2GRAY: int +COLOR_BayerGR2GRAY: int +COLOR_BAYER_GR2GRAY: int +COLOR_BayerRGGB2GRAY: int +COLOR_BAYER_RGGB2GRAY: int +COLOR_BayerGRBG2GRAY: int +COLOR_BAYER_GRBG2GRAY: int +COLOR_BayerBGGR2GRAY: int +COLOR_BAYER_BGGR2GRAY: int +COLOR_BayerGBRG2GRAY: int +COLOR_BAYER_GBRG2GRAY: int +COLOR_BayerBG2BGR_VNG: int +COLOR_BAYER_BG2BGR_VNG: int +COLOR_BayerGB2BGR_VNG: int +COLOR_BAYER_GB2BGR_VNG: int +COLOR_BayerRG2BGR_VNG: int +COLOR_BAYER_RG2BGR_VNG: int +COLOR_BayerGR2BGR_VNG: int +COLOR_BAYER_GR2BGR_VNG: int +COLOR_BayerRGGB2BGR_VNG: int +COLOR_BAYER_RGGB2BGR_VNG: int +COLOR_BayerGRBG2BGR_VNG: int +COLOR_BAYER_GRBG2BGR_VNG: int +COLOR_BayerBGGR2BGR_VNG: int +COLOR_BAYER_BGGR2BGR_VNG: int +COLOR_BayerGBRG2BGR_VNG: int +COLOR_BAYER_GBRG2BGR_VNG: int +COLOR_BayerRGGB2RGB_VNG: int +COLOR_BAYER_RGGB2RGB_VNG: int +COLOR_BayerGRBG2RGB_VNG: int +COLOR_BAYER_GRBG2RGB_VNG: int +COLOR_BayerBGGR2RGB_VNG: int +COLOR_BAYER_BGGR2RGB_VNG: int +COLOR_BayerGBRG2RGB_VNG: int +COLOR_BAYER_GBRG2RGB_VNG: int +COLOR_BayerBG2RGB_VNG: int +COLOR_BAYER_BG2RGB_VNG: int +COLOR_BayerGB2RGB_VNG: int +COLOR_BAYER_GB2RGB_VNG: int +COLOR_BayerRG2RGB_VNG: int +COLOR_BAYER_RG2RGB_VNG: int +COLOR_BayerGR2RGB_VNG: int +COLOR_BAYER_GR2RGB_VNG: int +COLOR_BayerBG2BGR_EA: int +COLOR_BAYER_BG2BGR_EA: int +COLOR_BayerGB2BGR_EA: int +COLOR_BAYER_GB2BGR_EA: int +COLOR_BayerRG2BGR_EA: int +COLOR_BAYER_RG2BGR_EA: int +COLOR_BayerGR2BGR_EA: int +COLOR_BAYER_GR2BGR_EA: int +COLOR_BayerRGGB2BGR_EA: int +COLOR_BAYER_RGGB2BGR_EA: int +COLOR_BayerGRBG2BGR_EA: int +COLOR_BAYER_GRBG2BGR_EA: int +COLOR_BayerBGGR2BGR_EA: int +COLOR_BAYER_BGGR2BGR_EA: int +COLOR_BayerGBRG2BGR_EA: int +COLOR_BAYER_GBRG2BGR_EA: int +COLOR_BayerRGGB2RGB_EA: int +COLOR_BAYER_RGGB2RGB_EA: int +COLOR_BayerGRBG2RGB_EA: int +COLOR_BAYER_GRBG2RGB_EA: int +COLOR_BayerBGGR2RGB_EA: int +COLOR_BAYER_BGGR2RGB_EA: int +COLOR_BayerGBRG2RGB_EA: int +COLOR_BAYER_GBRG2RGB_EA: int +COLOR_BayerBG2RGB_EA: int +COLOR_BAYER_BG2RGB_EA: int +COLOR_BayerGB2RGB_EA: int +COLOR_BAYER_GB2RGB_EA: int +COLOR_BayerRG2RGB_EA: int +COLOR_BAYER_RG2RGB_EA: int +COLOR_BayerGR2RGB_EA: int +COLOR_BAYER_GR2RGB_EA: int +COLOR_BayerBG2BGRA: int +COLOR_BAYER_BG2BGRA: int +COLOR_BayerGB2BGRA: int +COLOR_BAYER_GB2BGRA: int +COLOR_BayerRG2BGRA: int +COLOR_BAYER_RG2BGRA: int +COLOR_BayerGR2BGRA: int +COLOR_BAYER_GR2BGRA: int +COLOR_BayerRGGB2BGRA: int +COLOR_BAYER_RGGB2BGRA: int +COLOR_BayerGRBG2BGRA: int +COLOR_BAYER_GRBG2BGRA: int +COLOR_BayerBGGR2BGRA: int +COLOR_BAYER_BGGR2BGRA: int +COLOR_BayerGBRG2BGRA: int +COLOR_BAYER_GBRG2BGRA: int +COLOR_BayerRGGB2RGBA: int +COLOR_BAYER_RGGB2RGBA: int +COLOR_BayerGRBG2RGBA: int +COLOR_BAYER_GRBG2RGBA: int +COLOR_BayerBGGR2RGBA: int +COLOR_BAYER_BGGR2RGBA: int +COLOR_BayerGBRG2RGBA: int +COLOR_BAYER_GBRG2RGBA: int +COLOR_BayerBG2RGBA: int +COLOR_BAYER_BG2RGBA: int +COLOR_BayerGB2RGBA: int +COLOR_BAYER_GB2RGBA: int +COLOR_BayerRG2RGBA: int +COLOR_BAYER_RG2RGBA: int +COLOR_BayerGR2RGBA: int +COLOR_BAYER_GR2RGBA: int +COLOR_RGB2YUV_UYVY: int +COLOR_BGR2YUV_UYVY: int +COLOR_RGB2YUV_Y422: int +COLOR_BGR2YUV_Y422: int +COLOR_RGB2YUV_UYNV: int +COLOR_BGR2YUV_UYNV: int +COLOR_RGBA2YUV_UYVY: int +COLOR_BGRA2YUV_UYVY: int +COLOR_RGBA2YUV_Y422: int +COLOR_BGRA2YUV_Y422: int +COLOR_RGBA2YUV_UYNV: int +COLOR_BGRA2YUV_UYNV: int +COLOR_RGB2YUV_YUY2: int +COLOR_BGR2YUV_YUY2: int +COLOR_RGB2YUV_YVYU: int +COLOR_BGR2YUV_YVYU: int +COLOR_RGB2YUV_YUYV: int +COLOR_BGR2YUV_YUYV: int +COLOR_RGB2YUV_YUNV: int +COLOR_BGR2YUV_YUNV: int +COLOR_RGBA2YUV_YUY2: int +COLOR_BGRA2YUV_YUY2: int +COLOR_RGBA2YUV_YVYU: int +COLOR_BGRA2YUV_YVYU: int +COLOR_RGBA2YUV_YUYV: int +COLOR_BGRA2YUV_YUYV: int +COLOR_RGBA2YUV_YUNV: int +COLOR_BGRA2YUV_YUNV: int +COLOR_COLORCVT_MAX: int +ColorConversionCodes = int +"""One of [COLOR_BGR2BGRA, COLOR_RGB2RGBA, COLOR_BGRA2BGR, COLOR_RGBA2RGB, COLOR_BGR2RGBA, COLOR_RGB2BGRA, COLOR_RGBA2BGR, COLOR_BGRA2RGB, COLOR_BGR2RGB, COLOR_RGB2BGR, COLOR_BGRA2RGBA, COLOR_RGBA2BGRA, COLOR_BGR2GRAY, COLOR_RGB2GRAY, COLOR_GRAY2BGR, COLOR_GRAY2RGB, COLOR_GRAY2BGRA, COLOR_GRAY2RGBA, COLOR_BGRA2GRAY, COLOR_RGBA2GRAY, COLOR_BGR2BGR565, COLOR_RGB2BGR565, COLOR_BGR5652BGR, COLOR_BGR5652RGB, COLOR_BGRA2BGR565, COLOR_RGBA2BGR565, COLOR_BGR5652BGRA, COLOR_BGR5652RGBA, COLOR_GRAY2BGR565, COLOR_BGR5652GRAY, COLOR_BGR2BGR555, COLOR_RGB2BGR555, COLOR_BGR5552BGR, COLOR_BGR5552RGB, COLOR_BGRA2BGR555, COLOR_RGBA2BGR555, COLOR_BGR5552BGRA, COLOR_BGR5552RGBA, COLOR_GRAY2BGR555, COLOR_BGR5552GRAY, COLOR_BGR2XYZ, COLOR_RGB2XYZ, COLOR_XYZ2BGR, COLOR_XYZ2RGB, COLOR_BGR2YCrCb, COLOR_BGR2YCR_CB, COLOR_RGB2YCrCb, COLOR_RGB2YCR_CB, COLOR_YCrCb2BGR, COLOR_YCR_CB2BGR, COLOR_YCrCb2RGB, COLOR_YCR_CB2RGB, COLOR_BGR2HSV, COLOR_RGB2HSV, COLOR_BGR2Lab, COLOR_BGR2LAB, COLOR_RGB2Lab, COLOR_RGB2LAB, COLOR_BGR2Luv, COLOR_BGR2LUV, COLOR_RGB2Luv, COLOR_RGB2LUV, COLOR_BGR2HLS, COLOR_RGB2HLS, COLOR_HSV2BGR, COLOR_HSV2RGB, COLOR_Lab2BGR, COLOR_LAB2BGR, COLOR_Lab2RGB, COLOR_LAB2RGB, COLOR_Luv2BGR, COLOR_LUV2BGR, COLOR_Luv2RGB, COLOR_LUV2RGB, COLOR_HLS2BGR, COLOR_HLS2RGB, COLOR_BGR2HSV_FULL, COLOR_RGB2HSV_FULL, COLOR_BGR2HLS_FULL, COLOR_RGB2HLS_FULL, COLOR_HSV2BGR_FULL, COLOR_HSV2RGB_FULL, COLOR_HLS2BGR_FULL, COLOR_HLS2RGB_FULL, COLOR_LBGR2Lab, COLOR_LBGR2LAB, COLOR_LRGB2Lab, COLOR_LRGB2LAB, COLOR_LBGR2Luv, COLOR_LBGR2LUV, COLOR_LRGB2Luv, COLOR_LRGB2LUV, COLOR_Lab2LBGR, COLOR_LAB2LBGR, COLOR_Lab2LRGB, COLOR_LAB2LRGB, COLOR_Luv2LBGR, COLOR_LUV2LBGR, COLOR_Luv2LRGB, COLOR_LUV2LRGB, COLOR_BGR2YUV, COLOR_RGB2YUV, COLOR_YUV2BGR, COLOR_YUV2RGB, COLOR_YUV2RGB_NV12, COLOR_YUV2BGR_NV12, COLOR_YUV2RGB_NV21, COLOR_YUV2BGR_NV21, COLOR_YUV420sp2RGB, COLOR_YUV420SP2RGB, COLOR_YUV420sp2BGR, COLOR_YUV420SP2BGR, COLOR_YUV2RGBA_NV12, COLOR_YUV2BGRA_NV12, COLOR_YUV2RGBA_NV21, COLOR_YUV2BGRA_NV21, COLOR_YUV420sp2RGBA, COLOR_YUV420SP2RGBA, COLOR_YUV420sp2BGRA, COLOR_YUV420SP2BGRA, COLOR_YUV2RGB_YV12, COLOR_YUV2BGR_YV12, COLOR_YUV2RGB_IYUV, COLOR_YUV2BGR_IYUV, COLOR_YUV2RGB_I420, COLOR_YUV2BGR_I420, COLOR_YUV420p2RGB, COLOR_YUV420P2RGB, COLOR_YUV420p2BGR, COLOR_YUV420P2BGR, COLOR_YUV2RGBA_YV12, COLOR_YUV2BGRA_YV12, COLOR_YUV2RGBA_IYUV, COLOR_YUV2BGRA_IYUV, COLOR_YUV2RGBA_I420, COLOR_YUV2BGRA_I420, COLOR_YUV420p2RGBA, COLOR_YUV420P2RGBA, COLOR_YUV420p2BGRA, COLOR_YUV420P2BGRA, COLOR_YUV2GRAY_420, COLOR_YUV2GRAY_NV21, COLOR_YUV2GRAY_NV12, COLOR_YUV2GRAY_YV12, COLOR_YUV2GRAY_IYUV, COLOR_YUV2GRAY_I420, COLOR_YUV420sp2GRAY, COLOR_YUV420SP2GRAY, COLOR_YUV420p2GRAY, COLOR_YUV420P2GRAY, COLOR_YUV2RGB_UYVY, COLOR_YUV2BGR_UYVY, COLOR_YUV2RGB_Y422, COLOR_YUV2BGR_Y422, COLOR_YUV2RGB_UYNV, COLOR_YUV2BGR_UYNV, COLOR_YUV2RGBA_UYVY, COLOR_YUV2BGRA_UYVY, COLOR_YUV2RGBA_Y422, COLOR_YUV2BGRA_Y422, COLOR_YUV2RGBA_UYNV, COLOR_YUV2BGRA_UYNV, COLOR_YUV2RGB_YUY2, COLOR_YUV2BGR_YUY2, COLOR_YUV2RGB_YVYU, COLOR_YUV2BGR_YVYU, COLOR_YUV2RGB_YUYV, COLOR_YUV2BGR_YUYV, COLOR_YUV2RGB_YUNV, COLOR_YUV2BGR_YUNV, COLOR_YUV2RGBA_YUY2, COLOR_YUV2BGRA_YUY2, COLOR_YUV2RGBA_YVYU, COLOR_YUV2BGRA_YVYU, COLOR_YUV2RGBA_YUYV, COLOR_YUV2BGRA_YUYV, COLOR_YUV2RGBA_YUNV, COLOR_YUV2BGRA_YUNV, COLOR_YUV2GRAY_UYVY, COLOR_YUV2GRAY_YUY2, COLOR_YUV2GRAY_Y422, COLOR_YUV2GRAY_UYNV, COLOR_YUV2GRAY_YVYU, COLOR_YUV2GRAY_YUYV, COLOR_YUV2GRAY_YUNV, COLOR_RGBA2mRGBA, COLOR_RGBA2M_RGBA, COLOR_mRGBA2RGBA, COLOR_M_RGBA2RGBA, COLOR_RGB2YUV_I420, COLOR_BGR2YUV_I420, COLOR_RGB2YUV_IYUV, COLOR_BGR2YUV_IYUV, COLOR_RGBA2YUV_I420, COLOR_BGRA2YUV_I420, COLOR_RGBA2YUV_IYUV, COLOR_BGRA2YUV_IYUV, COLOR_RGB2YUV_YV12, COLOR_BGR2YUV_YV12, COLOR_RGBA2YUV_YV12, COLOR_BGRA2YUV_YV12, COLOR_BayerBG2BGR, COLOR_BAYER_BG2BGR, COLOR_BayerGB2BGR, COLOR_BAYER_GB2BGR, COLOR_BayerRG2BGR, COLOR_BAYER_RG2BGR, COLOR_BayerGR2BGR, COLOR_BAYER_GR2BGR, COLOR_BayerRGGB2BGR, COLOR_BAYER_RGGB2BGR, COLOR_BayerGRBG2BGR, COLOR_BAYER_GRBG2BGR, COLOR_BayerBGGR2BGR, COLOR_BAYER_BGGR2BGR, COLOR_BayerGBRG2BGR, COLOR_BAYER_GBRG2BGR, COLOR_BayerRGGB2RGB, COLOR_BAYER_RGGB2RGB, COLOR_BayerGRBG2RGB, COLOR_BAYER_GRBG2RGB, COLOR_BayerBGGR2RGB, COLOR_BAYER_BGGR2RGB, COLOR_BayerGBRG2RGB, COLOR_BAYER_GBRG2RGB, COLOR_BayerBG2RGB, COLOR_BAYER_BG2RGB, COLOR_BayerGB2RGB, COLOR_BAYER_GB2RGB, COLOR_BayerRG2RGB, COLOR_BAYER_RG2RGB, COLOR_BayerGR2RGB, COLOR_BAYER_GR2RGB, COLOR_BayerBG2GRAY, COLOR_BAYER_BG2GRAY, COLOR_BayerGB2GRAY, COLOR_BAYER_GB2GRAY, COLOR_BayerRG2GRAY, COLOR_BAYER_RG2GRAY, COLOR_BayerGR2GRAY, COLOR_BAYER_GR2GRAY, COLOR_BayerRGGB2GRAY, COLOR_BAYER_RGGB2GRAY, COLOR_BayerGRBG2GRAY, COLOR_BAYER_GRBG2GRAY, COLOR_BayerBGGR2GRAY, COLOR_BAYER_BGGR2GRAY, COLOR_BayerGBRG2GRAY, COLOR_BAYER_GBRG2GRAY, COLOR_BayerBG2BGR_VNG, COLOR_BAYER_BG2BGR_VNG, COLOR_BayerGB2BGR_VNG, COLOR_BAYER_GB2BGR_VNG, COLOR_BayerRG2BGR_VNG, COLOR_BAYER_RG2BGR_VNG, COLOR_BayerGR2BGR_VNG, COLOR_BAYER_GR2BGR_VNG, COLOR_BayerRGGB2BGR_VNG, COLOR_BAYER_RGGB2BGR_VNG, COLOR_BayerGRBG2BGR_VNG, COLOR_BAYER_GRBG2BGR_VNG, COLOR_BayerBGGR2BGR_VNG, COLOR_BAYER_BGGR2BGR_VNG, COLOR_BayerGBRG2BGR_VNG, COLOR_BAYER_GBRG2BGR_VNG, COLOR_BayerRGGB2RGB_VNG, COLOR_BAYER_RGGB2RGB_VNG, COLOR_BayerGRBG2RGB_VNG, COLOR_BAYER_GRBG2RGB_VNG, COLOR_BayerBGGR2RGB_VNG, COLOR_BAYER_BGGR2RGB_VNG, COLOR_BayerGBRG2RGB_VNG, COLOR_BAYER_GBRG2RGB_VNG, COLOR_BayerBG2RGB_VNG, COLOR_BAYER_BG2RGB_VNG, COLOR_BayerGB2RGB_VNG, COLOR_BAYER_GB2RGB_VNG, COLOR_BayerRG2RGB_VNG, COLOR_BAYER_RG2RGB_VNG, COLOR_BayerGR2RGB_VNG, COLOR_BAYER_GR2RGB_VNG, COLOR_BayerBG2BGR_EA, COLOR_BAYER_BG2BGR_EA, COLOR_BayerGB2BGR_EA, COLOR_BAYER_GB2BGR_EA, COLOR_BayerRG2BGR_EA, COLOR_BAYER_RG2BGR_EA, COLOR_BayerGR2BGR_EA, COLOR_BAYER_GR2BGR_EA, COLOR_BayerRGGB2BGR_EA, COLOR_BAYER_RGGB2BGR_EA, COLOR_BayerGRBG2BGR_EA, COLOR_BAYER_GRBG2BGR_EA, COLOR_BayerBGGR2BGR_EA, COLOR_BAYER_BGGR2BGR_EA, COLOR_BayerGBRG2BGR_EA, COLOR_BAYER_GBRG2BGR_EA, COLOR_BayerRGGB2RGB_EA, COLOR_BAYER_RGGB2RGB_EA, COLOR_BayerGRBG2RGB_EA, COLOR_BAYER_GRBG2RGB_EA, COLOR_BayerBGGR2RGB_EA, COLOR_BAYER_BGGR2RGB_EA, COLOR_BayerGBRG2RGB_EA, COLOR_BAYER_GBRG2RGB_EA, COLOR_BayerBG2RGB_EA, COLOR_BAYER_BG2RGB_EA, COLOR_BayerGB2RGB_EA, COLOR_BAYER_GB2RGB_EA, COLOR_BayerRG2RGB_EA, COLOR_BAYER_RG2RGB_EA, COLOR_BayerGR2RGB_EA, COLOR_BAYER_GR2RGB_EA, COLOR_BayerBG2BGRA, COLOR_BAYER_BG2BGRA, COLOR_BayerGB2BGRA, COLOR_BAYER_GB2BGRA, COLOR_BayerRG2BGRA, COLOR_BAYER_RG2BGRA, COLOR_BayerGR2BGRA, COLOR_BAYER_GR2BGRA, COLOR_BayerRGGB2BGRA, COLOR_BAYER_RGGB2BGRA, COLOR_BayerGRBG2BGRA, COLOR_BAYER_GRBG2BGRA, COLOR_BayerBGGR2BGRA, COLOR_BAYER_BGGR2BGRA, COLOR_BayerGBRG2BGRA, COLOR_BAYER_GBRG2BGRA, COLOR_BayerRGGB2RGBA, COLOR_BAYER_RGGB2RGBA, COLOR_BayerGRBG2RGBA, COLOR_BAYER_GRBG2RGBA, COLOR_BayerBGGR2RGBA, COLOR_BAYER_BGGR2RGBA, COLOR_BayerGBRG2RGBA, COLOR_BAYER_GBRG2RGBA, COLOR_BayerBG2RGBA, COLOR_BAYER_BG2RGBA, COLOR_BayerGB2RGBA, COLOR_BAYER_GB2RGBA, COLOR_BayerRG2RGBA, COLOR_BAYER_RG2RGBA, COLOR_BayerGR2RGBA, COLOR_BAYER_GR2RGBA, COLOR_RGB2YUV_UYVY, COLOR_BGR2YUV_UYVY, COLOR_RGB2YUV_Y422, COLOR_BGR2YUV_Y422, COLOR_RGB2YUV_UYNV, COLOR_BGR2YUV_UYNV, COLOR_RGBA2YUV_UYVY, COLOR_BGRA2YUV_UYVY, COLOR_RGBA2YUV_Y422, COLOR_BGRA2YUV_Y422, COLOR_RGBA2YUV_UYNV, COLOR_BGRA2YUV_UYNV, COLOR_RGB2YUV_YUY2, COLOR_BGR2YUV_YUY2, COLOR_RGB2YUV_YVYU, COLOR_BGR2YUV_YVYU, COLOR_RGB2YUV_YUYV, COLOR_BGR2YUV_YUYV, COLOR_RGB2YUV_YUNV, COLOR_BGR2YUV_YUNV, COLOR_RGBA2YUV_YUY2, COLOR_BGRA2YUV_YUY2, COLOR_RGBA2YUV_YVYU, COLOR_BGRA2YUV_YVYU, COLOR_RGBA2YUV_YUYV, COLOR_BGRA2YUV_YUYV, COLOR_RGBA2YUV_YUNV, COLOR_BGRA2YUV_YUNV, COLOR_COLORCVT_MAX]""" + +FILLED: int +LINE_4: int +LINE_8: int +LINE_AA: int +LineTypes = int +"""One of [FILLED, LINE_4, LINE_8, LINE_AA]""" + +FONT_HERSHEY_SIMPLEX: int +FONT_HERSHEY_PLAIN: int +FONT_HERSHEY_DUPLEX: int +FONT_HERSHEY_COMPLEX: int +FONT_HERSHEY_TRIPLEX: int +FONT_HERSHEY_COMPLEX_SMALL: int +FONT_HERSHEY_SCRIPT_SIMPLEX: int +FONT_HERSHEY_SCRIPT_COMPLEX: int +FONT_ITALIC: int +HersheyFonts = int +"""One of [FONT_HERSHEY_SIMPLEX, FONT_HERSHEY_PLAIN, FONT_HERSHEY_DUPLEX, FONT_HERSHEY_COMPLEX, FONT_HERSHEY_TRIPLEX, FONT_HERSHEY_COMPLEX_SMALL, FONT_HERSHEY_SCRIPT_SIMPLEX, FONT_HERSHEY_SCRIPT_COMPLEX, FONT_ITALIC]""" + +MARKER_CROSS: int +MARKER_TILTED_CROSS: int +MARKER_STAR: int +MARKER_DIAMOND: int +MARKER_SQUARE: int +MARKER_TRIANGLE_UP: int +MARKER_TRIANGLE_DOWN: int +MarkerTypes = int +"""One of [MARKER_CROSS, MARKER_TILTED_CROSS, MARKER_STAR, MARKER_DIAMOND, MARKER_SQUARE, MARKER_TRIANGLE_UP, MARKER_TRIANGLE_DOWN]""" + +PROJ_SPHERICAL_ORTHO: int +PROJ_SPHERICAL_EQRECT: int +UndistortTypes = int +"""One of [PROJ_SPHERICAL_ORTHO, PROJ_SPHERICAL_EQRECT]""" + +TM_SQDIFF: int +TM_SQDIFF_NORMED: int +TM_CCORR: int +TM_CCORR_NORMED: int +TM_CCOEFF: int +TM_CCOEFF_NORMED: int +TemplateMatchModes = int +"""One of [TM_SQDIFF, TM_SQDIFF_NORMED, TM_CCORR, TM_CCORR_NORMED, TM_CCOEFF, TM_CCOEFF_NORMED]""" + +COLORMAP_AUTUMN: int +COLORMAP_BONE: int +COLORMAP_JET: int +COLORMAP_WINTER: int +COLORMAP_RAINBOW: int +COLORMAP_OCEAN: int +COLORMAP_SUMMER: int +COLORMAP_SPRING: int +COLORMAP_COOL: int +COLORMAP_HSV: int +COLORMAP_PINK: int +COLORMAP_HOT: int +COLORMAP_PARULA: int +COLORMAP_MAGMA: int +COLORMAP_INFERNO: int +COLORMAP_PLASMA: int +COLORMAP_VIRIDIS: int +COLORMAP_CIVIDIS: int +COLORMAP_TWILIGHT: int +COLORMAP_TWILIGHT_SHIFTED: int +COLORMAP_TURBO: int +COLORMAP_DEEPGREEN: int +ColormapTypes = int +"""One of [COLORMAP_AUTUMN, COLORMAP_BONE, COLORMAP_JET, COLORMAP_WINTER, COLORMAP_RAINBOW, COLORMAP_OCEAN, COLORMAP_SUMMER, COLORMAP_SPRING, COLORMAP_COOL, COLORMAP_HSV, COLORMAP_PINK, COLORMAP_HOT, COLORMAP_PARULA, COLORMAP_MAGMA, COLORMAP_INFERNO, COLORMAP_PLASMA, COLORMAP_VIRIDIS, COLORMAP_CIVIDIS, COLORMAP_TWILIGHT, COLORMAP_TWILIGHT_SHIFTED, COLORMAP_TURBO, COLORMAP_DEEPGREEN]""" + +PUT_TEXT_ALIGN_LEFT: int +PUT_TEXT_ALIGN_CENTER: int +PUT_TEXT_ALIGN_RIGHT: int +PUT_TEXT_ALIGN_MASK: int +PUT_TEXT_ORIGIN_TL: int +PUT_TEXT_ORIGIN_BL: int +PUT_TEXT_WRAP: int +PutTextFlags = int +"""One of [PUT_TEXT_ALIGN_LEFT, PUT_TEXT_ALIGN_CENTER, PUT_TEXT_ALIGN_RIGHT, PUT_TEXT_ALIGN_MASK, PUT_TEXT_ORIGIN_TL, PUT_TEXT_ORIGIN_BL, PUT_TEXT_WRAP]""" + +NORMAL_CLONE: int +MIXED_CLONE: int +MONOCHROME_TRANSFER: int +NORMAL_CLONE_WIDE: int +MIXED_CLONE_WIDE: int +MONOCHROME_TRANSFER_WIDE: int +SeamlessCloneFlags = int +"""One of [NORMAL_CLONE, MIXED_CLONE, MONOCHROME_TRANSFER, NORMAL_CLONE_WIDE, MIXED_CLONE_WIDE, MONOCHROME_TRANSFER_WIDE]""" + +RASTERIZE_SHADING_WHITE: int +RASTERIZE_SHADING_FLAT: int +RASTERIZE_SHADING_SHADED: int +TriangleShadingType = int +"""One of [RASTERIZE_SHADING_WHITE, RASTERIZE_SHADING_FLAT, RASTERIZE_SHADING_SHADED]""" + +RASTERIZE_CULLING_NONE: int +RASTERIZE_CULLING_CW: int +RASTERIZE_CULLING_CCW: int +TriangleCullingMode = int +"""One of [RASTERIZE_CULLING_NONE, RASTERIZE_CULLING_CW, RASTERIZE_CULLING_CCW]""" + +RASTERIZE_COMPAT_DISABLED: int +RASTERIZE_COMPAT_INVDEPTH: int +TriangleGlCompatibleMode = int +"""One of [RASTERIZE_COMPAT_DISABLED, RASTERIZE_COMPAT_INVDEPTH]""" + +RGBD_PLANE_METHOD_DEFAULT: int +RgbdPlaneMethod = int +"""One of [RGBD_PLANE_METHOD_DEFAULT]""" + +OdometryType_DEPTH: int +ODOMETRY_TYPE_DEPTH: int +OdometryType_RGB: int +ODOMETRY_TYPE_RGB: int +OdometryType_RGB_DEPTH: int +ODOMETRY_TYPE_RGB_DEPTH: int +OdometryType = int +"""One of [OdometryType_DEPTH, ODOMETRY_TYPE_DEPTH, OdometryType_RGB, ODOMETRY_TYPE_RGB, OdometryType_RGB_DEPTH, ODOMETRY_TYPE_RGB_DEPTH]""" + +OdometryAlgoType_COMMON: int +ODOMETRY_ALGO_TYPE_COMMON: int +OdometryAlgoType_FAST: int +ODOMETRY_ALGO_TYPE_FAST: int +OdometryAlgoType = int +"""One of [OdometryAlgoType_COMMON, ODOMETRY_ALGO_TYPE_COMMON, OdometryAlgoType_FAST, ODOMETRY_ALGO_TYPE_FAST]""" + +PYR_IMAGE: int +PYR_DEPTH: int +PYR_MASK: int +PYR_CLOUD: int +PYR_DIX: int +PYR_DIY: int +PYR_TEXMASK: int +PYR_NORM: int +PYR_NORMMASK: int +N_PYRAMIDS: int +OdometryFramePyramidType = int +"""One of [PYR_IMAGE, PYR_DEPTH, PYR_MASK, PYR_CLOUD, PYR_DIX, PYR_DIY, PYR_TEXMASK, PYR_NORM, PYR_NORMMASK, N_PYRAMIDS]""" + +VolumeType_TSDF: int +VOLUME_TYPE_TSDF: int +VolumeType_HashTSDF: int +VOLUME_TYPE_HASH_TSDF: int +VolumeType_ColorTSDF: int +VOLUME_TYPE_COLOR_TSDF: int +VolumeType = int +"""One of [VolumeType_TSDF, VOLUME_TYPE_TSDF, VolumeType_HashTSDF, VOLUME_TYPE_HASH_TSDF, VolumeType_ColorTSDF, VOLUME_TYPE_COLOR_TSDF]""" + +DrawMatchesFlags_DEFAULT: int +DRAW_MATCHES_FLAGS_DEFAULT: int +DrawMatchesFlags_DRAW_OVER_OUTIMG: int +DRAW_MATCHES_FLAGS_DRAW_OVER_OUTIMG: int +DrawMatchesFlags_NOT_DRAW_SINGLE_POINTS: int +DRAW_MATCHES_FLAGS_NOT_DRAW_SINGLE_POINTS: int +DrawMatchesFlags_DRAW_RICH_KEYPOINTS: int +DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS: int +DrawMatchesFlags = int +"""One of [DrawMatchesFlags_DEFAULT, DRAW_MATCHES_FLAGS_DEFAULT, DrawMatchesFlags_DRAW_OVER_OUTIMG, DRAW_MATCHES_FLAGS_DRAW_OVER_OUTIMG, DrawMatchesFlags_NOT_DRAW_SINGLE_POINTS, DRAW_MATCHES_FLAGS_NOT_DRAW_SINGLE_POINTS, DrawMatchesFlags_DRAW_RICH_KEYPOINTS, DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS]""" + +IMREAD_UNCHANGED: int +IMREAD_GRAYSCALE: int +IMREAD_COLOR_BGR: int +IMREAD_COLOR: int +IMREAD_ANYDEPTH: int +IMREAD_ANYCOLOR: int +IMREAD_LOAD_GDAL: int +IMREAD_REDUCED_GRAYSCALE_2: int +IMREAD_REDUCED_COLOR_2: int +IMREAD_REDUCED_GRAYSCALE_4: int +IMREAD_REDUCED_COLOR_4: int +IMREAD_REDUCED_GRAYSCALE_8: int +IMREAD_REDUCED_COLOR_8: int +IMREAD_IGNORE_ORIENTATION: int +IMREAD_COLOR_RGB: int +ImreadModes = int +"""One of [IMREAD_UNCHANGED, IMREAD_GRAYSCALE, IMREAD_COLOR_BGR, IMREAD_COLOR, IMREAD_ANYDEPTH, IMREAD_ANYCOLOR, IMREAD_LOAD_GDAL, IMREAD_REDUCED_GRAYSCALE_2, IMREAD_REDUCED_COLOR_2, IMREAD_REDUCED_GRAYSCALE_4, IMREAD_REDUCED_COLOR_4, IMREAD_REDUCED_GRAYSCALE_8, IMREAD_REDUCED_COLOR_8, IMREAD_IGNORE_ORIENTATION, IMREAD_COLOR_RGB]""" + +IMWRITE_JPEG_QUALITY: int +IMWRITE_JPEG_PROGRESSIVE: int +IMWRITE_JPEG_OPTIMIZE: int +IMWRITE_JPEG_RST_INTERVAL: int +IMWRITE_JPEG_LUMA_QUALITY: int +IMWRITE_JPEG_CHROMA_QUALITY: int +IMWRITE_JPEG_SAMPLING_FACTOR: int +IMWRITE_PNG_COMPRESSION: int +IMWRITE_PNG_STRATEGY: int +IMWRITE_PNG_BILEVEL: int +IMWRITE_PNG_FILTER: int +IMWRITE_PNG_ZLIBBUFFER_SIZE: int +IMWRITE_PXM_BINARY: int +IMWRITE_EXR_TYPE: int +IMWRITE_EXR_COMPRESSION: int +IMWRITE_EXR_DWA_COMPRESSION_LEVEL: int +IMWRITE_WEBP_QUALITY: int +IMWRITE_WEBP_LOSSLESS_MODE: int +IMWRITE_HDR_COMPRESSION: int +IMWRITE_PAM_TUPLETYPE: int +IMWRITE_TIFF_RESUNIT: int +IMWRITE_TIFF_XDPI: int +IMWRITE_TIFF_YDPI: int +IMWRITE_TIFF_COMPRESSION: int +IMWRITE_TIFF_ROWSPERSTRIP: int +IMWRITE_TIFF_PREDICTOR: int +IMWRITE_JPEG2000_COMPRESSION_X1000: int +IMWRITE_AVIF_QUALITY: int +IMWRITE_AVIF_DEPTH: int +IMWRITE_AVIF_SPEED: int +IMWRITE_JPEGXL_QUALITY: int +IMWRITE_JPEGXL_EFFORT: int +IMWRITE_JPEGXL_DISTANCE: int +IMWRITE_JPEGXL_DECODING_SPEED: int +IMWRITE_BMP_COMPRESSION: int +IMWRITE_GIF_LOOP: int +IMWRITE_GIF_SPEED: int +IMWRITE_GIF_QUALITY: int +IMWRITE_GIF_DITHER: int +IMWRITE_GIF_TRANSPARENCY: int +IMWRITE_GIF_COLORTABLE: int +ImwriteFlags = int +"""One of [IMWRITE_JPEG_QUALITY, IMWRITE_JPEG_PROGRESSIVE, IMWRITE_JPEG_OPTIMIZE, IMWRITE_JPEG_RST_INTERVAL, IMWRITE_JPEG_LUMA_QUALITY, IMWRITE_JPEG_CHROMA_QUALITY, IMWRITE_JPEG_SAMPLING_FACTOR, IMWRITE_PNG_COMPRESSION, IMWRITE_PNG_STRATEGY, IMWRITE_PNG_BILEVEL, IMWRITE_PNG_FILTER, IMWRITE_PNG_ZLIBBUFFER_SIZE, IMWRITE_PXM_BINARY, IMWRITE_EXR_TYPE, IMWRITE_EXR_COMPRESSION, IMWRITE_EXR_DWA_COMPRESSION_LEVEL, IMWRITE_WEBP_QUALITY, IMWRITE_WEBP_LOSSLESS_MODE, IMWRITE_HDR_COMPRESSION, IMWRITE_PAM_TUPLETYPE, IMWRITE_TIFF_RESUNIT, IMWRITE_TIFF_XDPI, IMWRITE_TIFF_YDPI, IMWRITE_TIFF_COMPRESSION, IMWRITE_TIFF_ROWSPERSTRIP, IMWRITE_TIFF_PREDICTOR, IMWRITE_JPEG2000_COMPRESSION_X1000, IMWRITE_AVIF_QUALITY, IMWRITE_AVIF_DEPTH, IMWRITE_AVIF_SPEED, IMWRITE_JPEGXL_QUALITY, IMWRITE_JPEGXL_EFFORT, IMWRITE_JPEGXL_DISTANCE, IMWRITE_JPEGXL_DECODING_SPEED, IMWRITE_BMP_COMPRESSION, IMWRITE_GIF_LOOP, IMWRITE_GIF_SPEED, IMWRITE_GIF_QUALITY, IMWRITE_GIF_DITHER, IMWRITE_GIF_TRANSPARENCY, IMWRITE_GIF_COLORTABLE]""" + +IMWRITE_JPEG_SAMPLING_FACTOR_411: int +IMWRITE_JPEG_SAMPLING_FACTOR_420: int +IMWRITE_JPEG_SAMPLING_FACTOR_422: int +IMWRITE_JPEG_SAMPLING_FACTOR_440: int +IMWRITE_JPEG_SAMPLING_FACTOR_444: int +ImwriteJPEGSamplingFactorParams = int +"""One of [IMWRITE_JPEG_SAMPLING_FACTOR_411, IMWRITE_JPEG_SAMPLING_FACTOR_420, IMWRITE_JPEG_SAMPLING_FACTOR_422, IMWRITE_JPEG_SAMPLING_FACTOR_440, IMWRITE_JPEG_SAMPLING_FACTOR_444]""" + +IMWRITE_TIFF_COMPRESSION_NONE: int +IMWRITE_TIFF_COMPRESSION_CCITTRLE: int +IMWRITE_TIFF_COMPRESSION_CCITTFAX3: int +IMWRITE_TIFF_COMPRESSION_CCITT_T4: int +IMWRITE_TIFF_COMPRESSION_CCITTFAX4: int +IMWRITE_TIFF_COMPRESSION_CCITT_T6: int +IMWRITE_TIFF_COMPRESSION_LZW: int +IMWRITE_TIFF_COMPRESSION_OJPEG: int +IMWRITE_TIFF_COMPRESSION_JPEG: int +IMWRITE_TIFF_COMPRESSION_T85: int +IMWRITE_TIFF_COMPRESSION_T43: int +IMWRITE_TIFF_COMPRESSION_NEXT: int +IMWRITE_TIFF_COMPRESSION_CCITTRLEW: int +IMWRITE_TIFF_COMPRESSION_PACKBITS: int +IMWRITE_TIFF_COMPRESSION_THUNDERSCAN: int +IMWRITE_TIFF_COMPRESSION_IT8CTPAD: int +IMWRITE_TIFF_COMPRESSION_IT8LW: int +IMWRITE_TIFF_COMPRESSION_IT8MP: int +IMWRITE_TIFF_COMPRESSION_IT8BL: int +IMWRITE_TIFF_COMPRESSION_PIXARFILM: int +IMWRITE_TIFF_COMPRESSION_PIXARLOG: int +IMWRITE_TIFF_COMPRESSION_DEFLATE: int +IMWRITE_TIFF_COMPRESSION_ADOBE_DEFLATE: int +IMWRITE_TIFF_COMPRESSION_DCS: int +IMWRITE_TIFF_COMPRESSION_JBIG: int +IMWRITE_TIFF_COMPRESSION_SGILOG: int +IMWRITE_TIFF_COMPRESSION_SGILOG24: int +IMWRITE_TIFF_COMPRESSION_JP2000: int +IMWRITE_TIFF_COMPRESSION_LERC: int +IMWRITE_TIFF_COMPRESSION_LZMA: int +IMWRITE_TIFF_COMPRESSION_ZSTD: int +IMWRITE_TIFF_COMPRESSION_WEBP: int +IMWRITE_TIFF_COMPRESSION_JXL: int +ImwriteTiffCompressionFlags = int +"""One of [IMWRITE_TIFF_COMPRESSION_NONE, IMWRITE_TIFF_COMPRESSION_CCITTRLE, IMWRITE_TIFF_COMPRESSION_CCITTFAX3, IMWRITE_TIFF_COMPRESSION_CCITT_T4, IMWRITE_TIFF_COMPRESSION_CCITTFAX4, IMWRITE_TIFF_COMPRESSION_CCITT_T6, IMWRITE_TIFF_COMPRESSION_LZW, IMWRITE_TIFF_COMPRESSION_OJPEG, IMWRITE_TIFF_COMPRESSION_JPEG, IMWRITE_TIFF_COMPRESSION_T85, IMWRITE_TIFF_COMPRESSION_T43, IMWRITE_TIFF_COMPRESSION_NEXT, IMWRITE_TIFF_COMPRESSION_CCITTRLEW, IMWRITE_TIFF_COMPRESSION_PACKBITS, IMWRITE_TIFF_COMPRESSION_THUNDERSCAN, IMWRITE_TIFF_COMPRESSION_IT8CTPAD, IMWRITE_TIFF_COMPRESSION_IT8LW, IMWRITE_TIFF_COMPRESSION_IT8MP, IMWRITE_TIFF_COMPRESSION_IT8BL, IMWRITE_TIFF_COMPRESSION_PIXARFILM, IMWRITE_TIFF_COMPRESSION_PIXARLOG, IMWRITE_TIFF_COMPRESSION_DEFLATE, IMWRITE_TIFF_COMPRESSION_ADOBE_DEFLATE, IMWRITE_TIFF_COMPRESSION_DCS, IMWRITE_TIFF_COMPRESSION_JBIG, IMWRITE_TIFF_COMPRESSION_SGILOG, IMWRITE_TIFF_COMPRESSION_SGILOG24, IMWRITE_TIFF_COMPRESSION_JP2000, IMWRITE_TIFF_COMPRESSION_LERC, IMWRITE_TIFF_COMPRESSION_LZMA, IMWRITE_TIFF_COMPRESSION_ZSTD, IMWRITE_TIFF_COMPRESSION_WEBP, IMWRITE_TIFF_COMPRESSION_JXL]""" + +IMWRITE_TIFF_PREDICTOR_NONE: int +IMWRITE_TIFF_PREDICTOR_HORIZONTAL: int +IMWRITE_TIFF_PREDICTOR_FLOATINGPOINT: int +ImwriteTiffPredictorFlags = int +"""One of [IMWRITE_TIFF_PREDICTOR_NONE, IMWRITE_TIFF_PREDICTOR_HORIZONTAL, IMWRITE_TIFF_PREDICTOR_FLOATINGPOINT]""" + +IMWRITE_TIFF_RESOLUTION_UNIT_NONE: int +IMWRITE_TIFF_RESOLUTION_UNIT_INCH: int +IMWRITE_TIFF_RESOLUTION_UNIT_CENTIMETER: int +ImwriteTiffResolutionUnitFlags = int +"""One of [IMWRITE_TIFF_RESOLUTION_UNIT_NONE, IMWRITE_TIFF_RESOLUTION_UNIT_INCH, IMWRITE_TIFF_RESOLUTION_UNIT_CENTIMETER]""" + +IMWRITE_EXR_TYPE_HALF: int +IMWRITE_EXR_TYPE_FLOAT: int +ImwriteEXRTypeFlags = int +"""One of [IMWRITE_EXR_TYPE_HALF, IMWRITE_EXR_TYPE_FLOAT]""" + +IMWRITE_EXR_COMPRESSION_NO: int +IMWRITE_EXR_COMPRESSION_RLE: int +IMWRITE_EXR_COMPRESSION_ZIPS: int +IMWRITE_EXR_COMPRESSION_ZIP: int +IMWRITE_EXR_COMPRESSION_PIZ: int +IMWRITE_EXR_COMPRESSION_PXR24: int +IMWRITE_EXR_COMPRESSION_B44: int +IMWRITE_EXR_COMPRESSION_B44A: int +IMWRITE_EXR_COMPRESSION_DWAA: int +IMWRITE_EXR_COMPRESSION_DWAB: int +ImwriteEXRCompressionFlags = int +"""One of [IMWRITE_EXR_COMPRESSION_NO, IMWRITE_EXR_COMPRESSION_RLE, IMWRITE_EXR_COMPRESSION_ZIPS, IMWRITE_EXR_COMPRESSION_ZIP, IMWRITE_EXR_COMPRESSION_PIZ, IMWRITE_EXR_COMPRESSION_PXR24, IMWRITE_EXR_COMPRESSION_B44, IMWRITE_EXR_COMPRESSION_B44A, IMWRITE_EXR_COMPRESSION_DWAA, IMWRITE_EXR_COMPRESSION_DWAB]""" + +IMWRITE_PNG_STRATEGY_DEFAULT: int +IMWRITE_PNG_STRATEGY_FILTERED: int +IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY: int +IMWRITE_PNG_STRATEGY_RLE: int +IMWRITE_PNG_STRATEGY_FIXED: int +ImwritePNGFlags = int +"""One of [IMWRITE_PNG_STRATEGY_DEFAULT, IMWRITE_PNG_STRATEGY_FILTERED, IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY, IMWRITE_PNG_STRATEGY_RLE, IMWRITE_PNG_STRATEGY_FIXED]""" + +IMWRITE_PNG_FILTER_NONE: int +IMWRITE_PNG_FILTER_SUB: int +IMWRITE_PNG_FILTER_UP: int +IMWRITE_PNG_FILTER_AVG: int +IMWRITE_PNG_FILTER_PAETH: int +IMWRITE_PNG_FAST_FILTERS: int +IMWRITE_PNG_ALL_FILTERS: int +ImwritePNGFilterFlags = int +"""One of [IMWRITE_PNG_FILTER_NONE, IMWRITE_PNG_FILTER_SUB, IMWRITE_PNG_FILTER_UP, IMWRITE_PNG_FILTER_AVG, IMWRITE_PNG_FILTER_PAETH, IMWRITE_PNG_FAST_FILTERS, IMWRITE_PNG_ALL_FILTERS]""" + +IMWRITE_PAM_FORMAT_NULL: int +IMWRITE_PAM_FORMAT_BLACKANDWHITE: int +IMWRITE_PAM_FORMAT_GRAYSCALE: int +IMWRITE_PAM_FORMAT_GRAYSCALE_ALPHA: int +IMWRITE_PAM_FORMAT_RGB: int +IMWRITE_PAM_FORMAT_RGB_ALPHA: int +ImwritePAMFlags = int +"""One of [IMWRITE_PAM_FORMAT_NULL, IMWRITE_PAM_FORMAT_BLACKANDWHITE, IMWRITE_PAM_FORMAT_GRAYSCALE, IMWRITE_PAM_FORMAT_GRAYSCALE_ALPHA, IMWRITE_PAM_FORMAT_RGB, IMWRITE_PAM_FORMAT_RGB_ALPHA]""" + +IMWRITE_WEBP_LOSSLESS_OFF: int +IMWRITE_WEBP_LOSSLESS_ON: int +IMWRITE_WEBP_LOSSLESS_PRESERVE_COLOR: int +ImwriteWEBPLosslessMode = int +"""One of [IMWRITE_WEBP_LOSSLESS_OFF, IMWRITE_WEBP_LOSSLESS_ON, IMWRITE_WEBP_LOSSLESS_PRESERVE_COLOR]""" + +IMWRITE_HDR_COMPRESSION_NONE: int +IMWRITE_HDR_COMPRESSION_RLE: int +ImwriteHDRCompressionFlags = int +"""One of [IMWRITE_HDR_COMPRESSION_NONE, IMWRITE_HDR_COMPRESSION_RLE]""" + +IMWRITE_BMP_COMPRESSION_RGB: int +IMWRITE_BMP_COMPRESSION_BITFIELDS: int +ImwriteBMPCompressionFlags = int +"""One of [IMWRITE_BMP_COMPRESSION_RGB, IMWRITE_BMP_COMPRESSION_BITFIELDS]""" + +IMWRITE_GIF_FAST_NO_DITHER: int +IMWRITE_GIF_FAST_FLOYD_DITHER: int +IMWRITE_GIF_COLORTABLE_SIZE_8: int +IMWRITE_GIF_COLORTABLE_SIZE_16: int +IMWRITE_GIF_COLORTABLE_SIZE_32: int +IMWRITE_GIF_COLORTABLE_SIZE_64: int +IMWRITE_GIF_COLORTABLE_SIZE_128: int +IMWRITE_GIF_COLORTABLE_SIZE_256: int +ImwriteGIFCompressionFlags = int +"""One of [IMWRITE_GIF_FAST_NO_DITHER, IMWRITE_GIF_FAST_FLOYD_DITHER, IMWRITE_GIF_COLORTABLE_SIZE_8, IMWRITE_GIF_COLORTABLE_SIZE_16, IMWRITE_GIF_COLORTABLE_SIZE_32, IMWRITE_GIF_COLORTABLE_SIZE_64, IMWRITE_GIF_COLORTABLE_SIZE_128, IMWRITE_GIF_COLORTABLE_SIZE_256]""" + +IMAGE_METADATA_UNKNOWN: int +IMAGE_METADATA_EXIF: int +IMAGE_METADATA_XMP: int +IMAGE_METADATA_ICCP: int +IMAGE_METADATA_CICP: int +IMAGE_METADATA_MAX: int +ImageMetadataType = int +"""One of [IMAGE_METADATA_UNKNOWN, IMAGE_METADATA_EXIF, IMAGE_METADATA_XMP, IMAGE_METADATA_ICCP, IMAGE_METADATA_CICP, IMAGE_METADATA_MAX]""" + +CAP_ANY: int +CAP_V4L: int +CAP_V4L2: int +CAP_FIREWIRE: int +CAP_FIREWARE: int +CAP_IEEE1394: int +CAP_DC1394: int +CAP_CMU1394: int +CAP_DSHOW: int +CAP_PVAPI: int +CAP_ANDROID: int +CAP_XIAPI: int +CAP_AVFOUNDATION: int +CAP_MSMF: int +CAP_WINRT: int +CAP_INTELPERC: int +CAP_REALSENSE: int +CAP_OPENNI2: int +CAP_OPENNI2_ASUS: int +CAP_OPENNI2_ASTRA: int +CAP_GPHOTO2: int +CAP_GSTREAMER: int +CAP_FFMPEG: int +CAP_IMAGES: int +CAP_ARAVIS: int +CAP_OPENCV_MJPEG: int +CAP_INTEL_MFX: int +CAP_XINE: int +CAP_UEYE: int +CAP_OBSENSOR: int +VideoCaptureAPIs = int +"""One of [CAP_ANY, CAP_V4L, CAP_V4L2, CAP_FIREWIRE, CAP_FIREWARE, CAP_IEEE1394, CAP_DC1394, CAP_CMU1394, CAP_DSHOW, CAP_PVAPI, CAP_ANDROID, CAP_XIAPI, CAP_AVFOUNDATION, CAP_MSMF, CAP_WINRT, CAP_INTELPERC, CAP_REALSENSE, CAP_OPENNI2, CAP_OPENNI2_ASUS, CAP_OPENNI2_ASTRA, CAP_GPHOTO2, CAP_GSTREAMER, CAP_FFMPEG, CAP_IMAGES, CAP_ARAVIS, CAP_OPENCV_MJPEG, CAP_INTEL_MFX, CAP_XINE, CAP_UEYE, CAP_OBSENSOR]""" + +CAP_PROP_UNKNOWN: int +CAP_PROP_POS_MSEC: int +CAP_PROP_POS_FRAMES: int +CAP_PROP_POS_AVI_RATIO: int +CAP_PROP_FRAME_WIDTH: int +CAP_PROP_FRAME_HEIGHT: int +CAP_PROP_FPS: int +CAP_PROP_FOURCC: int +CAP_PROP_FRAME_COUNT: int +CAP_PROP_FORMAT: int +CAP_PROP_MODE: int +CAP_PROP_BRIGHTNESS: int +CAP_PROP_CONTRAST: int +CAP_PROP_SATURATION: int +CAP_PROP_HUE: int +CAP_PROP_GAIN: int +CAP_PROP_EXPOSURE: int +CAP_PROP_CONVERT_RGB: int +CAP_PROP_WHITE_BALANCE_BLUE_U: int +CAP_PROP_RECTIFICATION: int +CAP_PROP_MONOCHROME: int +CAP_PROP_SHARPNESS: int +CAP_PROP_AUTO_EXPOSURE: int +CAP_PROP_GAMMA: int +CAP_PROP_TEMPERATURE: int +CAP_PROP_TRIGGER: int +CAP_PROP_TRIGGER_DELAY: int +CAP_PROP_WHITE_BALANCE_RED_V: int +CAP_PROP_ZOOM: int +CAP_PROP_FOCUS: int +CAP_PROP_GUID: int +CAP_PROP_ISO_SPEED: int +CAP_PROP_BACKLIGHT: int +CAP_PROP_PAN: int +CAP_PROP_TILT: int +CAP_PROP_ROLL: int +CAP_PROP_IRIS: int +CAP_PROP_SETTINGS: int +CAP_PROP_BUFFERSIZE: int +CAP_PROP_AUTOFOCUS: int +CAP_PROP_SAR_NUM: int +CAP_PROP_SAR_DEN: int +CAP_PROP_BACKEND: int +CAP_PROP_CHANNEL: int +CAP_PROP_AUTO_WB: int +CAP_PROP_WB_TEMPERATURE: int +CAP_PROP_CODEC_PIXEL_FORMAT: int +CAP_PROP_BITRATE: int +CAP_PROP_ORIENTATION_META: int +CAP_PROP_ORIENTATION_AUTO: int +CAP_PROP_HW_ACCELERATION: int +CAP_PROP_HW_DEVICE: int +CAP_PROP_HW_ACCELERATION_USE_OPENCL: int +CAP_PROP_OPEN_TIMEOUT_MSEC: int +CAP_PROP_READ_TIMEOUT_MSEC: int +CAP_PROP_STREAM_OPEN_TIME_USEC: int +CAP_PROP_VIDEO_TOTAL_CHANNELS: int +CAP_PROP_VIDEO_STREAM: int +CAP_PROP_AUDIO_STREAM: int +CAP_PROP_AUDIO_POS: int +CAP_PROP_AUDIO_SHIFT_NSEC: int +CAP_PROP_AUDIO_DATA_DEPTH: int +CAP_PROP_AUDIO_SAMPLES_PER_SECOND: int +CAP_PROP_AUDIO_BASE_INDEX: int +CAP_PROP_AUDIO_TOTAL_CHANNELS: int +CAP_PROP_AUDIO_TOTAL_STREAMS: int +CAP_PROP_AUDIO_SYNCHRONIZE: int +CAP_PROP_LRF_HAS_KEY_FRAME: int +CAP_PROP_CODEC_EXTRADATA_INDEX: int +CAP_PROP_FRAME_TYPE: int +CAP_PROP_N_THREADS: int +CAP_PROP_PTS: int +CAP_PROP_DTS_DELAY: int +CAP_PROP_IMAGE_SEQ_START: int +VideoCaptureProperties = int +"""One of [CAP_PROP_UNKNOWN, CAP_PROP_POS_MSEC, CAP_PROP_POS_FRAMES, CAP_PROP_POS_AVI_RATIO, CAP_PROP_FRAME_WIDTH, CAP_PROP_FRAME_HEIGHT, CAP_PROP_FPS, CAP_PROP_FOURCC, CAP_PROP_FRAME_COUNT, CAP_PROP_FORMAT, CAP_PROP_MODE, CAP_PROP_BRIGHTNESS, CAP_PROP_CONTRAST, CAP_PROP_SATURATION, CAP_PROP_HUE, CAP_PROP_GAIN, CAP_PROP_EXPOSURE, CAP_PROP_CONVERT_RGB, CAP_PROP_WHITE_BALANCE_BLUE_U, CAP_PROP_RECTIFICATION, CAP_PROP_MONOCHROME, CAP_PROP_SHARPNESS, CAP_PROP_AUTO_EXPOSURE, CAP_PROP_GAMMA, CAP_PROP_TEMPERATURE, CAP_PROP_TRIGGER, CAP_PROP_TRIGGER_DELAY, CAP_PROP_WHITE_BALANCE_RED_V, CAP_PROP_ZOOM, CAP_PROP_FOCUS, CAP_PROP_GUID, CAP_PROP_ISO_SPEED, CAP_PROP_BACKLIGHT, CAP_PROP_PAN, CAP_PROP_TILT, CAP_PROP_ROLL, CAP_PROP_IRIS, CAP_PROP_SETTINGS, CAP_PROP_BUFFERSIZE, CAP_PROP_AUTOFOCUS, CAP_PROP_SAR_NUM, CAP_PROP_SAR_DEN, CAP_PROP_BACKEND, CAP_PROP_CHANNEL, CAP_PROP_AUTO_WB, CAP_PROP_WB_TEMPERATURE, CAP_PROP_CODEC_PIXEL_FORMAT, CAP_PROP_BITRATE, CAP_PROP_ORIENTATION_META, CAP_PROP_ORIENTATION_AUTO, CAP_PROP_HW_ACCELERATION, CAP_PROP_HW_DEVICE, CAP_PROP_HW_ACCELERATION_USE_OPENCL, CAP_PROP_OPEN_TIMEOUT_MSEC, CAP_PROP_READ_TIMEOUT_MSEC, CAP_PROP_STREAM_OPEN_TIME_USEC, CAP_PROP_VIDEO_TOTAL_CHANNELS, CAP_PROP_VIDEO_STREAM, CAP_PROP_AUDIO_STREAM, CAP_PROP_AUDIO_POS, CAP_PROP_AUDIO_SHIFT_NSEC, CAP_PROP_AUDIO_DATA_DEPTH, CAP_PROP_AUDIO_SAMPLES_PER_SECOND, CAP_PROP_AUDIO_BASE_INDEX, CAP_PROP_AUDIO_TOTAL_CHANNELS, CAP_PROP_AUDIO_TOTAL_STREAMS, CAP_PROP_AUDIO_SYNCHRONIZE, CAP_PROP_LRF_HAS_KEY_FRAME, CAP_PROP_CODEC_EXTRADATA_INDEX, CAP_PROP_FRAME_TYPE, CAP_PROP_N_THREADS, CAP_PROP_PTS, CAP_PROP_DTS_DELAY, CAP_PROP_IMAGE_SEQ_START]""" + +VIDEOWRITER_PROP_UNKNOWN: int +VIDEOWRITER_PROP_QUALITY: int +VIDEOWRITER_PROP_FRAMEBYTES: int +VIDEOWRITER_PROP_NSTRIPES: int +VIDEOWRITER_PROP_IS_COLOR: int +VIDEOWRITER_PROP_DEPTH: int +VIDEOWRITER_PROP_HW_ACCELERATION: int +VIDEOWRITER_PROP_HW_DEVICE: int +VIDEOWRITER_PROP_HW_ACCELERATION_USE_OPENCL: int +VIDEOWRITER_PROP_RAW_VIDEO: int +VIDEOWRITER_PROP_KEY_INTERVAL: int +VIDEOWRITER_PROP_KEY_FLAG: int +VIDEOWRITER_PROP_PTS: int +VIDEOWRITER_PROP_DTS_DELAY: int +VIDEOWRITER_PROP_COLOR_SPACE: int +VIDEOWRITER_PROP_ENABLE_ALPHA: int +VideoWriterProperties = int +"""One of [VIDEOWRITER_PROP_UNKNOWN, VIDEOWRITER_PROP_QUALITY, VIDEOWRITER_PROP_FRAMEBYTES, VIDEOWRITER_PROP_NSTRIPES, VIDEOWRITER_PROP_IS_COLOR, VIDEOWRITER_PROP_DEPTH, VIDEOWRITER_PROP_HW_ACCELERATION, VIDEOWRITER_PROP_HW_DEVICE, VIDEOWRITER_PROP_HW_ACCELERATION_USE_OPENCL, VIDEOWRITER_PROP_RAW_VIDEO, VIDEOWRITER_PROP_KEY_INTERVAL, VIDEOWRITER_PROP_KEY_FLAG, VIDEOWRITER_PROP_PTS, VIDEOWRITER_PROP_DTS_DELAY, VIDEOWRITER_PROP_COLOR_SPACE, VIDEOWRITER_PROP_ENABLE_ALPHA]""" + +VIDEO_ACCELERATION_NONE: int +VIDEO_ACCELERATION_ANY: int +VIDEO_ACCELERATION_D3D11: int +VIDEO_ACCELERATION_VAAPI: int +VIDEO_ACCELERATION_MFX: int +VIDEO_ACCELERATION_DRM: int +VideoAccelerationType = int +"""One of [VIDEO_ACCELERATION_NONE, VIDEO_ACCELERATION_ANY, VIDEO_ACCELERATION_D3D11, VIDEO_ACCELERATION_VAAPI, VIDEO_ACCELERATION_MFX, VIDEO_ACCELERATION_DRM]""" + +CAP_OBSENSOR_DEPTH_MAP: int +CAP_OBSENSOR_BGR_IMAGE: int +CAP_OBSENSOR_IR_IMAGE: int +VideoCaptureOBSensorDataType = int +"""One of [CAP_OBSENSOR_DEPTH_MAP, CAP_OBSENSOR_BGR_IMAGE, CAP_OBSENSOR_IR_IMAGE]""" + +CAP_OBSENSOR_DEPTH_GENERATOR: int +CAP_OBSENSOR_IMAGE_GENERATOR: int +CAP_OBSENSOR_IR_GENERATOR: int +CAP_OBSENSOR_GENERATORS_MASK: int +VideoCaptureOBSensorGenerators = int +"""One of [CAP_OBSENSOR_DEPTH_GENERATOR, CAP_OBSENSOR_IMAGE_GENERATOR, CAP_OBSENSOR_IR_GENERATOR, CAP_OBSENSOR_GENERATORS_MASK]""" + +CAP_PROP_OBSENSOR_INTRINSIC_FX: int +CAP_PROP_OBSENSOR_INTRINSIC_FY: int +CAP_PROP_OBSENSOR_INTRINSIC_CX: int +CAP_PROP_OBSENSOR_INTRINSIC_CY: int +CAP_PROP_OBSENSOR_RGB_POS_MSEC: int +CAP_PROP_OBSENSOR_DEPTH_POS_MSEC: int +CAP_PROP_OBSENSOR_DEPTH_WIDTH: int +CAP_PROP_OBSENSOR_DEPTH_HEIGHT: int +CAP_PROP_OBSENSOR_DEPTH_FPS: int +CAP_PROP_OBSENSOR_COLOR_DISTORTION_K1: int +CAP_PROP_OBSENSOR_COLOR_DISTORTION_K2: int +CAP_PROP_OBSENSOR_COLOR_DISTORTION_K3: int +CAP_PROP_OBSENSOR_COLOR_DISTORTION_K4: int +CAP_PROP_OBSENSOR_COLOR_DISTORTION_K5: int +CAP_PROP_OBSENSOR_COLOR_DISTORTION_K6: int +CAP_PROP_OBSENSOR_COLOR_DISTORTION_P1: int +CAP_PROP_OBSENSOR_COLOR_DISTORTION_P2: int +VideoCaptureOBSensorProperties = int +"""One of [CAP_PROP_OBSENSOR_INTRINSIC_FX, CAP_PROP_OBSENSOR_INTRINSIC_FY, CAP_PROP_OBSENSOR_INTRINSIC_CX, CAP_PROP_OBSENSOR_INTRINSIC_CY, CAP_PROP_OBSENSOR_RGB_POS_MSEC, CAP_PROP_OBSENSOR_DEPTH_POS_MSEC, CAP_PROP_OBSENSOR_DEPTH_WIDTH, CAP_PROP_OBSENSOR_DEPTH_HEIGHT, CAP_PROP_OBSENSOR_DEPTH_FPS, CAP_PROP_OBSENSOR_COLOR_DISTORTION_K1, CAP_PROP_OBSENSOR_COLOR_DISTORTION_K2, CAP_PROP_OBSENSOR_COLOR_DISTORTION_K3, CAP_PROP_OBSENSOR_COLOR_DISTORTION_K4, CAP_PROP_OBSENSOR_COLOR_DISTORTION_K5, CAP_PROP_OBSENSOR_COLOR_DISTORTION_K6, CAP_PROP_OBSENSOR_COLOR_DISTORTION_P1, CAP_PROP_OBSENSOR_COLOR_DISTORTION_P2]""" + +CALIB_MODEL_PINHOLE: int +CALIB_MODEL_FISHEYE: int +CameraModel = int +"""One of [CALIB_MODEL_PINHOLE, CALIB_MODEL_FISHEYE]""" + +CALIB_HAND_EYE_TSAI: int +CALIB_HAND_EYE_PARK: int +CALIB_HAND_EYE_HORAUD: int +CALIB_HAND_EYE_ANDREFF: int +CALIB_HAND_EYE_DANIILIDIS: int +HandEyeCalibrationMethod = int +"""One of [CALIB_HAND_EYE_TSAI, CALIB_HAND_EYE_PARK, CALIB_HAND_EYE_HORAUD, CALIB_HAND_EYE_ANDREFF, CALIB_HAND_EYE_DANIILIDIS]""" + +CALIB_ROBOT_WORLD_HAND_EYE_SHAH: int +CALIB_ROBOT_WORLD_HAND_EYE_LI: int +RobotWorldHandEyeCalibrationMethod = int +"""One of [CALIB_ROBOT_WORLD_HAND_EYE_SHAH, CALIB_ROBOT_WORLD_HAND_EYE_LI]""" + +WINDOW_NORMAL: int +WINDOW_AUTOSIZE: int +WINDOW_OPENGL: int +WINDOW_FULLSCREEN: int +WINDOW_FREERATIO: int +WINDOW_KEEPRATIO: int +WINDOW_GUI_EXPANDED: int +WINDOW_GUI_NORMAL: int +WindowFlags = int +"""One of [WINDOW_NORMAL, WINDOW_AUTOSIZE, WINDOW_OPENGL, WINDOW_FULLSCREEN, WINDOW_FREERATIO, WINDOW_KEEPRATIO, WINDOW_GUI_EXPANDED, WINDOW_GUI_NORMAL]""" + +WND_PROP_FULLSCREEN: int +WND_PROP_AUTOSIZE: int +WND_PROP_ASPECT_RATIO: int +WND_PROP_OPENGL: int +WND_PROP_VISIBLE: int +WND_PROP_TOPMOST: int +WND_PROP_VSYNC: int +WindowPropertyFlags = int +"""One of [WND_PROP_FULLSCREEN, WND_PROP_AUTOSIZE, WND_PROP_ASPECT_RATIO, WND_PROP_OPENGL, WND_PROP_VISIBLE, WND_PROP_TOPMOST, WND_PROP_VSYNC]""" + +EVENT_MOUSEMOVE: int +EVENT_LBUTTONDOWN: int +EVENT_RBUTTONDOWN: int +EVENT_MBUTTONDOWN: int +EVENT_LBUTTONUP: int +EVENT_RBUTTONUP: int +EVENT_MBUTTONUP: int +EVENT_LBUTTONDBLCLK: int +EVENT_RBUTTONDBLCLK: int +EVENT_MBUTTONDBLCLK: int +EVENT_MOUSEWHEEL: int +EVENT_MOUSEHWHEEL: int +MouseEventTypes = int +"""One of [EVENT_MOUSEMOVE, EVENT_LBUTTONDOWN, EVENT_RBUTTONDOWN, EVENT_MBUTTONDOWN, EVENT_LBUTTONUP, EVENT_RBUTTONUP, EVENT_MBUTTONUP, EVENT_LBUTTONDBLCLK, EVENT_RBUTTONDBLCLK, EVENT_MBUTTONDBLCLK, EVENT_MOUSEWHEEL, EVENT_MOUSEHWHEEL]""" + +EVENT_FLAG_LBUTTON: int +EVENT_FLAG_RBUTTON: int +EVENT_FLAG_MBUTTON: int +EVENT_FLAG_CTRLKEY: int +EVENT_FLAG_SHIFTKEY: int +EVENT_FLAG_ALTKEY: int +MouseEventFlags = int +"""One of [EVENT_FLAG_LBUTTON, EVENT_FLAG_RBUTTON, EVENT_FLAG_MBUTTON, EVENT_FLAG_CTRLKEY, EVENT_FLAG_SHIFTKEY, EVENT_FLAG_ALTKEY]""" + +QT_FONT_LIGHT: int +QT_FONT_NORMAL: int +QT_FONT_DEMIBOLD: int +QT_FONT_BOLD: int +QT_FONT_BLACK: int +QtFontWeights = int +"""One of [QT_FONT_LIGHT, QT_FONT_NORMAL, QT_FONT_DEMIBOLD, QT_FONT_BOLD, QT_FONT_BLACK]""" + +QT_STYLE_NORMAL: int +QT_STYLE_ITALIC: int +QT_STYLE_OBLIQUE: int +QtFontStyles = int +"""One of [QT_STYLE_NORMAL, QT_STYLE_ITALIC, QT_STYLE_OBLIQUE]""" + +QT_PUSH_BUTTON: int +QT_CHECKBOX: int +QT_RADIOBOX: int +QT_NEW_BUTTONBAR: int +QtButtonTypes = int +"""One of [QT_PUSH_BUTTON, QT_CHECKBOX, QT_RADIOBOX, QT_NEW_BUTTONBAR]""" + + +MatShape_MAX_DIMS: int +MAT_SHAPE_MAX_DIMS: int + +FileStorage_READ: int +FILE_STORAGE_READ: int +FileStorage_WRITE: int +FILE_STORAGE_WRITE: int +FileStorage_APPEND: int +FILE_STORAGE_APPEND: int +FileStorage_MEMORY: int +FILE_STORAGE_MEMORY: int +FileStorage_FORMAT_MASK: int +FILE_STORAGE_FORMAT_MASK: int +FileStorage_FORMAT_AUTO: int +FILE_STORAGE_FORMAT_AUTO: int +FileStorage_FORMAT_XML: int +FILE_STORAGE_FORMAT_XML: int +FileStorage_FORMAT_YAML: int +FILE_STORAGE_FORMAT_YAML: int +FileStorage_FORMAT_JSON: int +FILE_STORAGE_FORMAT_JSON: int +FileStorage_FORMAT_YAML_1_0: int +FILE_STORAGE_FORMAT_YAML_1_0: int +FileStorage_BASE64: int +FILE_STORAGE_BASE64: int +FileStorage_WRITE_BASE64: int +FILE_STORAGE_WRITE_BASE64: int +FileStorage_Mode = int +"""One of [FileStorage_READ, FILE_STORAGE_READ, FileStorage_WRITE, FILE_STORAGE_WRITE, FileStorage_APPEND, FILE_STORAGE_APPEND, FileStorage_MEMORY, FILE_STORAGE_MEMORY, FileStorage_FORMAT_MASK, FILE_STORAGE_FORMAT_MASK, FileStorage_FORMAT_AUTO, FILE_STORAGE_FORMAT_AUTO, FileStorage_FORMAT_XML, FILE_STORAGE_FORMAT_XML, FileStorage_FORMAT_YAML, FILE_STORAGE_FORMAT_YAML, FileStorage_FORMAT_JSON, FILE_STORAGE_FORMAT_JSON, FileStorage_FORMAT_YAML_1_0, FILE_STORAGE_FORMAT_YAML_1_0, FileStorage_BASE64, FILE_STORAGE_BASE64, FileStorage_WRITE_BASE64, FILE_STORAGE_WRITE_BASE64]""" + +FileStorage_UNDEFINED: int +FILE_STORAGE_UNDEFINED: int +FileStorage_VALUE_EXPECTED: int +FILE_STORAGE_VALUE_EXPECTED: int +FileStorage_NAME_EXPECTED: int +FILE_STORAGE_NAME_EXPECTED: int +FileStorage_INSIDE_MAP: int +FILE_STORAGE_INSIDE_MAP: int +FileStorage_State = int +"""One of [FileStorage_UNDEFINED, FILE_STORAGE_UNDEFINED, FileStorage_VALUE_EXPECTED, FILE_STORAGE_VALUE_EXPECTED, FileStorage_NAME_EXPECTED, FILE_STORAGE_NAME_EXPECTED, FileStorage_INSIDE_MAP, FILE_STORAGE_INSIDE_MAP]""" + +FileNode_NONE: int +FILE_NODE_NONE: int +FileNode_INT: int +FILE_NODE_INT: int +FileNode_REAL: int +FILE_NODE_REAL: int +FileNode_FLOAT: int +FILE_NODE_FLOAT: int +FileNode_STR: int +FILE_NODE_STR: int +FileNode_STRING: int +FILE_NODE_STRING: int +FileNode_SEQ: int +FILE_NODE_SEQ: int +FileNode_MAP: int +FILE_NODE_MAP: int +FileNode_TYPE_MASK: int +FILE_NODE_TYPE_MASK: int +FileNode_FLOW: int +FILE_NODE_FLOW: int +FileNode_UNIFORM: int +FILE_NODE_UNIFORM: int +FileNode_EMPTY: int +FILE_NODE_EMPTY: int +FileNode_NAMED: int +FILE_NODE_NAMED: int + +UMat_MAGIC_VAL: int +UMAT_MAGIC_VAL: int +UMat_AUTO_STEP: int +UMAT_AUTO_STEP: int +UMat_CONTINUOUS_FLAG: int +UMAT_CONTINUOUS_FLAG: int +UMat_SUBMATRIX_FLAG: int +UMAT_SUBMATRIX_FLAG: int +UMat_MAGIC_MASK: int +UMAT_MAGIC_MASK: int +UMat_TYPE_MASK: int +UMAT_TYPE_MASK: int +UMat_DEPTH_MASK: int +UMAT_DEPTH_MASK: int + +Subdiv2D_PTLOC_ERROR: int +SUBDIV2D_PTLOC_ERROR: int +Subdiv2D_PTLOC_OUTSIDE_RECT: int +SUBDIV2D_PTLOC_OUTSIDE_RECT: int +Subdiv2D_PTLOC_INSIDE: int +SUBDIV2D_PTLOC_INSIDE: int +Subdiv2D_PTLOC_VERTEX: int +SUBDIV2D_PTLOC_VERTEX: int +Subdiv2D_PTLOC_ON_EDGE: int +SUBDIV2D_PTLOC_ON_EDGE: int +Subdiv2D_NEXT_AROUND_ORG: int +SUBDIV2D_NEXT_AROUND_ORG: int +Subdiv2D_NEXT_AROUND_DST: int +SUBDIV2D_NEXT_AROUND_DST: int +Subdiv2D_PREV_AROUND_ORG: int +SUBDIV2D_PREV_AROUND_ORG: int +Subdiv2D_PREV_AROUND_DST: int +SUBDIV2D_PREV_AROUND_DST: int +Subdiv2D_NEXT_AROUND_LEFT: int +SUBDIV2D_NEXT_AROUND_LEFT: int +Subdiv2D_NEXT_AROUND_RIGHT: int +SUBDIV2D_NEXT_AROUND_RIGHT: int +Subdiv2D_PREV_AROUND_LEFT: int +SUBDIV2D_PREV_AROUND_LEFT: int +Subdiv2D_PREV_AROUND_RIGHT: int +SUBDIV2D_PREV_AROUND_RIGHT: int + +RgbdNormals_RGBD_NORMALS_METHOD_FALS: int +RGBD_NORMALS_RGBD_NORMALS_METHOD_FALS: int +RgbdNormals_RGBD_NORMALS_METHOD_LINEMOD: int +RGBD_NORMALS_RGBD_NORMALS_METHOD_LINEMOD: int +RgbdNormals_RGBD_NORMALS_METHOD_SRI: int +RGBD_NORMALS_RGBD_NORMALS_METHOD_SRI: int +RgbdNormals_RGBD_NORMALS_METHOD_CROSS_PRODUCT: int +RGBD_NORMALS_RGBD_NORMALS_METHOD_CROSS_PRODUCT: int +RgbdNormals_RgbdNormalsMethod = int +"""One of [RgbdNormals_RGBD_NORMALS_METHOD_FALS, RGBD_NORMALS_RGBD_NORMALS_METHOD_FALS, RgbdNormals_RGBD_NORMALS_METHOD_LINEMOD, RGBD_NORMALS_RGBD_NORMALS_METHOD_LINEMOD, RgbdNormals_RGBD_NORMALS_METHOD_SRI, RGBD_NORMALS_RGBD_NORMALS_METHOD_SRI, RgbdNormals_RGBD_NORMALS_METHOD_CROSS_PRODUCT, RGBD_NORMALS_RGBD_NORMALS_METHOD_CROSS_PRODUCT]""" + +Volume_VOLUME_UNIT: int +VOLUME_VOLUME_UNIT: int +Volume_VOXEL: int +VOLUME_VOXEL: int +Volume_BoundingBoxPrecision = int +"""One of [Volume_VOLUME_UNIT, VOLUME_VOLUME_UNIT, Volume_VOXEL, VOLUME_VOXEL]""" + +StereoMatcher_DISP_SHIFT: int +STEREO_MATCHER_DISP_SHIFT: int +StereoMatcher_DISP_SCALE: int +STEREO_MATCHER_DISP_SCALE: int + +StereoBM_PREFILTER_NORMALIZED_RESPONSE: int +STEREO_BM_PREFILTER_NORMALIZED_RESPONSE: int +StereoBM_PREFILTER_XSOBEL: int +STEREO_BM_PREFILTER_XSOBEL: int + +StereoSGBM_MODE_SGBM: int +STEREO_SGBM_MODE_SGBM: int +StereoSGBM_MODE_HH: int +STEREO_SGBM_MODE_HH: int +StereoSGBM_MODE_SGBM_3WAY: int +STEREO_SGBM_MODE_SGBM_3WAY: int +StereoSGBM_MODE_HH4: int +STEREO_SGBM_MODE_HH4: int + +ORB_HARRIS_SCORE: int +ORB_FAST_SCORE: int +ORB_ScoreType = int +"""One of [ORB_HARRIS_SCORE, ORB_FAST_SCORE]""" + +FastFeatureDetector_TYPE_5_8: int +FAST_FEATURE_DETECTOR_TYPE_5_8: int +FastFeatureDetector_TYPE_7_12: int +FAST_FEATURE_DETECTOR_TYPE_7_12: int +FastFeatureDetector_TYPE_9_16: int +FAST_FEATURE_DETECTOR_TYPE_9_16: int +FastFeatureDetector_DetectorType = int +"""One of [FastFeatureDetector_TYPE_5_8, FAST_FEATURE_DETECTOR_TYPE_5_8, FastFeatureDetector_TYPE_7_12, FAST_FEATURE_DETECTOR_TYPE_7_12, FastFeatureDetector_TYPE_9_16, FAST_FEATURE_DETECTOR_TYPE_9_16]""" + +FastFeatureDetector_THRESHOLD: int +FAST_FEATURE_DETECTOR_THRESHOLD: int +FastFeatureDetector_NONMAX_SUPPRESSION: int +FAST_FEATURE_DETECTOR_NONMAX_SUPPRESSION: int +FastFeatureDetector_FAST_N: int +FAST_FEATURE_DETECTOR_FAST_N: int + +DescriptorMatcher_FLANNBASED: int +DESCRIPTOR_MATCHER_FLANNBASED: int +DescriptorMatcher_BRUTEFORCE: int +DESCRIPTOR_MATCHER_BRUTEFORCE: int +DescriptorMatcher_BRUTEFORCE_L1: int +DESCRIPTOR_MATCHER_BRUTEFORCE_L1: int +DescriptorMatcher_BRUTEFORCE_HAMMING: int +DESCRIPTOR_MATCHER_BRUTEFORCE_HAMMING: int +DescriptorMatcher_BRUTEFORCE_HAMMINGLUT: int +DESCRIPTOR_MATCHER_BRUTEFORCE_HAMMINGLUT: int +DescriptorMatcher_BRUTEFORCE_SL2: int +DESCRIPTOR_MATCHER_BRUTEFORCE_SL2: int +DescriptorMatcher_MatcherType = int +"""One of [DescriptorMatcher_FLANNBASED, DESCRIPTOR_MATCHER_FLANNBASED, DescriptorMatcher_BRUTEFORCE, DESCRIPTOR_MATCHER_BRUTEFORCE, DescriptorMatcher_BRUTEFORCE_L1, DESCRIPTOR_MATCHER_BRUTEFORCE_L1, DescriptorMatcher_BRUTEFORCE_HAMMING, DESCRIPTOR_MATCHER_BRUTEFORCE_HAMMING, DescriptorMatcher_BRUTEFORCE_HAMMINGLUT, DESCRIPTOR_MATCHER_BRUTEFORCE_HAMMINGLUT, DescriptorMatcher_BRUTEFORCE_SL2, DESCRIPTOR_MATCHER_BRUTEFORCE_SL2]""" + +ANNIndex_DIST_EUCLIDEAN: int +ANNINDEX_DIST_EUCLIDEAN: int +ANNIndex_DIST_MANHATTAN: int +ANNINDEX_DIST_MANHATTAN: int +ANNIndex_DIST_ANGULAR: int +ANNINDEX_DIST_ANGULAR: int +ANNIndex_DIST_HAMMING: int +ANNINDEX_DIST_HAMMING: int +ANNIndex_DIST_DOTPRODUCT: int +ANNINDEX_DIST_DOTPRODUCT: int +ANNIndex_Distance = int +"""One of [ANNIndex_DIST_EUCLIDEAN, ANNINDEX_DIST_EUCLIDEAN, ANNIndex_DIST_MANHATTAN, ANNINDEX_DIST_MANHATTAN, ANNIndex_DIST_ANGULAR, ANNINDEX_DIST_ANGULAR, ANNIndex_DIST_HAMMING, ANNINDEX_DIST_HAMMING, ANNIndex_DIST_DOTPRODUCT, ANNINDEX_DIST_DOTPRODUCT]""" + +QRCodeEncoder_MODE_AUTO: int +QRCODE_ENCODER_MODE_AUTO: int +QRCodeEncoder_MODE_NUMERIC: int +QRCODE_ENCODER_MODE_NUMERIC: int +QRCodeEncoder_MODE_ALPHANUMERIC: int +QRCODE_ENCODER_MODE_ALPHANUMERIC: int +QRCodeEncoder_MODE_BYTE: int +QRCODE_ENCODER_MODE_BYTE: int +QRCodeEncoder_MODE_ECI: int +QRCODE_ENCODER_MODE_ECI: int +QRCodeEncoder_MODE_KANJI: int +QRCODE_ENCODER_MODE_KANJI: int +QRCodeEncoder_MODE_STRUCTURED_APPEND: int +QRCODE_ENCODER_MODE_STRUCTURED_APPEND: int +QRCodeEncoder_EncodeMode = int +"""One of [QRCodeEncoder_MODE_AUTO, QRCODE_ENCODER_MODE_AUTO, QRCodeEncoder_MODE_NUMERIC, QRCODE_ENCODER_MODE_NUMERIC, QRCodeEncoder_MODE_ALPHANUMERIC, QRCODE_ENCODER_MODE_ALPHANUMERIC, QRCodeEncoder_MODE_BYTE, QRCODE_ENCODER_MODE_BYTE, QRCodeEncoder_MODE_ECI, QRCODE_ENCODER_MODE_ECI, QRCodeEncoder_MODE_KANJI, QRCODE_ENCODER_MODE_KANJI, QRCodeEncoder_MODE_STRUCTURED_APPEND, QRCODE_ENCODER_MODE_STRUCTURED_APPEND]""" + +QRCodeEncoder_CORRECT_LEVEL_L: int +QRCODE_ENCODER_CORRECT_LEVEL_L: int +QRCodeEncoder_CORRECT_LEVEL_M: int +QRCODE_ENCODER_CORRECT_LEVEL_M: int +QRCodeEncoder_CORRECT_LEVEL_Q: int +QRCODE_ENCODER_CORRECT_LEVEL_Q: int +QRCodeEncoder_CORRECT_LEVEL_H: int +QRCODE_ENCODER_CORRECT_LEVEL_H: int +QRCodeEncoder_CorrectionLevel = int +"""One of [QRCodeEncoder_CORRECT_LEVEL_L, QRCODE_ENCODER_CORRECT_LEVEL_L, QRCodeEncoder_CORRECT_LEVEL_M, QRCODE_ENCODER_CORRECT_LEVEL_M, QRCodeEncoder_CORRECT_LEVEL_Q, QRCODE_ENCODER_CORRECT_LEVEL_Q, QRCodeEncoder_CORRECT_LEVEL_H, QRCODE_ENCODER_CORRECT_LEVEL_H]""" + +QRCodeEncoder_ECI_SHIFT_JIS: int +QRCODE_ENCODER_ECI_SHIFT_JIS: int +QRCodeEncoder_ECI_UTF8: int +QRCODE_ENCODER_ECI_UTF8: int +QRCodeEncoder_ECIEncodings = int +"""One of [QRCodeEncoder_ECI_SHIFT_JIS, QRCODE_ENCODER_ECI_SHIFT_JIS, QRCodeEncoder_ECI_UTF8, QRCODE_ENCODER_ECI_UTF8]""" + +CirclesGridFinderParameters_SYMMETRIC_GRID: int +CIRCLES_GRID_FINDER_PARAMETERS_SYMMETRIC_GRID: int +CirclesGridFinderParameters_ASYMMETRIC_GRID: int +CIRCLES_GRID_FINDER_PARAMETERS_ASYMMETRIC_GRID: int +CirclesGridFinderParameters_GridType = int +"""One of [CirclesGridFinderParameters_SYMMETRIC_GRID, CIRCLES_GRID_FINDER_PARAMETERS_SYMMETRIC_GRID, CirclesGridFinderParameters_ASYMMETRIC_GRID, CIRCLES_GRID_FINDER_PARAMETERS_ASYMMETRIC_GRID]""" + +FaceRecognizerSF_FR_COSINE: int +FACE_RECOGNIZER_SF_FR_COSINE: int +FaceRecognizerSF_FR_NORM_L2: int +FACE_RECOGNIZER_SF_FR_NORM_L2: int +FaceRecognizerSF_DisType = int +"""One of [FaceRecognizerSF_FR_COSINE, FACE_RECOGNIZER_SF_FR_COSINE, FaceRecognizerSF_FR_NORM_L2, FACE_RECOGNIZER_SF_FR_NORM_L2]""" + +Stitcher_OK: int +STITCHER_OK: int +Stitcher_ERR_NEED_MORE_IMGS: int +STITCHER_ERR_NEED_MORE_IMGS: int +Stitcher_ERR_HOMOGRAPHY_EST_FAIL: int +STITCHER_ERR_HOMOGRAPHY_EST_FAIL: int +Stitcher_ERR_CAMERA_PARAMS_ADJUST_FAIL: int +STITCHER_ERR_CAMERA_PARAMS_ADJUST_FAIL: int +Stitcher_Status = int +"""One of [Stitcher_OK, STITCHER_OK, Stitcher_ERR_NEED_MORE_IMGS, STITCHER_ERR_NEED_MORE_IMGS, Stitcher_ERR_HOMOGRAPHY_EST_FAIL, STITCHER_ERR_HOMOGRAPHY_EST_FAIL, Stitcher_ERR_CAMERA_PARAMS_ADJUST_FAIL, STITCHER_ERR_CAMERA_PARAMS_ADJUST_FAIL]""" + +Stitcher_PANORAMA: int +STITCHER_PANORAMA: int +Stitcher_SCANS: int +STITCHER_SCANS: int +Stitcher_Mode = int +"""One of [Stitcher_PANORAMA, STITCHER_PANORAMA, Stitcher_SCANS, STITCHER_SCANS]""" + +DISOpticalFlow_PRESET_ULTRAFAST: int +DISOPTICAL_FLOW_PRESET_ULTRAFAST: int +DISOpticalFlow_PRESET_FAST: int +DISOPTICAL_FLOW_PRESET_FAST: int +DISOpticalFlow_PRESET_MEDIUM: int +DISOPTICAL_FLOW_PRESET_MEDIUM: int + +PCA_DATA_AS_ROW: int +PCA_DATA_AS_COL: int +PCA_USE_AVG: int +PCA_Flags = int +"""One of [PCA_DATA_AS_ROW, PCA_DATA_AS_COL, PCA_USE_AVG]""" + +SVD_MODIFY_A: int +SVD_NO_UV: int +SVD_FULL_UV: int +SVD_Flags = int +"""One of [SVD_MODIFY_A, SVD_NO_UV, SVD_FULL_UV]""" + +RNG_UNIFORM: int +RNG_NORMAL: int + +Formatter_FMT_DEFAULT: int +FORMATTER_FMT_DEFAULT: int +Formatter_FMT_MATLAB: int +FORMATTER_FMT_MATLAB: int +Formatter_FMT_CSV: int +FORMATTER_FMT_CSV: int +Formatter_FMT_PYTHON: int +FORMATTER_FMT_PYTHON: int +Formatter_FMT_NUMPY: int +FORMATTER_FMT_NUMPY: int +Formatter_FMT_C: int +FORMATTER_FMT_C: int +Formatter_FormatType = int +"""One of [Formatter_FMT_DEFAULT, FORMATTER_FMT_DEFAULT, Formatter_FMT_MATLAB, FORMATTER_FMT_MATLAB, Formatter_FMT_CSV, FORMATTER_FMT_CSV, Formatter_FMT_PYTHON, FORMATTER_FMT_PYTHON, Formatter_FMT_NUMPY, FORMATTER_FMT_NUMPY, Formatter_FMT_C, FORMATTER_FMT_C]""" + +_InputArray_KIND_SHIFT: int +_INPUT_ARRAY_KIND_SHIFT: int +_InputArray_FIXED_TYPE: int +_INPUT_ARRAY_FIXED_TYPE: int +_InputArray_FIXED_SIZE: int +_INPUT_ARRAY_FIXED_SIZE: int +_InputArray_KIND_MASK: int +_INPUT_ARRAY_KIND_MASK: int +_InputArray_NONE: int +_INPUT_ARRAY_NONE: int +_InputArray_MAT: int +_INPUT_ARRAY_MAT: int +_InputArray_MATX: int +_INPUT_ARRAY_MATX: int +_InputArray_STD_VECTOR: int +_INPUT_ARRAY_STD_VECTOR: int +_InputArray_STD_VECTOR_VECTOR: int +_INPUT_ARRAY_STD_VECTOR_VECTOR: int +_InputArray_STD_VECTOR_MAT: int +_INPUT_ARRAY_STD_VECTOR_MAT: int +_InputArray_OPENGL_BUFFER: int +_INPUT_ARRAY_OPENGL_BUFFER: int +_InputArray_CUDA_HOST_MEM: int +_INPUT_ARRAY_CUDA_HOST_MEM: int +_InputArray_CUDA_GPU_MAT: int +_INPUT_ARRAY_CUDA_GPU_MAT: int +_InputArray_UMAT: int +_INPUT_ARRAY_UMAT: int +_InputArray_STD_VECTOR_UMAT: int +_INPUT_ARRAY_STD_VECTOR_UMAT: int +_InputArray_STD_BOOL_VECTOR: int +_INPUT_ARRAY_STD_BOOL_VECTOR: int +_InputArray_STD_VECTOR_CUDA_GPU_MAT: int +_INPUT_ARRAY_STD_VECTOR_CUDA_GPU_MAT: int +_InputArray_STD_ARRAY_MAT: int +_INPUT_ARRAY_STD_ARRAY_MAT: int +_InputArray_CUDA_GPU_MATND: int +_INPUT_ARRAY_CUDA_GPU_MATND: int +_InputArray_STD_VECTOR_CUDA_GPU_MAT_ND: int +_INPUT_ARRAY_STD_VECTOR_CUDA_GPU_MAT_ND: int +_InputArray_KindFlag = int +"""One of [_InputArray_KIND_SHIFT, _INPUT_ARRAY_KIND_SHIFT, _InputArray_FIXED_TYPE, _INPUT_ARRAY_FIXED_TYPE, _InputArray_FIXED_SIZE, _INPUT_ARRAY_FIXED_SIZE, _InputArray_KIND_MASK, _INPUT_ARRAY_KIND_MASK, _InputArray_NONE, _INPUT_ARRAY_NONE, _InputArray_MAT, _INPUT_ARRAY_MAT, _InputArray_MATX, _INPUT_ARRAY_MATX, _InputArray_STD_VECTOR, _INPUT_ARRAY_STD_VECTOR, _InputArray_STD_VECTOR_VECTOR, _INPUT_ARRAY_STD_VECTOR_VECTOR, _InputArray_STD_VECTOR_MAT, _INPUT_ARRAY_STD_VECTOR_MAT, _InputArray_OPENGL_BUFFER, _INPUT_ARRAY_OPENGL_BUFFER, _InputArray_CUDA_HOST_MEM, _INPUT_ARRAY_CUDA_HOST_MEM, _InputArray_CUDA_GPU_MAT, _INPUT_ARRAY_CUDA_GPU_MAT, _InputArray_UMAT, _INPUT_ARRAY_UMAT, _InputArray_STD_VECTOR_UMAT, _INPUT_ARRAY_STD_VECTOR_UMAT, _InputArray_STD_BOOL_VECTOR, _INPUT_ARRAY_STD_BOOL_VECTOR, _InputArray_STD_VECTOR_CUDA_GPU_MAT, _INPUT_ARRAY_STD_VECTOR_CUDA_GPU_MAT, _InputArray_STD_ARRAY_MAT, _INPUT_ARRAY_STD_ARRAY_MAT, _InputArray_CUDA_GPU_MATND, _INPUT_ARRAY_CUDA_GPU_MATND, _InputArray_STD_VECTOR_CUDA_GPU_MAT_ND, _INPUT_ARRAY_STD_VECTOR_CUDA_GPU_MAT_ND]""" + +_OutputArray_DEPTH_MASK_8U: int +_OUTPUT_ARRAY_DEPTH_MASK_8U: int +_OutputArray_DEPTH_MASK_8S: int +_OUTPUT_ARRAY_DEPTH_MASK_8S: int +_OutputArray_DEPTH_MASK_16U: int +_OUTPUT_ARRAY_DEPTH_MASK_16U: int +_OutputArray_DEPTH_MASK_16S: int +_OUTPUT_ARRAY_DEPTH_MASK_16S: int +_OutputArray_DEPTH_MASK_32S: int +_OUTPUT_ARRAY_DEPTH_MASK_32S: int +_OutputArray_DEPTH_MASK_32F: int +_OUTPUT_ARRAY_DEPTH_MASK_32F: int +_OutputArray_DEPTH_MASK_64F: int +_OUTPUT_ARRAY_DEPTH_MASK_64F: int +_OutputArray_DEPTH_MASK_16F: int +_OUTPUT_ARRAY_DEPTH_MASK_16F: int +_OutputArray_DEPTH_MASK_16BF: int +_OUTPUT_ARRAY_DEPTH_MASK_16BF: int +_OutputArray_DEPTH_MASK_BOOL: int +_OUTPUT_ARRAY_DEPTH_MASK_BOOL: int +_OutputArray_DEPTH_MASK_64U: int +_OUTPUT_ARRAY_DEPTH_MASK_64U: int +_OutputArray_DEPTH_MASK_64S: int +_OUTPUT_ARRAY_DEPTH_MASK_64S: int +_OutputArray_DEPTH_MASK_32U: int +_OUTPUT_ARRAY_DEPTH_MASK_32U: int +_OutputArray_DEPTH_MASK_ALL: int +_OUTPUT_ARRAY_DEPTH_MASK_ALL: int +_OutputArray_DEPTH_MASK_ALL_BUT_8S: int +_OUTPUT_ARRAY_DEPTH_MASK_ALL_BUT_8S: int +_OutputArray_DEPTH_MASK_ALL_16F: int +_OUTPUT_ARRAY_DEPTH_MASK_ALL_16F: int +_OutputArray_DEPTH_MASK_FLT: int +_OUTPUT_ARRAY_DEPTH_MASK_FLT: int +_OutputArray_DepthMask = int +"""One of [_OutputArray_DEPTH_MASK_8U, _OUTPUT_ARRAY_DEPTH_MASK_8U, _OutputArray_DEPTH_MASK_8S, _OUTPUT_ARRAY_DEPTH_MASK_8S, _OutputArray_DEPTH_MASK_16U, _OUTPUT_ARRAY_DEPTH_MASK_16U, _OutputArray_DEPTH_MASK_16S, _OUTPUT_ARRAY_DEPTH_MASK_16S, _OutputArray_DEPTH_MASK_32S, _OUTPUT_ARRAY_DEPTH_MASK_32S, _OutputArray_DEPTH_MASK_32F, _OUTPUT_ARRAY_DEPTH_MASK_32F, _OutputArray_DEPTH_MASK_64F, _OUTPUT_ARRAY_DEPTH_MASK_64F, _OutputArray_DEPTH_MASK_16F, _OUTPUT_ARRAY_DEPTH_MASK_16F, _OutputArray_DEPTH_MASK_16BF, _OUTPUT_ARRAY_DEPTH_MASK_16BF, _OutputArray_DEPTH_MASK_BOOL, _OUTPUT_ARRAY_DEPTH_MASK_BOOL, _OutputArray_DEPTH_MASK_64U, _OUTPUT_ARRAY_DEPTH_MASK_64U, _OutputArray_DEPTH_MASK_64S, _OUTPUT_ARRAY_DEPTH_MASK_64S, _OutputArray_DEPTH_MASK_32U, _OUTPUT_ARRAY_DEPTH_MASK_32U, _OutputArray_DEPTH_MASK_ALL, _OUTPUT_ARRAY_DEPTH_MASK_ALL, _OutputArray_DEPTH_MASK_ALL_BUT_8S, _OUTPUT_ARRAY_DEPTH_MASK_ALL_BUT_8S, _OutputArray_DEPTH_MASK_ALL_16F, _OUTPUT_ARRAY_DEPTH_MASK_ALL_16F, _OutputArray_DEPTH_MASK_FLT, _OUTPUT_ARRAY_DEPTH_MASK_FLT]""" + +UMatData_COPY_ON_MAP: int +UMAT_DATA_COPY_ON_MAP: int +UMatData_HOST_COPY_OBSOLETE: int +UMAT_DATA_HOST_COPY_OBSOLETE: int +UMatData_DEVICE_COPY_OBSOLETE: int +UMAT_DATA_DEVICE_COPY_OBSOLETE: int +UMatData_TEMP_UMAT: int +UMAT_DATA_TEMP_UMAT: int +UMatData_TEMP_COPIED_UMAT: int +UMAT_DATA_TEMP_COPIED_UMAT: int +UMatData_USER_ALLOCATED: int +UMAT_DATA_USER_ALLOCATED: int +UMatData_DEVICE_MEM_MAPPED: int +UMAT_DATA_DEVICE_MEM_MAPPED: int +UMatData_ASYNC_CLEANUP: int +UMAT_DATA_ASYNC_CLEANUP: int +UMatData_MemoryFlag = int +"""One of [UMatData_COPY_ON_MAP, UMAT_DATA_COPY_ON_MAP, UMatData_HOST_COPY_OBSOLETE, UMAT_DATA_HOST_COPY_OBSOLETE, UMatData_DEVICE_COPY_OBSOLETE, UMAT_DATA_DEVICE_COPY_OBSOLETE, UMatData_TEMP_UMAT, UMAT_DATA_TEMP_UMAT, UMatData_TEMP_COPIED_UMAT, UMAT_DATA_TEMP_COPIED_UMAT, UMatData_USER_ALLOCATED, UMAT_DATA_USER_ALLOCATED, UMatData_DEVICE_MEM_MAPPED, UMAT_DATA_DEVICE_MEM_MAPPED, UMatData_ASYNC_CLEANUP, UMAT_DATA_ASYNC_CLEANUP]""" + +Mat_MAGIC_VAL: int +MAT_MAGIC_VAL: int +Mat_AUTO_STEP: int +MAT_AUTO_STEP: int +Mat_CONTINUOUS_FLAG: int +MAT_CONTINUOUS_FLAG: int +Mat_SUBMATRIX_FLAG: int +MAT_SUBMATRIX_FLAG: int +Mat_MAGIC_MASK: int +MAT_MAGIC_MASK: int +Mat_TYPE_MASK: int +MAT_TYPE_MASK: int +Mat_DEPTH_MASK: int +MAT_DEPTH_MASK: int + +SparseMat_MAGIC_VAL: int +SPARSE_MAT_MAGIC_VAL: int +SparseMat_MAX_DIM: int +SPARSE_MAT_MAX_DIM: int +SparseMat_HASH_SCALE: int +SPARSE_MAT_HASH_SCALE: int +SparseMat_HASH_BIT: int +SPARSE_MAT_HASH_BIT: int + +QuatEnum_INT_XYZ: int +QUAT_ENUM_INT_XYZ: int +QuatEnum_INT_XZY: int +QUAT_ENUM_INT_XZY: int +QuatEnum_INT_YXZ: int +QUAT_ENUM_INT_YXZ: int +QuatEnum_INT_YZX: int +QUAT_ENUM_INT_YZX: int +QuatEnum_INT_ZXY: int +QUAT_ENUM_INT_ZXY: int +QuatEnum_INT_ZYX: int +QUAT_ENUM_INT_ZYX: int +QuatEnum_INT_XYX: int +QUAT_ENUM_INT_XYX: int +QuatEnum_INT_XZX: int +QUAT_ENUM_INT_XZX: int +QuatEnum_INT_YXY: int +QUAT_ENUM_INT_YXY: int +QuatEnum_INT_YZY: int +QUAT_ENUM_INT_YZY: int +QuatEnum_INT_ZXZ: int +QUAT_ENUM_INT_ZXZ: int +QuatEnum_INT_ZYZ: int +QUAT_ENUM_INT_ZYZ: int +QuatEnum_EXT_XYZ: int +QUAT_ENUM_EXT_XYZ: int +QuatEnum_EXT_XZY: int +QUAT_ENUM_EXT_XZY: int +QuatEnum_EXT_YXZ: int +QUAT_ENUM_EXT_YXZ: int +QuatEnum_EXT_YZX: int +QUAT_ENUM_EXT_YZX: int +QuatEnum_EXT_ZXY: int +QUAT_ENUM_EXT_ZXY: int +QuatEnum_EXT_ZYX: int +QUAT_ENUM_EXT_ZYX: int +QuatEnum_EXT_XYX: int +QUAT_ENUM_EXT_XYX: int +QuatEnum_EXT_XZX: int +QUAT_ENUM_EXT_XZX: int +QuatEnum_EXT_YXY: int +QUAT_ENUM_EXT_YXY: int +QuatEnum_EXT_YZY: int +QUAT_ENUM_EXT_YZY: int +QuatEnum_EXT_ZXZ: int +QUAT_ENUM_EXT_ZXZ: int +QuatEnum_EXT_ZYZ: int +QUAT_ENUM_EXT_ZYZ: int +QuatEnum_EULER_ANGLES_MAX_VALUE: int +QUAT_ENUM_EULER_ANGLES_MAX_VALUE: int +QuatEnum_EulerAnglesType = int +"""One of [QuatEnum_INT_XYZ, QUAT_ENUM_INT_XYZ, QuatEnum_INT_XZY, QUAT_ENUM_INT_XZY, QuatEnum_INT_YXZ, QUAT_ENUM_INT_YXZ, QuatEnum_INT_YZX, QUAT_ENUM_INT_YZX, QuatEnum_INT_ZXY, QUAT_ENUM_INT_ZXY, QuatEnum_INT_ZYX, QUAT_ENUM_INT_ZYX, QuatEnum_INT_XYX, QUAT_ENUM_INT_XYX, QuatEnum_INT_XZX, QUAT_ENUM_INT_XZX, QuatEnum_INT_YXY, QUAT_ENUM_INT_YXY, QuatEnum_INT_YZY, QUAT_ENUM_INT_YZY, QuatEnum_INT_ZXZ, QUAT_ENUM_INT_ZXZ, QuatEnum_INT_ZYZ, QUAT_ENUM_INT_ZYZ, QuatEnum_EXT_XYZ, QUAT_ENUM_EXT_XYZ, QuatEnum_EXT_XZY, QUAT_ENUM_EXT_XZY, QuatEnum_EXT_YXZ, QUAT_ENUM_EXT_YXZ, QuatEnum_EXT_YZX, QUAT_ENUM_EXT_YZX, QuatEnum_EXT_ZXY, QUAT_ENUM_EXT_ZXY, QuatEnum_EXT_ZYX, QUAT_ENUM_EXT_ZYX, QuatEnum_EXT_XYX, QUAT_ENUM_EXT_XYX, QuatEnum_EXT_XZX, QUAT_ENUM_EXT_XZX, QuatEnum_EXT_YXY, QUAT_ENUM_EXT_YXY, QuatEnum_EXT_YZY, QUAT_ENUM_EXT_YZY, QuatEnum_EXT_ZXZ, QUAT_ENUM_EXT_ZXZ, QuatEnum_EXT_ZYZ, QUAT_ENUM_EXT_ZYZ, QuatEnum_EULER_ANGLES_MAX_VALUE, QUAT_ENUM_EULER_ANGLES_MAX_VALUE]""" + +TermCriteria_COUNT: int +TERM_CRITERIA_COUNT: int +TermCriteria_MAX_ITER: int +TERM_CRITERIA_MAX_ITER: int +TermCriteria_EPS: int +TERM_CRITERIA_EPS: int +TermCriteria_Type = int +"""One of [TermCriteria_COUNT, TERM_CRITERIA_COUNT, TermCriteria_MAX_ITER, TERM_CRITERIA_MAX_ITER, TermCriteria_EPS, TERM_CRITERIA_EPS]""" + + +# Constants +CV_8U: int +CV_8UC1: int +CV_8UC2: int +CV_8UC3: int +CV_8UC4: int +CV_8S: int +CV_8SC1: int +CV_8SC2: int +CV_8SC3: int +CV_8SC4: int +CV_16U: int +CV_16UC1: int +CV_16UC2: int +CV_16UC3: int +CV_16UC4: int +CV_16S: int +CV_16SC1: int +CV_16SC2: int +CV_16SC3: int +CV_16SC4: int +CV_32U: int +CV_32UC1: int +CV_32UC2: int +CV_32UC3: int +CV_32UC4: int +CV_32S: int +CV_32SC1: int +CV_32SC2: int +CV_32SC3: int +CV_32SC4: int +CV_64U: int +CV_64UC1: int +CV_64UC2: int +CV_64UC3: int +CV_64UC4: int +CV_64S: int +CV_64SC1: int +CV_64SC2: int +CV_64SC3: int +CV_64SC4: int +CV_32F: int +CV_32FC1: int +CV_32FC2: int +CV_32FC3: int +CV_32FC4: int +CV_64F: int +CV_64FC1: int +CV_64FC2: int +CV_64FC3: int +CV_64FC4: int +CV_16F: int +CV_16FC1: int +CV_16FC2: int +CV_16FC3: int +CV_16FC4: int +CV_16BFCV_Bool: int +CV_16BFCV_BOOL: int +CV_16BFCV_BoolC1: int +CV_16BFCV_BOOL_C1: int +CV_16BFCV_BoolC2: int +CV_16BFCV_BOOL_C2: int +CV_16BFCV_BoolC3: int +CV_16BFCV_BOOL_C3: int +CV_16BFCV_BoolC4: int +CV_16BFCV_BOOL_C4: int +__version__: str + +# Classes +class Algorithm: + # Functions + def clear(self) -> None: ... + + @_typing.overload + def write(self, fs: FileStorage) -> None: ... + @_typing.overload + def write(self, fs: FileStorage, name: str) -> None: ... + + def read(self, fn: FileNode) -> None: ... + + def empty(self) -> bool: ... + + def save(self, filename: str | os.PathLike[str]) -> None: ... + + def getDefaultName(self) -> str: ... + + +class AsyncArray: + # Functions + def __init__(self) -> None: ... + + def release(self) -> None: ... + + @_typing.overload + def get(self, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def get(self, dst: UMat | None = ...) -> UMat: ... + @_typing.overload + def get(self, timeoutNs: float, dst: cv2.typing.MatLike | None = ...) -> tuple[bool, cv2.typing.MatLike]: ... + @_typing.overload + def get(self, timeoutNs: float, dst: UMat | None = ...) -> tuple[bool, UMat]: ... + + def wait_for(self, timeoutNs: float) -> bool: ... + + def valid(self) -> bool: ... + + +class MatShape: + # Functions + def empty(self) -> bool: ... + + def isScalar(self) -> bool: ... + + def clear(self) -> None: ... + + def erase(self, where: int) -> None: ... + + def channels(self) -> int: ... + + def hasSymbols(self) -> bool: ... + + def expand(self, another: cv2.typing.MatShape) -> cv2.typing.MatShape: ... + + def toLayout(self, newLayout: DataLayout, C0: int = ...) -> cv2.typing.MatShape: ... + + +class FileStorage: + # Functions + @_typing.overload + def __init__(self) -> None: ... + @_typing.overload + def __init__(self, filename: str | os.PathLike[str], flags: int, encoding: str = ...) -> None: ... + + def open(self, filename: str | os.PathLike[str], flags: int, encoding: str = ...) -> bool: ... + + def isOpened(self) -> bool: ... + + def release(self) -> None: ... + + def releaseAndGetString(self) -> str: ... + + def getFirstTopLevelNode(self) -> FileNode: ... + + def root(self, streamidx: int = ...) -> FileNode: ... + + def getNode(self, nodename: str) -> FileNode: ... + + @_typing.overload + def write(self, name: str, val: int) -> None: ... + @_typing.overload + def write(self, name: str, val: bool) -> None: ... + @_typing.overload + def write(self, name: str, val: int) -> None: ... + @_typing.overload + def write(self, name: str, val: float) -> None: ... + @_typing.overload + def write(self, name: str, val: str) -> None: ... + @_typing.overload + def write(self, name: str, val: cv2.typing.MatLike) -> None: ... + @_typing.overload + def write(self, name: str, val: _typing.Sequence[str]) -> None: ... + + def writeComment(self, comment: str, append: bool = ...) -> None: ... + + def startWriteStruct(self, name: str, flags: int, typeName: str = ...) -> None: ... + + def endWriteStruct(self) -> None: ... + + def getFormat(self) -> int: ... + + +class FileNode: + # Functions + def __init__(self) -> None: ... + + def getNode(self, nodename: str) -> FileNode: ... + + def at(self, i: int) -> FileNode: ... + + def keys(self) -> _typing.Sequence[str]: ... + + def type(self) -> int: ... + + def empty(self) -> bool: ... + + def isNone(self) -> bool: ... + + def isSeq(self) -> bool: ... + + def isMap(self) -> bool: ... + + def isInt(self) -> bool: ... + + def isReal(self) -> bool: ... + + def isString(self) -> bool: ... + + def isNamed(self) -> bool: ... + + def name(self) -> str: ... + + def size(self) -> int: ... + + def rawSize(self) -> int: ... + + def real(self) -> float: ... + + def string(self) -> str: ... + + def mat(self) -> cv2.typing.MatLike: ... + + +class RotatedRect: + center: cv2.typing.Point2f + size: cv2.typing.Size2f + angle: float + + # Functions + @_typing.overload + def __init__(self) -> None: ... + @_typing.overload + def __init__(self, center: cv2.typing.Point2f, size: cv2.typing.Size2f, angle: float) -> None: ... + @_typing.overload + def __init__(self, point1: cv2.typing.Point2f, point2: cv2.typing.Point2f, point3: cv2.typing.Point2f) -> None: ... + + def points(self) -> _typing.Sequence[cv2.typing.Point2f]: ... + + def boundingRect(self) -> cv2.typing.Rect: ... + + def boundingRect2f(self) -> cv2.typing.Rect2f: ... + + +class KeyPoint: + pt: cv2.typing.Point2f + size: float + angle: float + response: float + octave: int + class_id: int + + # Functions + @_typing.overload + def __init__(self) -> None: ... + @_typing.overload + def __init__(self, x: float, y: float, size: float, angle: float = ..., response: float = ..., octave: int = ..., class_id: int = ...) -> None: ... + + @staticmethod + @_typing.overload + def convert(keypoints: _typing.Sequence[KeyPoint], keypointIndexes: _typing.Sequence[int] = ...) -> _typing.Sequence[cv2.typing.Point2f]: ... + @staticmethod + @_typing.overload + def convert(points2f: _typing.Sequence[cv2.typing.Point2f], size: float = ..., response: float = ..., octave: int = ..., class_id: int = ...) -> _typing.Sequence[KeyPoint]: ... + + @staticmethod + def overlap(kp1: KeyPoint, kp2: KeyPoint) -> float: ... + + +class DMatch: + queryIdx: int + trainIdx: int + imgIdx: int + distance: float + + # Functions + @_typing.overload + def __init__(self) -> None: ... + @_typing.overload + def __init__(self, _queryIdx: int, _trainIdx: int, _distance: float) -> None: ... + @_typing.overload + def __init__(self, _queryIdx: int, _trainIdx: int, _imgIdx: int, _distance: float) -> None: ... + + +class TickMeter: + # Functions + def __init__(self) -> None: ... + + def start(self) -> None: ... + + def stop(self) -> None: ... + + def getTimeTicks(self) -> int: ... + + def getTimeMicro(self) -> float: ... + + def getTimeMilli(self) -> float: ... + + def getTimeSec(self) -> float: ... + + def getLastTimeTicks(self) -> int: ... + + def getLastTimeMicro(self) -> float: ... + + def getLastTimeMilli(self) -> float: ... + + def getLastTimeSec(self) -> float: ... + + def getCounter(self) -> int: ... + + def getFPS(self) -> float: ... + + def getAvgTimeSec(self) -> float: ... + + def getAvgTimeMilli(self) -> float: ... + + def reset(self) -> None: ... + + +class UMat: + offset: int + + # Functions + @_typing.overload + def __init__(self, usageFlags: UMatUsageFlags = ...) -> None: ... + @_typing.overload + def __init__(self, rows: int, cols: int, type: int, usageFlags: UMatUsageFlags = ...) -> None: ... + @_typing.overload + def __init__(self, size: cv2.typing.Size, type: int, usageFlags: UMatUsageFlags = ...) -> None: ... + @_typing.overload + def __init__(self, rows: int, cols: int, type: int, s: cv2.typing.Scalar, usageFlags: UMatUsageFlags = ...) -> None: ... + @_typing.overload + def __init__(self, size: cv2.typing.Size, type: int, s: cv2.typing.Scalar, usageFlags: UMatUsageFlags = ...) -> None: ... + @_typing.overload + def __init__(self, m: UMat) -> None: ... + @_typing.overload + def __init__(self, m: UMat, rowRange: cv2.typing.Range, colRange: cv2.typing.Range = ...) -> None: ... + @_typing.overload + def __init__(self, m: UMat, roi: cv2.typing.Rect) -> None: ... + @_typing.overload + def __init__(self, m: UMat, ranges: _typing.Sequence[cv2.typing.Range]) -> None: ... + + @staticmethod + def queue() -> cv2.typing.IntPointer: ... + + @staticmethod + def context() -> cv2.typing.IntPointer: ... + + def get(self) -> cv2.typing.MatLike: ... + + def isContinuous(self) -> bool: ... + + def isSubmatrix(self) -> bool: ... + + def handle(self, accessFlags: AccessFlag) -> cv2.typing.IntPointer: ... + + +class Subdiv2D: + # Functions + @_typing.overload + def __init__(self) -> None: ... + @_typing.overload + def __init__(self, rect: cv2.typing.Rect) -> None: ... + @_typing.overload + def __init__(self, rect2f: cv2.typing.Rect2f) -> None: ... + + def initDelaunay(self, rect: cv2.typing.Rect) -> None: ... + + def initDelaunay2f(self, rect: cv2.typing.Rect2f) -> None: ... + + @_typing.overload + def insert(self, pt: cv2.typing.Point2f) -> int: ... + @_typing.overload + def insert(self, ptvec: _typing.Sequence[cv2.typing.Point2f]) -> None: ... + + def locate(self, pt: cv2.typing.Point2f) -> tuple[int, int, int]: ... + + def findNearest(self, pt: cv2.typing.Point2f) -> tuple[int, cv2.typing.Point2f]: ... + + def getEdgeList(self) -> _typing.Sequence[cv2.typing.Vec4f]: ... + + def getLeadingEdgeList(self) -> _typing.Sequence[int]: ... + + def getTriangleList(self) -> _typing.Sequence[cv2.typing.Vec6f]: ... + + def getVoronoiFacetList(self, idx: _typing.Sequence[int]) -> tuple[_typing.Sequence[_typing.Sequence[cv2.typing.Point2f]], _typing.Sequence[cv2.typing.Point2f]]: ... + + def getVertex(self, vertex: int) -> tuple[cv2.typing.Point2f, int]: ... + + def getEdge(self, edge: int, nextEdgeType: int) -> int: ... + + def nextEdge(self, edge: int) -> int: ... + + def rotateEdge(self, edge: int, rotate: int) -> int: ... + + def symEdge(self, edge: int) -> int: ... + + def edgeOrg(self, edge: int) -> tuple[int, cv2.typing.Point2f]: ... + + def edgeDst(self, edge: int) -> tuple[int, cv2.typing.Point2f]: ... + + +class UsacParams: + confidence: float + isParallel: bool + loIterations: int + loMethod: LocalOptimMethod + loSampleSize: int + maxIterations: int + neighborsSearch: NeighborSearchMethod + randomGeneratorState: int + sampler: SamplingMethod + score: ScoreMethod + threshold: float + final_polisher: PolishingMethod + final_polisher_iterations: int + + # Functions + def __init__(self) -> None: ... + + +class MSTEdge: + source: int + target: int + weight: float + +class GeneralizedHough(Algorithm): + # Functions + @_typing.overload + def setTemplate(self, templ: cv2.typing.MatLike, templCenter: cv2.typing.Point = ...) -> None: ... + @_typing.overload + def setTemplate(self, templ: UMat, templCenter: cv2.typing.Point = ...) -> None: ... + @_typing.overload + def setTemplate(self, edges: cv2.typing.MatLike, dx: cv2.typing.MatLike, dy: cv2.typing.MatLike, templCenter: cv2.typing.Point = ...) -> None: ... + @_typing.overload + def setTemplate(self, edges: UMat, dx: UMat, dy: UMat, templCenter: cv2.typing.Point = ...) -> None: ... + + @_typing.overload + def detect(self, image: cv2.typing.MatLike, positions: cv2.typing.MatLike | None = ..., votes: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... + @_typing.overload + def detect(self, image: UMat, positions: UMat | None = ..., votes: UMat | None = ...) -> tuple[UMat, UMat]: ... + @_typing.overload + def detect(self, edges: cv2.typing.MatLike, dx: cv2.typing.MatLike, dy: cv2.typing.MatLike, positions: cv2.typing.MatLike | None = ..., votes: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... + @_typing.overload + def detect(self, edges: UMat, dx: UMat, dy: UMat, positions: UMat | None = ..., votes: UMat | None = ...) -> tuple[UMat, UMat]: ... + + def setCannyLowThresh(self, cannyLowThresh: int) -> None: ... + + def getCannyLowThresh(self) -> int: ... + + def setCannyHighThresh(self, cannyHighThresh: int) -> None: ... + + def getCannyHighThresh(self) -> int: ... + + def setMinDist(self, minDist: float) -> None: ... + + def getMinDist(self) -> float: ... + + def setDp(self, dp: float) -> None: ... + + def getDp(self) -> float: ... + + def setMaxBufferSize(self, maxBufferSize: int) -> None: ... + + def getMaxBufferSize(self) -> int: ... + + +class GeneralizedHoughBallard(GeneralizedHough): + # Functions + def setLevels(self, levels: int) -> None: ... + + def getLevels(self) -> int: ... + + def setVotesThreshold(self, votesThreshold: int) -> None: ... + + def getVotesThreshold(self) -> int: ... + + +class GeneralizedHoughGuil(GeneralizedHough): + # Functions + def setXi(self, xi: float) -> None: ... + + def getXi(self) -> float: ... + + def setLevels(self, levels: int) -> None: ... + + def getLevels(self) -> int: ... + + def setAngleEpsilon(self, angleEpsilon: float) -> None: ... + + def getAngleEpsilon(self) -> float: ... + + def setMinAngle(self, minAngle: float) -> None: ... + + def getMinAngle(self) -> float: ... + + def setMaxAngle(self, maxAngle: float) -> None: ... + + def getMaxAngle(self) -> float: ... + + def setAngleStep(self, angleStep: float) -> None: ... + + def getAngleStep(self) -> float: ... + + def setAngleThresh(self, angleThresh: int) -> None: ... + + def getAngleThresh(self) -> int: ... + + def setMinScale(self, minScale: float) -> None: ... + + def getMinScale(self) -> float: ... + + def setMaxScale(self, maxScale: float) -> None: ... + + def getMaxScale(self) -> float: ... + + def setScaleStep(self, scaleStep: float) -> None: ... + + def getScaleStep(self) -> float: ... + + def setScaleThresh(self, scaleThresh: int) -> None: ... + + def getScaleThresh(self) -> int: ... + + def setPosThresh(self, posThresh: int) -> None: ... + + def getPosThresh(self) -> int: ... + + +class CLAHE(Algorithm): + # Functions + @_typing.overload + def apply(self, src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def apply(self, src: UMat, dst: UMat | None = ...) -> UMat: ... + + def setClipLimit(self, clipLimit: float) -> None: ... + + def getClipLimit(self) -> float: ... + + def setTilesGridSize(self, tileGridSize: cv2.typing.Size) -> None: ... + + def getTilesGridSize(self) -> cv2.typing.Size: ... + + def setBitShift(self, bitShift: int) -> None: ... + + def getBitShift(self) -> int: ... + + def collectGarbage(self) -> None: ... + + +class LineSegmentDetector(Algorithm): + # Functions + @_typing.overload + def detect(self, image: cv2.typing.MatLike, lines: cv2.typing.MatLike | None = ..., width: cv2.typing.MatLike | None = ..., prec: cv2.typing.MatLike | None = ..., nfa: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... + @_typing.overload + def detect(self, image: UMat, lines: UMat | None = ..., width: UMat | None = ..., prec: UMat | None = ..., nfa: UMat | None = ...) -> tuple[UMat, UMat, UMat, UMat]: ... + + @_typing.overload + def drawSegments(self, image: cv2.typing.MatLike, lines: cv2.typing.MatLike) -> cv2.typing.MatLike: ... + @_typing.overload + def drawSegments(self, image: UMat, lines: UMat) -> UMat: ... + + @_typing.overload + def compareSegments(self, size: cv2.typing.Size, lines1: cv2.typing.MatLike, lines2: cv2.typing.MatLike, image: cv2.typing.MatLike | None = ...) -> tuple[int, cv2.typing.MatLike]: ... + @_typing.overload + def compareSegments(self, size: cv2.typing.Size, lines1: UMat, lines2: UMat, image: UMat | None = ...) -> tuple[int, UMat]: ... + + +class FontFace: + # Functions + @_typing.overload + def __init__(self) -> None: ... + @_typing.overload + def __init__(self, fontPathOrName: str) -> None: ... + + def set(self, fontPathOrName: str) -> bool: ... + + def getName(self) -> str: ... + + def setInstance(self, params: _typing.Sequence[int]) -> bool: ... + + def getInstance(self) -> tuple[bool, _typing.Sequence[int]]: ... + + +class Tonemap(Algorithm): + # Functions + @_typing.overload + def process(self, src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def process(self, src: UMat, dst: UMat | None = ...) -> UMat: ... + + def getGamma(self) -> float: ... + + def setGamma(self, gamma: float) -> None: ... + + +class TonemapDrago(Tonemap): + # Functions + def getSaturation(self) -> float: ... + + def setSaturation(self, saturation: float) -> None: ... + + def getBias(self) -> float: ... + + def setBias(self, bias: float) -> None: ... + + +class TonemapReinhard(Tonemap): + # Functions + def getIntensity(self) -> float: ... + + def setIntensity(self, intensity: float) -> None: ... + + def getLightAdaptation(self) -> float: ... + + def setLightAdaptation(self, light_adapt: float) -> None: ... + + def getColorAdaptation(self) -> float: ... + + def setColorAdaptation(self, color_adapt: float) -> None: ... + + +class TonemapMantiuk(Tonemap): + # Functions + def getScale(self) -> float: ... + + def setScale(self, scale: float) -> None: ... + + def getSaturation(self) -> float: ... + + def setSaturation(self, saturation: float) -> None: ... + + +class AlignExposures(Algorithm): + # Functions + @_typing.overload + def process(self, src: _typing.Sequence[cv2.typing.MatLike], dst: _typing.Sequence[cv2.typing.MatLike], times: cv2.typing.MatLike, response: cv2.typing.MatLike) -> None: ... + @_typing.overload + def process(self, src: _typing.Sequence[UMat], dst: _typing.Sequence[cv2.typing.MatLike], times: UMat, response: UMat) -> None: ... + + +class AlignMTB(AlignExposures): + # Functions + @_typing.overload + def process(self, src: _typing.Sequence[cv2.typing.MatLike], dst: _typing.Sequence[cv2.typing.MatLike], times: cv2.typing.MatLike, response: cv2.typing.MatLike) -> None: ... + @_typing.overload + def process(self, src: _typing.Sequence[UMat], dst: _typing.Sequence[cv2.typing.MatLike], times: UMat, response: UMat) -> None: ... + @_typing.overload + def process(self, src: _typing.Sequence[cv2.typing.MatLike], dst: _typing.Sequence[cv2.typing.MatLike]) -> None: ... + @_typing.overload + def process(self, src: _typing.Sequence[UMat], dst: _typing.Sequence[cv2.typing.MatLike]) -> None: ... + + @_typing.overload + def calculateShift(self, img0: cv2.typing.MatLike, img1: cv2.typing.MatLike) -> cv2.typing.Point: ... + @_typing.overload + def calculateShift(self, img0: UMat, img1: UMat) -> cv2.typing.Point: ... + + @_typing.overload + def shiftMat(self, src: cv2.typing.MatLike, shift: cv2.typing.Point, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def shiftMat(self, src: UMat, shift: cv2.typing.Point, dst: UMat | None = ...) -> UMat: ... + + @_typing.overload + def computeBitmaps(self, img: cv2.typing.MatLike, tb: cv2.typing.MatLike | None = ..., eb: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... + @_typing.overload + def computeBitmaps(self, img: UMat, tb: UMat | None = ..., eb: UMat | None = ...) -> tuple[UMat, UMat]: ... + + def getMaxBits(self) -> int: ... + + def setMaxBits(self, max_bits: int) -> None: ... + + def getExcludeRange(self) -> int: ... + + def setExcludeRange(self, exclude_range: int) -> None: ... + + def getCut(self) -> bool: ... + + def setCut(self, value: bool) -> None: ... + + +class CalibrateCRF(Algorithm): + # Functions + @_typing.overload + def process(self, src: _typing.Sequence[cv2.typing.MatLike], times: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def process(self, src: _typing.Sequence[UMat], times: UMat, dst: UMat | None = ...) -> UMat: ... + + +class CalibrateDebevec(CalibrateCRF): + # Functions + def getLambda(self) -> float: ... + + def setLambda(self, lambda_: float) -> None: ... + + def getSamples(self) -> int: ... + + def setSamples(self, samples: int) -> None: ... + + def getRandom(self) -> bool: ... + + def setRandom(self, random: bool) -> None: ... + + +class CalibrateRobertson(CalibrateCRF): + # Functions + def getMaxIter(self) -> int: ... + + def setMaxIter(self, max_iter: int) -> None: ... + + def getThreshold(self) -> float: ... + + def setThreshold(self, threshold: float) -> None: ... + + def getRadiance(self) -> cv2.typing.MatLike: ... + + +class MergeExposures(Algorithm): + # Functions + @_typing.overload + def process(self, src: _typing.Sequence[cv2.typing.MatLike], times: cv2.typing.MatLike, response: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def process(self, src: _typing.Sequence[UMat], times: UMat, response: UMat, dst: UMat | None = ...) -> UMat: ... + + +class MergeDebevec(MergeExposures): + # Functions + @_typing.overload + def process(self, src: _typing.Sequence[cv2.typing.MatLike], times: cv2.typing.MatLike, response: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def process(self, src: _typing.Sequence[UMat], times: UMat, response: UMat, dst: UMat | None = ...) -> UMat: ... + @_typing.overload + def process(self, src: _typing.Sequence[cv2.typing.MatLike], times: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def process(self, src: _typing.Sequence[UMat], times: UMat, dst: UMat | None = ...) -> UMat: ... + + +class MergeMertens(MergeExposures): + # Functions + @_typing.overload + def process(self, src: _typing.Sequence[cv2.typing.MatLike], times: cv2.typing.MatLike, response: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def process(self, src: _typing.Sequence[UMat], times: UMat, response: UMat, dst: UMat | None = ...) -> UMat: ... + @_typing.overload + def process(self, src: _typing.Sequence[cv2.typing.MatLike], dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def process(self, src: _typing.Sequence[UMat], dst: UMat | None = ...) -> UMat: ... + + def getContrastWeight(self) -> float: ... + + def setContrastWeight(self, contrast_weiht: float) -> None: ... + + def getSaturationWeight(self) -> float: ... + + def setSaturationWeight(self, saturation_weight: float) -> None: ... + + def getExposureWeight(self) -> float: ... + + def setExposureWeight(self, exposure_weight: float) -> None: ... + + +class MergeRobertson(MergeExposures): + # Functions + @_typing.overload + def process(self, src: _typing.Sequence[cv2.typing.MatLike], times: cv2.typing.MatLike, response: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def process(self, src: _typing.Sequence[UMat], times: UMat, response: UMat, dst: UMat | None = ...) -> UMat: ... + @_typing.overload + def process(self, src: _typing.Sequence[cv2.typing.MatLike], times: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def process(self, src: _typing.Sequence[UMat], times: UMat, dst: UMat | None = ...) -> UMat: ... + + +class TriangleRasterizeSettings: + # Functions + def setShadingType(self, st: TriangleShadingType) -> TriangleRasterizeSettings: ... + + def setCullingMode(self, cm: TriangleCullingMode) -> TriangleRasterizeSettings: ... + + def setGlCompatibleMode(self, gm: TriangleGlCompatibleMode) -> TriangleRasterizeSettings: ... + + +class Octree: + # Functions + @classmethod + @_typing.overload + def createWithDepth(cls, maxDepth: int, size: float, origin: cv2.typing.Point3f = ..., withColors: bool = ...) -> Octree: ... + @classmethod + @_typing.overload + def createWithDepth(cls, maxDepth: int, pointCloud: cv2.typing.MatLike, colors: cv2.typing.MatLike | None = ...) -> Octree: ... + @classmethod + @_typing.overload + def createWithDepth(cls, maxDepth: int, pointCloud: UMat, colors: UMat | None = ...) -> Octree: ... + + @classmethod + @_typing.overload + def createWithResolution(cls, resolution: float, size: float, origin: cv2.typing.Point3f = ..., withColors: bool = ...) -> Octree: ... + @classmethod + @_typing.overload + def createWithResolution(cls, resolution: float, pointCloud: cv2.typing.MatLike, colors: cv2.typing.MatLike | None = ...) -> Octree: ... + @classmethod + @_typing.overload + def createWithResolution(cls, resolution: float, pointCloud: UMat, colors: UMat | None = ...) -> Octree: ... + + def insertPoint(self, point: cv2.typing.Point3f, color: cv2.typing.Point3f = ...) -> bool: ... + + def isPointInBound(self, point: cv2.typing.Point3f) -> bool: ... + + def empty(self) -> bool: ... + + def clear(self) -> None: ... + + def deletePoint(self, point: cv2.typing.Point3f) -> bool: ... + + @_typing.overload + def getPointCloudByOctree(self, restoredPointCloud: cv2.typing.MatLike | None = ..., restoredColor: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... + @_typing.overload + def getPointCloudByOctree(self, restoredPointCloud: UMat | None = ..., restoredColor: UMat | None = ...) -> tuple[UMat, UMat]: ... + + @_typing.overload + def radiusNNSearch(self, query: cv2.typing.Point3f, radius: float, points: cv2.typing.MatLike | None = ..., squareDists: cv2.typing.MatLike | None = ...) -> tuple[int, cv2.typing.MatLike, cv2.typing.MatLike]: ... + @_typing.overload + def radiusNNSearch(self, query: cv2.typing.Point3f, radius: float, points: UMat | None = ..., squareDists: UMat | None = ...) -> tuple[int, UMat, UMat]: ... + @_typing.overload + def radiusNNSearch(self, query: cv2.typing.Point3f, radius: float, points: cv2.typing.MatLike | None = ..., colors: cv2.typing.MatLike | None = ..., squareDists: cv2.typing.MatLike | None = ...) -> tuple[int, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... + @_typing.overload + def radiusNNSearch(self, query: cv2.typing.Point3f, radius: float, points: UMat | None = ..., colors: UMat | None = ..., squareDists: UMat | None = ...) -> tuple[int, UMat, UMat, UMat]: ... + + @_typing.overload + def KNNSearch(self, query: cv2.typing.Point3f, K: int, points: cv2.typing.MatLike | None = ..., squareDists: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... + @_typing.overload + def KNNSearch(self, query: cv2.typing.Point3f, K: int, points: UMat | None = ..., squareDists: UMat | None = ...) -> tuple[UMat, UMat]: ... + @_typing.overload + def KNNSearch(self, query: cv2.typing.Point3f, K: int, points: cv2.typing.MatLike | None = ..., colors: cv2.typing.MatLike | None = ..., squareDists: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... + @_typing.overload + def KNNSearch(self, query: cv2.typing.Point3f, K: int, points: UMat | None = ..., colors: UMat | None = ..., squareDists: UMat | None = ...) -> tuple[UMat, UMat, UMat]: ... + + +class RgbdNormals: + # Functions + @classmethod + @_typing.overload + def create(cls, rows: int = ..., cols: int = ..., depth: int = ..., K: cv2.typing.MatLike | None = ..., window_size: int = ..., diff_threshold: float = ..., method: RgbdNormals_RgbdNormalsMethod = ...) -> RgbdNormals: ... + @classmethod + @_typing.overload + def create(cls, rows: int = ..., cols: int = ..., depth: int = ..., K: UMat | None = ..., window_size: int = ..., diff_threshold: float = ..., method: RgbdNormals_RgbdNormalsMethod = ...) -> RgbdNormals: ... + + @_typing.overload + def apply(self, points: cv2.typing.MatLike, normals: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def apply(self, points: UMat, normals: UMat | None = ...) -> UMat: ... + + def cache(self) -> None: ... + + def getRows(self) -> int: ... + + def setRows(self, val: int) -> None: ... + + def getCols(self) -> int: ... + + def setCols(self, val: int) -> None: ... + + def getWindowSize(self) -> int: ... + + def setWindowSize(self, val: int) -> None: ... + + def getDepth(self) -> int: ... + + @_typing.overload + def getK(self, val: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def getK(self, val: UMat | None = ...) -> UMat: ... + + @_typing.overload + def setK(self, val: cv2.typing.MatLike) -> None: ... + @_typing.overload + def setK(self, val: UMat) -> None: ... + + def getMethod(self) -> RgbdNormals_RgbdNormalsMethod: ... + + +class Odometry: + # Functions + @_typing.overload + def __init__(self) -> None: ... + @_typing.overload + def __init__(self, otype: OdometryType) -> None: ... + @_typing.overload + def __init__(self, otype: OdometryType, settings: OdometrySettings, algtype: OdometryAlgoType) -> None: ... + + def prepareFrame(self, frame: OdometryFrame) -> None: ... + + def prepareFrames(self, srcFrame: OdometryFrame, dstFrame: OdometryFrame) -> None: ... + + @_typing.overload + def compute(self, srcFrame: OdometryFrame, dstFrame: OdometryFrame, Rt: cv2.typing.MatLike | None = ...) -> tuple[bool, cv2.typing.MatLike]: ... + @_typing.overload + def compute(self, srcFrame: OdometryFrame, dstFrame: OdometryFrame, Rt: UMat | None = ...) -> tuple[bool, UMat]: ... + @_typing.overload + def compute(self, srcDepth: cv2.typing.MatLike, dstDepth: cv2.typing.MatLike, Rt: cv2.typing.MatLike | None = ...) -> tuple[bool, cv2.typing.MatLike]: ... + @_typing.overload + def compute(self, srcDepth: UMat, dstDepth: UMat, Rt: UMat | None = ...) -> tuple[bool, UMat]: ... + @_typing.overload + def compute(self, srcDepth: cv2.typing.MatLike, srcRGB: cv2.typing.MatLike, dstDepth: cv2.typing.MatLike, dstRGB: cv2.typing.MatLike, Rt: cv2.typing.MatLike | None = ...) -> tuple[bool, cv2.typing.MatLike]: ... + @_typing.overload + def compute(self, srcDepth: UMat, srcRGB: UMat, dstDepth: UMat, dstRGB: UMat, Rt: UMat | None = ...) -> tuple[bool, UMat]: ... + + def getNormalsComputer(self) -> RgbdNormals: ... + + +class OdometryFrame: + # Functions + @_typing.overload + def __init__(self, depth: cv2.typing.MatLike | None = ..., image: cv2.typing.MatLike | None = ..., mask: cv2.typing.MatLike | None = ..., normals: cv2.typing.MatLike | None = ...) -> None: ... + @_typing.overload + def __init__(self, depth: UMat | None = ..., image: UMat | None = ..., mask: UMat | None = ..., normals: UMat | None = ...) -> None: ... + + @_typing.overload + def getImage(self, image: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def getImage(self, image: UMat | None = ...) -> UMat: ... + + @_typing.overload + def getGrayImage(self, image: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def getGrayImage(self, image: UMat | None = ...) -> UMat: ... + + @_typing.overload + def getDepth(self, depth: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def getDepth(self, depth: UMat | None = ...) -> UMat: ... + + @_typing.overload + def getProcessedDepth(self, depth: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def getProcessedDepth(self, depth: UMat | None = ...) -> UMat: ... + + @_typing.overload + def getMask(self, mask: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def getMask(self, mask: UMat | None = ...) -> UMat: ... + + @_typing.overload + def getNormals(self, normals: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def getNormals(self, normals: UMat | None = ...) -> UMat: ... + + def getPyramidLevels(self) -> int: ... + + @_typing.overload + def getPyramidAt(self, pyrType: OdometryFramePyramidType, level: int, img: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def getPyramidAt(self, pyrType: OdometryFramePyramidType, level: int, img: UMat | None = ...) -> UMat: ... + + +class OdometrySettings: + # Functions + def __init__(self) -> None: ... + + @_typing.overload + def setCameraMatrix(self, val: cv2.typing.MatLike) -> None: ... + @_typing.overload + def setCameraMatrix(self, val: UMat) -> None: ... + + @_typing.overload + def getCameraMatrix(self, val: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def getCameraMatrix(self, val: UMat | None = ...) -> UMat: ... + + @_typing.overload + def setIterCounts(self, val: cv2.typing.MatLike) -> None: ... + @_typing.overload + def setIterCounts(self, val: UMat) -> None: ... + + @_typing.overload + def getIterCounts(self, val: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def getIterCounts(self, val: UMat | None = ...) -> UMat: ... + + def setMinDepth(self, val: float) -> None: ... + + def getMinDepth(self) -> float: ... + + def setMaxDepth(self, val: float) -> None: ... + + def getMaxDepth(self) -> float: ... + + def setMaxDepthDiff(self, val: float) -> None: ... + + def getMaxDepthDiff(self) -> float: ... + + def setMaxPointsPart(self, val: float) -> None: ... + + def getMaxPointsPart(self) -> float: ... + + def setSobelSize(self, val: int) -> None: ... + + def getSobelSize(self) -> int: ... + + def setSobelScale(self, val: float) -> None: ... + + def getSobelScale(self) -> float: ... + + def setNormalWinSize(self, val: int) -> None: ... + + def getNormalWinSize(self) -> int: ... + + def setNormalDiffThreshold(self, val: float) -> None: ... + + def getNormalDiffThreshold(self) -> float: ... + + def setNormalMethod(self, nm: RgbdNormals_RgbdNormalsMethod) -> None: ... + + def getNormalMethod(self) -> RgbdNormals_RgbdNormalsMethod: ... + + def setAngleThreshold(self, val: float) -> None: ... + + def getAngleThreshold(self) -> float: ... + + def setMaxTranslation(self, val: float) -> None: ... + + def getMaxTranslation(self) -> float: ... + + def setMaxRotation(self, val: float) -> None: ... + + def getMaxRotation(self) -> float: ... + + def setMinGradientMagnitude(self, val: float) -> None: ... + + def getMinGradientMagnitude(self) -> float: ... + + @_typing.overload + def setMinGradientMagnitudes(self, val: cv2.typing.MatLike) -> None: ... + @_typing.overload + def setMinGradientMagnitudes(self, val: UMat) -> None: ... + + @_typing.overload + def getMinGradientMagnitudes(self, val: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def getMinGradientMagnitudes(self, val: UMat | None = ...) -> UMat: ... + + +class Volume: + # Functions + def __init__(self, vtype: VolumeType = ..., settings: VolumeSettings = ...) -> None: ... + + @_typing.overload + def integrateFrame(self, frame: OdometryFrame, pose: cv2.typing.MatLike) -> None: ... + @_typing.overload + def integrateFrame(self, frame: OdometryFrame, pose: UMat) -> None: ... + + @_typing.overload + def integrate(self, depth: cv2.typing.MatLike, pose: cv2.typing.MatLike) -> None: ... + @_typing.overload + def integrate(self, depth: UMat, pose: UMat) -> None: ... + + @_typing.overload + def integrateColor(self, depth: cv2.typing.MatLike, image: cv2.typing.MatLike, pose: cv2.typing.MatLike) -> None: ... + @_typing.overload + def integrateColor(self, depth: UMat, image: UMat, pose: UMat) -> None: ... + + @_typing.overload + def raycast(self, cameraPose: cv2.typing.MatLike, points: cv2.typing.MatLike | None = ..., normals: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... + @_typing.overload + def raycast(self, cameraPose: UMat, points: UMat | None = ..., normals: UMat | None = ...) -> tuple[UMat, UMat]: ... + + @_typing.overload + def raycastColor(self, cameraPose: cv2.typing.MatLike, points: cv2.typing.MatLike | None = ..., normals: cv2.typing.MatLike | None = ..., colors: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... + @_typing.overload + def raycastColor(self, cameraPose: UMat, points: UMat | None = ..., normals: UMat | None = ..., colors: UMat | None = ...) -> tuple[UMat, UMat, UMat]: ... + + @_typing.overload + def raycastEx(self, cameraPose: cv2.typing.MatLike, height: int, width: int, K: cv2.typing.MatLike, points: cv2.typing.MatLike | None = ..., normals: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... + @_typing.overload + def raycastEx(self, cameraPose: UMat, height: int, width: int, K: UMat, points: UMat | None = ..., normals: UMat | None = ...) -> tuple[UMat, UMat]: ... + + @_typing.overload + def raycastExColor(self, cameraPose: cv2.typing.MatLike, height: int, width: int, K: cv2.typing.MatLike, points: cv2.typing.MatLike | None = ..., normals: cv2.typing.MatLike | None = ..., colors: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... + @_typing.overload + def raycastExColor(self, cameraPose: UMat, height: int, width: int, K: UMat, points: UMat | None = ..., normals: UMat | None = ..., colors: UMat | None = ...) -> tuple[UMat, UMat, UMat]: ... + + @_typing.overload + def fetchNormals(self, points: cv2.typing.MatLike, normals: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def fetchNormals(self, points: UMat, normals: UMat | None = ...) -> UMat: ... + + @_typing.overload + def fetchPointsNormals(self, points: cv2.typing.MatLike | None = ..., normals: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... + @_typing.overload + def fetchPointsNormals(self, points: UMat | None = ..., normals: UMat | None = ...) -> tuple[UMat, UMat]: ... + + @_typing.overload + def fetchPointsNormalsColors(self, points: cv2.typing.MatLike | None = ..., normals: cv2.typing.MatLike | None = ..., colors: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... + @_typing.overload + def fetchPointsNormalsColors(self, points: UMat | None = ..., normals: UMat | None = ..., colors: UMat | None = ...) -> tuple[UMat, UMat, UMat]: ... + + def reset(self) -> None: ... + + def getVisibleBlocks(self) -> int: ... + + def getTotalVolumeUnits(self) -> int: ... + + @_typing.overload + def getBoundingBox(self, precision: int, bb: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def getBoundingBox(self, precision: int, bb: UMat | None = ...) -> UMat: ... + + def setEnableGrowth(self, v: bool) -> None: ... + + def getEnableGrowth(self) -> bool: ... + + +class VolumeSettings: + # Functions + def __init__(self, volumeType: VolumeType = ...) -> None: ... + + def setIntegrateWidth(self, val: int) -> None: ... + + def getIntegrateWidth(self) -> int: ... + + def setIntegrateHeight(self, val: int) -> None: ... + + def getIntegrateHeight(self) -> int: ... + + def setRaycastWidth(self, val: int) -> None: ... + + def getRaycastWidth(self) -> int: ... + + def setRaycastHeight(self, val: int) -> None: ... + + def getRaycastHeight(self) -> int: ... + + def setDepthFactor(self, val: float) -> None: ... + + def getDepthFactor(self) -> float: ... + + def setVoxelSize(self, val: float) -> None: ... + + def getVoxelSize(self) -> float: ... + + def setTsdfTruncateDistance(self, val: float) -> None: ... + + def getTsdfTruncateDistance(self) -> float: ... + + def setMaxDepth(self, val: float) -> None: ... + + def getMaxDepth(self) -> float: ... + + def setMaxWeight(self, val: int) -> None: ... + + def getMaxWeight(self) -> int: ... + + def setRaycastStepFactor(self, val: float) -> None: ... + + def getRaycastStepFactor(self) -> float: ... + + @_typing.overload + def setVolumePose(self, val: cv2.typing.MatLike) -> None: ... + @_typing.overload + def setVolumePose(self, val: UMat) -> None: ... + + @_typing.overload + def getVolumePose(self, val: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def getVolumePose(self, val: UMat | None = ...) -> UMat: ... + + @_typing.overload + def setVolumeResolution(self, val: cv2.typing.MatLike) -> None: ... + @_typing.overload + def setVolumeResolution(self, val: UMat) -> None: ... + + @_typing.overload + def getVolumeResolution(self, val: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def getVolumeResolution(self, val: UMat | None = ...) -> UMat: ... + + @_typing.overload + def getVolumeStrides(self, val: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def getVolumeStrides(self, val: UMat | None = ...) -> UMat: ... + + @_typing.overload + def setCameraIntegrateIntrinsics(self, val: cv2.typing.MatLike) -> None: ... + @_typing.overload + def setCameraIntegrateIntrinsics(self, val: UMat) -> None: ... + + @_typing.overload + def getCameraIntegrateIntrinsics(self, val: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def getCameraIntegrateIntrinsics(self, val: UMat | None = ...) -> UMat: ... + + @_typing.overload + def setCameraRaycastIntrinsics(self, val: cv2.typing.MatLike) -> None: ... + @_typing.overload + def setCameraRaycastIntrinsics(self, val: UMat) -> None: ... + + @_typing.overload + def getCameraRaycastIntrinsics(self, val: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def getCameraRaycastIntrinsics(self, val: UMat | None = ...) -> UMat: ... + + +class StereoMatcher(Algorithm): + # Functions + @_typing.overload + def compute(self, left: cv2.typing.MatLike, right: cv2.typing.MatLike, disparity: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def compute(self, left: UMat, right: UMat, disparity: UMat | None = ...) -> UMat: ... + + def getMinDisparity(self) -> int: ... + + def setMinDisparity(self, minDisparity: int) -> None: ... + + def getNumDisparities(self) -> int: ... + + def setNumDisparities(self, numDisparities: int) -> None: ... + + def getBlockSize(self) -> int: ... + + def setBlockSize(self, blockSize: int) -> None: ... + + def getSpeckleWindowSize(self) -> int: ... + + def setSpeckleWindowSize(self, speckleWindowSize: int) -> None: ... + + def getSpeckleRange(self) -> int: ... + + def setSpeckleRange(self, speckleRange: int) -> None: ... + + def getDisp12MaxDiff(self) -> int: ... + + def setDisp12MaxDiff(self, disp12MaxDiff: int) -> None: ... + + +class StereoBM(StereoMatcher): + # Functions + def getPreFilterType(self) -> int: ... + + def setPreFilterType(self, preFilterType: int) -> None: ... + + def getPreFilterSize(self) -> int: ... + + def setPreFilterSize(self, preFilterSize: int) -> None: ... + + def getPreFilterCap(self) -> int: ... + + def setPreFilterCap(self, preFilterCap: int) -> None: ... + + def getTextureThreshold(self) -> int: ... + + def setTextureThreshold(self, textureThreshold: int) -> None: ... + + def getUniquenessRatio(self) -> int: ... + + def setUniquenessRatio(self, uniquenessRatio: int) -> None: ... + + def getSmallerBlockSize(self) -> int: ... + + def setSmallerBlockSize(self, blockSize: int) -> None: ... + + def getROI1(self) -> cv2.typing.Rect: ... + + def setROI1(self, roi1: cv2.typing.Rect) -> None: ... + + def getROI2(self) -> cv2.typing.Rect: ... + + def setROI2(self, roi2: cv2.typing.Rect) -> None: ... + + @classmethod + def create(cls, numDisparities: int = ..., blockSize: int = ...) -> StereoBM: ... + + +class StereoSGBM(StereoMatcher): + # Functions + def getPreFilterCap(self) -> int: ... + + def setPreFilterCap(self, preFilterCap: int) -> None: ... + + def getUniquenessRatio(self) -> int: ... + + def setUniquenessRatio(self, uniquenessRatio: int) -> None: ... + + def getP1(self) -> int: ... + + def setP1(self, P1: int) -> None: ... + + def getP2(self) -> int: ... + + def setP2(self, P2: int) -> None: ... + + def getMode(self) -> int: ... + + def setMode(self, mode: int) -> None: ... + + @classmethod + def create(cls, minDisparity: int = ..., numDisparities: int = ..., blockSize: int = ..., P1: int = ..., P2: int = ..., disp12MaxDiff: int = ..., preFilterCap: int = ..., uniquenessRatio: int = ..., speckleWindowSize: int = ..., speckleRange: int = ..., mode: int = ...) -> StereoSGBM: ... + + +class Feature2D(Algorithm): + # Functions + @_typing.overload + def detect(self, image: cv2.typing.MatLike, mask: cv2.typing.MatLike | None = ...) -> _typing.Sequence[KeyPoint]: ... + @_typing.overload + def detect(self, image: UMat, mask: UMat | None = ...) -> _typing.Sequence[KeyPoint]: ... + @_typing.overload + def detect(self, images: _typing.Sequence[cv2.typing.MatLike], masks: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[_typing.Sequence[KeyPoint]]: ... + @_typing.overload + def detect(self, images: _typing.Sequence[UMat], masks: _typing.Sequence[UMat] | None = ...) -> _typing.Sequence[_typing.Sequence[KeyPoint]]: ... + + @_typing.overload + def compute(self, image: cv2.typing.MatLike, keypoints: _typing.Sequence[KeyPoint], descriptors: cv2.typing.MatLike | None = ...) -> tuple[_typing.Sequence[KeyPoint], cv2.typing.MatLike]: ... + @_typing.overload + def compute(self, image: UMat, keypoints: _typing.Sequence[KeyPoint], descriptors: UMat | None = ...) -> tuple[_typing.Sequence[KeyPoint], UMat]: ... + @_typing.overload + def compute(self, images: _typing.Sequence[cv2.typing.MatLike], keypoints: _typing.Sequence[_typing.Sequence[KeyPoint]], descriptors: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> tuple[_typing.Sequence[_typing.Sequence[KeyPoint]], _typing.Sequence[cv2.typing.MatLike]]: ... + @_typing.overload + def compute(self, images: _typing.Sequence[UMat], keypoints: _typing.Sequence[_typing.Sequence[KeyPoint]], descriptors: _typing.Sequence[UMat] | None = ...) -> tuple[_typing.Sequence[_typing.Sequence[KeyPoint]], _typing.Sequence[UMat]]: ... + + @_typing.overload + def detectAndCompute(self, image: cv2.typing.MatLike, mask: cv2.typing.MatLike | None, descriptors: cv2.typing.MatLike | None = ..., useProvidedKeypoints: bool = ...) -> tuple[_typing.Sequence[KeyPoint], cv2.typing.MatLike]: ... + @_typing.overload + def detectAndCompute(self, image: UMat, mask: UMat | None, descriptors: UMat | None = ..., useProvidedKeypoints: bool = ...) -> tuple[_typing.Sequence[KeyPoint], UMat]: ... + + def descriptorSize(self) -> int: ... + + def descriptorType(self) -> int: ... + + def defaultNorm(self) -> int: ... + + @_typing.overload + def write(self, fileName: str | os.PathLike[str]) -> None: ... + @_typing.overload + def write(self, fs: FileStorage, name: str) -> None: ... + + @_typing.overload + def read(self, fileName: str | os.PathLike[str]) -> None: ... + @_typing.overload + def read(self, arg1: FileNode) -> None: ... + + def empty(self) -> bool: ... + + def getDefaultName(self) -> str: ... + + +class AffineFeature(Feature2D): + # Functions + @classmethod + def create(cls, backend: Feature2D, maxTilt: int = ..., minTilt: int = ..., tiltStep: float = ..., rotateStepBase: float = ...) -> AffineFeature: ... + + def setViewParams(self, tilts: _typing.Sequence[float], rolls: _typing.Sequence[float]) -> None: ... + + def getViewParams(self, tilts: _typing.Sequence[float], rolls: _typing.Sequence[float]) -> None: ... + + def getDefaultName(self) -> str: ... + + +class SIFT(Feature2D): + # Functions + @classmethod + @_typing.overload + def create(cls, nfeatures: int = ..., nOctaveLayers: int = ..., contrastThreshold: float = ..., edgeThreshold: float = ..., sigma: float = ..., enable_precise_upscale: bool = ...) -> SIFT: ... + @classmethod + @_typing.overload + def create(cls, nfeatures: int, nOctaveLayers: int, contrastThreshold: float, edgeThreshold: float, sigma: float, descriptorType: int, enable_precise_upscale: bool = ...) -> SIFT: ... + + def getDefaultName(self) -> str: ... + + def setNFeatures(self, maxFeatures: int) -> None: ... + + def getNFeatures(self) -> int: ... + + def setNOctaveLayers(self, nOctaveLayers: int) -> None: ... + + def getNOctaveLayers(self) -> int: ... + + def setContrastThreshold(self, contrastThreshold: float) -> None: ... + + def getContrastThreshold(self) -> float: ... + + def setEdgeThreshold(self, edgeThreshold: float) -> None: ... + + def getEdgeThreshold(self) -> float: ... + + def setSigma(self, sigma: float) -> None: ... + + def getSigma(self) -> float: ... + + +class ORB(Feature2D): + # Functions + @classmethod + def create(cls, nfeatures: int = ..., scaleFactor: float = ..., nlevels: int = ..., edgeThreshold: int = ..., firstLevel: int = ..., WTA_K: int = ..., scoreType: ORB_ScoreType = ..., patchSize: int = ..., fastThreshold: int = ...) -> ORB: ... + + def setMaxFeatures(self, maxFeatures: int) -> None: ... + + def getMaxFeatures(self) -> int: ... + + def setScaleFactor(self, scaleFactor: float) -> None: ... + + def getScaleFactor(self) -> float: ... + + def setNLevels(self, nlevels: int) -> None: ... + + def getNLevels(self) -> int: ... + + def setEdgeThreshold(self, edgeThreshold: int) -> None: ... + + def getEdgeThreshold(self) -> int: ... + + def setFirstLevel(self, firstLevel: int) -> None: ... + + def getFirstLevel(self) -> int: ... + + def setWTA_K(self, wta_k: int) -> None: ... + + def getWTA_K(self) -> int: ... + + def setScoreType(self, scoreType: ORB_ScoreType) -> None: ... + + def getScoreType(self) -> ORB_ScoreType: ... + + def setPatchSize(self, patchSize: int) -> None: ... + + def getPatchSize(self) -> int: ... + + def setFastThreshold(self, fastThreshold: int) -> None: ... + + def getFastThreshold(self) -> int: ... + + def getDefaultName(self) -> str: ... + + +class MSER(Feature2D): + # Functions + @classmethod + def create(cls, delta: int = ..., min_area: int = ..., max_area: int = ..., max_variation: float = ..., min_diversity: float = ..., max_evolution: int = ..., area_threshold: float = ..., min_margin: float = ..., edge_blur_size: int = ...) -> MSER: ... + + @_typing.overload + def detectRegions(self, image: cv2.typing.MatLike) -> tuple[_typing.Sequence[_typing.Sequence[cv2.typing.Point]], _typing.Sequence[cv2.typing.Rect]]: ... + @_typing.overload + def detectRegions(self, image: UMat) -> tuple[_typing.Sequence[_typing.Sequence[cv2.typing.Point]], _typing.Sequence[cv2.typing.Rect]]: ... + + def setDelta(self, delta: int) -> None: ... + + def getDelta(self) -> int: ... + + def setMinArea(self, minArea: int) -> None: ... + + def getMinArea(self) -> int: ... + + def setMaxArea(self, maxArea: int) -> None: ... + + def getMaxArea(self) -> int: ... + + def setMaxVariation(self, maxVariation: float) -> None: ... + + def getMaxVariation(self) -> float: ... + + def setMinDiversity(self, minDiversity: float) -> None: ... + + def getMinDiversity(self) -> float: ... + + def setMaxEvolution(self, maxEvolution: int) -> None: ... + + def getMaxEvolution(self) -> int: ... + + def setAreaThreshold(self, areaThreshold: float) -> None: ... + + def getAreaThreshold(self) -> float: ... + + def setMinMargin(self, min_margin: float) -> None: ... + + def getMinMargin(self) -> float: ... + + def setEdgeBlurSize(self, edge_blur_size: int) -> None: ... + + def getEdgeBlurSize(self) -> int: ... + + def setPass2Only(self, f: bool) -> None: ... + + def getPass2Only(self) -> bool: ... + + def getDefaultName(self) -> str: ... + + +class FastFeatureDetector(Feature2D): + # Functions + @classmethod + def create(cls, threshold: int = ..., nonmaxSuppression: bool = ..., type: FastFeatureDetector_DetectorType = ...) -> FastFeatureDetector: ... + + def setThreshold(self, threshold: int) -> None: ... + + def getThreshold(self) -> int: ... + + def setNonmaxSuppression(self, f: bool) -> None: ... + + def getNonmaxSuppression(self) -> bool: ... + + def setType(self, type: FastFeatureDetector_DetectorType) -> None: ... + + def getType(self) -> FastFeatureDetector_DetectorType: ... + + def getDefaultName(self) -> str: ... + + +class GFTTDetector(Feature2D): + # Functions + @classmethod + @_typing.overload + def create(cls, maxCorners: int = ..., qualityLevel: float = ..., minDistance: float = ..., blockSize: int = ..., useHarrisDetector: bool = ..., k: float = ...) -> GFTTDetector: ... + @classmethod + @_typing.overload + def create(cls, maxCorners: int, qualityLevel: float, minDistance: float, blockSize: int, gradientSize: int, useHarrisDetector: bool = ..., k: float = ...) -> GFTTDetector: ... + + def setMaxFeatures(self, maxFeatures: int) -> None: ... + + def getMaxFeatures(self) -> int: ... + + def setQualityLevel(self, qlevel: float) -> None: ... + + def getQualityLevel(self) -> float: ... + + def setMinDistance(self, minDistance: float) -> None: ... + + def getMinDistance(self) -> float: ... + + def setBlockSize(self, blockSize: int) -> None: ... + + def getBlockSize(self) -> int: ... + + def setGradientSize(self, gradientSize_: int) -> None: ... + + def getGradientSize(self) -> int: ... + + def setHarrisDetector(self, val: bool) -> None: ... + + def getHarrisDetector(self) -> bool: ... + + def setK(self, k: float) -> None: ... + + def getK(self) -> float: ... + + def getDefaultName(self) -> str: ... + + +class DISK(Feature2D): + # Functions + @classmethod + def create(cls, modelPath: str, maxKeypoints: int = ..., scoreThreshold: float = ..., imageSize: cv2.typing.Size = ..., backendId: int = ..., targetId: int = ...) -> DISK: ... + + @classmethod + def createFromMemory(cls, bufferModel: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]], maxKeypoints: int = ..., scoreThreshold: float = ..., imageSize: cv2.typing.Size = ..., backendId: int = ..., targetId: int = ...) -> DISK: ... + + def setMaxKeypoints(self, maxKeypoints: int) -> None: ... + + def getMaxKeypoints(self) -> int: ... + + def setScoreThreshold(self, threshold: float) -> None: ... + + def getScoreThreshold(self) -> float: ... + + def setImageSize(self, size: cv2.typing.Size) -> None: ... + + def getImageSize(self) -> cv2.typing.Size: ... + + def getDefaultName(self) -> str: ... + + +class SimpleBlobDetector(Feature2D): + # Classes + class Params: + thresholdStep: float + minThreshold: float + maxThreshold: float + minRepeatability: int + minDistBetweenBlobs: float + filterByColor: bool + blobColor: int + filterByArea: bool + minArea: float + maxArea: float + filterByCircularity: bool + minCircularity: float + maxCircularity: float + filterByInertia: bool + minInertiaRatio: float + maxInertiaRatio: float + filterByConvexity: bool + minConvexity: float + maxConvexity: float + collectContours: bool + + # Functions + def __init__(self) -> None: ... + + + + # Functions + @classmethod + def create(cls, parameters: SimpleBlobDetector.Params = ...) -> SimpleBlobDetector: ... + + def setParams(self, params: SimpleBlobDetector.Params) -> None: ... + + def getParams(self) -> SimpleBlobDetector.Params: ... + + def getDefaultName(self) -> str: ... + + def getBlobContours(self) -> _typing.Sequence[_typing.Sequence[cv2.typing.Point]]: ... + + +class ALIKED(Feature2D): + # Classes + class Params: + inputSize: cv2.typing.Size + normalizeDescriptors: bool + engine: int + backend: int + target: int + + # Functions + def __init__(self) -> None: ... + + + + # Functions + @classmethod + def create(cls, modelPath: str, params: ALIKED.Params = ...) -> ALIKED: ... + + +class DescriptorMatcher(Algorithm): + # Functions + @_typing.overload + def add(self, descriptors: _typing.Sequence[cv2.typing.MatLike]) -> None: ... + @_typing.overload + def add(self, descriptors: _typing.Sequence[UMat]) -> None: ... + + def getTrainDescriptors(self) -> _typing.Sequence[cv2.typing.MatLike]: ... + + def clear(self) -> None: ... + + def empty(self) -> bool: ... + + def isMaskSupported(self) -> bool: ... + + def train(self) -> None: ... + + @_typing.overload + def match(self, queryDescriptors: cv2.typing.MatLike, trainDescriptors: cv2.typing.MatLike, mask: cv2.typing.MatLike | None = ...) -> _typing.Sequence[DMatch]: ... + @_typing.overload + def match(self, queryDescriptors: UMat, trainDescriptors: UMat, mask: UMat | None = ...) -> _typing.Sequence[DMatch]: ... + @_typing.overload + def match(self, queryDescriptors: cv2.typing.MatLike, masks: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[DMatch]: ... + @_typing.overload + def match(self, queryDescriptors: UMat, masks: _typing.Sequence[UMat] | None = ...) -> _typing.Sequence[DMatch]: ... + + @_typing.overload + def knnMatch(self, queryDescriptors: cv2.typing.MatLike, trainDescriptors: cv2.typing.MatLike, k: int, mask: cv2.typing.MatLike | None = ..., compactResult: bool = ...) -> _typing.Sequence[_typing.Sequence[DMatch]]: ... + @_typing.overload + def knnMatch(self, queryDescriptors: UMat, trainDescriptors: UMat, k: int, mask: UMat | None = ..., compactResult: bool = ...) -> _typing.Sequence[_typing.Sequence[DMatch]]: ... + @_typing.overload + def knnMatch(self, queryDescriptors: cv2.typing.MatLike, k: int, masks: _typing.Sequence[cv2.typing.MatLike] | None = ..., compactResult: bool = ...) -> _typing.Sequence[_typing.Sequence[DMatch]]: ... + @_typing.overload + def knnMatch(self, queryDescriptors: UMat, k: int, masks: _typing.Sequence[UMat] | None = ..., compactResult: bool = ...) -> _typing.Sequence[_typing.Sequence[DMatch]]: ... + + @_typing.overload + def radiusMatch(self, queryDescriptors: cv2.typing.MatLike, trainDescriptors: cv2.typing.MatLike, maxDistance: float, mask: cv2.typing.MatLike | None = ..., compactResult: bool = ...) -> _typing.Sequence[_typing.Sequence[DMatch]]: ... + @_typing.overload + def radiusMatch(self, queryDescriptors: UMat, trainDescriptors: UMat, maxDistance: float, mask: UMat | None = ..., compactResult: bool = ...) -> _typing.Sequence[_typing.Sequence[DMatch]]: ... + @_typing.overload + def radiusMatch(self, queryDescriptors: cv2.typing.MatLike, maxDistance: float, masks: _typing.Sequence[cv2.typing.MatLike] | None = ..., compactResult: bool = ...) -> _typing.Sequence[_typing.Sequence[DMatch]]: ... + @_typing.overload + def radiusMatch(self, queryDescriptors: UMat, maxDistance: float, masks: _typing.Sequence[UMat] | None = ..., compactResult: bool = ...) -> _typing.Sequence[_typing.Sequence[DMatch]]: ... + + @_typing.overload + def write(self, fileName: str | os.PathLike[str]) -> None: ... + @_typing.overload + def write(self, fs: FileStorage, name: str) -> None: ... + + @_typing.overload + def read(self, fileName: str | os.PathLike[str]) -> None: ... + @_typing.overload + def read(self, arg1: FileNode) -> None: ... + + def clone(self, emptyTrainData: bool = ...) -> DescriptorMatcher: ... + + @classmethod + @_typing.overload + def create(cls, descriptorMatcherType: str) -> DescriptorMatcher: ... + @classmethod + @_typing.overload + def create(cls, matcherType: DescriptorMatcher_MatcherType) -> DescriptorMatcher: ... + + +class BFMatcher(DescriptorMatcher): + # Functions + def __init__(self, normType: int = ..., crossCheck: bool = ...) -> None: ... + + @classmethod + def create(cls, normType: int = ..., crossCheck: bool = ...) -> BFMatcher: ... + + +class FlannBasedMatcher(DescriptorMatcher): + # Functions + def __init__(self, indexParams: cv2.typing.IndexParams = ..., searchParams: cv2.typing.SearchParams = ...) -> None: ... + + @classmethod + def create(cls) -> FlannBasedMatcher: ... + + +class LightGlueMatcher(DescriptorMatcher): + # Functions + @classmethod + def create(cls, modelPath: str, scoreThreshold: float = ..., backend: int = ..., target: int = ...) -> LightGlueMatcher: ... + + @classmethod + def createFromMemory(cls, modelData: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]], scoreThreshold: float = ..., backend: int = ..., target: int = ...) -> LightGlueMatcher: ... + + @_typing.overload + def setPairInfo(self, queryKpts: cv2.typing.MatLike, trainKpts: cv2.typing.MatLike, queryImageSize: cv2.typing.Size = ..., trainImageSize: cv2.typing.Size = ...) -> None: ... + @_typing.overload + def setPairInfo(self, queryKpts: UMat, trainKpts: UMat, queryImageSize: cv2.typing.Size = ..., trainImageSize: cv2.typing.Size = ...) -> None: ... + + def clearPairInfo(self) -> None: ... + + +class ANNIndex: + # Functions + @_typing.overload + def addItems(self, features: cv2.typing.MatLike) -> None: ... + @_typing.overload + def addItems(self, features: UMat) -> None: ... + + def build(self, trees: int = ...) -> None: ... + + @_typing.overload + def knnSearch(self, query: cv2.typing.MatLike, knn: int, indices: cv2.typing.MatLike | None = ..., dists: cv2.typing.MatLike | None = ..., search_k: int = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... + @_typing.overload + def knnSearch(self, query: UMat, knn: int, indices: UMat | None = ..., dists: UMat | None = ..., search_k: int = ...) -> tuple[UMat, UMat]: ... + + def save(self, filename: str | os.PathLike[str], prefault: bool = ...) -> None: ... + + def load(self, filename: str | os.PathLike[str], prefault: bool = ...) -> None: ... + + def getTreeNumber(self) -> int: ... + + def getItemNumber(self) -> int: ... + + def setOnDiskBuild(self, filename: str | os.PathLike[str]) -> bool: ... + + def setSeed(self, seed: int) -> None: ... + + @classmethod + def create(cls, dim: int, distType: ANNIndex_Distance = ...) -> ANNIndex: ... + + +class Animation: + loop_count: int + bgcolor: cv2.typing.Scalar + durations: _typing.Sequence[int] + frames: _typing.Sequence[cv2.typing.MatLike] + still_image: cv2.typing.MatLike + + # Functions + def __init__(self, loopCount: int = ..., bgColor: cv2.typing.Scalar = ...) -> None: ... + + +class QRCodeEncoder: + # Classes + class Params: + version: int + correction_level: QRCodeEncoder_CorrectionLevel + mode: QRCodeEncoder_EncodeMode + structure_number: int + + # Functions + def __init__(self) -> None: ... + + + + # Functions + @classmethod + def create(cls, parameters: QRCodeEncoder.Params = ...) -> QRCodeEncoder: ... + + @_typing.overload + def encode(self, encoded_info: str, qrcode: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def encode(self, encoded_info: str, qrcode: UMat | None = ...) -> UMat: ... + + @_typing.overload + def encodeStructuredAppend(self, encoded_info: str, qrcodes: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ... + @_typing.overload + def encodeStructuredAppend(self, encoded_info: str, qrcodes: _typing.Sequence[UMat] | None = ...) -> _typing.Sequence[UMat]: ... + + +class QRCodeDetector(GraphicalCodeDetector): + # Functions + def __init__(self) -> None: ... + + def setEpsX(self, epsX: float) -> QRCodeDetector: ... + + def setEpsY(self, epsY: float) -> QRCodeDetector: ... + + def setUseAlignmentMarkers(self, useAlignmentMarkers: bool) -> QRCodeDetector: ... + + @_typing.overload + def decodeCurved(self, img: cv2.typing.MatLike, points: cv2.typing.MatLike, straight_qrcode: cv2.typing.MatLike | None = ...) -> tuple[str, cv2.typing.MatLike]: ... + @_typing.overload + def decodeCurved(self, img: UMat, points: UMat, straight_qrcode: UMat | None = ...) -> tuple[str, UMat]: ... + + @_typing.overload + def detectAndDecodeCurved(self, img: cv2.typing.MatLike, points: cv2.typing.MatLike | None = ..., straight_qrcode: cv2.typing.MatLike | None = ...) -> tuple[str, cv2.typing.MatLike, cv2.typing.MatLike]: ... + @_typing.overload + def detectAndDecodeCurved(self, img: UMat, points: UMat | None = ..., straight_qrcode: UMat | None = ...) -> tuple[str, UMat, UMat]: ... + + def getEncoding(self, codeIdx: int = ...) -> QRCodeEncoder_ECIEncodings: ... + + +class GraphicalCodeDetector: + # Functions + @_typing.overload + def detect(self, img: cv2.typing.MatLike, points: cv2.typing.MatLike | None = ...) -> tuple[bool, cv2.typing.MatLike]: ... + @_typing.overload + def detect(self, img: UMat, points: UMat | None = ...) -> tuple[bool, UMat]: ... + + @_typing.overload + def decode(self, img: cv2.typing.MatLike, points: cv2.typing.MatLike, straight_code: cv2.typing.MatLike | None = ...) -> tuple[str, cv2.typing.MatLike]: ... + @_typing.overload + def decode(self, img: UMat, points: UMat, straight_code: UMat | None = ...) -> tuple[str, UMat]: ... + + @_typing.overload + def detectAndDecode(self, img: cv2.typing.MatLike, points: cv2.typing.MatLike | None = ..., straight_code: cv2.typing.MatLike | None = ...) -> tuple[str, cv2.typing.MatLike, cv2.typing.MatLike]: ... + @_typing.overload + def detectAndDecode(self, img: UMat, points: UMat | None = ..., straight_code: UMat | None = ...) -> tuple[str, UMat, UMat]: ... + + @_typing.overload + def detectMulti(self, img: cv2.typing.MatLike, points: cv2.typing.MatLike | None = ...) -> tuple[bool, cv2.typing.MatLike]: ... + @_typing.overload + def detectMulti(self, img: UMat, points: UMat | None = ...) -> tuple[bool, UMat]: ... + + @_typing.overload + def decodeMulti(self, img: cv2.typing.MatLike, points: cv2.typing.MatLike, straight_code: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> tuple[bool, _typing.Sequence[str], _typing.Sequence[cv2.typing.MatLike]]: ... + @_typing.overload + def decodeMulti(self, img: UMat, points: UMat, straight_code: _typing.Sequence[UMat] | None = ...) -> tuple[bool, _typing.Sequence[str], _typing.Sequence[UMat]]: ... + + @_typing.overload + def detectAndDecodeMulti(self, img: cv2.typing.MatLike, points: cv2.typing.MatLike | None = ..., straight_code: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> tuple[bool, _typing.Sequence[str], cv2.typing.MatLike, _typing.Sequence[cv2.typing.MatLike]]: ... + @_typing.overload + def detectAndDecodeMulti(self, img: UMat, points: UMat | None = ..., straight_code: _typing.Sequence[UMat] | None = ...) -> tuple[bool, _typing.Sequence[str], UMat, _typing.Sequence[UMat]]: ... + + @_typing.overload + def detectAndDecodeBytes(self, img: cv2.typing.MatLike, points: cv2.typing.MatLike | None = ..., straight_code: cv2.typing.MatLike | None = ...) -> tuple[bytes, cv2.typing.MatLike, cv2.typing.MatLike]: ... + @_typing.overload + def detectAndDecodeBytes(self, img: UMat, points: UMat | None = ..., straight_code: UMat | None = ...) -> tuple[bytes, UMat, UMat]: ... + + @_typing.overload + def decodeBytes(self, img: cv2.typing.MatLike, points: cv2.typing.MatLike, straight_code: cv2.typing.MatLike | None = ...) -> tuple[bytes, cv2.typing.MatLike]: ... + @_typing.overload + def decodeBytes(self, img: UMat, points: UMat, straight_code: UMat | None = ...) -> tuple[bytes, UMat]: ... + + @_typing.overload + def decodeBytesMulti(self, img: cv2.typing.MatLike, points: cv2.typing.MatLike, straight_code: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> tuple[bool, _typing.Sequence[bytes], _typing.Sequence[cv2.typing.MatLike]]: ... + @_typing.overload + def decodeBytesMulti(self, img: UMat, points: UMat, straight_code: _typing.Sequence[UMat] | None = ...) -> tuple[bool, _typing.Sequence[bytes], _typing.Sequence[UMat]]: ... + + @_typing.overload + def detectAndDecodeBytesMulti(self, img: cv2.typing.MatLike, points: cv2.typing.MatLike | None = ..., straight_code: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> tuple[bool, _typing.Sequence[bytes], cv2.typing.MatLike, _typing.Sequence[cv2.typing.MatLike]]: ... + @_typing.overload + def detectAndDecodeBytesMulti(self, img: UMat, points: UMat | None = ..., straight_code: _typing.Sequence[UMat] | None = ...) -> tuple[bool, _typing.Sequence[bytes], UMat, _typing.Sequence[UMat]]: ... + + +class QRCodeDetectorAruco(GraphicalCodeDetector): + # Classes + class Params: + minModuleSizeInPyramid: float + maxRotation: float + maxModuleSizeMismatch: float + maxTimingPatternMismatch: float + maxPenalties: float + maxColorsMismatch: float + scaleTimingPatternScore: float + + # Functions + def __init__(self) -> None: ... + + + + # Functions + @_typing.overload + def __init__(self) -> None: ... + @_typing.overload + def __init__(self, params: QRCodeDetectorAruco.Params) -> None: ... + + def getDetectorParameters(self) -> QRCodeDetectorAruco.Params: ... + + def setDetectorParameters(self, params: QRCodeDetectorAruco.Params) -> QRCodeDetectorAruco: ... + + def getArucoParameters(self) -> cv2.aruco.DetectorParameters: ... + + def setArucoParameters(self, params: cv2.aruco.DetectorParameters) -> None: ... + + +class CirclesGridFinderParameters: + densityNeighborhoodSize: cv2.typing.Size2f + minDensity: float + kmeansAttempts: int + minDistanceToAddKeypoint: int + keypointScale: int + minGraphConfidence: float + vertexGain: float + vertexPenalty: float + existingVertexGain: float + edgeGain: float + edgePenalty: float + convexHullFactor: float + minRNGEdgeSwitchDist: float + gridType: CirclesGridFinderParameters_GridType + squareSize: float + maxRectifiedDistance: float + + # Functions + def __init__(self) -> None: ... + + +class FaceDetectorYN: + # Functions + def setInputSize(self, input_size: cv2.typing.Size) -> None: ... + + def getInputSize(self) -> cv2.typing.Size: ... + + def setScoreThreshold(self, score_threshold: float) -> None: ... + + def getScoreThreshold(self) -> float: ... + + def setNMSThreshold(self, nms_threshold: float) -> None: ... + + def getNMSThreshold(self) -> float: ... + + def setTopK(self, top_k: int) -> None: ... + + def getTopK(self) -> int: ... + + @_typing.overload + def detect(self, image: cv2.typing.MatLike, faces: cv2.typing.MatLike | None = ...) -> tuple[int, cv2.typing.MatLike]: ... + @_typing.overload + def detect(self, image: UMat, faces: UMat | None = ...) -> tuple[int, UMat]: ... + + @classmethod + @_typing.overload + def create(cls, model: str | os.PathLike[str], config: str | os.PathLike[str], input_size: cv2.typing.Size, score_threshold: float = ..., nms_threshold: float = ..., top_k: int = ..., backend_id: int = ..., target_id: int = ...) -> FaceDetectorYN: ... + @classmethod + @_typing.overload + def create(cls, framework: str, bufferModel: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]], bufferConfig: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]], input_size: cv2.typing.Size, score_threshold: float = ..., nms_threshold: float = ..., top_k: int = ..., backend_id: int = ..., target_id: int = ...) -> FaceDetectorYN: ... + + +class FaceRecognizerSF: + # Functions + @_typing.overload + def alignCrop(self, src_img: cv2.typing.MatLike, face_box: cv2.typing.MatLike, aligned_img: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def alignCrop(self, src_img: UMat, face_box: UMat, aligned_img: UMat | None = ...) -> UMat: ... + + @_typing.overload + def feature(self, aligned_img: cv2.typing.MatLike, face_feature: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def feature(self, aligned_img: UMat, face_feature: UMat | None = ...) -> UMat: ... + + @_typing.overload + def match(self, face_feature1: cv2.typing.MatLike, face_feature2: cv2.typing.MatLike, dis_type: int = ...) -> float: ... + @_typing.overload + def match(self, face_feature1: UMat, face_feature2: UMat, dis_type: int = ...) -> float: ... + + @classmethod + @_typing.overload + def create(cls, model: str | os.PathLike[str], config: str | os.PathLike[str], backend_id: int = ..., target_id: int = ...) -> FaceRecognizerSF: ... + @classmethod + @_typing.overload + def create(cls, framework: str, bufferModel: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]], bufferConfig: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]], backend_id: int = ..., target_id: int = ...) -> FaceRecognizerSF: ... + + +class Stitcher: + # Functions + @classmethod + def create(cls, mode: Stitcher_Mode = ...) -> Stitcher: ... + + def registrationResol(self) -> float: ... + + def setRegistrationResol(self, resol_mpx: float) -> None: ... + + def seamEstimationResol(self) -> float: ... + + def setSeamEstimationResol(self, resol_mpx: float) -> None: ... + + def compositingResol(self) -> float: ... + + def setCompositingResol(self, resol_mpx: float) -> None: ... + + def panoConfidenceThresh(self) -> float: ... + + def setPanoConfidenceThresh(self, conf_thresh: float) -> None: ... + + def waveCorrection(self) -> bool: ... + + def setWaveCorrection(self, flag: bool) -> None: ... + + def interpolationFlags(self) -> InterpolationFlags: ... + + def setInterpolationFlags(self, interp_flags: InterpolationFlags) -> None: ... + + @_typing.overload + def estimateTransform(self, images: _typing.Sequence[cv2.typing.MatLike], masks: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> Stitcher_Status: ... + @_typing.overload + def estimateTransform(self, images: _typing.Sequence[UMat], masks: _typing.Sequence[UMat] | None = ...) -> Stitcher_Status: ... + + @_typing.overload + def composePanorama(self, pano: cv2.typing.MatLike | None = ...) -> tuple[Stitcher_Status, cv2.typing.MatLike]: ... + @_typing.overload + def composePanorama(self, pano: UMat | None = ...) -> tuple[Stitcher_Status, UMat]: ... + @_typing.overload + def composePanorama(self, images: _typing.Sequence[cv2.typing.MatLike], pano: cv2.typing.MatLike | None = ...) -> tuple[Stitcher_Status, cv2.typing.MatLike]: ... + @_typing.overload + def composePanorama(self, images: _typing.Sequence[UMat], pano: UMat | None = ...) -> tuple[Stitcher_Status, UMat]: ... + + @_typing.overload + def stitch(self, images: _typing.Sequence[cv2.typing.MatLike], pano: cv2.typing.MatLike | None = ...) -> tuple[Stitcher_Status, cv2.typing.MatLike]: ... + @_typing.overload + def stitch(self, images: _typing.Sequence[UMat], pano: UMat | None = ...) -> tuple[Stitcher_Status, UMat]: ... + @_typing.overload + def stitch(self, images: _typing.Sequence[cv2.typing.MatLike], masks: _typing.Sequence[cv2.typing.MatLike], pano: cv2.typing.MatLike | None = ...) -> tuple[Stitcher_Status, cv2.typing.MatLike]: ... + @_typing.overload + def stitch(self, images: _typing.Sequence[UMat], masks: _typing.Sequence[UMat], pano: UMat | None = ...) -> tuple[Stitcher_Status, UMat]: ... + + def component(self) -> _typing.Sequence[int]: ... + + def cameras(self) -> _typing.Sequence[cv2.detail.CameraParams]: ... + + def workScale(self) -> float: ... + + +class PyRotationWarper: + # Functions + @_typing.overload + def __init__(self, type: str, scale: float) -> None: ... + @_typing.overload + def __init__(self) -> None: ... + + @_typing.overload + def warpPoint(self, pt: cv2.typing.Point2f, K: cv2.typing.MatLike, R: cv2.typing.MatLike) -> cv2.typing.Point2f: ... + @_typing.overload + def warpPoint(self, pt: cv2.typing.Point2f, K: UMat, R: UMat) -> cv2.typing.Point2f: ... + + @_typing.overload + def warpPointBackward(self, pt: cv2.typing.Point2f, K: cv2.typing.MatLike, R: cv2.typing.MatLike) -> cv2.typing.Point2f: ... + @_typing.overload + def warpPointBackward(self, pt: cv2.typing.Point2f, K: UMat, R: UMat) -> cv2.typing.Point2f: ... + + @_typing.overload + def buildMaps(self, src_size: cv2.typing.Size, K: cv2.typing.MatLike, R: cv2.typing.MatLike, xmap: cv2.typing.MatLike | None = ..., ymap: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.Rect, cv2.typing.MatLike, cv2.typing.MatLike]: ... + @_typing.overload + def buildMaps(self, src_size: cv2.typing.Size, K: UMat, R: UMat, xmap: UMat | None = ..., ymap: UMat | None = ...) -> tuple[cv2.typing.Rect, UMat, UMat]: ... + + @_typing.overload + def warp(self, src: cv2.typing.MatLike, K: cv2.typing.MatLike, R: cv2.typing.MatLike, interp_mode: int, border_mode: int, dst: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.Point, cv2.typing.MatLike]: ... + @_typing.overload + def warp(self, src: UMat, K: UMat, R: UMat, interp_mode: int, border_mode: int, dst: UMat | None = ...) -> tuple[cv2.typing.Point, UMat]: ... + + @_typing.overload + def warpBackward(self, src: cv2.typing.MatLike, K: cv2.typing.MatLike, R: cv2.typing.MatLike, interp_mode: int, border_mode: int, dst_size: cv2.typing.Size, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def warpBackward(self, src: UMat, K: UMat, R: UMat, interp_mode: int, border_mode: int, dst_size: cv2.typing.Size, dst: UMat | None = ...) -> UMat: ... + + @_typing.overload + def warpRoi(self, src_size: cv2.typing.Size, K: cv2.typing.MatLike, R: cv2.typing.MatLike) -> cv2.typing.Rect: ... + @_typing.overload + def warpRoi(self, src_size: cv2.typing.Size, K: UMat, R: UMat) -> cv2.typing.Rect: ... + + def getScale(self) -> float: ... + + def setScale(self, arg1: float) -> None: ... + + +class WarperCreator: + ... + +class BackgroundSubtractor(Algorithm): + # Functions + @_typing.overload + def apply(self, image: cv2.typing.MatLike, fgmask: cv2.typing.MatLike | None = ..., learningRate: float = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def apply(self, image: UMat, fgmask: UMat | None = ..., learningRate: float = ...) -> UMat: ... + @_typing.overload + def apply(self, image: cv2.typing.MatLike, knownForegroundMask: cv2.typing.MatLike, fgmask: cv2.typing.MatLike | None = ..., learningRate: float = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def apply(self, image: UMat, knownForegroundMask: UMat, fgmask: UMat | None = ..., learningRate: float = ...) -> UMat: ... + + @_typing.overload + def getBackgroundImage(self, backgroundImage: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def getBackgroundImage(self, backgroundImage: UMat | None = ...) -> UMat: ... + + +class BackgroundSubtractorMOG2(BackgroundSubtractor): + # Functions + def getHistory(self) -> int: ... + + def setHistory(self, history: int) -> None: ... + + def getNMixtures(self) -> int: ... + + def setNMixtures(self, nmixtures: int) -> None: ... + + def getBackgroundRatio(self) -> float: ... + + def setBackgroundRatio(self, ratio: float) -> None: ... + + def getVarThreshold(self) -> float: ... + + def setVarThreshold(self, varThreshold: float) -> None: ... + + def getVarThresholdGen(self) -> float: ... + + def setVarThresholdGen(self, varThresholdGen: float) -> None: ... + + def getVarInit(self) -> float: ... + + def setVarInit(self, varInit: float) -> None: ... + + def getVarMin(self) -> float: ... + + def setVarMin(self, varMin: float) -> None: ... + + def getVarMax(self) -> float: ... + + def setVarMax(self, varMax: float) -> None: ... + + def getComplexityReductionThreshold(self) -> float: ... + + def setComplexityReductionThreshold(self, ct: float) -> None: ... + + def getDetectShadows(self) -> bool: ... + + def setDetectShadows(self, detectShadows: bool) -> None: ... + + def getShadowValue(self) -> int: ... + + def setShadowValue(self, value: int) -> None: ... + + def getShadowThreshold(self) -> float: ... + + def setShadowThreshold(self, threshold: float) -> None: ... + + @_typing.overload + def apply(self, image: cv2.typing.MatLike, fgmask: cv2.typing.MatLike | None = ..., learningRate: float = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def apply(self, image: UMat, fgmask: UMat | None = ..., learningRate: float = ...) -> UMat: ... + @_typing.overload + def apply(self, image: cv2.typing.MatLike, knownForegroundMask: cv2.typing.MatLike, fgmask: cv2.typing.MatLike | None = ..., learningRate: float = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def apply(self, image: UMat, knownForegroundMask: UMat, fgmask: UMat | None = ..., learningRate: float = ...) -> UMat: ... + + +class BackgroundSubtractorKNN(BackgroundSubtractor): + # Functions + def getHistory(self) -> int: ... + + def setHistory(self, history: int) -> None: ... + + def getNSamples(self) -> int: ... + + def setNSamples(self, _nN: int) -> None: ... + + def getDist2Threshold(self) -> float: ... + + def setDist2Threshold(self, _dist2Threshold: float) -> None: ... + + def getkNNSamples(self) -> int: ... + + def setkNNSamples(self, _nkNN: int) -> None: ... + + def getDetectShadows(self) -> bool: ... + + def setDetectShadows(self, detectShadows: bool) -> None: ... + + def getShadowValue(self) -> int: ... + + def setShadowValue(self, value: int) -> None: ... + + def getShadowThreshold(self) -> float: ... + + def setShadowThreshold(self, threshold: float) -> None: ... + + +class ECCParameters: + motionType: int + criteria: cv2.typing.TermCriteria + itersPerLevel: _typing.Sequence[int] + gaussFiltSize: int + nlevels: int + interpolation: int + + # Functions + def __init__(self) -> None: ... + + +class KalmanFilter: + statePre: cv2.typing.MatLike + statePost: cv2.typing.MatLike + transitionMatrix: cv2.typing.MatLike + controlMatrix: cv2.typing.MatLike + measurementMatrix: cv2.typing.MatLike + processNoiseCov: cv2.typing.MatLike + measurementNoiseCov: cv2.typing.MatLike + errorCovPre: cv2.typing.MatLike + gain: cv2.typing.MatLike + errorCovPost: cv2.typing.MatLike + + # Functions + @_typing.overload + def __init__(self) -> None: ... + @_typing.overload + def __init__(self, dynamParams: int, measureParams: int, controlParams: int = ..., type: int = ...) -> None: ... + + def predict(self, control: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + + def correct(self, measurement: cv2.typing.MatLike) -> cv2.typing.MatLike: ... + + +class DenseOpticalFlow(Algorithm): + # Functions + @_typing.overload + def calc(self, I0: cv2.typing.MatLike, I1: cv2.typing.MatLike, flow: cv2.typing.MatLike) -> cv2.typing.MatLike: ... + @_typing.overload + def calc(self, I0: UMat, I1: UMat, flow: UMat) -> UMat: ... + + def collectGarbage(self) -> None: ... + + +class SparseOpticalFlow(Algorithm): + # Functions + @_typing.overload + def calc(self, prevImg: cv2.typing.MatLike, nextImg: cv2.typing.MatLike, prevPts: cv2.typing.MatLike, nextPts: cv2.typing.MatLike, status: cv2.typing.MatLike | None = ..., err: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... + @_typing.overload + def calc(self, prevImg: UMat, nextImg: UMat, prevPts: UMat, nextPts: UMat, status: UMat | None = ..., err: UMat | None = ...) -> tuple[UMat, UMat, UMat]: ... + + +class FarnebackOpticalFlow(DenseOpticalFlow): + # Functions + def getNumLevels(self) -> int: ... + + def setNumLevels(self, numLevels: int) -> None: ... + + def getPyrScale(self) -> float: ... + + def setPyrScale(self, pyrScale: float) -> None: ... + + def getFastPyramids(self) -> bool: ... + + def setFastPyramids(self, fastPyramids: bool) -> None: ... + + def getWinSize(self) -> int: ... + + def setWinSize(self, winSize: int) -> None: ... + + def getNumIters(self) -> int: ... + + def setNumIters(self, numIters: int) -> None: ... + + def getPolyN(self) -> int: ... + + def setPolyN(self, polyN: int) -> None: ... + + def getPolySigma(self) -> float: ... + + def setPolySigma(self, polySigma: float) -> None: ... + + def getFlags(self) -> int: ... + + def setFlags(self, flags: int) -> None: ... + + @classmethod + def create(cls, numLevels: int = ..., pyrScale: float = ..., fastPyramids: bool = ..., winSize: int = ..., numIters: int = ..., polyN: int = ..., polySigma: float = ..., flags: int = ...) -> FarnebackOpticalFlow: ... + + +class VariationalRefinement(DenseOpticalFlow): + # Functions + @_typing.overload + def calcUV(self, I0: cv2.typing.MatLike, I1: cv2.typing.MatLike, flow_u: cv2.typing.MatLike, flow_v: cv2.typing.MatLike) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... + @_typing.overload + def calcUV(self, I0: UMat, I1: UMat, flow_u: UMat, flow_v: UMat) -> tuple[UMat, UMat]: ... + + def getFixedPointIterations(self) -> int: ... + + def setFixedPointIterations(self, val: int) -> None: ... + + def getSorIterations(self) -> int: ... + + def setSorIterations(self, val: int) -> None: ... + + def getOmega(self) -> float: ... + + def setOmega(self, val: float) -> None: ... + + def getAlpha(self) -> float: ... + + def setAlpha(self, val: float) -> None: ... + + def getDelta(self) -> float: ... + + def setDelta(self, val: float) -> None: ... + + def getGamma(self) -> float: ... + + def setGamma(self, val: float) -> None: ... + + def getEpsilon(self) -> float: ... + + def setEpsilon(self, val: float) -> None: ... + + @classmethod + def create(cls) -> VariationalRefinement: ... + + +class DISOpticalFlow(DenseOpticalFlow): + # Functions + def getFinestScale(self) -> int: ... + + def setFinestScale(self, val: int) -> None: ... + + def setCoarsestScale(self, val: int) -> None: ... + + def getCoarsestScale(self) -> int: ... + + def getPatchSize(self) -> int: ... + + def setPatchSize(self, val: int) -> None: ... + + def getPatchStride(self) -> int: ... + + def setPatchStride(self, val: int) -> None: ... + + def getGradientDescentIterations(self) -> int: ... + + def setGradientDescentIterations(self, val: int) -> None: ... + + def getVariationalRefinementIterations(self) -> int: ... + + def setVariationalRefinementIterations(self, val: int) -> None: ... + + def getVariationalRefinementAlpha(self) -> float: ... + + def setVariationalRefinementAlpha(self, val: float) -> None: ... + + def getVariationalRefinementDelta(self) -> float: ... + + def setVariationalRefinementDelta(self, val: float) -> None: ... + + def getVariationalRefinementGamma(self) -> float: ... + + def setVariationalRefinementGamma(self, val: float) -> None: ... + + def getVariationalRefinementEpsilon(self) -> float: ... + + def setVariationalRefinementEpsilon(self, val: float) -> None: ... + + def getUseMeanNormalization(self) -> bool: ... + + def setUseMeanNormalization(self, val: bool) -> None: ... + + def getUseSpatialPropagation(self) -> bool: ... + + def setUseSpatialPropagation(self, val: bool) -> None: ... + + @classmethod + def create(cls, preset: int = ...) -> DISOpticalFlow: ... + + +class SparsePyrLKOpticalFlow(SparseOpticalFlow): + # Functions + def getWinSize(self) -> cv2.typing.Size: ... + + def setWinSize(self, winSize: cv2.typing.Size) -> None: ... + + def getMaxLevel(self) -> int: ... + + def setMaxLevel(self, maxLevel: int) -> None: ... + + def getTermCriteria(self) -> cv2.typing.TermCriteria: ... + + def setTermCriteria(self, crit: cv2.typing.TermCriteria) -> None: ... + + def getFlags(self) -> int: ... + + def setFlags(self, flags: int) -> None: ... + + def getMinEigThreshold(self) -> float: ... + + def setMinEigThreshold(self, minEigThreshold: float) -> None: ... + + @classmethod + def create(cls, winSize: cv2.typing.Size = ..., maxLevel: int = ..., crit: cv2.typing.TermCriteria = ..., flags: int = ..., minEigThreshold: float = ...) -> SparsePyrLKOpticalFlow: ... + + +class Tracker: + # Functions + @_typing.overload + def init(self, image: cv2.typing.MatLike, boundingBox: cv2.typing.Rect) -> None: ... + @_typing.overload + def init(self, image: UMat, boundingBox: cv2.typing.Rect) -> None: ... + + @_typing.overload + def update(self, image: cv2.typing.MatLike) -> tuple[bool, cv2.typing.Rect]: ... + @_typing.overload + def update(self, image: UMat) -> tuple[bool, cv2.typing.Rect]: ... + + def getTrackingScore(self) -> float: ... + + +class TrackerMIL(Tracker): + # Classes + class Params: + samplerInitInRadius: float + samplerInitMaxNegNum: int + samplerSearchWinSize: float + samplerTrackInRadius: float + samplerTrackMaxPosNum: int + samplerTrackMaxNegNum: int + featureSetNumFeatures: int + + # Functions + def __init__(self) -> None: ... + + + + # Functions + @classmethod + def create(cls, parameters: TrackerMIL.Params = ...) -> TrackerMIL: ... + + +class TrackerDaSiamRPN(Tracker): + # Classes + class Params: + model: str + kernel_cls1: str + kernel_r1: str + backend: int + target: int + + # Functions + def __init__(self) -> None: ... + + + + # Functions + @classmethod + @_typing.overload + def create(cls, parameters: TrackerDaSiamRPN.Params = ...) -> TrackerDaSiamRPN: ... + @classmethod + @_typing.overload + def create(cls, siam_rpn: cv2.dnn.Net, kernel_cls1: cv2.dnn.Net, kernel_r1: cv2.dnn.Net) -> TrackerDaSiamRPN: ... + + +class TrackerNano(Tracker): + # Classes + class Params: + backbone: str + neckhead: str + backend: int + target: int + + # Functions + def __init__(self) -> None: ... + + + + # Functions + @classmethod + @_typing.overload + def create(cls, parameters: TrackerNano.Params = ...) -> TrackerNano: ... + @classmethod + @_typing.overload + def create(cls, backbone: cv2.dnn.Net, neckhead: cv2.dnn.Net) -> TrackerNano: ... + + +class TrackerVit(Tracker): + # Classes + class Params: + net: str + backend: int + target: int + meanvalue: cv2.typing.Scalar + stdvalue: cv2.typing.Scalar + tracking_score_threshold: float + + # Functions + def __init__(self) -> None: ... + + + + # Functions + @classmethod + @_typing.overload + def create(cls, parameters: TrackerVit.Params = ...) -> TrackerVit: ... + @classmethod + @_typing.overload + def create(cls, model: cv2.dnn.Net, meanvalue: cv2.typing.Scalar = ..., stdvalue: cv2.typing.Scalar = ..., tracking_score_threshold: float = ...) -> TrackerVit: ... + + +class IStreamReader: + # Functions + def read(self, buffer: str, size: int) -> int: ... + + def seek(self, offset: int, origin: int) -> int: ... + + +class VideoCapture: + # Functions + @_typing.overload + def __init__(self) -> None: ... + @_typing.overload + def __init__(self, filename: str | os.PathLike[str], apiPreference: int = ...) -> None: ... + @_typing.overload + def __init__(self, filename: str | os.PathLike[str], apiPreference: int, params: _typing.Sequence[int]) -> None: ... + @_typing.overload + def __init__(self, index: int, apiPreference: int = ...) -> None: ... + @_typing.overload + def __init__(self, index: int, apiPreference: int, params: _typing.Sequence[int]) -> None: ... + @_typing.overload + def __init__(self, source: IStreamReader, apiPreference: int, params: _typing.Sequence[int]) -> None: ... + + @_typing.overload + def open(self, filename: str | os.PathLike[str], apiPreference: int = ...) -> bool: ... + @_typing.overload + def open(self, filename: str | os.PathLike[str], apiPreference: int, params: _typing.Sequence[int]) -> bool: ... + @_typing.overload + def open(self, index: int, apiPreference: int = ...) -> bool: ... + @_typing.overload + def open(self, index: int, apiPreference: int, params: _typing.Sequence[int]) -> bool: ... + @_typing.overload + def open(self, source: IStreamReader, apiPreference: int, params: _typing.Sequence[int]) -> bool: ... + + def isOpened(self) -> bool: ... + + def release(self) -> None: ... + + def grab(self) -> bool: ... + + @_typing.overload + def retrieve(self, image: cv2.typing.MatLike | None = ..., flag: int = ...) -> tuple[bool, cv2.typing.MatLike]: ... + @_typing.overload + def retrieve(self, image: UMat | None = ..., flag: int = ...) -> tuple[bool, UMat]: ... + + @_typing.overload + def read(self, image: cv2.typing.MatLike | None = ...) -> tuple[bool, cv2.typing.MatLike]: ... + @_typing.overload + def read(self, image: UMat | None = ...) -> tuple[bool, UMat]: ... + + def set(self, propId: int, value: float) -> bool: ... + + def get(self, propId: int) -> float: ... + + def getBackendName(self) -> str: ... + + def setExceptionMode(self, enable: bool) -> None: ... + + def getExceptionMode(self) -> bool: ... + + @staticmethod + def waitAny(streams: _typing.Sequence[VideoCapture], timeoutNs: int = ...) -> tuple[bool, _typing.Sequence[int]]: ... + + +class VideoWriter: + # Functions + @_typing.overload + def __init__(self) -> None: ... + @_typing.overload + def __init__(self, filename: str | os.PathLike[str], fourcc: int, fps: float, frameSize: cv2.typing.Size, isColor: bool = ...) -> None: ... + @_typing.overload + def __init__(self, filename: str | os.PathLike[str], apiPreference: int, fourcc: int, fps: float, frameSize: cv2.typing.Size, isColor: bool = ...) -> None: ... + @_typing.overload + def __init__(self, filename: str | os.PathLike[str], fourcc: int, fps: float, frameSize: cv2.typing.Size, params: _typing.Sequence[int]) -> None: ... + @_typing.overload + def __init__(self, filename: str | os.PathLike[str], apiPreference: int, fourcc: int, fps: float, frameSize: cv2.typing.Size, params: _typing.Sequence[int]) -> None: ... + + @_typing.overload + def open(self, filename: str | os.PathLike[str], fourcc: int, fps: float, frameSize: cv2.typing.Size, isColor: bool = ...) -> bool: ... + @_typing.overload + def open(self, filename: str | os.PathLike[str], apiPreference: int, fourcc: int, fps: float, frameSize: cv2.typing.Size, isColor: bool = ...) -> bool: ... + @_typing.overload + def open(self, filename: str | os.PathLike[str], fourcc: int, fps: float, frameSize: cv2.typing.Size, params: _typing.Sequence[int]) -> bool: ... + @_typing.overload + def open(self, filename: str | os.PathLike[str], apiPreference: int, fourcc: int, fps: float, frameSize: cv2.typing.Size, params: _typing.Sequence[int]) -> bool: ... + + def isOpened(self) -> bool: ... + + def release(self) -> None: ... + + @_typing.overload + def write(self, image: cv2.typing.MatLike) -> bool: ... + @_typing.overload + def write(self, image: UMat) -> bool: ... + + def set(self, propId: int, value: float) -> bool: ... + + def get(self, propId: int) -> float: ... + + @staticmethod + def fourcc(c1: str, c2: str, c3: str, c4: str) -> int: ... + + def getBackendName(self) -> str: ... + + +class error(Exception): + code: int + err: str + file: str + func: str + line: int + msg: str + + +# Functions +@_typing.overload +def CamShift(probImage: cv2.typing.MatLike, window: cv2.typing.Rect, criteria: cv2.typing.TermCriteria) -> tuple[cv2.typing.RotatedRect, cv2.typing.Rect]: ... +@_typing.overload +def CamShift(probImage: UMat, window: cv2.typing.Rect, criteria: cv2.typing.TermCriteria) -> tuple[cv2.typing.RotatedRect, cv2.typing.Rect]: ... + +@_typing.overload +def Canny(image: cv2.typing.MatLike, threshold1: float, threshold2: float, edges: cv2.typing.MatLike | None = ..., apertureSize: int = ..., L2gradient: bool = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def Canny(image: UMat, threshold1: float, threshold2: float, edges: UMat | None = ..., apertureSize: int = ..., L2gradient: bool = ...) -> UMat: ... +@_typing.overload +def Canny(dx: cv2.typing.MatLike, dy: cv2.typing.MatLike, threshold1: float, threshold2: float, edges: cv2.typing.MatLike | None = ..., L2gradient: bool = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def Canny(dx: UMat, dy: UMat, threshold1: float, threshold2: float, edges: UMat | None = ..., L2gradient: bool = ...) -> UMat: ... + +@_typing.overload +def EMD(signature1: cv2.typing.MatLike, signature2: cv2.typing.MatLike, distType: int, cost: cv2.typing.MatLike | None = ..., lowerBound: float | None = ..., flow: cv2.typing.MatLike | None = ...) -> tuple[float, float, cv2.typing.MatLike]: ... +@_typing.overload +def EMD(signature1: UMat, signature2: UMat, distType: int, cost: UMat | None = ..., lowerBound: float | None = ..., flow: UMat | None = ...) -> tuple[float, float, UMat]: ... + +@_typing.overload +def GaussianBlur(src: cv2.typing.MatLike, ksize: cv2.typing.Size, sigmaX: float, dst: cv2.typing.MatLike | None = ..., sigmaY: float = ..., borderType: int = ..., hint: AlgorithmHint = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def GaussianBlur(src: UMat, ksize: cv2.typing.Size, sigmaX: float, dst: UMat | None = ..., sigmaY: float = ..., borderType: int = ..., hint: AlgorithmHint = ...) -> UMat: ... + +@_typing.overload +def HoughCircles(image: cv2.typing.MatLike, method: int, dp: float, minDist: float, circles: cv2.typing.MatLike | None = ..., param1: float = ..., param2: float = ..., minRadius: int = ..., maxRadius: int = ...) -> cv2.typing.MatLike | None: ... +@_typing.overload +def HoughCircles(image: UMat, method: int, dp: float, minDist: float, circles: UMat | None = ..., param1: float = ..., param2: float = ..., minRadius: int = ..., maxRadius: int = ...) -> UMat | None: ... + +@_typing.overload +def HoughCirclesWithAccumulator(image: cv2.typing.MatLike, method: int, dp: float, minDist: float, circles: cv2.typing.MatLike | None = ..., param1: float = ..., param2: float = ..., minRadius: int = ..., maxRadius: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def HoughCirclesWithAccumulator(image: UMat, method: int, dp: float, minDist: float, circles: UMat | None = ..., param1: float = ..., param2: float = ..., minRadius: int = ..., maxRadius: int = ...) -> UMat: ... + +@_typing.overload +def HoughLines(image: cv2.typing.MatLike, rho: float, theta: float, threshold: int, lines: cv2.typing.MatLike | None = ..., srn: float = ..., stn: float = ..., min_theta: float = ..., max_theta: float = ..., use_edgeval: bool = ...) -> cv2.typing.MatLike | None: ... +@_typing.overload +def HoughLines(image: UMat, rho: float, theta: float, threshold: int, lines: UMat | None = ..., srn: float = ..., stn: float = ..., min_theta: float = ..., max_theta: float = ..., use_edgeval: bool = ...) -> UMat | None: ... + +@_typing.overload +def HoughLinesP(image: cv2.typing.MatLike, rho: float, theta: float, threshold: int, lines: cv2.typing.MatLike | None = ..., minLineLength: float = ..., maxLineGap: float = ...) -> cv2.typing.MatLike | None: ... +@_typing.overload +def HoughLinesP(image: UMat, rho: float, theta: float, threshold: int, lines: UMat | None = ..., minLineLength: float = ..., maxLineGap: float = ...) -> UMat | None: ... + +@_typing.overload +def HoughLinesPointSet(point: cv2.typing.MatLike, lines_max: int, threshold: int, min_rho: float, max_rho: float, rho_step: float, min_theta: float, max_theta: float, theta_step: float, lines: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def HoughLinesPointSet(point: UMat, lines_max: int, threshold: int, min_rho: float, max_rho: float, rho_step: float, min_theta: float, max_theta: float, theta_step: float, lines: UMat | None = ...) -> UMat: ... + +@_typing.overload +def HoughLinesWithAccumulator(image: cv2.typing.MatLike, rho: float, theta: float, threshold: int, lines: cv2.typing.MatLike | None = ..., srn: float = ..., stn: float = ..., min_theta: float = ..., max_theta: float = ..., use_edgeval: bool = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def HoughLinesWithAccumulator(image: UMat, rho: float, theta: float, threshold: int, lines: UMat | None = ..., srn: float = ..., stn: float = ..., min_theta: float = ..., max_theta: float = ..., use_edgeval: bool = ...) -> UMat: ... + +@_typing.overload +def HuMoments(m: cv2.typing.Moments, hu: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def HuMoments(m: cv2.typing.Moments, hu: UMat | None = ...) -> UMat: ... + +@_typing.overload +def LUT(src: cv2.typing.MatLike, lut: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def LUT(src: UMat, lut: UMat, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def Laplacian(src: cv2.typing.MatLike, ddepth: int, dst: cv2.typing.MatLike | None = ..., ksize: int = ..., scale: float = ..., delta: float = ..., borderType: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def Laplacian(src: UMat, ddepth: int, dst: UMat | None = ..., ksize: int = ..., scale: float = ..., delta: float = ..., borderType: int = ...) -> UMat: ... + +@_typing.overload +def Mahalanobis(v1: cv2.typing.MatLike, v2: cv2.typing.MatLike, icovar: cv2.typing.MatLike) -> float: ... +@_typing.overload +def Mahalanobis(v1: UMat, v2: UMat, icovar: UMat) -> float: ... + +@_typing.overload +def PCABackProject(data: cv2.typing.MatLike, mean: cv2.typing.MatLike, eigenvectors: cv2.typing.MatLike, result: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def PCABackProject(data: UMat, mean: UMat, eigenvectors: UMat, result: UMat | None = ...) -> UMat: ... + +@_typing.overload +def PCACompute(data: cv2.typing.MatLike, mean: cv2.typing.MatLike, eigenvectors: cv2.typing.MatLike | None = ..., maxComponents: int = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def PCACompute(data: UMat, mean: UMat, eigenvectors: UMat | None = ..., maxComponents: int = ...) -> tuple[UMat, UMat]: ... +@_typing.overload +def PCACompute(data: cv2.typing.MatLike, mean: cv2.typing.MatLike, retainedVariance: float, eigenvectors: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def PCACompute(data: UMat, mean: UMat, retainedVariance: float, eigenvectors: UMat | None = ...) -> tuple[UMat, UMat]: ... + +@_typing.overload +def PCACompute2(data: cv2.typing.MatLike, mean: cv2.typing.MatLike, eigenvectors: cv2.typing.MatLike | None = ..., eigenvalues: cv2.typing.MatLike | None = ..., maxComponents: int = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def PCACompute2(data: UMat, mean: UMat, eigenvectors: UMat | None = ..., eigenvalues: UMat | None = ..., maxComponents: int = ...) -> tuple[UMat, UMat, UMat]: ... +@_typing.overload +def PCACompute2(data: cv2.typing.MatLike, mean: cv2.typing.MatLike, retainedVariance: float, eigenvectors: cv2.typing.MatLike | None = ..., eigenvalues: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def PCACompute2(data: UMat, mean: UMat, retainedVariance: float, eigenvectors: UMat | None = ..., eigenvalues: UMat | None = ...) -> tuple[UMat, UMat, UMat]: ... + +@_typing.overload +def PCAProject(data: cv2.typing.MatLike, mean: cv2.typing.MatLike, eigenvectors: cv2.typing.MatLike, result: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def PCAProject(data: UMat, mean: UMat, eigenvectors: UMat, result: UMat | None = ...) -> UMat: ... + +@_typing.overload +def PSNR(src1: cv2.typing.MatLike, src2: cv2.typing.MatLike, R: float = ...) -> float: ... +@_typing.overload +def PSNR(src1: UMat, src2: UMat, R: float = ...) -> float: ... + +@_typing.overload +def RQDecomp3x3(src: cv2.typing.MatLike, mtxR: cv2.typing.MatLike | None = ..., mtxQ: cv2.typing.MatLike | None = ..., Qx: cv2.typing.MatLike | None = ..., Qy: cv2.typing.MatLike | None = ..., Qz: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.Vec3d, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def RQDecomp3x3(src: UMat, mtxR: UMat | None = ..., mtxQ: UMat | None = ..., Qx: UMat | None = ..., Qy: UMat | None = ..., Qz: UMat | None = ...) -> tuple[cv2.typing.Vec3d, UMat, UMat, UMat, UMat, UMat]: ... + +@_typing.overload +def Rodrigues(src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., jacobian: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def Rodrigues(src: UMat, dst: UMat | None = ..., jacobian: UMat | None = ...) -> tuple[UMat, UMat]: ... + +@_typing.overload +def SVBackSubst(w: cv2.typing.MatLike, u: cv2.typing.MatLike, vt: cv2.typing.MatLike, rhs: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def SVBackSubst(w: UMat, u: UMat, vt: UMat, rhs: UMat, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def SVDecomp(src: cv2.typing.MatLike, w: cv2.typing.MatLike | None = ..., u: cv2.typing.MatLike | None = ..., vt: cv2.typing.MatLike | None = ..., flags: int = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def SVDecomp(src: UMat, w: UMat | None = ..., u: UMat | None = ..., vt: UMat | None = ..., flags: int = ...) -> tuple[UMat, UMat, UMat]: ... + +@_typing.overload +def Scharr(src: cv2.typing.MatLike, ddepth: int, dx: int, dy: int, dst: cv2.typing.MatLike | None = ..., scale: float = ..., delta: float = ..., borderType: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def Scharr(src: UMat, ddepth: int, dx: int, dy: int, dst: UMat | None = ..., scale: float = ..., delta: float = ..., borderType: int = ...) -> UMat: ... + +@_typing.overload +def Sobel(src: cv2.typing.MatLike, ddepth: int, dx: int, dy: int, dst: cv2.typing.MatLike | None = ..., ksize: int = ..., scale: float = ..., delta: float = ..., borderType: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def Sobel(src: UMat, ddepth: int, dx: int, dy: int, dst: UMat | None = ..., ksize: int = ..., scale: float = ..., delta: float = ..., borderType: int = ...) -> UMat: ... + +@_typing.overload +def absdiff(src1: cv2.typing.MatLike, src2: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def absdiff(src1: UMat, src2: UMat, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def accumulate(src: cv2.typing.MatLike, dst: cv2.typing.MatLike, mask: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def accumulate(src: UMat, dst: UMat, mask: UMat | None = ...) -> UMat: ... + +@_typing.overload +def accumulateProduct(src1: cv2.typing.MatLike, src2: cv2.typing.MatLike, dst: cv2.typing.MatLike, mask: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def accumulateProduct(src1: UMat, src2: UMat, dst: UMat, mask: UMat | None = ...) -> UMat: ... + +@_typing.overload +def accumulateSquare(src: cv2.typing.MatLike, dst: cv2.typing.MatLike, mask: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def accumulateSquare(src: UMat, dst: UMat, mask: UMat | None = ...) -> UMat: ... + +@_typing.overload +def accumulateWeighted(src: cv2.typing.MatLike, dst: cv2.typing.MatLike, alpha: float, mask: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def accumulateWeighted(src: UMat, dst: UMat, alpha: float, mask: UMat | None = ...) -> UMat: ... + +@_typing.overload +def adaptiveThreshold(src: cv2.typing.MatLike, maxValue: float, adaptiveMethod: int, thresholdType: int, blockSize: int, C: float, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def adaptiveThreshold(src: UMat, maxValue: float, adaptiveMethod: int, thresholdType: int, blockSize: int, C: float, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def add(src1: cv2.typing.MatLike, src2: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., mask: cv2.typing.MatLike | None = ..., dtype: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def add(src1: UMat, src2: UMat, dst: UMat | None = ..., mask: UMat | None = ..., dtype: int = ...) -> UMat: ... + +def addText(img: cv2.typing.MatLike, text: str, org: cv2.typing.Point, nameFont: str, pointSize: int = ..., color: cv2.typing.Scalar = ..., weight: int = ..., style: int = ..., spacing: int = ...) -> None: ... + +@_typing.overload +def addWeighted(src1: cv2.typing.MatLike, alpha: float, src2: cv2.typing.MatLike, beta: float, gamma: float, dst: cv2.typing.MatLike | None = ..., dtype: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def addWeighted(src1: UMat, alpha: float, src2: UMat, beta: float, gamma: float, dst: UMat | None = ..., dtype: int = ...) -> UMat: ... + +@_typing.overload +def applyColorMap(src: cv2.typing.MatLike, colormap: int, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def applyColorMap(src: UMat, colormap: int, dst: UMat | None = ...) -> UMat: ... +@_typing.overload +def applyColorMap(src: cv2.typing.MatLike, userColor: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def applyColorMap(src: UMat, userColor: UMat, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def approxPolyDP(curve: cv2.typing.MatLike, epsilon: float, closed: bool, approxCurve: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def approxPolyDP(curve: UMat, epsilon: float, closed: bool, approxCurve: UMat | None = ...) -> UMat: ... + +@_typing.overload +def approxPolyN(curve: cv2.typing.MatLike, nsides: int, approxCurve: cv2.typing.MatLike | None = ..., epsilon_percentage: float = ..., ensure_convex: bool = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def approxPolyN(curve: UMat, nsides: int, approxCurve: UMat | None = ..., epsilon_percentage: float = ..., ensure_convex: bool = ...) -> UMat: ... + +@_typing.overload +def arcLength(curve: cv2.typing.MatLike, closed: bool) -> float: ... +@_typing.overload +def arcLength(curve: UMat, closed: bool) -> float: ... + +@_typing.overload +def arrowedLine(img: cv2.typing.MatLike, pt1: cv2.typing.Point, pt2: cv2.typing.Point, color: cv2.typing.Scalar, thickness: int = ..., line_type: int = ..., shift: int = ..., tipLength: float = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def arrowedLine(img: UMat, pt1: cv2.typing.Point, pt2: cv2.typing.Point, color: cv2.typing.Scalar, thickness: int = ..., line_type: int = ..., shift: int = ..., tipLength: float = ...) -> UMat: ... + +@_typing.overload +def batchDistance(src1: cv2.typing.MatLike, src2: cv2.typing.MatLike, dtype: int, dist: cv2.typing.MatLike | None = ..., nidx: cv2.typing.MatLike | None = ..., normType: int = ..., K: int = ..., mask: cv2.typing.MatLike | None = ..., update: int = ..., crosscheck: bool = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def batchDistance(src1: UMat, src2: UMat, dtype: int, dist: UMat | None = ..., nidx: UMat | None = ..., normType: int = ..., K: int = ..., mask: UMat | None = ..., update: int = ..., crosscheck: bool = ...) -> tuple[UMat, UMat]: ... + +@_typing.overload +def bilateralFilter(src: cv2.typing.MatLike, d: int, sigmaColor: float, sigmaSpace: float, dst: cv2.typing.MatLike | None = ..., borderType: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def bilateralFilter(src: UMat, d: int, sigmaColor: float, sigmaSpace: float, dst: UMat | None = ..., borderType: int = ...) -> UMat: ... + +@_typing.overload +def bitwise_and(src1: cv2.typing.MatLike, src2: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., mask: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def bitwise_and(src1: UMat, src2: UMat, dst: UMat | None = ..., mask: UMat | None = ...) -> UMat: ... + +@_typing.overload +def bitwise_not(src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., mask: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def bitwise_not(src: UMat, dst: UMat | None = ..., mask: UMat | None = ...) -> UMat: ... + +@_typing.overload +def bitwise_or(src1: cv2.typing.MatLike, src2: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., mask: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def bitwise_or(src1: UMat, src2: UMat, dst: UMat | None = ..., mask: UMat | None = ...) -> UMat: ... + +@_typing.overload +def bitwise_xor(src1: cv2.typing.MatLike, src2: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., mask: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def bitwise_xor(src1: UMat, src2: UMat, dst: UMat | None = ..., mask: UMat | None = ...) -> UMat: ... + +@_typing.overload +def blendLinear(src1: cv2.typing.MatLike, src2: cv2.typing.MatLike, weights1: cv2.typing.MatLike, weights2: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def blendLinear(src1: UMat, src2: UMat, weights1: UMat, weights2: UMat, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def blur(src: cv2.typing.MatLike, ksize: cv2.typing.Size, dst: cv2.typing.MatLike | None = ..., anchor: cv2.typing.Point = ..., borderType: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def blur(src: UMat, ksize: cv2.typing.Size, dst: UMat | None = ..., anchor: cv2.typing.Point = ..., borderType: int = ...) -> UMat: ... + +def borderInterpolate(p: int, len: int, borderType: int) -> int: ... + +@_typing.overload +def boundingRect(array: cv2.typing.MatLike) -> cv2.typing.Rect: ... +@_typing.overload +def boundingRect(array: UMat) -> cv2.typing.Rect: ... + +@_typing.overload +def boxFilter(src: cv2.typing.MatLike, ddepth: int, ksize: cv2.typing.Size, dst: cv2.typing.MatLike | None = ..., anchor: cv2.typing.Point = ..., normalize: bool = ..., borderType: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def boxFilter(src: UMat, ddepth: int, ksize: cv2.typing.Size, dst: UMat | None = ..., anchor: cv2.typing.Point = ..., normalize: bool = ..., borderType: int = ...) -> UMat: ... + +@_typing.overload +def boxPoints(box: cv2.typing.RotatedRect, points: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def boxPoints(box: cv2.typing.RotatedRect, points: UMat | None = ...) -> UMat: ... + +@_typing.overload +def broadcast(src: cv2.typing.MatLike, shape: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def broadcast(src: UMat, shape: UMat, dst: UMat | None = ...) -> UMat: ... + +def buildMST(numNodes: int, inputEdges: _typing.Sequence[MSTEdge], algorithm: MSTAlgorithm, root: int = ...) -> tuple[bool, _typing.Sequence[MSTEdge]]: ... + +@_typing.overload +def buildOpticalFlowPyramid(img: cv2.typing.MatLike, winSize: cv2.typing.Size, maxLevel: int, pyramid: _typing.Sequence[cv2.typing.MatLike] | None = ..., withDerivatives: bool = ..., pyrBorder: int = ..., derivBorder: int = ..., tryReuseInputImage: bool = ...) -> tuple[int, _typing.Sequence[cv2.typing.MatLike]]: ... +@_typing.overload +def buildOpticalFlowPyramid(img: UMat, winSize: cv2.typing.Size, maxLevel: int, pyramid: _typing.Sequence[UMat] | None = ..., withDerivatives: bool = ..., pyrBorder: int = ..., derivBorder: int = ..., tryReuseInputImage: bool = ...) -> tuple[int, _typing.Sequence[UMat]]: ... + +@_typing.overload +def calcBackProject(images: _typing.Sequence[cv2.typing.MatLike], channels: _typing.Sequence[int], hist: cv2.typing.MatLike, ranges: _typing.Sequence[float], scale: float, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def calcBackProject(images: _typing.Sequence[UMat], channels: _typing.Sequence[int], hist: UMat, ranges: _typing.Sequence[float], scale: float, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def calcCovarMatrix(samples: cv2.typing.MatLike, mean: cv2.typing.MatLike, flags: int, covar: cv2.typing.MatLike | None = ..., ctype: int = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def calcCovarMatrix(samples: UMat, mean: UMat, flags: int, covar: UMat | None = ..., ctype: int = ...) -> tuple[UMat, UMat]: ... + +@_typing.overload +def calcHist(images: _typing.Sequence[cv2.typing.MatLike], channels: _typing.Sequence[int], mask: cv2.typing.MatLike | None, histSize: _typing.Sequence[int], ranges: _typing.Sequence[float], hist: cv2.typing.MatLike | None = ..., accumulate: bool = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def calcHist(images: _typing.Sequence[UMat], channels: _typing.Sequence[int], mask: UMat | None, histSize: _typing.Sequence[int], ranges: _typing.Sequence[float], hist: UMat | None = ..., accumulate: bool = ...) -> UMat: ... + +@_typing.overload +def calcOpticalFlowFarneback(prev: cv2.typing.MatLike, next: cv2.typing.MatLike, flow: cv2.typing.MatLike, pyr_scale: float, levels: int, winsize: int, iterations: int, poly_n: int, poly_sigma: float, flags: int) -> cv2.typing.MatLike: ... +@_typing.overload +def calcOpticalFlowFarneback(prev: UMat, next: UMat, flow: UMat, pyr_scale: float, levels: int, winsize: int, iterations: int, poly_n: int, poly_sigma: float, flags: int) -> UMat: ... + +@_typing.overload +def calcOpticalFlowPyrLK(prevImg: cv2.typing.MatLike, nextImg: cv2.typing.MatLike, prevPts: cv2.typing.MatLike, nextPts: cv2.typing.MatLike, status: cv2.typing.MatLike | None = ..., err: cv2.typing.MatLike | None = ..., winSize: cv2.typing.Size = ..., maxLevel: int = ..., criteria: cv2.typing.TermCriteria = ..., flags: int = ..., minEigThreshold: float = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def calcOpticalFlowPyrLK(prevImg: UMat, nextImg: UMat, prevPts: UMat, nextPts: UMat, status: UMat | None = ..., err: UMat | None = ..., winSize: cv2.typing.Size = ..., maxLevel: int = ..., criteria: cv2.typing.TermCriteria = ..., flags: int = ..., minEigThreshold: float = ...) -> tuple[UMat, UMat, UMat]: ... + +@_typing.overload +def calibrateCamera(objectPoints: _typing.Sequence[cv2.typing.MatLike], imagePoints: _typing.Sequence[cv2.typing.MatLike], imageSize: cv2.typing.Size, cameraMatrix: cv2.typing.MatLike | None, distCoeffs: cv2.typing.MatLike | None, rvecs: _typing.Sequence[cv2.typing.MatLike] | None = ..., tvecs: _typing.Sequence[cv2.typing.MatLike] | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, cv2.typing.MatLike, cv2.typing.MatLike, _typing.Sequence[cv2.typing.MatLike], _typing.Sequence[cv2.typing.MatLike]]: ... +@_typing.overload +def calibrateCamera(objectPoints: _typing.Sequence[UMat], imagePoints: _typing.Sequence[UMat], imageSize: cv2.typing.Size, cameraMatrix: UMat | None, distCoeffs: UMat | None, rvecs: _typing.Sequence[UMat] | None = ..., tvecs: _typing.Sequence[UMat] | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, UMat, UMat, _typing.Sequence[UMat], _typing.Sequence[UMat]]: ... + +@_typing.overload +def calibrateCameraExtended(objectPoints: _typing.Sequence[cv2.typing.MatLike], imagePoints: _typing.Sequence[cv2.typing.MatLike], imageSize: cv2.typing.Size, cameraMatrix: cv2.typing.MatLike, distCoeffs: cv2.typing.MatLike, rvecs: _typing.Sequence[cv2.typing.MatLike] | None = ..., tvecs: _typing.Sequence[cv2.typing.MatLike] | None = ..., stdDeviationsIntrinsics: cv2.typing.MatLike | None = ..., stdDeviationsExtrinsics: cv2.typing.MatLike | None = ..., perViewErrors: cv2.typing.MatLike | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, cv2.typing.MatLike, cv2.typing.MatLike, _typing.Sequence[cv2.typing.MatLike], _typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def calibrateCameraExtended(objectPoints: _typing.Sequence[UMat], imagePoints: _typing.Sequence[UMat], imageSize: cv2.typing.Size, cameraMatrix: UMat, distCoeffs: UMat, rvecs: _typing.Sequence[UMat] | None = ..., tvecs: _typing.Sequence[UMat] | None = ..., stdDeviationsIntrinsics: UMat | None = ..., stdDeviationsExtrinsics: UMat | None = ..., perViewErrors: UMat | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, UMat, UMat, _typing.Sequence[UMat], _typing.Sequence[UMat], UMat, UMat, UMat]: ... + +@_typing.overload +def calibrateCameraRO(objectPoints: _typing.Sequence[cv2.typing.MatLike], imagePoints: _typing.Sequence[cv2.typing.MatLike], imageSize: cv2.typing.Size, iFixedPoint: int, cameraMatrix: cv2.typing.MatLike, distCoeffs: cv2.typing.MatLike, rvecs: _typing.Sequence[cv2.typing.MatLike] | None = ..., tvecs: _typing.Sequence[cv2.typing.MatLike] | None = ..., newObjPoints: cv2.typing.MatLike | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, cv2.typing.MatLike, cv2.typing.MatLike, _typing.Sequence[cv2.typing.MatLike], _typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike]: ... +@_typing.overload +def calibrateCameraRO(objectPoints: _typing.Sequence[UMat], imagePoints: _typing.Sequence[UMat], imageSize: cv2.typing.Size, iFixedPoint: int, cameraMatrix: UMat, distCoeffs: UMat, rvecs: _typing.Sequence[UMat] | None = ..., tvecs: _typing.Sequence[UMat] | None = ..., newObjPoints: UMat | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, UMat, UMat, _typing.Sequence[UMat], _typing.Sequence[UMat], UMat]: ... + +@_typing.overload +def calibrateCameraROExtended(objectPoints: _typing.Sequence[cv2.typing.MatLike], imagePoints: _typing.Sequence[cv2.typing.MatLike], imageSize: cv2.typing.Size, iFixedPoint: int, cameraMatrix: cv2.typing.MatLike, distCoeffs: cv2.typing.MatLike, rvecs: _typing.Sequence[cv2.typing.MatLike] | None = ..., tvecs: _typing.Sequence[cv2.typing.MatLike] | None = ..., newObjPoints: cv2.typing.MatLike | None = ..., stdDeviationsIntrinsics: cv2.typing.MatLike | None = ..., stdDeviationsExtrinsics: cv2.typing.MatLike | None = ..., stdDeviationsObjPoints: cv2.typing.MatLike | None = ..., perViewErrors: cv2.typing.MatLike | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, cv2.typing.MatLike, cv2.typing.MatLike, _typing.Sequence[cv2.typing.MatLike], _typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def calibrateCameraROExtended(objectPoints: _typing.Sequence[UMat], imagePoints: _typing.Sequence[UMat], imageSize: cv2.typing.Size, iFixedPoint: int, cameraMatrix: UMat, distCoeffs: UMat, rvecs: _typing.Sequence[UMat] | None = ..., tvecs: _typing.Sequence[UMat] | None = ..., newObjPoints: UMat | None = ..., stdDeviationsIntrinsics: UMat | None = ..., stdDeviationsExtrinsics: UMat | None = ..., stdDeviationsObjPoints: UMat | None = ..., perViewErrors: UMat | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, UMat, UMat, _typing.Sequence[UMat], _typing.Sequence[UMat], UMat, UMat, UMat, UMat, UMat]: ... + +@_typing.overload +def calibrateMultiview(objPoints: _typing.Sequence[cv2.typing.MatLike], imagePoints: _typing.Sequence[_typing.Sequence[cv2.typing.MatLike]], imageSize: _typing.Sequence[cv2.typing.Size], detectionMask: cv2.typing.MatLike, models: cv2.typing.MatLike, Ks: _typing.Sequence[cv2.typing.MatLike], distortions: _typing.Sequence[cv2.typing.MatLike], Rs: _typing.Sequence[cv2.typing.MatLike], Ts: _typing.Sequence[cv2.typing.MatLike], flagsForIntrinsics: cv2.typing.MatLike | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, _typing.Sequence[cv2.typing.MatLike], _typing.Sequence[cv2.typing.MatLike], _typing.Sequence[cv2.typing.MatLike], _typing.Sequence[cv2.typing.MatLike]]: ... +@_typing.overload +def calibrateMultiview(objPoints: _typing.Sequence[UMat], imagePoints: _typing.Sequence[_typing.Sequence[cv2.typing.MatLike]], imageSize: _typing.Sequence[cv2.typing.Size], detectionMask: UMat, models: UMat, Ks: _typing.Sequence[UMat], distortions: _typing.Sequence[UMat], Rs: _typing.Sequence[UMat], Ts: _typing.Sequence[UMat], flagsForIntrinsics: UMat | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, _typing.Sequence[UMat], _typing.Sequence[UMat], _typing.Sequence[UMat], _typing.Sequence[UMat]]: ... + +@_typing.overload +def calibrateMultiviewExtended(objPoints: _typing.Sequence[cv2.typing.MatLike], imagePoints: _typing.Sequence[_typing.Sequence[cv2.typing.MatLike]], imageSize: _typing.Sequence[cv2.typing.Size], detectionMask: cv2.typing.MatLike, models: cv2.typing.MatLike, Ks: _typing.Sequence[cv2.typing.MatLike], distortions: _typing.Sequence[cv2.typing.MatLike], Rs: _typing.Sequence[cv2.typing.MatLike], Ts: _typing.Sequence[cv2.typing.MatLike], initializationPairs: cv2.typing.MatLike | None = ..., rvecs0: _typing.Sequence[cv2.typing.MatLike] | None = ..., tvecs0: _typing.Sequence[cv2.typing.MatLike] | None = ..., perFrameErrors: cv2.typing.MatLike | None = ..., flagsForIntrinsics: cv2.typing.MatLike | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, _typing.Sequence[cv2.typing.MatLike], _typing.Sequence[cv2.typing.MatLike], _typing.Sequence[cv2.typing.MatLike], _typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike, _typing.Sequence[cv2.typing.MatLike], _typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike]: ... +@_typing.overload +def calibrateMultiviewExtended(objPoints: _typing.Sequence[UMat], imagePoints: _typing.Sequence[_typing.Sequence[cv2.typing.MatLike]], imageSize: _typing.Sequence[cv2.typing.Size], detectionMask: UMat, models: UMat, Ks: _typing.Sequence[UMat], distortions: _typing.Sequence[UMat], Rs: _typing.Sequence[UMat], Ts: _typing.Sequence[UMat], initializationPairs: UMat | None = ..., rvecs0: _typing.Sequence[UMat] | None = ..., tvecs0: _typing.Sequence[UMat] | None = ..., perFrameErrors: UMat | None = ..., flagsForIntrinsics: UMat | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, _typing.Sequence[UMat], _typing.Sequence[UMat], _typing.Sequence[UMat], _typing.Sequence[UMat], UMat, _typing.Sequence[UMat], _typing.Sequence[UMat], UMat]: ... + +@_typing.overload +def calibrationMatrixValues(cameraMatrix: cv2.typing.MatLike, imageSize: cv2.typing.Size, apertureWidth: float, apertureHeight: float) -> tuple[float, float, float, cv2.typing.Point2d, float]: ... +@_typing.overload +def calibrationMatrixValues(cameraMatrix: UMat, imageSize: cv2.typing.Size, apertureWidth: float, apertureHeight: float) -> tuple[float, float, float, cv2.typing.Point2d, float]: ... + +@_typing.overload +def cartToPolar(x: cv2.typing.MatLike, y: cv2.typing.MatLike, magnitude: cv2.typing.MatLike | None = ..., angle: cv2.typing.MatLike | None = ..., angleInDegrees: bool = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def cartToPolar(x: UMat, y: UMat, magnitude: UMat | None = ..., angle: UMat | None = ..., angleInDegrees: bool = ...) -> tuple[UMat, UMat]: ... + +@_typing.overload +def checkChessboard(img: cv2.typing.MatLike, size: cv2.typing.Size) -> bool: ... +@_typing.overload +def checkChessboard(img: UMat, size: cv2.typing.Size) -> bool: ... + +def checkHardwareSupport(feature: int) -> bool: ... + +@_typing.overload +def checkRange(a: cv2.typing.MatLike, quiet: bool = ..., minVal: float = ..., maxVal: float = ...) -> tuple[bool, cv2.typing.Point]: ... +@_typing.overload +def checkRange(a: UMat, quiet: bool = ..., minVal: float = ..., maxVal: float = ...) -> tuple[bool, cv2.typing.Point]: ... + +@_typing.overload +def circle(img: cv2.typing.MatLike, center: cv2.typing.Point, radius: int, color: cv2.typing.Scalar, thickness: int = ..., lineType: int = ..., shift: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def circle(img: UMat, center: cv2.typing.Point, radius: int, color: cv2.typing.Scalar, thickness: int = ..., lineType: int = ..., shift: int = ...) -> UMat: ... + +def clipLine(imgRect: cv2.typing.Rect, pt1: cv2.typing.Point, pt2: cv2.typing.Point) -> tuple[bool, cv2.typing.Point, cv2.typing.Point]: ... + +@_typing.overload +def colorChange(src: cv2.typing.MatLike, mask: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., red_mul: float = ..., green_mul: float = ..., blue_mul: float = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def colorChange(src: UMat, mask: UMat, dst: UMat | None = ..., red_mul: float = ..., green_mul: float = ..., blue_mul: float = ...) -> UMat: ... + +@_typing.overload +def compare(src1: cv2.typing.MatLike, src2: cv2.typing.MatLike, cmpop: int, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def compare(src1: UMat, src2: UMat, cmpop: int, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def compareHist(H1: cv2.typing.MatLike, H2: cv2.typing.MatLike, method: int) -> float: ... +@_typing.overload +def compareHist(H1: UMat, H2: UMat, method: int) -> float: ... + +@_typing.overload +def completeSymm(m: cv2.typing.MatLike, lowerToUpper: bool = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def completeSymm(m: UMat, lowerToUpper: bool = ...) -> UMat: ... + +@_typing.overload +def composeRT(rvec1: cv2.typing.MatLike, tvec1: cv2.typing.MatLike, rvec2: cv2.typing.MatLike, tvec2: cv2.typing.MatLike, rvec3: cv2.typing.MatLike | None = ..., tvec3: cv2.typing.MatLike | None = ..., dr3dr1: cv2.typing.MatLike | None = ..., dr3dt1: cv2.typing.MatLike | None = ..., dr3dr2: cv2.typing.MatLike | None = ..., dr3dt2: cv2.typing.MatLike | None = ..., dt3dr1: cv2.typing.MatLike | None = ..., dt3dt1: cv2.typing.MatLike | None = ..., dt3dr2: cv2.typing.MatLike | None = ..., dt3dt2: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def composeRT(rvec1: UMat, tvec1: UMat, rvec2: UMat, tvec2: UMat, rvec3: UMat | None = ..., tvec3: UMat | None = ..., dr3dr1: UMat | None = ..., dr3dt1: UMat | None = ..., dr3dr2: UMat | None = ..., dr3dt2: UMat | None = ..., dt3dr1: UMat | None = ..., dt3dt1: UMat | None = ..., dt3dr2: UMat | None = ..., dt3dt2: UMat | None = ...) -> tuple[UMat, UMat, UMat, UMat, UMat, UMat, UMat, UMat, UMat, UMat]: ... + +@_typing.overload +def computeCorrespondEpilines(points: cv2.typing.MatLike, whichImage: int, F: cv2.typing.MatLike, lines: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def computeCorrespondEpilines(points: UMat, whichImage: int, F: UMat, lines: UMat | None = ...) -> UMat: ... + +@_typing.overload +def computeECC(templateImage: cv2.typing.MatLike, inputImage: cv2.typing.MatLike, inputMask: cv2.typing.MatLike | None = ...) -> float: ... +@_typing.overload +def computeECC(templateImage: UMat, inputImage: UMat, inputMask: UMat | None = ...) -> float: ... + +@_typing.overload +def connectedComponents(image: cv2.typing.MatLike, labels: cv2.typing.MatLike | None = ..., connectivity: int = ..., ltype: int = ...) -> tuple[int, cv2.typing.MatLike]: ... +@_typing.overload +def connectedComponents(image: UMat, labels: UMat | None = ..., connectivity: int = ..., ltype: int = ...) -> tuple[int, UMat]: ... + +@_typing.overload +def connectedComponentsWithAlgorithm(image: cv2.typing.MatLike, connectivity: int, ltype: int, ccltype: int, labels: cv2.typing.MatLike | None = ...) -> tuple[int, cv2.typing.MatLike]: ... +@_typing.overload +def connectedComponentsWithAlgorithm(image: UMat, connectivity: int, ltype: int, ccltype: int, labels: UMat | None = ...) -> tuple[int, UMat]: ... + +@_typing.overload +def connectedComponentsWithStats(image: cv2.typing.MatLike, labels: cv2.typing.MatLike | None = ..., stats: cv2.typing.MatLike | None = ..., centroids: cv2.typing.MatLike | None = ..., connectivity: int = ..., ltype: int = ...) -> tuple[int, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def connectedComponentsWithStats(image: UMat, labels: UMat | None = ..., stats: UMat | None = ..., centroids: UMat | None = ..., connectivity: int = ..., ltype: int = ...) -> tuple[int, UMat, UMat, UMat]: ... + +@_typing.overload +def connectedComponentsWithStatsWithAlgorithm(image: cv2.typing.MatLike, connectivity: int, ltype: int, ccltype: int, labels: cv2.typing.MatLike | None = ..., stats: cv2.typing.MatLike | None = ..., centroids: cv2.typing.MatLike | None = ...) -> tuple[int, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def connectedComponentsWithStatsWithAlgorithm(image: UMat, connectivity: int, ltype: int, ccltype: int, labels: UMat | None = ..., stats: UMat | None = ..., centroids: UMat | None = ...) -> tuple[int, UMat, UMat, UMat]: ... + +@_typing.overload +def contourArea(contour: cv2.typing.MatLike, oriented: bool = ...) -> float: ... +@_typing.overload +def contourArea(contour: UMat, oriented: bool = ...) -> float: ... + +@_typing.overload +def convertMaps(map1: cv2.typing.MatLike, map2: cv2.typing.MatLike, dstmap1type: int, dstmap1: cv2.typing.MatLike | None = ..., dstmap2: cv2.typing.MatLike | None = ..., nninterpolation: bool = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def convertMaps(map1: UMat, map2: UMat, dstmap1type: int, dstmap1: UMat | None = ..., dstmap2: UMat | None = ..., nninterpolation: bool = ...) -> tuple[UMat, UMat]: ... + +@_typing.overload +def convertPointsFromHomogeneous(src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., dtype: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def convertPointsFromHomogeneous(src: UMat, dst: UMat | None = ..., dtype: int = ...) -> UMat: ... + +@_typing.overload +def convertPointsToHomogeneous(src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., dtype: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def convertPointsToHomogeneous(src: UMat, dst: UMat | None = ..., dtype: int = ...) -> UMat: ... + +@_typing.overload +def convertScaleAbs(src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., alpha: float = ..., beta: float = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def convertScaleAbs(src: UMat, dst: UMat | None = ..., alpha: float = ..., beta: float = ...) -> UMat: ... + +@_typing.overload +def convexHull(points: cv2.typing.MatLike, hull: cv2.typing.MatLike | None = ..., clockwise: bool = ..., returnPoints: bool = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def convexHull(points: UMat, hull: UMat | None = ..., clockwise: bool = ..., returnPoints: bool = ...) -> UMat: ... + +@_typing.overload +def convexityDefects(contour: cv2.typing.MatLike, convexhull: cv2.typing.MatLike, convexityDefects: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def convexityDefects(contour: UMat, convexhull: UMat, convexityDefects: UMat | None = ...) -> UMat: ... + +@_typing.overload +def copyMakeBorder(src: cv2.typing.MatLike, top: int, bottom: int, left: int, right: int, borderType: int, dst: cv2.typing.MatLike | None = ..., value: cv2.typing.Scalar = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def copyMakeBorder(src: UMat, top: int, bottom: int, left: int, right: int, borderType: int, dst: UMat | None = ..., value: cv2.typing.Scalar = ...) -> UMat: ... + +@_typing.overload +def copyTo(src: cv2.typing.MatLike, mask: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def copyTo(src: UMat, mask: UMat, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def cornerEigenValsAndVecs(src: cv2.typing.MatLike, blockSize: int, ksize: int, dst: cv2.typing.MatLike | None = ..., borderType: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def cornerEigenValsAndVecs(src: UMat, blockSize: int, ksize: int, dst: UMat | None = ..., borderType: int = ...) -> UMat: ... + +@_typing.overload +def cornerHarris(src: cv2.typing.MatLike, blockSize: int, ksize: int, k: float, dst: cv2.typing.MatLike | None = ..., borderType: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def cornerHarris(src: UMat, blockSize: int, ksize: int, k: float, dst: UMat | None = ..., borderType: int = ...) -> UMat: ... + +@_typing.overload +def cornerMinEigenVal(src: cv2.typing.MatLike, blockSize: int, dst: cv2.typing.MatLike | None = ..., ksize: int = ..., borderType: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def cornerMinEigenVal(src: UMat, blockSize: int, dst: UMat | None = ..., ksize: int = ..., borderType: int = ...) -> UMat: ... + +@_typing.overload +def cornerSubPix(image: cv2.typing.MatLike, corners: cv2.typing.MatLike, winSize: cv2.typing.Size, zeroZone: cv2.typing.Size, criteria: cv2.typing.TermCriteria) -> cv2.typing.MatLike: ... +@_typing.overload +def cornerSubPix(image: UMat, corners: UMat, winSize: cv2.typing.Size, zeroZone: cv2.typing.Size, criteria: cv2.typing.TermCriteria) -> UMat: ... + +@_typing.overload +def correctChromaticAberration(input_image: cv2.typing.MatLike, coefficients: cv2.typing.MatLike, image_size: cv2.typing.Size, calib_degree: int, output_image: cv2.typing.MatLike | None = ..., bayer_pattern: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def correctChromaticAberration(input_image: UMat, coefficients: UMat, image_size: cv2.typing.Size, calib_degree: int, output_image: UMat | None = ..., bayer_pattern: int = ...) -> UMat: ... + +@_typing.overload +def correctMatches(F: cv2.typing.MatLike, points1: cv2.typing.MatLike, points2: cv2.typing.MatLike, newPoints1: cv2.typing.MatLike | None = ..., newPoints2: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def correctMatches(F: UMat, points1: UMat, points2: UMat, newPoints1: UMat | None = ..., newPoints2: UMat | None = ...) -> tuple[UMat, UMat]: ... + +@_typing.overload +def countNonZero(src: cv2.typing.MatLike) -> int: ... +@_typing.overload +def countNonZero(src: UMat) -> int: ... + +def createAlignMTB(max_bits: int = ..., exclude_range: int = ..., cut: bool = ...) -> AlignMTB: ... + +def createBackgroundSubtractorKNN(history: int = ..., dist2Threshold: float = ..., detectShadows: bool = ...) -> BackgroundSubtractorKNN: ... + +def createBackgroundSubtractorMOG2(history: int = ..., varThreshold: float = ..., detectShadows: bool = ...) -> BackgroundSubtractorMOG2: ... + +def createCLAHE(clipLimit: float = ..., tileGridSize: cv2.typing.Size = ...) -> CLAHE: ... + +def createCalibrateDebevec(samples: int = ..., lambda_: float = ..., random: bool = ...) -> CalibrateDebevec: ... + +def createCalibrateRobertson(max_iter: int = ..., threshold: float = ...) -> CalibrateRobertson: ... + +def createGeneralizedHoughBallard() -> GeneralizedHoughBallard: ... + +def createGeneralizedHoughGuil() -> GeneralizedHoughGuil: ... + +@_typing.overload +def createHanningWindow(winSize: cv2.typing.Size, type: int, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def createHanningWindow(winSize: cv2.typing.Size, type: int, dst: UMat | None = ...) -> UMat: ... + +def createLineSegmentDetector(refine: LineSegmentDetectorModes = ..., scale: float = ..., sigma_scale: float = ..., quant: float = ..., ang_th: float = ..., log_eps: float = ..., density_th: float = ..., n_bins: int = ...) -> LineSegmentDetector: ... + +def createMergeDebevec() -> MergeDebevec: ... + +def createMergeMertens(contrast_weight: float = ..., saturation_weight: float = ..., exposure_weight: float = ...) -> MergeMertens: ... + +def createMergeRobertson() -> MergeRobertson: ... + +def createTonemap(gamma: float = ...) -> Tonemap: ... + +def createTonemapDrago(gamma: float = ..., saturation: float = ..., bias: float = ...) -> TonemapDrago: ... + +def createTonemapMantiuk(gamma: float = ..., scale: float = ..., saturation: float = ...) -> TonemapMantiuk: ... + +def createTonemapReinhard(gamma: float = ..., intensity: float = ..., light_adapt: float = ..., color_adapt: float = ...) -> TonemapReinhard: ... + +def cubeRoot(val: float) -> float: ... + +def currentUIFramework() -> str: ... + +@_typing.overload +def cvtColor(src: cv2.typing.MatLike, code: int, dst: cv2.typing.MatLike | None = ..., dstCn: int = ..., hint: AlgorithmHint = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def cvtColor(src: UMat, code: int, dst: UMat | None = ..., dstCn: int = ..., hint: AlgorithmHint = ...) -> UMat: ... + +@_typing.overload +def cvtColorTwoPlane(src1: cv2.typing.MatLike, src2: cv2.typing.MatLike, code: int, dst: cv2.typing.MatLike | None = ..., hint: AlgorithmHint = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def cvtColorTwoPlane(src1: UMat, src2: UMat, code: int, dst: UMat | None = ..., hint: AlgorithmHint = ...) -> UMat: ... + +@_typing.overload +def dct(src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., flags: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def dct(src: UMat, dst: UMat | None = ..., flags: int = ...) -> UMat: ... + +@_typing.overload +def decolor(src: cv2.typing.MatLike, grayscale: cv2.typing.MatLike | None = ..., color_boost: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def decolor(src: UMat, grayscale: UMat | None = ..., color_boost: UMat | None = ...) -> tuple[UMat, UMat]: ... + +@_typing.overload +def decomposeEssentialMat(E: cv2.typing.MatLike, R1: cv2.typing.MatLike | None = ..., R2: cv2.typing.MatLike | None = ..., t: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def decomposeEssentialMat(E: UMat, R1: UMat | None = ..., R2: UMat | None = ..., t: UMat | None = ...) -> tuple[UMat, UMat, UMat]: ... + +@_typing.overload +def decomposeHomographyMat(H: cv2.typing.MatLike, K: cv2.typing.MatLike, rotations: _typing.Sequence[cv2.typing.MatLike] | None = ..., translations: _typing.Sequence[cv2.typing.MatLike] | None = ..., normals: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> tuple[int, _typing.Sequence[cv2.typing.MatLike], _typing.Sequence[cv2.typing.MatLike], _typing.Sequence[cv2.typing.MatLike]]: ... +@_typing.overload +def decomposeHomographyMat(H: UMat, K: UMat, rotations: _typing.Sequence[UMat] | None = ..., translations: _typing.Sequence[UMat] | None = ..., normals: _typing.Sequence[UMat] | None = ...) -> tuple[int, _typing.Sequence[UMat], _typing.Sequence[UMat], _typing.Sequence[UMat]]: ... + +@_typing.overload +def decomposeProjectionMatrix(projMatrix: cv2.typing.MatLike, cameraMatrix: cv2.typing.MatLike | None = ..., rotMatrix: cv2.typing.MatLike | None = ..., transVect: cv2.typing.MatLike | None = ..., rotMatrixX: cv2.typing.MatLike | None = ..., rotMatrixY: cv2.typing.MatLike | None = ..., rotMatrixZ: cv2.typing.MatLike | None = ..., eulerAngles: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def decomposeProjectionMatrix(projMatrix: UMat, cameraMatrix: UMat | None = ..., rotMatrix: UMat | None = ..., transVect: UMat | None = ..., rotMatrixX: UMat | None = ..., rotMatrixY: UMat | None = ..., rotMatrixZ: UMat | None = ..., eulerAngles: UMat | None = ...) -> tuple[UMat, UMat, UMat, UMat, UMat, UMat, UMat]: ... + +@_typing.overload +def demosaicing(src: cv2.typing.MatLike, code: int, dst: cv2.typing.MatLike | None = ..., dstCn: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def demosaicing(src: UMat, code: int, dst: UMat | None = ..., dstCn: int = ...) -> UMat: ... + +def denoise_TVL1(observations: _typing.Sequence[cv2.typing.MatLike], result: cv2.typing.MatLike, lambda_: float = ..., niters: int = ...) -> None: ... + +@_typing.overload +def depthTo3d(depth: cv2.typing.MatLike, K: cv2.typing.MatLike, points3d: cv2.typing.MatLike | None = ..., mask: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def depthTo3d(depth: UMat, K: UMat, points3d: UMat | None = ..., mask: UMat | None = ...) -> UMat: ... + +@_typing.overload +def depthTo3dSparse(depth: cv2.typing.MatLike, in_K: cv2.typing.MatLike, in_points: cv2.typing.MatLike, points3d: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def depthTo3dSparse(depth: UMat, in_K: UMat, in_points: UMat, points3d: UMat | None = ...) -> UMat: ... + +def destroyAllWindows() -> None: ... + +def destroyWindow(winname: str) -> None: ... + +@_typing.overload +def detailEnhance(src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., sigma_s: float = ..., sigma_r: float = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def detailEnhance(src: UMat, dst: UMat | None = ..., sigma_s: float = ..., sigma_r: float = ...) -> UMat: ... + +@_typing.overload +def determinant(mtx: cv2.typing.MatLike) -> float: ... +@_typing.overload +def determinant(mtx: UMat) -> float: ... + +@_typing.overload +def dft(src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., flags: int = ..., nonzeroRows: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def dft(src: UMat, dst: UMat | None = ..., flags: int = ..., nonzeroRows: int = ...) -> UMat: ... + +@_typing.overload +def dilate(src: cv2.typing.MatLike, kernel: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., anchor: cv2.typing.Point = ..., iterations: int = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def dilate(src: UMat, kernel: UMat, dst: UMat | None = ..., anchor: cv2.typing.Point = ..., iterations: int = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> UMat: ... + +def displayOverlay(winname: str, text: str, delayms: int = ...) -> None: ... + +def displayStatusBar(winname: str, text: str, delayms: int = ...) -> None: ... + +@_typing.overload +def distanceTransform(src: cv2.typing.MatLike, distanceType: int, maskSize: int, dst: cv2.typing.MatLike | None = ..., dstType: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def distanceTransform(src: UMat, distanceType: int, maskSize: int, dst: UMat | None = ..., dstType: int = ...) -> UMat: ... + +@_typing.overload +def distanceTransformWithLabels(src: cv2.typing.MatLike, distanceType: int, maskSize: int, dst: cv2.typing.MatLike | None = ..., labels: cv2.typing.MatLike | None = ..., labelType: int = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def distanceTransformWithLabels(src: UMat, distanceType: int, maskSize: int, dst: UMat | None = ..., labels: UMat | None = ..., labelType: int = ...) -> tuple[UMat, UMat]: ... + +@_typing.overload +def divSpectrums(a: cv2.typing.MatLike, b: cv2.typing.MatLike, flags: int, c: cv2.typing.MatLike | None = ..., conjB: bool = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def divSpectrums(a: UMat, b: UMat, flags: int, c: UMat | None = ..., conjB: bool = ...) -> UMat: ... + +@_typing.overload +def divide(src1: cv2.typing.MatLike, src2: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., scale: float = ..., dtype: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def divide(src1: UMat, src2: UMat, dst: UMat | None = ..., scale: float = ..., dtype: int = ...) -> UMat: ... +@_typing.overload +def divide(scale: float, src2: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., dtype: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def divide(scale: float, src2: UMat, dst: UMat | None = ..., dtype: int = ...) -> UMat: ... + +@_typing.overload +def drawChessboardCorners(image: cv2.typing.MatLike, patternSize: cv2.typing.Size, corners: cv2.typing.MatLike, patternWasFound: bool) -> cv2.typing.MatLike: ... +@_typing.overload +def drawChessboardCorners(image: UMat, patternSize: cv2.typing.Size, corners: UMat, patternWasFound: bool) -> UMat: ... + +@_typing.overload +def drawContours(image: cv2.typing.MatLike, contours: _typing.Sequence[cv2.typing.MatLike], contourIdx: int, color: cv2.typing.Scalar, thickness: int = ..., lineType: int = ..., hierarchy: cv2.typing.MatLike | None = ..., maxLevel: int = ..., offset: cv2.typing.Point = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def drawContours(image: UMat, contours: _typing.Sequence[UMat], contourIdx: int, color: cv2.typing.Scalar, thickness: int = ..., lineType: int = ..., hierarchy: UMat | None = ..., maxLevel: int = ..., offset: cv2.typing.Point = ...) -> UMat: ... + +@_typing.overload +def drawFrameAxes(image: cv2.typing.MatLike, cameraMatrix: cv2.typing.MatLike, distCoeffs: cv2.typing.MatLike | None, rvec: cv2.typing.MatLike, tvec: cv2.typing.MatLike, length: float, thickness: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def drawFrameAxes(image: UMat, cameraMatrix: UMat, distCoeffs: UMat | None, rvec: UMat, tvec: UMat, length: float, thickness: int = ...) -> UMat: ... + +@_typing.overload +def drawKeypoints(image: cv2.typing.MatLike, keypoints: _typing.Sequence[KeyPoint], outImage: cv2.typing.MatLike, color: cv2.typing.Scalar = ..., flags: DrawMatchesFlags = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def drawKeypoints(image: UMat, keypoints: _typing.Sequence[KeyPoint], outImage: UMat, color: cv2.typing.Scalar = ..., flags: DrawMatchesFlags = ...) -> UMat: ... + +@_typing.overload +def drawMarker(img: cv2.typing.MatLike, position: cv2.typing.Point, color: cv2.typing.Scalar, markerType: int = ..., markerSize: int = ..., thickness: int = ..., line_type: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def drawMarker(img: UMat, position: cv2.typing.Point, color: cv2.typing.Scalar, markerType: int = ..., markerSize: int = ..., thickness: int = ..., line_type: int = ...) -> UMat: ... + +@_typing.overload +def drawMatches(img1: cv2.typing.MatLike, keypoints1: _typing.Sequence[KeyPoint], img2: cv2.typing.MatLike, keypoints2: _typing.Sequence[KeyPoint], matches1to2: _typing.Sequence[DMatch], outImg: cv2.typing.MatLike, matchColor: cv2.typing.Scalar = ..., singlePointColor: cv2.typing.Scalar = ..., matchesMask: _typing.Sequence[str] = ..., flags: DrawMatchesFlags = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def drawMatches(img1: UMat, keypoints1: _typing.Sequence[KeyPoint], img2: UMat, keypoints2: _typing.Sequence[KeyPoint], matches1to2: _typing.Sequence[DMatch], outImg: UMat, matchColor: cv2.typing.Scalar = ..., singlePointColor: cv2.typing.Scalar = ..., matchesMask: _typing.Sequence[str] = ..., flags: DrawMatchesFlags = ...) -> UMat: ... +@_typing.overload +def drawMatches(img1: cv2.typing.MatLike, keypoints1: _typing.Sequence[KeyPoint], img2: cv2.typing.MatLike, keypoints2: _typing.Sequence[KeyPoint], matches1to2: _typing.Sequence[DMatch], outImg: cv2.typing.MatLike, matchesThickness: int, matchColor: cv2.typing.Scalar = ..., singlePointColor: cv2.typing.Scalar = ..., matchesMask: _typing.Sequence[str] = ..., flags: DrawMatchesFlags = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def drawMatches(img1: UMat, keypoints1: _typing.Sequence[KeyPoint], img2: UMat, keypoints2: _typing.Sequence[KeyPoint], matches1to2: _typing.Sequence[DMatch], outImg: UMat, matchesThickness: int, matchColor: cv2.typing.Scalar = ..., singlePointColor: cv2.typing.Scalar = ..., matchesMask: _typing.Sequence[str] = ..., flags: DrawMatchesFlags = ...) -> UMat: ... + +@_typing.overload +def drawMatchesKnn(img1: cv2.typing.MatLike, keypoints1: _typing.Sequence[KeyPoint], img2: cv2.typing.MatLike, keypoints2: _typing.Sequence[KeyPoint], matches1to2: _typing.Sequence[_typing.Sequence[DMatch]], outImg: cv2.typing.MatLike, matchColor: cv2.typing.Scalar = ..., singlePointColor: cv2.typing.Scalar = ..., matchesMask: _typing.Sequence[_typing.Sequence[str]] = ..., flags: DrawMatchesFlags = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def drawMatchesKnn(img1: UMat, keypoints1: _typing.Sequence[KeyPoint], img2: UMat, keypoints2: _typing.Sequence[KeyPoint], matches1to2: _typing.Sequence[_typing.Sequence[DMatch]], outImg: UMat, matchColor: cv2.typing.Scalar = ..., singlePointColor: cv2.typing.Scalar = ..., matchesMask: _typing.Sequence[_typing.Sequence[str]] = ..., flags: DrawMatchesFlags = ...) -> UMat: ... + +@_typing.overload +def edgePreservingFilter(src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., flags: int = ..., sigma_s: float = ..., sigma_r: float = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def edgePreservingFilter(src: UMat, dst: UMat | None = ..., flags: int = ..., sigma_s: float = ..., sigma_r: float = ...) -> UMat: ... + +@_typing.overload +def eigen(src: cv2.typing.MatLike, eigenvalues: cv2.typing.MatLike | None = ..., eigenvectors: cv2.typing.MatLike | None = ...) -> tuple[bool, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def eigen(src: UMat, eigenvalues: UMat | None = ..., eigenvectors: UMat | None = ...) -> tuple[bool, UMat, UMat]: ... + +@_typing.overload +def eigenNonSymmetric(src: cv2.typing.MatLike, eigenvalues: cv2.typing.MatLike | None = ..., eigenvectors: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def eigenNonSymmetric(src: UMat, eigenvalues: UMat | None = ..., eigenvectors: UMat | None = ...) -> tuple[UMat, UMat]: ... + +@_typing.overload +def ellipse(img: cv2.typing.MatLike, center: cv2.typing.Point, axes: cv2.typing.Size, angle: float, startAngle: float, endAngle: float, color: cv2.typing.Scalar, thickness: int = ..., lineType: int = ..., shift: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def ellipse(img: UMat, center: cv2.typing.Point, axes: cv2.typing.Size, angle: float, startAngle: float, endAngle: float, color: cv2.typing.Scalar, thickness: int = ..., lineType: int = ..., shift: int = ...) -> UMat: ... +@_typing.overload +def ellipse(img: cv2.typing.MatLike, box: cv2.typing.RotatedRect, color: cv2.typing.Scalar, thickness: int = ..., lineType: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def ellipse(img: UMat, box: cv2.typing.RotatedRect, color: cv2.typing.Scalar, thickness: int = ..., lineType: int = ...) -> UMat: ... + +def ellipse2Poly(center: cv2.typing.Point, axes: cv2.typing.Size, angle: int, arcStart: int, arcEnd: int, delta: int) -> _typing.Sequence[cv2.typing.Point]: ... + +@_typing.overload +def equalizeHist(src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def equalizeHist(src: UMat, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def erode(src: cv2.typing.MatLike, kernel: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., anchor: cv2.typing.Point = ..., iterations: int = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def erode(src: UMat, kernel: UMat, dst: UMat | None = ..., anchor: cv2.typing.Point = ..., iterations: int = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> UMat: ... + +@_typing.overload +def estimateAffine2D(from_: cv2.typing.MatLike, to: cv2.typing.MatLike, inliers: cv2.typing.MatLike | None = ..., method: int = ..., ransacReprojThreshold: float = ..., maxIters: int = ..., confidence: float = ..., refineIters: int = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def estimateAffine2D(from_: UMat, to: UMat, inliers: UMat | None = ..., method: int = ..., ransacReprojThreshold: float = ..., maxIters: int = ..., confidence: float = ..., refineIters: int = ...) -> tuple[cv2.typing.MatLike, UMat]: ... +@_typing.overload +def estimateAffine2D(pts1: cv2.typing.MatLike, pts2: cv2.typing.MatLike, params: UsacParams, inliers: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def estimateAffine2D(pts1: UMat, pts2: UMat, params: UsacParams, inliers: UMat | None = ...) -> tuple[cv2.typing.MatLike, UMat]: ... + +@_typing.overload +def estimateAffine3D(src: cv2.typing.MatLike, dst: cv2.typing.MatLike, out: cv2.typing.MatLike | None = ..., inliers: cv2.typing.MatLike | None = ..., ransacThreshold: float = ..., confidence: float = ...) -> tuple[bool, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def estimateAffine3D(src: UMat, dst: UMat, out: UMat | None = ..., inliers: UMat | None = ..., ransacThreshold: float = ..., confidence: float = ...) -> tuple[bool, UMat, UMat]: ... +@_typing.overload +def estimateAffine3D(src: cv2.typing.MatLike, dst: cv2.typing.MatLike, force_rotation: bool = ...) -> tuple[cv2.typing.MatLike, float]: ... +@_typing.overload +def estimateAffine3D(src: UMat, dst: UMat, force_rotation: bool = ...) -> tuple[cv2.typing.MatLike, float]: ... + +@_typing.overload +def estimateAffinePartial2D(from_: cv2.typing.MatLike, to: cv2.typing.MatLike, inliers: cv2.typing.MatLike | None = ..., method: int = ..., ransacReprojThreshold: float = ..., maxIters: int = ..., confidence: float = ..., refineIters: int = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def estimateAffinePartial2D(from_: UMat, to: UMat, inliers: UMat | None = ..., method: int = ..., ransacReprojThreshold: float = ..., maxIters: int = ..., confidence: float = ..., refineIters: int = ...) -> tuple[cv2.typing.MatLike, UMat]: ... + +@_typing.overload +def estimateChessboardSharpness(image: cv2.typing.MatLike, patternSize: cv2.typing.Size, corners: cv2.typing.MatLike, rise_distance: float = ..., vertical: bool = ..., sharpness: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.Scalar, cv2.typing.MatLike]: ... +@_typing.overload +def estimateChessboardSharpness(image: UMat, patternSize: cv2.typing.Size, corners: UMat, rise_distance: float = ..., vertical: bool = ..., sharpness: UMat | None = ...) -> tuple[cv2.typing.Scalar, UMat]: ... + +@_typing.overload +def estimateTranslation2D(from_: cv2.typing.MatLike, to: cv2.typing.MatLike, inliers: cv2.typing.MatLike | None = ..., method: int = ..., ransacReprojThreshold: float = ..., maxIters: int = ..., confidence: float = ..., refineIters: int = ...) -> tuple[cv2.typing.Vec2d, cv2.typing.MatLike]: ... +@_typing.overload +def estimateTranslation2D(from_: UMat, to: UMat, inliers: UMat | None = ..., method: int = ..., ransacReprojThreshold: float = ..., maxIters: int = ..., confidence: float = ..., refineIters: int = ...) -> tuple[cv2.typing.Vec2d, UMat]: ... + +@_typing.overload +def estimateTranslation3D(src: cv2.typing.MatLike, dst: cv2.typing.MatLike, out: cv2.typing.MatLike | None = ..., inliers: cv2.typing.MatLike | None = ..., ransacThreshold: float = ..., confidence: float = ...) -> tuple[bool, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def estimateTranslation3D(src: UMat, dst: UMat, out: UMat | None = ..., inliers: UMat | None = ..., ransacThreshold: float = ..., confidence: float = ...) -> tuple[bool, UMat, UMat]: ... + +@_typing.overload +def exp(src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def exp(src: UMat, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def extractChannel(src: cv2.typing.MatLike, coi: int, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def extractChannel(src: UMat, coi: int, dst: UMat | None = ...) -> UMat: ... + +def fastAtan2(y: float, x: float) -> float: ... + +@_typing.overload +def fastNlMeansDenoising(src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., h: float = ..., templateWindowSize: int = ..., searchWindowSize: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def fastNlMeansDenoising(src: UMat, dst: UMat | None = ..., h: float = ..., templateWindowSize: int = ..., searchWindowSize: int = ...) -> UMat: ... +@_typing.overload +def fastNlMeansDenoising(src: cv2.typing.MatLike, h: _typing.Sequence[float], dst: cv2.typing.MatLike | None = ..., templateWindowSize: int = ..., searchWindowSize: int = ..., normType: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def fastNlMeansDenoising(src: UMat, h: _typing.Sequence[float], dst: UMat | None = ..., templateWindowSize: int = ..., searchWindowSize: int = ..., normType: int = ...) -> UMat: ... + +@_typing.overload +def fastNlMeansDenoisingColored(src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., h: float = ..., hColor: float = ..., templateWindowSize: int = ..., searchWindowSize: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def fastNlMeansDenoisingColored(src: UMat, dst: UMat | None = ..., h: float = ..., hColor: float = ..., templateWindowSize: int = ..., searchWindowSize: int = ...) -> UMat: ... + +@_typing.overload +def fastNlMeansDenoisingColoredMulti(srcImgs: _typing.Sequence[cv2.typing.MatLike], imgToDenoiseIndex: int, temporalWindowSize: int, dst: cv2.typing.MatLike | None = ..., h: float = ..., hColor: float = ..., templateWindowSize: int = ..., searchWindowSize: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def fastNlMeansDenoisingColoredMulti(srcImgs: _typing.Sequence[UMat], imgToDenoiseIndex: int, temporalWindowSize: int, dst: UMat | None = ..., h: float = ..., hColor: float = ..., templateWindowSize: int = ..., searchWindowSize: int = ...) -> UMat: ... + +@_typing.overload +def fastNlMeansDenoisingMulti(srcImgs: _typing.Sequence[cv2.typing.MatLike], imgToDenoiseIndex: int, temporalWindowSize: int, dst: cv2.typing.MatLike | None = ..., h: float = ..., templateWindowSize: int = ..., searchWindowSize: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def fastNlMeansDenoisingMulti(srcImgs: _typing.Sequence[UMat], imgToDenoiseIndex: int, temporalWindowSize: int, dst: UMat | None = ..., h: float = ..., templateWindowSize: int = ..., searchWindowSize: int = ...) -> UMat: ... +@_typing.overload +def fastNlMeansDenoisingMulti(srcImgs: _typing.Sequence[cv2.typing.MatLike], imgToDenoiseIndex: int, temporalWindowSize: int, h: _typing.Sequence[float], dst: cv2.typing.MatLike | None = ..., templateWindowSize: int = ..., searchWindowSize: int = ..., normType: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def fastNlMeansDenoisingMulti(srcImgs: _typing.Sequence[UMat], imgToDenoiseIndex: int, temporalWindowSize: int, h: _typing.Sequence[float], dst: UMat | None = ..., templateWindowSize: int = ..., searchWindowSize: int = ..., normType: int = ...) -> UMat: ... + +@_typing.overload +def fillConvexPoly(img: cv2.typing.MatLike, points: cv2.typing.MatLike, color: cv2.typing.Scalar, lineType: int = ..., shift: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def fillConvexPoly(img: UMat, points: UMat, color: cv2.typing.Scalar, lineType: int = ..., shift: int = ...) -> UMat: ... + +@_typing.overload +def fillPoly(img: cv2.typing.MatLike, pts: _typing.Sequence[cv2.typing.MatLike], color: cv2.typing.Scalar, lineType: int = ..., shift: int = ..., offset: cv2.typing.Point = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def fillPoly(img: UMat, pts: _typing.Sequence[UMat], color: cv2.typing.Scalar, lineType: int = ..., shift: int = ..., offset: cv2.typing.Point = ...) -> UMat: ... + +@_typing.overload +def filter2D(src: cv2.typing.MatLike, ddepth: int, kernel: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., anchor: cv2.typing.Point = ..., delta: float = ..., borderType: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def filter2D(src: UMat, ddepth: int, kernel: UMat, dst: UMat | None = ..., anchor: cv2.typing.Point = ..., delta: float = ..., borderType: int = ...) -> UMat: ... + +@_typing.overload +def filter2Dp(src: cv2.typing.MatLike, kernel: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., anchorX: int = ..., anchorY: int = ..., borderType: int = ..., ddepth: int = ..., scale: float = ..., shift: float = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def filter2Dp(src: UMat, kernel: UMat, dst: UMat | None = ..., anchorX: int = ..., anchorY: int = ..., borderType: int = ..., ddepth: int = ..., scale: float = ..., shift: float = ...) -> UMat: ... + +@_typing.overload +def filterHomographyDecompByVisibleRefpoints(rotations: _typing.Sequence[cv2.typing.MatLike], normals: _typing.Sequence[cv2.typing.MatLike], beforePoints: cv2.typing.MatLike, afterPoints: cv2.typing.MatLike, possibleSolutions: cv2.typing.MatLike | None = ..., pointsMask: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def filterHomographyDecompByVisibleRefpoints(rotations: _typing.Sequence[UMat], normals: _typing.Sequence[UMat], beforePoints: UMat, afterPoints: UMat, possibleSolutions: UMat | None = ..., pointsMask: UMat | None = ...) -> UMat: ... + +@_typing.overload +def filterSpeckles(img: cv2.typing.MatLike, newVal: float, maxSpeckleSize: int, maxDiff: float, buf: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def filterSpeckles(img: UMat, newVal: float, maxSpeckleSize: int, maxDiff: float, buf: UMat | None = ...) -> tuple[UMat, UMat]: ... + +@_typing.overload +def find4QuadCornerSubpix(img: cv2.typing.MatLike, corners: cv2.typing.MatLike, region_size: cv2.typing.Size) -> tuple[bool, cv2.typing.MatLike]: ... +@_typing.overload +def find4QuadCornerSubpix(img: UMat, corners: UMat, region_size: cv2.typing.Size) -> tuple[bool, UMat]: ... + +@_typing.overload +def findChessboardCorners(image: cv2.typing.MatLike, patternSize: cv2.typing.Size, corners: cv2.typing.MatLike | None = ..., flags: int = ...) -> tuple[bool, cv2.typing.MatLike]: ... +@_typing.overload +def findChessboardCorners(image: UMat, patternSize: cv2.typing.Size, corners: UMat | None = ..., flags: int = ...) -> tuple[bool, UMat]: ... + +@_typing.overload +def findChessboardCornersSB(image: cv2.typing.MatLike, patternSize: cv2.typing.Size, corners: cv2.typing.MatLike | None = ..., flags: int = ...) -> tuple[bool, cv2.typing.MatLike]: ... +@_typing.overload +def findChessboardCornersSB(image: UMat, patternSize: cv2.typing.Size, corners: UMat | None = ..., flags: int = ...) -> tuple[bool, UMat]: ... + +@_typing.overload +def findChessboardCornersSBWithMeta(image: cv2.typing.MatLike, patternSize: cv2.typing.Size, flags: int, corners: cv2.typing.MatLike | None = ..., meta: cv2.typing.MatLike | None = ...) -> tuple[bool, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def findChessboardCornersSBWithMeta(image: UMat, patternSize: cv2.typing.Size, flags: int, corners: UMat | None = ..., meta: UMat | None = ...) -> tuple[bool, UMat, UMat]: ... + +@_typing.overload +def findCirclesGrid(image: cv2.typing.MatLike, patternSize: cv2.typing.Size, flags: int, blobDetector: cv2.typing.FeatureDetector, parameters: CirclesGridFinderParameters, centers: cv2.typing.MatLike | None = ...) -> tuple[bool, cv2.typing.MatLike]: ... +@_typing.overload +def findCirclesGrid(image: UMat, patternSize: cv2.typing.Size, flags: int, blobDetector: cv2.typing.FeatureDetector, parameters: CirclesGridFinderParameters, centers: UMat | None = ...) -> tuple[bool, UMat]: ... +@_typing.overload +def findCirclesGrid(image: cv2.typing.MatLike, patternSize: cv2.typing.Size, centers: cv2.typing.MatLike | None = ..., flags: int = ..., blobDetector: cv2.typing.FeatureDetector = ...) -> tuple[bool, cv2.typing.MatLike]: ... +@_typing.overload +def findCirclesGrid(image: UMat, patternSize: cv2.typing.Size, centers: UMat | None = ..., flags: int = ..., blobDetector: cv2.typing.FeatureDetector = ...) -> tuple[bool, UMat]: ... + +@_typing.overload +def findContours(image: cv2.typing.MatLike, mode: int, method: int, contours: _typing.Sequence[cv2.typing.MatLike] | None = ..., hierarchy: cv2.typing.MatLike | None = ..., offset: cv2.typing.Point = ...) -> tuple[_typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike]: ... +@_typing.overload +def findContours(image: UMat, mode: int, method: int, contours: _typing.Sequence[UMat] | None = ..., hierarchy: UMat | None = ..., offset: cv2.typing.Point = ...) -> tuple[_typing.Sequence[UMat], UMat]: ... + +@_typing.overload +def findContoursLinkRuns(image: cv2.typing.MatLike, contours: _typing.Sequence[cv2.typing.MatLike] | None = ..., hierarchy: cv2.typing.MatLike | None = ...) -> tuple[_typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike]: ... +@_typing.overload +def findContoursLinkRuns(image: UMat, contours: _typing.Sequence[UMat] | None = ..., hierarchy: UMat | None = ...) -> tuple[_typing.Sequence[UMat], UMat]: ... +@_typing.overload +def findContoursLinkRuns(image: cv2.typing.MatLike, contours: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ... +@_typing.overload +def findContoursLinkRuns(image: UMat, contours: _typing.Sequence[UMat] | None = ...) -> _typing.Sequence[UMat]: ... + +@_typing.overload +def findEssentialMat(points1: cv2.typing.MatLike, points2: cv2.typing.MatLike, cameraMatrix: cv2.typing.MatLike, method: int = ..., prob: float = ..., threshold: float = ..., maxIters: int = ..., mask: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def findEssentialMat(points1: UMat, points2: UMat, cameraMatrix: UMat, method: int = ..., prob: float = ..., threshold: float = ..., maxIters: int = ..., mask: UMat | None = ...) -> tuple[cv2.typing.MatLike, UMat]: ... +@_typing.overload +def findEssentialMat(points1: cv2.typing.MatLike, points2: cv2.typing.MatLike, focal: float = ..., pp: cv2.typing.Point2d = ..., method: int = ..., prob: float = ..., threshold: float = ..., maxIters: int = ..., mask: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def findEssentialMat(points1: UMat, points2: UMat, focal: float = ..., pp: cv2.typing.Point2d = ..., method: int = ..., prob: float = ..., threshold: float = ..., maxIters: int = ..., mask: UMat | None = ...) -> tuple[cv2.typing.MatLike, UMat]: ... +@_typing.overload +def findEssentialMat(points1: cv2.typing.MatLike, points2: cv2.typing.MatLike, cameraMatrix1: cv2.typing.MatLike, distCoeffs1: cv2.typing.MatLike | None, cameraMatrix2: cv2.typing.MatLike, distCoeffs2: cv2.typing.MatLike | None, method: int = ..., prob: float = ..., threshold: float = ..., mask: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def findEssentialMat(points1: UMat, points2: UMat, cameraMatrix1: UMat, distCoeffs1: UMat | None, cameraMatrix2: UMat, distCoeffs2: UMat | None, method: int = ..., prob: float = ..., threshold: float = ..., mask: UMat | None = ...) -> tuple[cv2.typing.MatLike, UMat]: ... +@_typing.overload +def findEssentialMat(points1: cv2.typing.MatLike, points2: cv2.typing.MatLike, cameraMatrix1: cv2.typing.MatLike, cameraMatrix2: cv2.typing.MatLike, dist_coeff1: cv2.typing.MatLike | None, dist_coeff2: cv2.typing.MatLike | None, params: UsacParams, mask: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def findEssentialMat(points1: UMat, points2: UMat, cameraMatrix1: UMat, cameraMatrix2: UMat, dist_coeff1: UMat | None, dist_coeff2: UMat | None, params: UsacParams, mask: UMat | None = ...) -> tuple[cv2.typing.MatLike, UMat]: ... + +@_typing.overload +def findFundamentalMat(points1: cv2.typing.MatLike, points2: cv2.typing.MatLike, method: int, ransacReprojThreshold: float, confidence: float, maxIters: int, mask: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def findFundamentalMat(points1: UMat, points2: UMat, method: int, ransacReprojThreshold: float, confidence: float, maxIters: int, mask: UMat | None = ...) -> tuple[cv2.typing.MatLike, UMat]: ... +@_typing.overload +def findFundamentalMat(points1: cv2.typing.MatLike, points2: cv2.typing.MatLike, method: int = ..., ransacReprojThreshold: float = ..., confidence: float = ..., mask: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def findFundamentalMat(points1: UMat, points2: UMat, method: int = ..., ransacReprojThreshold: float = ..., confidence: float = ..., mask: UMat | None = ...) -> tuple[cv2.typing.MatLike, UMat]: ... +@_typing.overload +def findFundamentalMat(points1: cv2.typing.MatLike, points2: cv2.typing.MatLike, params: UsacParams, mask: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def findFundamentalMat(points1: UMat, points2: UMat, params: UsacParams, mask: UMat | None = ...) -> tuple[cv2.typing.MatLike, UMat]: ... + +@_typing.overload +def findHomography(srcPoints: cv2.typing.MatLike, dstPoints: cv2.typing.MatLike, method: int = ..., ransacReprojThreshold: float = ..., mask: cv2.typing.MatLike | None = ..., maxIters: int = ..., confidence: float = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def findHomography(srcPoints: UMat, dstPoints: UMat, method: int = ..., ransacReprojThreshold: float = ..., mask: UMat | None = ..., maxIters: int = ..., confidence: float = ...) -> tuple[cv2.typing.MatLike, UMat]: ... +@_typing.overload +def findHomography(srcPoints: cv2.typing.MatLike, dstPoints: cv2.typing.MatLike, params: UsacParams, mask: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def findHomography(srcPoints: UMat, dstPoints: UMat, params: UsacParams, mask: UMat | None = ...) -> tuple[cv2.typing.MatLike, UMat]: ... + +@_typing.overload +def findNonZero(src: cv2.typing.MatLike, idx: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def findNonZero(src: UMat, idx: UMat | None = ...) -> UMat: ... + +@_typing.overload +def findPlanes(points3d: cv2.typing.MatLike, normals: cv2.typing.MatLike, mask: cv2.typing.MatLike | None = ..., plane_coefficients: cv2.typing.MatLike | None = ..., block_size: int = ..., min_size: int = ..., threshold: float = ..., sensor_error_a: float = ..., sensor_error_b: float = ..., sensor_error_c: float = ..., method: RgbdPlaneMethod = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def findPlanes(points3d: UMat, normals: UMat, mask: UMat | None = ..., plane_coefficients: UMat | None = ..., block_size: int = ..., min_size: int = ..., threshold: float = ..., sensor_error_a: float = ..., sensor_error_b: float = ..., sensor_error_c: float = ..., method: RgbdPlaneMethod = ...) -> tuple[UMat, UMat]: ... + +@_typing.overload +def findTransformECC(templateImage: cv2.typing.MatLike, inputImage: cv2.typing.MatLike, warpMatrix: cv2.typing.MatLike, motionType: int, criteria: cv2.typing.TermCriteria, inputMask: cv2.typing.MatLike, gaussFiltSize: int) -> tuple[float, cv2.typing.MatLike]: ... +@_typing.overload +def findTransformECC(templateImage: UMat, inputImage: UMat, warpMatrix: UMat, motionType: int, criteria: cv2.typing.TermCriteria, inputMask: UMat, gaussFiltSize: int) -> tuple[float, UMat]: ... +@_typing.overload +def findTransformECC(templateImage: cv2.typing.MatLike, inputImage: cv2.typing.MatLike, warpMatrix: cv2.typing.MatLike, motionType: int = ..., criteria: cv2.typing.TermCriteria = ..., inputMask: cv2.typing.MatLike | None = ...) -> tuple[float, cv2.typing.MatLike]: ... +@_typing.overload +def findTransformECC(templateImage: UMat, inputImage: UMat, warpMatrix: UMat, motionType: int = ..., criteria: cv2.typing.TermCriteria = ..., inputMask: UMat | None = ...) -> tuple[float, UMat]: ... + +@_typing.overload +def findTransformECCMultiScale(reference: cv2.typing.MatLike, sample: cv2.typing.MatLike, warpMatrix: cv2.typing.MatLike, eccParams: ECCParameters = ..., referenceMask: cv2.typing.MatLike | None = ..., sampleMask: cv2.typing.MatLike | None = ...) -> tuple[float, cv2.typing.MatLike]: ... +@_typing.overload +def findTransformECCMultiScale(reference: UMat, sample: UMat, warpMatrix: UMat, eccParams: ECCParameters = ..., referenceMask: UMat | None = ..., sampleMask: UMat | None = ...) -> tuple[float, UMat]: ... + +@_typing.overload +def findTransformECCWithMask(templateImage: cv2.typing.MatLike, inputImage: cv2.typing.MatLike, templateMask: cv2.typing.MatLike, inputMask: cv2.typing.MatLike, warpMatrix: cv2.typing.MatLike, motionType: int = ..., criteria: cv2.typing.TermCriteria = ..., gaussFiltSize: int = ...) -> tuple[float, cv2.typing.MatLike]: ... +@_typing.overload +def findTransformECCWithMask(templateImage: UMat, inputImage: UMat, templateMask: UMat, inputMask: UMat, warpMatrix: UMat, motionType: int = ..., criteria: cv2.typing.TermCriteria = ..., gaussFiltSize: int = ...) -> tuple[float, UMat]: ... + +@_typing.overload +def finiteMask(src: cv2.typing.MatLike, mask: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def finiteMask(src: UMat, mask: UMat | None = ...) -> UMat: ... + +@_typing.overload +def fitEllipse(points: cv2.typing.MatLike) -> cv2.typing.RotatedRect: ... +@_typing.overload +def fitEllipse(points: UMat) -> cv2.typing.RotatedRect: ... + +@_typing.overload +def fitEllipseAMS(points: cv2.typing.MatLike) -> cv2.typing.RotatedRect: ... +@_typing.overload +def fitEllipseAMS(points: UMat) -> cv2.typing.RotatedRect: ... + +@_typing.overload +def fitEllipseDirect(points: cv2.typing.MatLike) -> cv2.typing.RotatedRect: ... +@_typing.overload +def fitEllipseDirect(points: UMat) -> cv2.typing.RotatedRect: ... + +@_typing.overload +def fitLine(points: cv2.typing.MatLike, distType: int, param: float, reps: float, aeps: float, line: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def fitLine(points: UMat, distType: int, param: float, reps: float, aeps: float, line: UMat | None = ...) -> UMat: ... + +@_typing.overload +def flip(src: cv2.typing.MatLike, flipCode: int, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def flip(src: UMat, flipCode: int, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def flipND(src: cv2.typing.MatLike, axis: int, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def flipND(src: UMat, axis: int, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def floodFill(image: cv2.typing.MatLike, mask: cv2.typing.MatLike | None, seedPoint: cv2.typing.Point, newVal: cv2.typing.Scalar, loDiff: cv2.typing.Scalar = ..., upDiff: cv2.typing.Scalar = ..., flags: int = ...) -> tuple[int, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.Rect]: ... +@_typing.overload +def floodFill(image: UMat, mask: UMat | None, seedPoint: cv2.typing.Point, newVal: cv2.typing.Scalar, loDiff: cv2.typing.Scalar = ..., upDiff: cv2.typing.Scalar = ..., flags: int = ...) -> tuple[int, UMat, UMat, cv2.typing.Rect]: ... + +@_typing.overload +def gemm(src1: cv2.typing.MatLike, src2: cv2.typing.MatLike, alpha: float, src3: cv2.typing.MatLike, beta: float, dst: cv2.typing.MatLike | None = ..., flags: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def gemm(src1: UMat, src2: UMat, alpha: float, src3: UMat, beta: float, dst: UMat | None = ..., flags: int = ...) -> UMat: ... + +@_typing.overload +def getAffineTransform(src: cv2.typing.MatLike, dst: cv2.typing.MatLike) -> cv2.typing.MatLike: ... +@_typing.overload +def getAffineTransform(src: UMat, dst: UMat) -> cv2.typing.MatLike: ... + +def getBuildInformation() -> str: ... + +def getCPUFeaturesLine() -> str: ... + +def getCPUTickCount() -> int: ... + +@_typing.overload +def getClosestEllipsePoints(ellipse_params: cv2.typing.RotatedRect, points: cv2.typing.MatLike, closest_pts: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def getClosestEllipsePoints(ellipse_params: cv2.typing.RotatedRect, points: UMat, closest_pts: UMat | None = ...) -> UMat: ... + +def getDefaultAlgorithmHint() -> AlgorithmHint: ... + +@_typing.overload +def getDefaultNewCameraMatrix(cameraMatrix: cv2.typing.MatLike, imgsize: cv2.typing.Size = ..., centerPrincipalPoint: bool = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def getDefaultNewCameraMatrix(cameraMatrix: UMat, imgsize: cv2.typing.Size = ..., centerPrincipalPoint: bool = ...) -> cv2.typing.MatLike: ... + +@_typing.overload +def getDerivKernels(dx: int, dy: int, ksize: int, kx: cv2.typing.MatLike | None = ..., ky: cv2.typing.MatLike | None = ..., normalize: bool = ..., ktype: int = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def getDerivKernels(dx: int, dy: int, ksize: int, kx: UMat | None = ..., ky: UMat | None = ..., normalize: bool = ..., ktype: int = ...) -> tuple[UMat, UMat]: ... + +def getFontScaleFromHeight(fontFace: int, pixelHeight: int, thickness: int = ...) -> float: ... + +def getGaborKernel(ksize: cv2.typing.Size, sigma: float, theta: float, lambd: float, gamma: float, psi: float = ..., ktype: int = ...) -> cv2.typing.MatLike: ... + +def getGaussianKernel(ksize: int, sigma: float, ktype: int = ...) -> cv2.typing.MatLike: ... + +def getHardwareFeatureName(feature: int) -> str: ... + +def getNumThreads() -> int: ... + +def getNumberOfCPUs() -> int: ... + +def getOptimalDFTSize(vecsize: int) -> int: ... + +@_typing.overload +def getOptimalNewCameraMatrix(cameraMatrix: cv2.typing.MatLike, distCoeffs: cv2.typing.MatLike | None, imageSize: cv2.typing.Size, alpha: float, newImgSize: cv2.typing.Size = ..., centerPrincipalPoint: bool = ...) -> tuple[cv2.typing.MatLike, cv2.typing.Rect]: ... +@_typing.overload +def getOptimalNewCameraMatrix(cameraMatrix: UMat, distCoeffs: UMat | None, imageSize: cv2.typing.Size, alpha: float, newImgSize: cv2.typing.Size = ..., centerPrincipalPoint: bool = ...) -> tuple[cv2.typing.MatLike, cv2.typing.Rect]: ... + +@_typing.overload +def getPerspectiveTransform(src: cv2.typing.MatLike, dst: cv2.typing.MatLike, solveMethod: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def getPerspectiveTransform(src: UMat, dst: UMat, solveMethod: int = ...) -> cv2.typing.MatLike: ... + +@_typing.overload +def getRectSubPix(image: cv2.typing.MatLike, patchSize: cv2.typing.Size, center: cv2.typing.Point2f, patch: cv2.typing.MatLike | None = ..., patchType: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def getRectSubPix(image: UMat, patchSize: cv2.typing.Size, center: cv2.typing.Point2f, patch: UMat | None = ..., patchType: int = ...) -> UMat: ... + +def getRotationMatrix2D(center: cv2.typing.Point2f, angle: float, scale: float) -> cv2.typing.MatLike: ... + +def getStructuringElement(shape: int, ksize: cv2.typing.Size, anchor: cv2.typing.Point = ...) -> cv2.typing.MatLike: ... + +@_typing.overload +def getTextSize(text: str, fontFace: int, fontScale: float, thickness: int) -> tuple[cv2.typing.Size, int]: ... +@_typing.overload +def getTextSize(imgsize: cv2.typing.Size, text: str, org: cv2.typing.Point, fface: FontFace, size: int, weight: int = ..., flags: PutTextFlags = ..., wrap: cv2.typing.Range = ...) -> cv2.typing.Rect: ... + +def getThreadNum() -> int: ... + +def getTickCount() -> int: ... + +def getTickFrequency() -> float: ... + +def getTrackbarPos(trackbarname: str, winname: str) -> int: ... + +def getValidDisparityROI(roi1: cv2.typing.Rect, roi2: cv2.typing.Rect, minDisparity: int, numberOfDisparities: int, blockSize: int) -> cv2.typing.Rect: ... + +def getVersionMajor() -> int: ... + +def getVersionMinor() -> int: ... + +def getVersionRevision() -> int: ... + +def getVersionString() -> str: ... + +def getWindowImageRect(winname: str) -> cv2.typing.Rect: ... + +def getWindowProperty(winname: str, prop_id: int) -> float: ... + +@_typing.overload +def goodFeaturesToTrack(image: cv2.typing.MatLike, maxCorners: int, qualityLevel: float, minDistance: float, corners: cv2.typing.MatLike | None = ..., mask: cv2.typing.MatLike | None = ..., blockSize: int = ..., useHarrisDetector: bool = ..., k: float = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def goodFeaturesToTrack(image: UMat, maxCorners: int, qualityLevel: float, minDistance: float, corners: UMat | None = ..., mask: UMat | None = ..., blockSize: int = ..., useHarrisDetector: bool = ..., k: float = ...) -> UMat: ... +@_typing.overload +def goodFeaturesToTrack(image: cv2.typing.MatLike, maxCorners: int, qualityLevel: float, minDistance: float, mask: cv2.typing.MatLike, blockSize: int, gradientSize: int, corners: cv2.typing.MatLike | None = ..., useHarrisDetector: bool = ..., k: float = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def goodFeaturesToTrack(image: UMat, maxCorners: int, qualityLevel: float, minDistance: float, mask: UMat, blockSize: int, gradientSize: int, corners: UMat | None = ..., useHarrisDetector: bool = ..., k: float = ...) -> UMat: ... + +@_typing.overload +def goodFeaturesToTrackWithQuality(image: cv2.typing.MatLike, maxCorners: int, qualityLevel: float, minDistance: float, mask: cv2.typing.MatLike, corners: cv2.typing.MatLike | None = ..., cornersQuality: cv2.typing.MatLike | None = ..., blockSize: int = ..., gradientSize: int = ..., useHarrisDetector: bool = ..., k: float = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def goodFeaturesToTrackWithQuality(image: UMat, maxCorners: int, qualityLevel: float, minDistance: float, mask: UMat, corners: UMat | None = ..., cornersQuality: UMat | None = ..., blockSize: int = ..., gradientSize: int = ..., useHarrisDetector: bool = ..., k: float = ...) -> tuple[UMat, UMat]: ... + +@_typing.overload +def grabCut(img: cv2.typing.MatLike, mask: cv2.typing.MatLike, rect: cv2.typing.Rect, bgdModel: cv2.typing.MatLike, fgdModel: cv2.typing.MatLike, iterCount: int, mode: int = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def grabCut(img: UMat, mask: UMat, rect: cv2.typing.Rect, bgdModel: UMat, fgdModel: UMat, iterCount: int, mode: int = ...) -> tuple[UMat, UMat, UMat]: ... + +@_typing.overload +def hasNonZero(src: cv2.typing.MatLike) -> bool: ... +@_typing.overload +def hasNonZero(src: UMat) -> bool: ... + +def haveImageReader(filename: str | os.PathLike[str]) -> bool: ... + +def haveImageWriter(filename: str | os.PathLike[str]) -> bool: ... + +@_typing.overload +def hconcat(src: _typing.Sequence[cv2.typing.MatLike], dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def hconcat(src: _typing.Sequence[UMat], dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def idct(src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., flags: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def idct(src: UMat, dst: UMat | None = ..., flags: int = ...) -> UMat: ... + +@_typing.overload +def idft(src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., flags: int = ..., nonzeroRows: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def idft(src: UMat, dst: UMat | None = ..., flags: int = ..., nonzeroRows: int = ...) -> UMat: ... + +@_typing.overload +def illuminationChange(src: cv2.typing.MatLike, mask: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., alpha: float = ..., beta: float = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def illuminationChange(src: UMat, mask: UMat, dst: UMat | None = ..., alpha: float = ..., beta: float = ...) -> UMat: ... + +def imcount(filename: str | os.PathLike[str], flags: int = ...) -> int: ... + +@_typing.overload +def imdecode(buf: cv2.typing.MatLike, flags: int) -> cv2.typing.MatLike | None: ... +@_typing.overload +def imdecode(buf: UMat, flags: int) -> cv2.typing.MatLike | None: ... + +@_typing.overload +def imdecodeWithMetadata(buf: cv2.typing.MatLike, flags: int, metadata: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> tuple[cv2.typing.MatLike, _typing.Sequence[int], _typing.Sequence[cv2.typing.MatLike]]: ... +@_typing.overload +def imdecodeWithMetadata(buf: UMat, flags: int, metadata: _typing.Sequence[UMat] | None = ...) -> tuple[cv2.typing.MatLike, _typing.Sequence[int], _typing.Sequence[UMat]]: ... + +@_typing.overload +def imdecodeanimation(buf: cv2.typing.MatLike, start: int = ..., count: int = ...) -> tuple[bool, Animation]: ... +@_typing.overload +def imdecodeanimation(buf: UMat, start: int = ..., count: int = ...) -> tuple[bool, Animation]: ... + +@_typing.overload +def imdecodemulti(buf: cv2.typing.MatLike, flags: int, mats: _typing.Sequence[cv2.typing.MatLike] | None = ..., range: cv2.typing.Range = ...) -> tuple[bool, _typing.Sequence[cv2.typing.MatLike]]: ... +@_typing.overload +def imdecodemulti(buf: UMat, flags: int, mats: _typing.Sequence[cv2.typing.MatLike] | None = ..., range: cv2.typing.Range = ...) -> tuple[bool, _typing.Sequence[cv2.typing.MatLike]]: ... + +@_typing.overload +def imencode(ext: str, img: cv2.typing.MatLike, params: _typing.Sequence[int] = ...) -> tuple[bool, numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]]]: ... +@_typing.overload +def imencode(ext: str, img: UMat, params: _typing.Sequence[int] = ...) -> tuple[bool, numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]]]: ... + +@_typing.overload +def imencodeWithMetadata(ext: str, img: cv2.typing.MatLike, metadataTypes: _typing.Sequence[int], metadata: _typing.Sequence[cv2.typing.MatLike], params: _typing.Sequence[int] = ...) -> tuple[bool, numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]]]: ... +@_typing.overload +def imencodeWithMetadata(ext: str, img: UMat, metadataTypes: _typing.Sequence[int], metadata: _typing.Sequence[UMat], params: _typing.Sequence[int] = ...) -> tuple[bool, numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]]]: ... + +def imencodeanimation(ext: str, animation: Animation, params: _typing.Sequence[int] = ...) -> tuple[bool, numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]]]: ... + +@_typing.overload +def imencodemulti(ext: str, imgs: _typing.Sequence[cv2.typing.MatLike], params: _typing.Sequence[int] = ...) -> tuple[bool, numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]]]: ... +@_typing.overload +def imencodemulti(ext: str, imgs: _typing.Sequence[UMat], params: _typing.Sequence[int] = ...) -> tuple[bool, numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]]]: ... + +@_typing.overload +def imread(filename: str | os.PathLike[str], flags: int = ...) -> cv2.typing.MatLike | None: ... +@_typing.overload +def imread(filename: str | os.PathLike[str], dst: cv2.typing.MatLike | None = ..., flags: int = ...) -> cv2.typing.MatLike | None: ... +@_typing.overload +def imread(filename: str | os.PathLike[str], dst: UMat | None = ..., flags: int = ...) -> UMat | None: ... + +@_typing.overload +def imreadWithMetadata(filename: str | os.PathLike[str], flags: int, metadata: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> tuple[cv2.typing.MatLike, _typing.Sequence[int], _typing.Sequence[cv2.typing.MatLike]]: ... +@_typing.overload +def imreadWithMetadata(filename: str | os.PathLike[str], flags: int, metadata: _typing.Sequence[UMat] | None = ...) -> tuple[cv2.typing.MatLike, _typing.Sequence[int], _typing.Sequence[UMat]]: ... + +def imreadanimation(filename: str | os.PathLike[str], start: int = ..., count: int = ...) -> tuple[bool, Animation]: ... + +@_typing.overload +def imreadmulti(filename: str | os.PathLike[str], mats: _typing.Sequence[cv2.typing.MatLike] | None = ..., flags: int = ...) -> tuple[bool, _typing.Sequence[cv2.typing.MatLike]]: ... +@_typing.overload +def imreadmulti(filename: str | os.PathLike[str], start: int, count: int, mats: _typing.Sequence[cv2.typing.MatLike] | None = ..., flags: int = ...) -> tuple[bool, _typing.Sequence[cv2.typing.MatLike]]: ... + +@_typing.overload +def imshow(winname: str, mat: cv2.typing.MatLike) -> None: ... +@_typing.overload +def imshow(winname: str, mat: cv2.cuda.GpuMat) -> None: ... +@_typing.overload +def imshow(winname: str, mat: UMat) -> None: ... + +@_typing.overload +def imwrite(filename: str | os.PathLike[str], img: cv2.typing.MatLike, params: _typing.Sequence[int] = ...) -> bool: ... +@_typing.overload +def imwrite(filename: str | os.PathLike[str], img: UMat, params: _typing.Sequence[int] = ...) -> bool: ... + +@_typing.overload +def imwriteWithMetadata(filename: str | os.PathLike[str], img: cv2.typing.MatLike, metadataTypes: _typing.Sequence[int], metadata: _typing.Sequence[cv2.typing.MatLike], params: _typing.Sequence[int] = ...) -> bool: ... +@_typing.overload +def imwriteWithMetadata(filename: str | os.PathLike[str], img: UMat, metadataTypes: _typing.Sequence[int], metadata: _typing.Sequence[UMat], params: _typing.Sequence[int] = ...) -> bool: ... + +def imwriteanimation(filename: str | os.PathLike[str], animation: Animation, params: _typing.Sequence[int] = ...) -> bool: ... + +@_typing.overload +def imwritemulti(filename: str | os.PathLike[str], img: _typing.Sequence[cv2.typing.MatLike], params: _typing.Sequence[int] = ...) -> bool: ... +@_typing.overload +def imwritemulti(filename: str | os.PathLike[str], img: _typing.Sequence[UMat], params: _typing.Sequence[int] = ...) -> bool: ... + +@_typing.overload +def inRange(src: cv2.typing.MatLike, lowerb: cv2.typing.MatLike | cv2.typing.Scalar, upperb: cv2.typing.MatLike | cv2.typing.Scalar, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def inRange(src: UMat, lowerb: UMat | cv2.typing.Scalar, upperb: UMat | cv2.typing.Scalar, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def initCameraMatrix2D(objectPoints: _typing.Sequence[cv2.typing.MatLike], imagePoints: _typing.Sequence[cv2.typing.MatLike], imageSize: cv2.typing.Size, aspectRatio: float = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def initCameraMatrix2D(objectPoints: _typing.Sequence[UMat], imagePoints: _typing.Sequence[UMat], imageSize: cv2.typing.Size, aspectRatio: float = ...) -> cv2.typing.MatLike: ... + +@_typing.overload +def initInverseRectificationMap(cameraMatrix: cv2.typing.MatLike, distCoeffs: cv2.typing.MatLike | None, R: cv2.typing.MatLike | None, newCameraMatrix: cv2.typing.MatLike, size: cv2.typing.Size, m1type: int, map1: cv2.typing.MatLike | None = ..., map2: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def initInverseRectificationMap(cameraMatrix: UMat, distCoeffs: UMat | None, R: UMat | None, newCameraMatrix: UMat, size: cv2.typing.Size, m1type: int, map1: UMat | None = ..., map2: UMat | None = ...) -> tuple[UMat, UMat]: ... + +@_typing.overload +def initUndistortRectifyMap(cameraMatrix: cv2.typing.MatLike, distCoeffs: cv2.typing.MatLike | None, R: cv2.typing.MatLike | None, newCameraMatrix: cv2.typing.MatLike, size: cv2.typing.Size, m1type: int, map1: cv2.typing.MatLike | None = ..., map2: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def initUndistortRectifyMap(cameraMatrix: UMat, distCoeffs: UMat | None, R: UMat | None, newCameraMatrix: UMat, size: cv2.typing.Size, m1type: int, map1: UMat | None = ..., map2: UMat | None = ...) -> tuple[UMat, UMat]: ... + +@_typing.overload +def inpaint(src: cv2.typing.MatLike, inpaintMask: cv2.typing.MatLike, inpaintRadius: float, flags: int, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def inpaint(src: UMat, inpaintMask: UMat, inpaintRadius: float, flags: int, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def insertChannel(src: cv2.typing.MatLike, dst: cv2.typing.MatLike, coi: int) -> cv2.typing.MatLike: ... +@_typing.overload +def insertChannel(src: UMat, dst: UMat, coi: int) -> UMat: ... + +@_typing.overload +def integral(src: cv2.typing.MatLike, sum: cv2.typing.MatLike | None = ..., sdepth: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def integral(src: UMat, sum: UMat | None = ..., sdepth: int = ...) -> UMat: ... + +@_typing.overload +def integral2(src: cv2.typing.MatLike, sum: cv2.typing.MatLike | None = ..., sqsum: cv2.typing.MatLike | None = ..., sdepth: int = ..., sqdepth: int = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def integral2(src: UMat, sum: UMat | None = ..., sqsum: UMat | None = ..., sdepth: int = ..., sqdepth: int = ...) -> tuple[UMat, UMat]: ... + +@_typing.overload +def integral3(src: cv2.typing.MatLike, sum: cv2.typing.MatLike | None = ..., sqsum: cv2.typing.MatLike | None = ..., tilted: cv2.typing.MatLike | None = ..., sdepth: int = ..., sqdepth: int = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def integral3(src: UMat, sum: UMat | None = ..., sqsum: UMat | None = ..., tilted: UMat | None = ..., sdepth: int = ..., sqdepth: int = ...) -> tuple[UMat, UMat, UMat]: ... + +@_typing.overload +def intersectConvexConvex(p1: cv2.typing.MatLike, p2: cv2.typing.MatLike, p12: cv2.typing.MatLike | None = ..., handleNested: bool = ...) -> tuple[float, cv2.typing.MatLike]: ... +@_typing.overload +def intersectConvexConvex(p1: UMat, p2: UMat, p12: UMat | None = ..., handleNested: bool = ...) -> tuple[float, UMat]: ... + +@_typing.overload +def invert(src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., flags: int = ...) -> tuple[float, cv2.typing.MatLike]: ... +@_typing.overload +def invert(src: UMat, dst: UMat | None = ..., flags: int = ...) -> tuple[float, UMat]: ... + +@_typing.overload +def invertAffineTransform(M: cv2.typing.MatLike, iM: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def invertAffineTransform(M: UMat, iM: UMat | None = ...) -> UMat: ... + +@_typing.overload +def isContourConvex(contour: cv2.typing.MatLike) -> bool: ... +@_typing.overload +def isContourConvex(contour: UMat) -> bool: ... + +@_typing.overload +def kmeans(data: cv2.typing.MatLike, K: int, bestLabels: cv2.typing.MatLike, criteria: cv2.typing.TermCriteria, attempts: int, flags: int, centers: cv2.typing.MatLike | None = ...) -> tuple[float, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def kmeans(data: UMat, K: int, bestLabels: UMat, criteria: cv2.typing.TermCriteria, attempts: int, flags: int, centers: UMat | None = ...) -> tuple[float, UMat, UMat]: ... + +@_typing.overload +def line(img: cv2.typing.MatLike, pt1: cv2.typing.Point, pt2: cv2.typing.Point, color: cv2.typing.Scalar, thickness: int = ..., lineType: int = ..., shift: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def line(img: UMat, pt1: cv2.typing.Point, pt2: cv2.typing.Point, color: cv2.typing.Scalar, thickness: int = ..., lineType: int = ..., shift: int = ...) -> UMat: ... + +@_typing.overload +def loadChromaticAberrationParams(node: FileNode, coeffMat: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.Size, int]: ... +@_typing.overload +def loadChromaticAberrationParams(node: FileNode, coeffMat: UMat | None = ...) -> tuple[UMat, cv2.typing.Size, int]: ... + +@_typing.overload +def loadMesh(filename: str | os.PathLike[str], vertices: cv2.typing.MatLike | None = ..., indices: _typing.Sequence[cv2.typing.MatLike] | None = ..., normals: cv2.typing.MatLike | None = ..., colors: cv2.typing.MatLike | None = ..., texCoords: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, _typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def loadMesh(filename: str | os.PathLike[str], vertices: UMat | None = ..., indices: _typing.Sequence[UMat] | None = ..., normals: UMat | None = ..., colors: UMat | None = ..., texCoords: UMat | None = ...) -> tuple[UMat, _typing.Sequence[UMat], UMat, UMat, UMat]: ... + +@_typing.overload +def loadPointCloud(filename: str | os.PathLike[str], vertices: cv2.typing.MatLike | None = ..., normals: cv2.typing.MatLike | None = ..., rgb: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def loadPointCloud(filename: str | os.PathLike[str], vertices: UMat | None = ..., normals: UMat | None = ..., rgb: UMat | None = ...) -> tuple[UMat, UMat, UMat]: ... + +@_typing.overload +def log(src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def log(src: UMat, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def magnitude(x: cv2.typing.MatLike, y: cv2.typing.MatLike, magnitude: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def magnitude(x: UMat, y: UMat, magnitude: UMat | None = ...) -> UMat: ... + +@_typing.overload +def matMulDeriv(A: cv2.typing.MatLike, B: cv2.typing.MatLike, dABdA: cv2.typing.MatLike | None = ..., dABdB: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def matMulDeriv(A: UMat, B: UMat, dABdA: UMat | None = ..., dABdB: UMat | None = ...) -> tuple[UMat, UMat]: ... + +@_typing.overload +def matchShapes(contour1: cv2.typing.MatLike, contour2: cv2.typing.MatLike, method: int, parameter: float) -> float: ... +@_typing.overload +def matchShapes(contour1: UMat, contour2: UMat, method: int, parameter: float) -> float: ... + +@_typing.overload +def matchTemplate(image: cv2.typing.MatLike, templ: cv2.typing.MatLike, method: int, result: cv2.typing.MatLike | None = ..., mask: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def matchTemplate(image: UMat, templ: UMat, method: int, result: UMat | None = ..., mask: UMat | None = ...) -> UMat: ... + +@_typing.overload +def max(src1: cv2.typing.MatLike, src2: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def max(src1: UMat, src2: UMat, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def mean(src: cv2.typing.MatLike, mask: cv2.typing.MatLike | None = ...) -> tuple[float, float, float, float]: ... +@_typing.overload +def mean(src: UMat, mask: UMat | None = ...) -> tuple[float, float, float, float]: ... + +@_typing.overload +def meanShift(probImage: cv2.typing.MatLike, window: cv2.typing.Rect, criteria: cv2.typing.TermCriteria) -> tuple[int, cv2.typing.Rect]: ... +@_typing.overload +def meanShift(probImage: UMat, window: cv2.typing.Rect, criteria: cv2.typing.TermCriteria) -> tuple[int, cv2.typing.Rect]: ... + +@_typing.overload +def meanStdDev(src: cv2.typing.MatLike, mean: cv2.typing.MatLike | None = ..., stddev: cv2.typing.MatLike | None = ..., mask: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def meanStdDev(src: UMat, mean: UMat | None = ..., stddev: UMat | None = ..., mask: UMat | None = ...) -> tuple[UMat, UMat]: ... + +@_typing.overload +def medianBlur(src: cv2.typing.MatLike, ksize: int, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def medianBlur(src: UMat, ksize: int, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def merge(mv: _typing.Sequence[cv2.typing.MatLike], dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def merge(mv: _typing.Sequence[UMat], dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def min(src1: cv2.typing.MatLike, src2: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def min(src1: UMat, src2: UMat, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def minAreaRect(points: cv2.typing.MatLike) -> cv2.typing.RotatedRect: ... +@_typing.overload +def minAreaRect(points: UMat) -> cv2.typing.RotatedRect: ... + +@_typing.overload +def minEnclosingCircle(points: cv2.typing.MatLike) -> tuple[cv2.typing.Point2f, float]: ... +@_typing.overload +def minEnclosingCircle(points: UMat) -> tuple[cv2.typing.Point2f, float]: ... + +@_typing.overload +def minEnclosingConvexPolygon(points: cv2.typing.MatLike, k: int, polygon: cv2.typing.MatLike | None = ...) -> tuple[float, cv2.typing.MatLike]: ... +@_typing.overload +def minEnclosingConvexPolygon(points: UMat, k: int, polygon: UMat | None = ...) -> tuple[float, UMat]: ... + +@_typing.overload +def minEnclosingTriangle(points: cv2.typing.MatLike, triangle: cv2.typing.MatLike | None = ...) -> tuple[float, cv2.typing.MatLike]: ... +@_typing.overload +def minEnclosingTriangle(points: UMat, triangle: UMat | None = ...) -> tuple[float, UMat]: ... + +@_typing.overload +def minMaxLoc(src: cv2.typing.MatLike, mask: cv2.typing.MatLike | None = ...) -> tuple[float, float, cv2.typing.Point, cv2.typing.Point]: ... +@_typing.overload +def minMaxLoc(src: UMat, mask: UMat | None = ...) -> tuple[float, float, cv2.typing.Point, cv2.typing.Point]: ... + +@_typing.overload +def mixChannels(src: _typing.Sequence[cv2.typing.MatLike], dst: _typing.Sequence[cv2.typing.MatLike], fromTo: _typing.Sequence[int]) -> _typing.Sequence[cv2.typing.MatLike]: ... +@_typing.overload +def mixChannels(src: _typing.Sequence[UMat], dst: _typing.Sequence[UMat], fromTo: _typing.Sequence[int]) -> _typing.Sequence[UMat]: ... + +@_typing.overload +def moments(array: cv2.typing.MatLike, binaryImage: bool = ...) -> cv2.typing.Moments: ... +@_typing.overload +def moments(array: UMat, binaryImage: bool = ...) -> cv2.typing.Moments: ... + +@_typing.overload +def morphologyEx(src: cv2.typing.MatLike, op: int, kernel: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., anchor: cv2.typing.Point = ..., iterations: int = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def morphologyEx(src: UMat, op: int, kernel: UMat, dst: UMat | None = ..., anchor: cv2.typing.Point = ..., iterations: int = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> UMat: ... + +def moveWindow(winname: str, x: int, y: int) -> None: ... + +@_typing.overload +def mulSpectrums(a: cv2.typing.MatLike, b: cv2.typing.MatLike, flags: int, c: cv2.typing.MatLike | None = ..., conjB: bool = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def mulSpectrums(a: UMat, b: UMat, flags: int, c: UMat | None = ..., conjB: bool = ...) -> UMat: ... + +@_typing.overload +def mulTransposed(src: cv2.typing.MatLike, aTa: bool, dst: cv2.typing.MatLike | None = ..., delta: cv2.typing.MatLike | None = ..., scale: float = ..., dtype: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def mulTransposed(src: UMat, aTa: bool, dst: UMat | None = ..., delta: UMat | None = ..., scale: float = ..., dtype: int = ...) -> UMat: ... + +@_typing.overload +def multiply(src1: cv2.typing.MatLike, src2: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., scale: float = ..., dtype: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def multiply(src1: UMat, src2: UMat, dst: UMat | None = ..., scale: float = ..., dtype: int = ...) -> UMat: ... + +def namedWindow(winname: str, flags: int = ...) -> None: ... + +@_typing.overload +def norm(src1: cv2.typing.MatLike, normType: int = ..., mask: cv2.typing.MatLike | None = ...) -> float: ... +@_typing.overload +def norm(src1: UMat, normType: int = ..., mask: UMat | None = ...) -> float: ... +@_typing.overload +def norm(src1: cv2.typing.MatLike, src2: cv2.typing.MatLike, normType: int = ..., mask: cv2.typing.MatLike | None = ...) -> float: ... +@_typing.overload +def norm(src1: UMat, src2: UMat, normType: int = ..., mask: UMat | None = ...) -> float: ... + +@_typing.overload +def normalize(src: cv2.typing.MatLike, dst: cv2.typing.MatLike, alpha: float = ..., beta: float = ..., norm_type: int = ..., dtype: int = ..., mask: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def normalize(src: UMat, dst: UMat, alpha: float = ..., beta: float = ..., norm_type: int = ..., dtype: int = ..., mask: UMat | None = ...) -> UMat: ... + +@_typing.overload +def patchNaNs(a: cv2.typing.MatLike, val: float = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def patchNaNs(a: UMat, val: float = ...) -> UMat: ... + +@_typing.overload +def pencilSketch(src: cv2.typing.MatLike, dst1: cv2.typing.MatLike | None = ..., dst2: cv2.typing.MatLike | None = ..., sigma_s: float = ..., sigma_r: float = ..., shade_factor: float = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def pencilSketch(src: UMat, dst1: UMat | None = ..., dst2: UMat | None = ..., sigma_s: float = ..., sigma_r: float = ..., shade_factor: float = ...) -> tuple[UMat, UMat]: ... + +@_typing.overload +def perspectiveTransform(src: cv2.typing.MatLike, m: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def perspectiveTransform(src: UMat, m: UMat, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def phase(x: cv2.typing.MatLike, y: cv2.typing.MatLike, angle: cv2.typing.MatLike | None = ..., angleInDegrees: bool = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def phase(x: UMat, y: UMat, angle: UMat | None = ..., angleInDegrees: bool = ...) -> UMat: ... + +@_typing.overload +def phaseCorrelate(src1: cv2.typing.MatLike, src2: cv2.typing.MatLike, window: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.Point2d, float]: ... +@_typing.overload +def phaseCorrelate(src1: UMat, src2: UMat, window: UMat | None = ...) -> tuple[cv2.typing.Point2d, float]: ... + +@_typing.overload +def phaseCorrelateIterative(src1: cv2.typing.MatLike, src2: cv2.typing.MatLike, L2size: int = ..., maxIters: int = ...) -> cv2.typing.Point2d: ... +@_typing.overload +def phaseCorrelateIterative(src1: UMat, src2: UMat, L2size: int = ..., maxIters: int = ...) -> cv2.typing.Point2d: ... + +@_typing.overload +def pointPolygonTest(contour: cv2.typing.MatLike, pt: cv2.typing.Point2f, measureDist: bool) -> float: ... +@_typing.overload +def pointPolygonTest(contour: UMat, pt: cv2.typing.Point2f, measureDist: bool) -> float: ... + +@_typing.overload +def polarToCart(magnitude: cv2.typing.MatLike, angle: cv2.typing.MatLike, x: cv2.typing.MatLike | None = ..., y: cv2.typing.MatLike | None = ..., angleInDegrees: bool = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def polarToCart(magnitude: UMat, angle: UMat, x: UMat | None = ..., y: UMat | None = ..., angleInDegrees: bool = ...) -> tuple[UMat, UMat]: ... + +def pollKey() -> int: ... + +@_typing.overload +def polylines(img: cv2.typing.MatLike, pts: _typing.Sequence[cv2.typing.MatLike], isClosed: bool, color: cv2.typing.Scalar, thickness: int = ..., lineType: int = ..., shift: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def polylines(img: UMat, pts: _typing.Sequence[UMat], isClosed: bool, color: cv2.typing.Scalar, thickness: int = ..., lineType: int = ..., shift: int = ...) -> UMat: ... + +@_typing.overload +def pow(src: cv2.typing.MatLike, power: float, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def pow(src: UMat, power: float, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def preCornerDetect(src: cv2.typing.MatLike, ksize: int, dst: cv2.typing.MatLike | None = ..., borderType: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def preCornerDetect(src: UMat, ksize: int, dst: UMat | None = ..., borderType: int = ...) -> UMat: ... + +@_typing.overload +def projectPoints(objectPoints: cv2.typing.MatLike, rvec: cv2.typing.MatLike, tvec: cv2.typing.MatLike, cameraMatrix: cv2.typing.MatLike, distCoeffs: cv2.typing.MatLike | None, imagePoints: cv2.typing.MatLike | None = ..., jacobian: cv2.typing.MatLike | None = ..., aspectRatio: float = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def projectPoints(objectPoints: UMat, rvec: UMat, tvec: UMat, cameraMatrix: UMat, distCoeffs: UMat | None, imagePoints: UMat | None = ..., jacobian: UMat | None = ..., aspectRatio: float = ...) -> tuple[UMat, UMat]: ... + +@_typing.overload +def projectPointsSepJ(objectPoints: cv2.typing.MatLike, rvec: cv2.typing.MatLike, tvec: cv2.typing.MatLike, cameraMatrix: cv2.typing.MatLike, distCoeffs: cv2.typing.MatLike, imagePoints: cv2.typing.MatLike | None = ..., dpdr: cv2.typing.MatLike | None = ..., dpdt: cv2.typing.MatLike | None = ..., dpdf: cv2.typing.MatLike | None = ..., dpdc: cv2.typing.MatLike | None = ..., dpdk: cv2.typing.MatLike | None = ..., dpdo: cv2.typing.MatLike | None = ..., aspectRatio: float = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def projectPointsSepJ(objectPoints: UMat, rvec: UMat, tvec: UMat, cameraMatrix: UMat, distCoeffs: UMat, imagePoints: UMat | None = ..., dpdr: UMat | None = ..., dpdt: UMat | None = ..., dpdf: UMat | None = ..., dpdc: UMat | None = ..., dpdk: UMat | None = ..., dpdo: UMat | None = ..., aspectRatio: float = ...) -> tuple[UMat, UMat, UMat, UMat, UMat, UMat, UMat]: ... + +@_typing.overload +def putText(img: cv2.typing.MatLike, text: str, org: cv2.typing.Point, fontFace: int, fontScale: float, color: cv2.typing.Scalar, thickness: int = ..., lineType: int = ..., bottomLeftOrigin: bool = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def putText(img: UMat, text: str, org: cv2.typing.Point, fontFace: int, fontScale: float, color: cv2.typing.Scalar, thickness: int = ..., lineType: int = ..., bottomLeftOrigin: bool = ...) -> UMat: ... +@_typing.overload +def putText(img: cv2.typing.MatLike, text: str, org: cv2.typing.Point, color: cv2.typing.Scalar, fface: FontFace, size: int, weight: int = ..., flags: PutTextFlags = ..., wrap: cv2.typing.Range = ...) -> tuple[cv2.typing.Point, cv2.typing.MatLike]: ... +@_typing.overload +def putText(img: UMat, text: str, org: cv2.typing.Point, color: cv2.typing.Scalar, fface: FontFace, size: int, weight: int = ..., flags: PutTextFlags = ..., wrap: cv2.typing.Range = ...) -> tuple[cv2.typing.Point, UMat]: ... + +@_typing.overload +def pyrDown(src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., dstsize: cv2.typing.Size = ..., borderType: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def pyrDown(src: UMat, dst: UMat | None = ..., dstsize: cv2.typing.Size = ..., borderType: int = ...) -> UMat: ... + +@_typing.overload +def pyrMeanShiftFiltering(src: cv2.typing.MatLike, sp: float, sr: float, dst: cv2.typing.MatLike | None = ..., maxLevel: int = ..., termcrit: cv2.typing.TermCriteria = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def pyrMeanShiftFiltering(src: UMat, sp: float, sr: float, dst: UMat | None = ..., maxLevel: int = ..., termcrit: cv2.typing.TermCriteria = ...) -> UMat: ... + +@_typing.overload +def pyrUp(src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., dstsize: cv2.typing.Size = ..., borderType: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def pyrUp(src: UMat, dst: UMat | None = ..., dstsize: cv2.typing.Size = ..., borderType: int = ...) -> UMat: ... + +@_typing.overload +def randShuffle(dst: cv2.typing.MatLike, iterFactor: float = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def randShuffle(dst: UMat, iterFactor: float = ...) -> UMat: ... + +@_typing.overload +def randn(dst: cv2.typing.MatLike, mean: cv2.typing.MatLike, stddev: cv2.typing.MatLike) -> cv2.typing.MatLike: ... +@_typing.overload +def randn(dst: UMat, mean: UMat, stddev: UMat) -> UMat: ... + +@_typing.overload +def randu(dst: cv2.typing.MatLike, low: cv2.typing.MatLike, high: cv2.typing.MatLike) -> cv2.typing.MatLike: ... +@_typing.overload +def randu(dst: UMat, low: UMat, high: UMat) -> UMat: ... + +def readOpticalFlow(path: str) -> cv2.typing.MatLike: ... + +@_typing.overload +def recoverPose(points1: cv2.typing.MatLike, points2: cv2.typing.MatLike, cameraMatrix1: cv2.typing.MatLike, distCoeffs1: cv2.typing.MatLike, cameraMatrix2: cv2.typing.MatLike, distCoeffs2: cv2.typing.MatLike, E: cv2.typing.MatLike | None = ..., R: cv2.typing.MatLike | None = ..., t: cv2.typing.MatLike | None = ..., method: int = ..., prob: float = ..., threshold: float = ..., mask: cv2.typing.MatLike | None = ...) -> tuple[int, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def recoverPose(points1: UMat, points2: UMat, cameraMatrix1: UMat, distCoeffs1: UMat, cameraMatrix2: UMat, distCoeffs2: UMat, E: UMat | None = ..., R: UMat | None = ..., t: UMat | None = ..., method: int = ..., prob: float = ..., threshold: float = ..., mask: UMat | None = ...) -> tuple[int, UMat, UMat, UMat, UMat]: ... +@_typing.overload +def recoverPose(E: cv2.typing.MatLike, points1: cv2.typing.MatLike, points2: cv2.typing.MatLike, cameraMatrix: cv2.typing.MatLike, R: cv2.typing.MatLike | None = ..., t: cv2.typing.MatLike | None = ..., mask: cv2.typing.MatLike | None = ...) -> tuple[int, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def recoverPose(E: UMat, points1: UMat, points2: UMat, cameraMatrix: UMat, R: UMat | None = ..., t: UMat | None = ..., mask: UMat | None = ...) -> tuple[int, UMat, UMat, UMat]: ... +@_typing.overload +def recoverPose(E: cv2.typing.MatLike, points1: cv2.typing.MatLike, points2: cv2.typing.MatLike, R: cv2.typing.MatLike | None = ..., t: cv2.typing.MatLike | None = ..., focal: float = ..., pp: cv2.typing.Point2d = ..., mask: cv2.typing.MatLike | None = ...) -> tuple[int, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def recoverPose(E: UMat, points1: UMat, points2: UMat, R: UMat | None = ..., t: UMat | None = ..., focal: float = ..., pp: cv2.typing.Point2d = ..., mask: UMat | None = ...) -> tuple[int, UMat, UMat, UMat]: ... +@_typing.overload +def recoverPose(E: cv2.typing.MatLike, points1: cv2.typing.MatLike, points2: cv2.typing.MatLike, cameraMatrix: cv2.typing.MatLike, distanceThresh: float, R: cv2.typing.MatLike | None = ..., t: cv2.typing.MatLike | None = ..., mask: cv2.typing.MatLike | None = ..., triangulatedPoints: cv2.typing.MatLike | None = ...) -> tuple[int, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def recoverPose(E: UMat, points1: UMat, points2: UMat, cameraMatrix: UMat, distanceThresh: float, R: UMat | None = ..., t: UMat | None = ..., mask: UMat | None = ..., triangulatedPoints: UMat | None = ...) -> tuple[int, UMat, UMat, UMat, UMat]: ... + +@_typing.overload +def rectangle(img: cv2.typing.MatLike, pt1: cv2.typing.Point, pt2: cv2.typing.Point, color: cv2.typing.Scalar, thickness: int = ..., lineType: int = ..., shift: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def rectangle(img: UMat, pt1: cv2.typing.Point, pt2: cv2.typing.Point, color: cv2.typing.Scalar, thickness: int = ..., lineType: int = ..., shift: int = ...) -> UMat: ... +@_typing.overload +def rectangle(img: cv2.typing.MatLike, rec: cv2.typing.Rect, color: cv2.typing.Scalar, thickness: int = ..., lineType: int = ..., shift: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def rectangle(img: UMat, rec: cv2.typing.Rect, color: cv2.typing.Scalar, thickness: int = ..., lineType: int = ..., shift: int = ...) -> UMat: ... + +def rectangleIntersectionArea(a: cv2.typing.Rect2d, b: cv2.typing.Rect2d) -> float: ... + +@_typing.overload +def reduce(src: cv2.typing.MatLike, dim: int, rtype: int, dst: cv2.typing.MatLike | None = ..., dtype: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def reduce(src: UMat, dim: int, rtype: int, dst: UMat | None = ..., dtype: int = ...) -> UMat: ... + +@_typing.overload +def reduceArgMax(src: cv2.typing.MatLike, axis: int, dst: cv2.typing.MatLike | None = ..., lastIndex: bool = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def reduceArgMax(src: UMat, axis: int, dst: UMat | None = ..., lastIndex: bool = ...) -> UMat: ... + +@_typing.overload +def reduceArgMin(src: cv2.typing.MatLike, axis: int, dst: cv2.typing.MatLike | None = ..., lastIndex: bool = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def reduceArgMin(src: UMat, axis: int, dst: UMat | None = ..., lastIndex: bool = ...) -> UMat: ... + +@_typing.overload +def registerCameras(objectPoints1: _typing.Sequence[cv2.typing.MatLike], objectPoints2: _typing.Sequence[cv2.typing.MatLike], imagePoints1: _typing.Sequence[cv2.typing.MatLike], imagePoints2: _typing.Sequence[cv2.typing.MatLike], cameraMatrix1: cv2.typing.MatLike, distCoeffs1: cv2.typing.MatLike, cameraModel1: CameraModel, cameraMatrix2: cv2.typing.MatLike, distCoeffs2: cv2.typing.MatLike, cameraModel2: CameraModel, R: cv2.typing.MatLike, T: cv2.typing.MatLike, E: cv2.typing.MatLike | None = ..., F: cv2.typing.MatLike | None = ..., perViewErrors: cv2.typing.MatLike | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def registerCameras(objectPoints1: _typing.Sequence[UMat], objectPoints2: _typing.Sequence[UMat], imagePoints1: _typing.Sequence[UMat], imagePoints2: _typing.Sequence[UMat], cameraMatrix1: UMat, distCoeffs1: UMat, cameraModel1: CameraModel, cameraMatrix2: UMat, distCoeffs2: UMat, cameraModel2: CameraModel, R: UMat, T: UMat, E: UMat | None = ..., F: UMat | None = ..., perViewErrors: UMat | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, UMat, UMat, UMat, UMat, UMat]: ... + +@_typing.overload +def registerCamerasExtended(objectPoints1: _typing.Sequence[cv2.typing.MatLike], objectPoints2: _typing.Sequence[cv2.typing.MatLike], imagePoints1: _typing.Sequence[cv2.typing.MatLike], imagePoints2: _typing.Sequence[cv2.typing.MatLike], cameraMatrix1: cv2.typing.MatLike, distCoeffs1: cv2.typing.MatLike, cameraModel1: CameraModel, cameraMatrix2: cv2.typing.MatLike, distCoeffs2: cv2.typing.MatLike, cameraModel2: CameraModel, R: cv2.typing.MatLike, T: cv2.typing.MatLike, E: cv2.typing.MatLike | None = ..., F: cv2.typing.MatLike | None = ..., rvecs: _typing.Sequence[cv2.typing.MatLike] | None = ..., tvecs: _typing.Sequence[cv2.typing.MatLike] | None = ..., perViewErrors: cv2.typing.MatLike | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, _typing.Sequence[cv2.typing.MatLike], _typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike]: ... +@_typing.overload +def registerCamerasExtended(objectPoints1: _typing.Sequence[UMat], objectPoints2: _typing.Sequence[UMat], imagePoints1: _typing.Sequence[UMat], imagePoints2: _typing.Sequence[UMat], cameraMatrix1: UMat, distCoeffs1: UMat, cameraModel1: CameraModel, cameraMatrix2: UMat, distCoeffs2: UMat, cameraModel2: CameraModel, R: UMat, T: UMat, E: UMat | None = ..., F: UMat | None = ..., rvecs: _typing.Sequence[UMat] | None = ..., tvecs: _typing.Sequence[UMat] | None = ..., perViewErrors: UMat | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, UMat, UMat, UMat, UMat, _typing.Sequence[UMat], _typing.Sequence[UMat], UMat]: ... + +@_typing.overload +def registerDepth(unregisteredCameraMatrix: cv2.typing.MatLike, registeredCameraMatrix: cv2.typing.MatLike, registeredDistCoeffs: cv2.typing.MatLike, Rt: cv2.typing.MatLike, unregisteredDepth: cv2.typing.MatLike, outputImagePlaneSize: cv2.typing.Size, registeredDepth: cv2.typing.MatLike | None = ..., depthDilation: bool = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def registerDepth(unregisteredCameraMatrix: UMat, registeredCameraMatrix: UMat, registeredDistCoeffs: UMat, Rt: UMat, unregisteredDepth: UMat, outputImagePlaneSize: cv2.typing.Size, registeredDepth: UMat | None = ..., depthDilation: bool = ...) -> UMat: ... + +@_typing.overload +def remap(src: cv2.typing.MatLike, map1: cv2.typing.MatLike, map2: cv2.typing.MatLike, interpolation: int, dst: cv2.typing.MatLike | None = ..., borderMode: int = ..., borderValue: cv2.typing.Scalar = ..., hint: AlgorithmHint = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def remap(src: UMat, map1: UMat, map2: UMat, interpolation: int, dst: UMat | None = ..., borderMode: int = ..., borderValue: cv2.typing.Scalar = ..., hint: AlgorithmHint = ...) -> UMat: ... + +@_typing.overload +def repeat(src: cv2.typing.MatLike, ny: int, nx: int, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def repeat(src: UMat, ny: int, nx: int, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def reprojectImageTo3D(disparity: cv2.typing.MatLike, Q: cv2.typing.MatLike, _3dImage: cv2.typing.MatLike | None = ..., handleMissingValues: bool = ..., ddepth: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def reprojectImageTo3D(disparity: UMat, Q: UMat, _3dImage: UMat | None = ..., handleMissingValues: bool = ..., ddepth: int = ...) -> UMat: ... + +@_typing.overload +def rescaleDepth(in_: cv2.typing.MatLike, type: int, out: cv2.typing.MatLike | None = ..., depth_factor: float = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def rescaleDepth(in_: UMat, type: int, out: UMat | None = ..., depth_factor: float = ...) -> UMat: ... + +@_typing.overload +def resize(src: cv2.typing.MatLike, dsize: cv2.typing.Size | None, dst: cv2.typing.MatLike | None = ..., fx: float = ..., fy: float = ..., interpolation: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def resize(src: UMat, dsize: cv2.typing.Size | None, dst: UMat | None = ..., fx: float = ..., fy: float = ..., interpolation: int = ...) -> UMat: ... + +@_typing.overload +def resizeWindow(winname: str, width: int, height: int) -> None: ... +@_typing.overload +def resizeWindow(winname: str, size: cv2.typing.Size) -> None: ... + +@_typing.overload +def rotate(src: cv2.typing.MatLike, rotateCode: int, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def rotate(src: UMat, rotateCode: int, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def rotatedRectangleIntersection(rect1: cv2.typing.RotatedRect, rect2: cv2.typing.RotatedRect, intersectingRegion: cv2.typing.MatLike | None = ...) -> tuple[int, cv2.typing.MatLike]: ... +@_typing.overload +def rotatedRectangleIntersection(rect1: cv2.typing.RotatedRect, rect2: cv2.typing.RotatedRect, intersectingRegion: UMat | None = ...) -> tuple[int, UMat]: ... + +@_typing.overload +def sampsonDistance(pt1: cv2.typing.MatLike, pt2: cv2.typing.MatLike, F: cv2.typing.MatLike) -> float: ... +@_typing.overload +def sampsonDistance(pt1: UMat, pt2: UMat, F: UMat) -> float: ... + +@_typing.overload +def saveMesh(filename: str | os.PathLike[str], vertices: cv2.typing.MatLike, indices: _typing.Sequence[cv2.typing.MatLike], normals: cv2.typing.MatLike | None = ..., colors: cv2.typing.MatLike | None = ..., texCoords: cv2.typing.MatLike | None = ...) -> None: ... +@_typing.overload +def saveMesh(filename: str | os.PathLike[str], vertices: UMat, indices: _typing.Sequence[UMat], normals: UMat | None = ..., colors: UMat | None = ..., texCoords: UMat | None = ...) -> None: ... + +@_typing.overload +def savePointCloud(filename: str | os.PathLike[str], vertices: cv2.typing.MatLike, normals: cv2.typing.MatLike | None = ..., rgb: cv2.typing.MatLike | None = ...) -> None: ... +@_typing.overload +def savePointCloud(filename: str | os.PathLike[str], vertices: UMat, normals: UMat | None = ..., rgb: UMat | None = ...) -> None: ... + +@_typing.overload +def scaleAdd(src1: cv2.typing.MatLike, alpha: float, src2: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def scaleAdd(src1: UMat, alpha: float, src2: UMat, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def seamlessClone(src: cv2.typing.MatLike, dst: cv2.typing.MatLike, mask: cv2.typing.MatLike, p: cv2.typing.Point, flags: int, blend: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def seamlessClone(src: UMat, dst: UMat, mask: UMat, p: cv2.typing.Point, flags: int, blend: UMat | None = ...) -> UMat: ... + +@_typing.overload +def selectROI(windowName: str, img: cv2.typing.MatLike, showCrosshair: bool = ..., fromCenter: bool = ..., printNotice: bool = ...) -> cv2.typing.Rect: ... +@_typing.overload +def selectROI(windowName: str, img: UMat, showCrosshair: bool = ..., fromCenter: bool = ..., printNotice: bool = ...) -> cv2.typing.Rect: ... +@_typing.overload +def selectROI(img: cv2.typing.MatLike, showCrosshair: bool = ..., fromCenter: bool = ..., printNotice: bool = ...) -> cv2.typing.Rect: ... +@_typing.overload +def selectROI(img: UMat, showCrosshair: bool = ..., fromCenter: bool = ..., printNotice: bool = ...) -> cv2.typing.Rect: ... + +@_typing.overload +def selectROIs(windowName: str, img: cv2.typing.MatLike, showCrosshair: bool = ..., fromCenter: bool = ..., printNotice: bool = ...) -> _typing.Sequence[cv2.typing.Rect]: ... +@_typing.overload +def selectROIs(windowName: str, img: UMat, showCrosshair: bool = ..., fromCenter: bool = ..., printNotice: bool = ...) -> _typing.Sequence[cv2.typing.Rect]: ... + +@_typing.overload +def sepFilter2D(src: cv2.typing.MatLike, ddepth: int, kernelX: cv2.typing.MatLike, kernelY: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., anchor: cv2.typing.Point = ..., delta: float = ..., borderType: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def sepFilter2D(src: UMat, ddepth: int, kernelX: UMat, kernelY: UMat, dst: UMat | None = ..., anchor: cv2.typing.Point = ..., delta: float = ..., borderType: int = ...) -> UMat: ... + +@_typing.overload +def setIdentity(mtx: cv2.typing.MatLike, s: cv2.typing.Scalar = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def setIdentity(mtx: UMat, s: cv2.typing.Scalar = ...) -> UMat: ... + +def setNumThreads(nthreads: int) -> None: ... + +def setRNGSeed(seed: int) -> None: ... + +def setTrackbarMax(trackbarname: str, winname: str, maxval: int) -> None: ... + +def setTrackbarMin(trackbarname: str, winname: str, minval: int) -> None: ... + +def setTrackbarPos(trackbarname: str, winname: str, pos: int) -> None: ... + +def setUseOptimized(onoff: bool) -> None: ... + +def setWindowProperty(winname: str, prop_id: int, prop_value: float) -> None: ... + +def setWindowTitle(winname: str, title: str) -> None: ... + +@_typing.overload +def solve(src1: cv2.typing.MatLike, src2: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., flags: int = ...) -> tuple[bool, cv2.typing.MatLike]: ... +@_typing.overload +def solve(src1: UMat, src2: UMat, dst: UMat | None = ..., flags: int = ...) -> tuple[bool, UMat]: ... + +@_typing.overload +def solveCubic(coeffs: cv2.typing.MatLike, roots: cv2.typing.MatLike | None = ...) -> tuple[int, cv2.typing.MatLike]: ... +@_typing.overload +def solveCubic(coeffs: UMat, roots: UMat | None = ...) -> tuple[int, UMat]: ... + +@_typing.overload +def solveLP(Func: cv2.typing.MatLike, Constr: cv2.typing.MatLike, constr_eps: float, z: cv2.typing.MatLike | None = ...) -> tuple[int, cv2.typing.MatLike]: ... +@_typing.overload +def solveLP(Func: UMat, Constr: UMat, constr_eps: float, z: UMat | None = ...) -> tuple[int, UMat]: ... +@_typing.overload +def solveLP(Func: cv2.typing.MatLike, Constr: cv2.typing.MatLike, z: cv2.typing.MatLike | None = ...) -> tuple[int, cv2.typing.MatLike]: ... +@_typing.overload +def solveLP(Func: UMat, Constr: UMat, z: UMat | None = ...) -> tuple[int, UMat]: ... + +@_typing.overload +def solveP3P(objectPoints: cv2.typing.MatLike, imagePoints: cv2.typing.MatLike, cameraMatrix: cv2.typing.MatLike, distCoeffs: cv2.typing.MatLike | None, flags: int, rvecs: _typing.Sequence[cv2.typing.MatLike] | None = ..., tvecs: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> tuple[int, _typing.Sequence[cv2.typing.MatLike], _typing.Sequence[cv2.typing.MatLike]]: ... +@_typing.overload +def solveP3P(objectPoints: UMat, imagePoints: UMat, cameraMatrix: UMat, distCoeffs: UMat | None, flags: int, rvecs: _typing.Sequence[UMat] | None = ..., tvecs: _typing.Sequence[UMat] | None = ...) -> tuple[int, _typing.Sequence[UMat], _typing.Sequence[UMat]]: ... + +@_typing.overload +def solvePnP(objectPoints: cv2.typing.MatLike, imagePoints: cv2.typing.MatLike, cameraMatrix: cv2.typing.MatLike, distCoeffs: cv2.typing.MatLike | None, rvec: cv2.typing.MatLike | None = ..., tvec: cv2.typing.MatLike | None = ..., useExtrinsicGuess: bool = ..., flags: int = ...) -> tuple[bool, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def solvePnP(objectPoints: UMat, imagePoints: UMat, cameraMatrix: UMat, distCoeffs: UMat | None, rvec: UMat | None = ..., tvec: UMat | None = ..., useExtrinsicGuess: bool = ..., flags: int = ...) -> tuple[bool, UMat, UMat]: ... + +@_typing.overload +def solvePnPGeneric(objectPoints: cv2.typing.MatLike, imagePoints: cv2.typing.MatLike, cameraMatrix: cv2.typing.MatLike, distCoeffs: cv2.typing.MatLike | None, rvecs: _typing.Sequence[cv2.typing.MatLike] | None = ..., tvecs: _typing.Sequence[cv2.typing.MatLike] | None = ..., useExtrinsicGuess: bool = ..., flags: int = ..., rvec: cv2.typing.MatLike | None = ..., tvec: cv2.typing.MatLike | None = ..., reprojectionError: cv2.typing.MatLike | None = ...) -> tuple[int, _typing.Sequence[cv2.typing.MatLike], _typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike]: ... +@_typing.overload +def solvePnPGeneric(objectPoints: UMat, imagePoints: UMat, cameraMatrix: UMat, distCoeffs: UMat | None, rvecs: _typing.Sequence[UMat] | None = ..., tvecs: _typing.Sequence[UMat] | None = ..., useExtrinsicGuess: bool = ..., flags: int = ..., rvec: UMat | None = ..., tvec: UMat | None = ..., reprojectionError: UMat | None = ...) -> tuple[int, _typing.Sequence[UMat], _typing.Sequence[UMat], UMat]: ... + +@_typing.overload +def solvePnPRansac(objectPoints: cv2.typing.MatLike, imagePoints: cv2.typing.MatLike, cameraMatrix: cv2.typing.MatLike, distCoeffs: cv2.typing.MatLike | None, rvec: cv2.typing.MatLike | None = ..., tvec: cv2.typing.MatLike | None = ..., useExtrinsicGuess: bool = ..., iterationsCount: int = ..., reprojectionError: float = ..., confidence: float = ..., inliers: cv2.typing.MatLike | None = ..., flags: int = ...) -> tuple[bool, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def solvePnPRansac(objectPoints: UMat, imagePoints: UMat, cameraMatrix: UMat, distCoeffs: UMat | None, rvec: UMat | None = ..., tvec: UMat | None = ..., useExtrinsicGuess: bool = ..., iterationsCount: int = ..., reprojectionError: float = ..., confidence: float = ..., inliers: UMat | None = ..., flags: int = ...) -> tuple[bool, UMat, UMat, UMat]: ... +@_typing.overload +def solvePnPRansac(objectPoints: cv2.typing.MatLike, imagePoints: cv2.typing.MatLike, cameraMatrix: cv2.typing.MatLike, distCoeffs: cv2.typing.MatLike | None, rvec: cv2.typing.MatLike | None = ..., tvec: cv2.typing.MatLike | None = ..., inliers: cv2.typing.MatLike | None = ..., params: UsacParams = ...) -> tuple[bool, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def solvePnPRansac(objectPoints: UMat, imagePoints: UMat, cameraMatrix: UMat, distCoeffs: UMat | None, rvec: UMat | None = ..., tvec: UMat | None = ..., inliers: UMat | None = ..., params: UsacParams = ...) -> tuple[bool, UMat, UMat, UMat, UMat]: ... + +@_typing.overload +def solvePnPRefineLM(objectPoints: cv2.typing.MatLike, imagePoints: cv2.typing.MatLike, cameraMatrix: cv2.typing.MatLike, distCoeffs: cv2.typing.MatLike | None, rvec: cv2.typing.MatLike, tvec: cv2.typing.MatLike, criteria: cv2.typing.TermCriteria = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def solvePnPRefineLM(objectPoints: UMat, imagePoints: UMat, cameraMatrix: UMat, distCoeffs: UMat | None, rvec: UMat, tvec: UMat, criteria: cv2.typing.TermCriteria = ...) -> tuple[UMat, UMat]: ... + +@_typing.overload +def solvePnPRefineVVS(objectPoints: cv2.typing.MatLike, imagePoints: cv2.typing.MatLike, cameraMatrix: cv2.typing.MatLike, distCoeffs: cv2.typing.MatLike | None, rvec: cv2.typing.MatLike, tvec: cv2.typing.MatLike, criteria: cv2.typing.TermCriteria = ..., VVSlambda: float = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def solvePnPRefineVVS(objectPoints: UMat, imagePoints: UMat, cameraMatrix: UMat, distCoeffs: UMat | None, rvec: UMat, tvec: UMat, criteria: cv2.typing.TermCriteria = ..., VVSlambda: float = ...) -> tuple[UMat, UMat]: ... + +@_typing.overload +def solvePoly(coeffs: cv2.typing.MatLike, roots: cv2.typing.MatLike | None = ..., maxIters: int = ...) -> tuple[float, cv2.typing.MatLike]: ... +@_typing.overload +def solvePoly(coeffs: UMat, roots: UMat | None = ..., maxIters: int = ...) -> tuple[float, UMat]: ... + +@_typing.overload +def sort(src: cv2.typing.MatLike, flags: int, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def sort(src: UMat, flags: int, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def sortIdx(src: cv2.typing.MatLike, flags: int, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def sortIdx(src: UMat, flags: int, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def spatialGradient(src: cv2.typing.MatLike, dx: cv2.typing.MatLike | None = ..., dy: cv2.typing.MatLike | None = ..., ksize: int = ..., borderType: int = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def spatialGradient(src: UMat, dx: UMat | None = ..., dy: UMat | None = ..., ksize: int = ..., borderType: int = ...) -> tuple[UMat, UMat]: ... + +@_typing.overload +def split(m: cv2.typing.MatLike, mv: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ... +@_typing.overload +def split(m: UMat, mv: _typing.Sequence[UMat] | None = ...) -> _typing.Sequence[UMat]: ... + +@_typing.overload +def sqrBoxFilter(src: cv2.typing.MatLike, ddepth: int, ksize: cv2.typing.Size, dst: cv2.typing.MatLike | None = ..., anchor: cv2.typing.Point = ..., normalize: bool = ..., borderType: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def sqrBoxFilter(src: UMat, ddepth: int, ksize: cv2.typing.Size, dst: UMat | None = ..., anchor: cv2.typing.Point = ..., normalize: bool = ..., borderType: int = ...) -> UMat: ... + +@_typing.overload +def sqrt(src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def sqrt(src: UMat, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def stackBlur(src: cv2.typing.MatLike, ksize: cv2.typing.Size, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def stackBlur(src: UMat, ksize: cv2.typing.Size, dst: UMat | None = ...) -> UMat: ... + +def startWindowThread() -> int: ... + +@_typing.overload +def stereoCalibrate(objectPoints: _typing.Sequence[cv2.typing.MatLike], imagePoints1: _typing.Sequence[cv2.typing.MatLike], imagePoints2: _typing.Sequence[cv2.typing.MatLike], cameraMatrix1: cv2.typing.MatLike, distCoeffs1: cv2.typing.MatLike, cameraMatrix2: cv2.typing.MatLike, distCoeffs2: cv2.typing.MatLike, imageSize: cv2.typing.Size, R: cv2.typing.MatLike | None = ..., T: cv2.typing.MatLike | None = ..., E: cv2.typing.MatLike | None = ..., F: cv2.typing.MatLike | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def stereoCalibrate(objectPoints: _typing.Sequence[UMat], imagePoints1: _typing.Sequence[UMat], imagePoints2: _typing.Sequence[UMat], cameraMatrix1: UMat, distCoeffs1: UMat, cameraMatrix2: UMat, distCoeffs2: UMat, imageSize: cv2.typing.Size, R: UMat | None = ..., T: UMat | None = ..., E: UMat | None = ..., F: UMat | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, UMat, UMat, UMat, UMat, UMat, UMat, UMat, UMat]: ... +@_typing.overload +def stereoCalibrate(objectPoints: _typing.Sequence[cv2.typing.MatLike], imagePoints1: _typing.Sequence[cv2.typing.MatLike], imagePoints2: _typing.Sequence[cv2.typing.MatLike], cameraMatrix1: cv2.typing.MatLike, distCoeffs1: cv2.typing.MatLike, cameraMatrix2: cv2.typing.MatLike, distCoeffs2: cv2.typing.MatLike, imageSize: cv2.typing.Size, R: cv2.typing.MatLike, T: cv2.typing.MatLike, E: cv2.typing.MatLike | None = ..., F: cv2.typing.MatLike | None = ..., perViewErrors: cv2.typing.MatLike | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def stereoCalibrate(objectPoints: _typing.Sequence[UMat], imagePoints1: _typing.Sequence[UMat], imagePoints2: _typing.Sequence[UMat], cameraMatrix1: UMat, distCoeffs1: UMat, cameraMatrix2: UMat, distCoeffs2: UMat, imageSize: cv2.typing.Size, R: UMat, T: UMat, E: UMat | None = ..., F: UMat | None = ..., perViewErrors: UMat | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, UMat, UMat, UMat, UMat, UMat, UMat, UMat, UMat, UMat]: ... + +@_typing.overload +def stereoCalibrateExtended(objectPoints: _typing.Sequence[cv2.typing.MatLike], imagePoints1: _typing.Sequence[cv2.typing.MatLike], imagePoints2: _typing.Sequence[cv2.typing.MatLike], cameraMatrix1: cv2.typing.MatLike, distCoeffs1: cv2.typing.MatLike, cameraMatrix2: cv2.typing.MatLike, distCoeffs2: cv2.typing.MatLike, imageSize: cv2.typing.Size, R: cv2.typing.MatLike, T: cv2.typing.MatLike, E: cv2.typing.MatLike | None = ..., F: cv2.typing.MatLike | None = ..., rvecs: _typing.Sequence[cv2.typing.MatLike] | None = ..., tvecs: _typing.Sequence[cv2.typing.MatLike] | None = ..., perViewErrors: cv2.typing.MatLike | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, _typing.Sequence[cv2.typing.MatLike], _typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike]: ... +@_typing.overload +def stereoCalibrateExtended(objectPoints: _typing.Sequence[UMat], imagePoints1: _typing.Sequence[UMat], imagePoints2: _typing.Sequence[UMat], cameraMatrix1: UMat, distCoeffs1: UMat, cameraMatrix2: UMat, distCoeffs2: UMat, imageSize: cv2.typing.Size, R: UMat, T: UMat, E: UMat | None = ..., F: UMat | None = ..., rvecs: _typing.Sequence[UMat] | None = ..., tvecs: _typing.Sequence[UMat] | None = ..., perViewErrors: UMat | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, UMat, UMat, UMat, UMat, UMat, UMat, UMat, UMat, _typing.Sequence[UMat], _typing.Sequence[UMat], UMat]: ... + +@_typing.overload +def stereoRectify(cameraMatrix1: cv2.typing.MatLike, distCoeffs1: cv2.typing.MatLike, cameraMatrix2: cv2.typing.MatLike, distCoeffs2: cv2.typing.MatLike, imageSize: cv2.typing.Size, R: cv2.typing.MatLike, T: cv2.typing.MatLike, R1: cv2.typing.MatLike | None = ..., R2: cv2.typing.MatLike | None = ..., P1: cv2.typing.MatLike | None = ..., P2: cv2.typing.MatLike | None = ..., Q: cv2.typing.MatLike | None = ..., flags: int = ..., alpha: float = ..., newImageSize: cv2.typing.Size = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.Rect, cv2.typing.Rect]: ... +@_typing.overload +def stereoRectify(cameraMatrix1: UMat, distCoeffs1: UMat, cameraMatrix2: UMat, distCoeffs2: UMat, imageSize: cv2.typing.Size, R: UMat, T: UMat, R1: UMat | None = ..., R2: UMat | None = ..., P1: UMat | None = ..., P2: UMat | None = ..., Q: UMat | None = ..., flags: int = ..., alpha: float = ..., newImageSize: cv2.typing.Size = ...) -> tuple[UMat, UMat, UMat, UMat, UMat, cv2.typing.Rect, cv2.typing.Rect]: ... + +@_typing.overload +def stereoRectifyUncalibrated(points1: cv2.typing.MatLike, points2: cv2.typing.MatLike, F: cv2.typing.MatLike, imgSize: cv2.typing.Size, H1: cv2.typing.MatLike | None = ..., H2: cv2.typing.MatLike | None = ..., threshold: float = ...) -> tuple[bool, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def stereoRectifyUncalibrated(points1: UMat, points2: UMat, F: UMat, imgSize: cv2.typing.Size, H1: UMat | None = ..., H2: UMat | None = ..., threshold: float = ...) -> tuple[bool, UMat, UMat]: ... + +@_typing.overload +def stylization(src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., sigma_s: float = ..., sigma_r: float = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def stylization(src: UMat, dst: UMat | None = ..., sigma_s: float = ..., sigma_r: float = ...) -> UMat: ... + +@_typing.overload +def subtract(src1: cv2.typing.MatLike, src2: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., mask: cv2.typing.MatLike | None = ..., dtype: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def subtract(src1: UMat, src2: UMat, dst: UMat | None = ..., mask: UMat | None = ..., dtype: int = ...) -> UMat: ... + +@_typing.overload +def sumElems(src: cv2.typing.MatLike) -> tuple[float, float, float, float]: ... +@_typing.overload +def sumElems(src: UMat) -> tuple[float, float, float, float]: ... + +@_typing.overload +def textureFlattening(src: cv2.typing.MatLike, mask: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., low_threshold: float = ..., high_threshold: float = ..., kernel_size: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def textureFlattening(src: UMat, mask: UMat, dst: UMat | None = ..., low_threshold: float = ..., high_threshold: float = ..., kernel_size: int = ...) -> UMat: ... + +@_typing.overload +def threshold(src: cv2.typing.MatLike, thresh: float, maxval: float, type: int, dst: cv2.typing.MatLike | None = ...) -> tuple[float, cv2.typing.MatLike]: ... +@_typing.overload +def threshold(src: UMat, thresh: float, maxval: float, type: int, dst: UMat | None = ...) -> tuple[float, UMat]: ... + +@_typing.overload +def thresholdWithMask(src: cv2.typing.MatLike, dst: cv2.typing.MatLike, mask: cv2.typing.MatLike, thresh: float, maxval: float, type: int) -> tuple[float, cv2.typing.MatLike]: ... +@_typing.overload +def thresholdWithMask(src: UMat, dst: UMat, mask: UMat, thresh: float, maxval: float, type: int) -> tuple[float, UMat]: ... + +@_typing.overload +def trace(mtx: cv2.typing.MatLike) -> tuple[float, float, float, float]: ... +@_typing.overload +def trace(mtx: UMat) -> tuple[float, float, float, float]: ... + +@_typing.overload +def transform(src: cv2.typing.MatLike, m: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def transform(src: UMat, m: UMat, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def transpose(src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def transpose(src: UMat, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def transposeND(src: cv2.typing.MatLike, order: _typing.Sequence[int], dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def transposeND(src: UMat, order: _typing.Sequence[int], dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def triangleRasterize(vertices: cv2.typing.MatLike, indices: cv2.typing.MatLike, colors: cv2.typing.MatLike, colorBuf: cv2.typing.MatLike, depthBuf: cv2.typing.MatLike, world2cam: cv2.typing.MatLike, fovY: float, zNear: float, zFar: float, settings: TriangleRasterizeSettings = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def triangleRasterize(vertices: UMat, indices: UMat, colors: UMat, colorBuf: UMat, depthBuf: UMat, world2cam: UMat, fovY: float, zNear: float, zFar: float, settings: TriangleRasterizeSettings = ...) -> tuple[UMat, UMat]: ... + +@_typing.overload +def triangleRasterizeColor(vertices: cv2.typing.MatLike, indices: cv2.typing.MatLike, colors: cv2.typing.MatLike, colorBuf: cv2.typing.MatLike, world2cam: cv2.typing.MatLike, fovY: float, zNear: float, zFar: float, settings: TriangleRasterizeSettings = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def triangleRasterizeColor(vertices: UMat, indices: UMat, colors: UMat, colorBuf: UMat, world2cam: UMat, fovY: float, zNear: float, zFar: float, settings: TriangleRasterizeSettings = ...) -> UMat: ... + +@_typing.overload +def triangleRasterizeDepth(vertices: cv2.typing.MatLike, indices: cv2.typing.MatLike, depthBuf: cv2.typing.MatLike, world2cam: cv2.typing.MatLike, fovY: float, zNear: float, zFar: float, settings: TriangleRasterizeSettings = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def triangleRasterizeDepth(vertices: UMat, indices: UMat, depthBuf: UMat, world2cam: UMat, fovY: float, zNear: float, zFar: float, settings: TriangleRasterizeSettings = ...) -> UMat: ... + +@_typing.overload +def triangulatePoints(projMatr1: cv2.typing.MatLike, projMatr2: cv2.typing.MatLike, projPoints1: cv2.typing.MatLike, projPoints2: cv2.typing.MatLike, points4D: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def triangulatePoints(projMatr1: UMat, projMatr2: UMat, projPoints1: UMat, projPoints2: UMat, points4D: UMat | None = ...) -> UMat: ... + +@_typing.overload +def undistort(src: cv2.typing.MatLike, cameraMatrix: cv2.typing.MatLike, distCoeffs: cv2.typing.MatLike | None, dst: cv2.typing.MatLike | None = ..., newCameraMatrix: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def undistort(src: UMat, cameraMatrix: UMat, distCoeffs: UMat | None, dst: UMat | None = ..., newCameraMatrix: UMat | None = ...) -> UMat: ... + +@_typing.overload +def undistortImagePoints(src: cv2.typing.MatLike, cameraMatrix: cv2.typing.MatLike, distCoeffs: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., arg1: cv2.typing.TermCriteria = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def undistortImagePoints(src: UMat, cameraMatrix: UMat, distCoeffs: UMat, dst: UMat | None = ..., arg1: cv2.typing.TermCriteria = ...) -> UMat: ... + +@_typing.overload +def undistortPoints(src: cv2.typing.MatLike, cameraMatrix: cv2.typing.MatLike, distCoeffs: cv2.typing.MatLike | None, dst: cv2.typing.MatLike | None = ..., R: cv2.typing.MatLike | None = ..., P: cv2.typing.MatLike | None = ..., criteria: cv2.typing.TermCriteria = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def undistortPoints(src: UMat, cameraMatrix: UMat, distCoeffs: UMat | None, dst: UMat | None = ..., R: UMat | None = ..., P: UMat | None = ..., criteria: cv2.typing.TermCriteria = ...) -> UMat: ... + +def useOptimized() -> bool: ... + +@_typing.overload +def validateDisparity(disparity: cv2.typing.MatLike, cost: cv2.typing.MatLike, minDisparity: int, numberOfDisparities: int, disp12MaxDisp: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def validateDisparity(disparity: UMat, cost: UMat, minDisparity: int, numberOfDisparities: int, disp12MaxDisp: int = ...) -> UMat: ... + +@_typing.overload +def vconcat(src: _typing.Sequence[cv2.typing.MatLike], dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def vconcat(src: _typing.Sequence[UMat], dst: UMat | None = ...) -> UMat: ... + +def waitKey(delay: int = ...) -> int: ... + +def waitKeyEx(delay: int = ...) -> int: ... + +@_typing.overload +def warpAffine(src: cv2.typing.MatLike, M: cv2.typing.MatLike, dsize: cv2.typing.Size, dst: cv2.typing.MatLike | None = ..., flags: int = ..., borderMode: int = ..., borderValue: cv2.typing.Scalar = ..., hint: AlgorithmHint = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def warpAffine(src: UMat, M: UMat, dsize: cv2.typing.Size, dst: UMat | None = ..., flags: int = ..., borderMode: int = ..., borderValue: cv2.typing.Scalar = ..., hint: AlgorithmHint = ...) -> UMat: ... + +@_typing.overload +def warpFrame(depth: cv2.typing.MatLike, image: cv2.typing.MatLike, mask: cv2.typing.MatLike, Rt: cv2.typing.MatLike, cameraMatrix: cv2.typing.MatLike, warpedDepth: cv2.typing.MatLike | None = ..., warpedImage: cv2.typing.MatLike | None = ..., warpedMask: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def warpFrame(depth: UMat, image: UMat, mask: UMat, Rt: UMat, cameraMatrix: UMat, warpedDepth: UMat | None = ..., warpedImage: UMat | None = ..., warpedMask: UMat | None = ...) -> tuple[UMat, UMat, UMat]: ... + +@_typing.overload +def warpPerspective(src: cv2.typing.MatLike, M: cv2.typing.MatLike, dsize: cv2.typing.Size, dst: cv2.typing.MatLike | None = ..., flags: int = ..., borderMode: int = ..., borderValue: cv2.typing.Scalar = ..., hint: AlgorithmHint = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def warpPerspective(src: UMat, M: UMat, dsize: cv2.typing.Size, dst: UMat | None = ..., flags: int = ..., borderMode: int = ..., borderValue: cv2.typing.Scalar = ..., hint: AlgorithmHint = ...) -> UMat: ... + +@_typing.overload +def warpPolar(src: cv2.typing.MatLike, dsize: cv2.typing.Size, center: cv2.typing.Point2f, maxRadius: float, flags: int, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def warpPolar(src: UMat, dsize: cv2.typing.Size, center: cv2.typing.Point2f, maxRadius: float, flags: int, dst: UMat | None = ...) -> UMat: ... + +@_typing.overload +def watershed(image: cv2.typing.MatLike, markers: cv2.typing.MatLike) -> cv2.typing.MatLike: ... +@_typing.overload +def watershed(image: UMat, markers: UMat) -> UMat: ... + +@_typing.overload +def writeOpticalFlow(path: str, flow: cv2.typing.MatLike) -> bool: ... +@_typing.overload +def writeOpticalFlow(path: str, flow: UMat) -> bool: ... + +def createTrackbar(trackbarName: str, windowName: str, value: int, count: int, onChange: _typing.Callable[[int], None]) -> None: ... + +def createButton(buttonName: str, onChange: _typing.Callable[[tuple[int] | tuple[int, _typing.Any]], None], userData: _typing.Any | None = ..., buttonType: int = ..., initialButtonState: int = ...) -> None: ... + +def setMouseCallback(windowName: str, onMouse: _typing.Callable[[int, int, int, int, _typing.Any | None], None], param: _typing.Any | None = ...) -> None: ... + +def CV_8UC(channels: int) -> int: ... + +def CV_8SC(channels: int) -> int: ... + +def CV_16UC(channels: int) -> int: ... + +def CV_16SC(channels: int) -> int: ... + +def CV_32UC(channels: int) -> int: ... + +def CV_32SC(channels: int) -> int: ... + +def CV_64UC(channels: int) -> int: ... + +def CV_64SC(channels: int) -> int: ... + +def CV_32FC(channels: int) -> int: ... + +def CV_64FC(channels: int) -> int: ... + +def CV_16FC(channels: int) -> int: ... + +def CV_16BFCV_BoolC(channels: int) -> int: ... + +def CV_MAKETYPE(depth: int, channels: int) -> int: ... + +def dnn_registerLayer(layerTypeName: str, layerClass: _typing.Type[cv2.dnn.LayerProtocol]) -> None: ... + +def dnn_unregisterLayer(layerTypeName: str) -> None: ... + +def redirectError(onError: _typing.Callable[[int, str, str, str, int], None] | None) -> None: ... + + diff --git a/hug/lib/python3.12/site-packages/cv2/__pycache__/__init__.cpython-312.pyc b/hug/lib/python3.12/site-packages/cv2/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4d88c2c9af74e8b6d1d5742578fd1b591b1e2fcb Binary files /dev/null and b/hug/lib/python3.12/site-packages/cv2/__pycache__/__init__.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cv2/__pycache__/config-3.cpython-312.pyc b/hug/lib/python3.12/site-packages/cv2/__pycache__/config-3.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6920f7aa26e8d4bc21db29905d0dae39eda0f028 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cv2/__pycache__/config-3.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cv2/__pycache__/config.cpython-312.pyc b/hug/lib/python3.12/site-packages/cv2/__pycache__/config.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3b1cf681591cf30543d218c552d7889265f825c9 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cv2/__pycache__/config.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cv2/__pycache__/load_config_py2.cpython-312.pyc b/hug/lib/python3.12/site-packages/cv2/__pycache__/load_config_py2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6d2f58dbed0bb9778a4ab2e33cbe7668f24aafe7 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cv2/__pycache__/load_config_py2.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cv2/__pycache__/load_config_py3.cpython-312.pyc b/hug/lib/python3.12/site-packages/cv2/__pycache__/load_config_py3.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0e760f8d8a2bc4fe0ac97d8980cc0a737704c0b2 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cv2/__pycache__/load_config_py3.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cv2/__pycache__/version.cpython-312.pyc b/hug/lib/python3.12/site-packages/cv2/__pycache__/version.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f992cdc5fc86d065a22766dd2fb1dbd49afd8a85 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cv2/__pycache__/version.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cv2/aruco/__init__.pyi b/hug/lib/python3.12/site-packages/cv2/aruco/__init__.pyi new file mode 100644 index 0000000000000000000000000000000000000000..365a9a17fd25f498f8a1f3b760c025a947cdc3dd --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/aruco/__init__.pyi @@ -0,0 +1,327 @@ +__all__: list[str] = [] + +import cv2 +import cv2.typing +import typing as _typing + + +# Enumerations +CORNER_REFINE_NONE: int +CORNER_REFINE_SUBPIX: int +CORNER_REFINE_CONTOUR: int +CORNER_REFINE_APRILTAG: int +CornerRefineMethod = int +"""One of [CORNER_REFINE_NONE, CORNER_REFINE_SUBPIX, CORNER_REFINE_CONTOUR, CORNER_REFINE_APRILTAG]""" + +DICT_4X4_50: int +DICT_4X4_100: int +DICT_4X4_250: int +DICT_4X4_1000: int +DICT_5X5_50: int +DICT_5X5_100: int +DICT_5X5_250: int +DICT_5X5_1000: int +DICT_6X6_50: int +DICT_6X6_100: int +DICT_6X6_250: int +DICT_6X6_1000: int +DICT_7X7_50: int +DICT_7X7_100: int +DICT_7X7_250: int +DICT_7X7_1000: int +DICT_ARUCO_ORIGINAL: int +DICT_APRILTAG_16h5: int +DICT_APRILTAG_16H5: int +DICT_APRILTAG_25h9: int +DICT_APRILTAG_25H9: int +DICT_APRILTAG_36h10: int +DICT_APRILTAG_36H10: int +DICT_APRILTAG_36h11: int +DICT_APRILTAG_36H11: int +DICT_ARUCO_MIP_36h12: int +DICT_ARUCO_MIP_36H12: int +PredefinedDictionaryType = int +"""One of [DICT_4X4_50, DICT_4X4_100, DICT_4X4_250, DICT_4X4_1000, DICT_5X5_50, DICT_5X5_100, DICT_5X5_250, DICT_5X5_1000, DICT_6X6_50, DICT_6X6_100, DICT_6X6_250, DICT_6X6_1000, DICT_7X7_50, DICT_7X7_100, DICT_7X7_250, DICT_7X7_1000, DICT_ARUCO_ORIGINAL, DICT_APRILTAG_16h5, DICT_APRILTAG_16H5, DICT_APRILTAG_25h9, DICT_APRILTAG_25H9, DICT_APRILTAG_36h10, DICT_APRILTAG_36H10, DICT_APRILTAG_36h11, DICT_APRILTAG_36H11, DICT_ARUCO_MIP_36h12, DICT_ARUCO_MIP_36H12]""" + + + +# Classes +class Board: + # Functions + @_typing.overload + def __init__(self, objPoints: _typing.Sequence[cv2.typing.MatLike], dictionary: Dictionary, ids: cv2.typing.MatLike) -> None: ... + @_typing.overload + def __init__(self, objPoints: _typing.Sequence[cv2.UMat], dictionary: Dictionary, ids: cv2.UMat) -> None: ... + + def getDictionary(self) -> Dictionary: ... + + def getObjPoints(self) -> _typing.Sequence[_typing.Sequence[cv2.typing.Point3f]]: ... + + def getIds(self) -> _typing.Sequence[int]: ... + + def getRightBottomCorner(self) -> cv2.typing.Point3f: ... + + @_typing.overload + def matchImagePoints(self, detectedCorners: _typing.Sequence[cv2.typing.MatLike], detectedIds: cv2.typing.MatLike, objPoints: cv2.typing.MatLike | None = ..., imgPoints: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... + @_typing.overload + def matchImagePoints(self, detectedCorners: _typing.Sequence[cv2.UMat], detectedIds: cv2.UMat, objPoints: cv2.UMat | None = ..., imgPoints: cv2.UMat | None = ...) -> tuple[cv2.UMat, cv2.UMat]: ... + + @_typing.overload + def generateImage(self, outSize: cv2.typing.Size, img: cv2.typing.MatLike | None = ..., marginSize: int = ..., borderBits: int = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def generateImage(self, outSize: cv2.typing.Size, img: cv2.UMat | None = ..., marginSize: int = ..., borderBits: int = ...) -> cv2.UMat: ... + + +class GridBoard(Board): + # Functions + @_typing.overload + def __init__(self, size: cv2.typing.Size, markerLength: float, markerSeparation: float, dictionary: Dictionary, ids: cv2.typing.MatLike | None = ...) -> None: ... + @_typing.overload + def __init__(self, size: cv2.typing.Size, markerLength: float, markerSeparation: float, dictionary: Dictionary, ids: cv2.UMat | None = ...) -> None: ... + + def getGridSize(self) -> cv2.typing.Size: ... + + def getMarkerLength(self) -> float: ... + + def getMarkerSeparation(self) -> float: ... + + +class CharucoBoard(Board): + # Functions + @_typing.overload + def __init__(self, size: cv2.typing.Size, squareLength: float, markerLength: float, dictionary: Dictionary, ids: cv2.typing.MatLike | None = ...) -> None: ... + @_typing.overload + def __init__(self, size: cv2.typing.Size, squareLength: float, markerLength: float, dictionary: Dictionary, ids: cv2.UMat | None = ...) -> None: ... + + def setLegacyPattern(self, legacyPattern: bool) -> None: ... + + def getLegacyPattern(self) -> bool: ... + + def getChessboardSize(self) -> cv2.typing.Size: ... + + def getSquareLength(self) -> float: ... + + def getMarkerLength(self) -> float: ... + + def getChessboardCorners(self) -> _typing.Sequence[cv2.typing.Point3f]: ... + + @_typing.overload + def checkCharucoCornersCollinear(self, charucoIds: cv2.typing.MatLike) -> bool: ... + @_typing.overload + def checkCharucoCornersCollinear(self, charucoIds: cv2.UMat) -> bool: ... + + +class DetectorParameters: + adaptiveThreshWinSizeMin: int + adaptiveThreshWinSizeMax: int + adaptiveThreshWinSizeStep: int + adaptiveThreshConstant: float + minMarkerPerimeterRate: float + maxMarkerPerimeterRate: float + polygonalApproxAccuracyRate: float + minCornerDistanceRate: float + minDistanceToBorder: int + minMarkerDistanceRate: float + minGroupDistance: float + cornerRefinementMethod: int + cornerRefinementWinSize: int + relativeCornerRefinmentWinSize: float + cornerRefinementMaxIterations: int + cornerRefinementMinAccuracy: float + markerBorderBits: int + perspectiveRemovePixelPerCell: int + perspectiveRemoveIgnoredMarginPerCell: float + maxErroneousBitsInBorderRate: float + minOtsuStdDev: float + errorCorrectionRate: float + aprilTagQuadDecimate: float + aprilTagQuadSigma: float + aprilTagMinClusterPixels: int + aprilTagMaxNmaxima: int + aprilTagCriticalRad: float + aprilTagMaxLineFitMse: float + aprilTagMinWhiteBlackDiff: int + aprilTagDeglitch: int + detectInvertedMarker: bool + useAruco3Detection: bool + minSideLengthCanonicalImg: int + minMarkerLengthRatioOriginalImg: float + validBitIdThreshold: float + + # Functions + def __init__(self) -> None: ... + + def readDetectorParameters(self, fn: cv2.FileNode) -> bool: ... + + def writeDetectorParameters(self, fs: cv2.FileStorage, name: str = ...) -> bool: ... + + +class RefineParameters: + minRepDistance: float + errorCorrectionRate: float + checkAllOrders: bool + + # Functions + def __init__(self, minRepDistance: float = ..., errorCorrectionRate: float = ..., checkAllOrders: bool = ...) -> None: ... + + def readRefineParameters(self, fn: cv2.FileNode) -> bool: ... + + def writeRefineParameters(self, fs: cv2.FileStorage, name: str = ...) -> bool: ... + + +class ArucoDetector(cv2.Algorithm): + # Functions + @_typing.overload + def __init__(self, dictionary: Dictionary = ..., detectorParams: DetectorParameters = ..., refineParams: RefineParameters = ...) -> None: ... + @_typing.overload + def __init__(self, dictionaries: _typing.Sequence[Dictionary], detectorParams: DetectorParameters = ..., refineParams: RefineParameters = ...) -> None: ... + + @_typing.overload + def detectMarkers(self, image: cv2.typing.MatLike, corners: _typing.Sequence[cv2.typing.MatLike] | None = ..., ids: cv2.typing.MatLike | None = ..., rejectedImgPoints: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> tuple[_typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike, _typing.Sequence[cv2.typing.MatLike]]: ... + @_typing.overload + def detectMarkers(self, image: cv2.UMat, corners: _typing.Sequence[cv2.UMat] | None = ..., ids: cv2.UMat | None = ..., rejectedImgPoints: _typing.Sequence[cv2.UMat] | None = ...) -> tuple[_typing.Sequence[cv2.UMat], cv2.UMat, _typing.Sequence[cv2.UMat]]: ... + + @_typing.overload + def detectMarkersWithConfidence(self, image: cv2.typing.MatLike, corners: _typing.Sequence[cv2.typing.MatLike] | None = ..., ids: cv2.typing.MatLike | None = ..., markersConfidence: cv2.typing.MatLike | None = ..., rejectedImgPoints: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> tuple[_typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike, cv2.typing.MatLike, _typing.Sequence[cv2.typing.MatLike]]: ... + @_typing.overload + def detectMarkersWithConfidence(self, image: cv2.UMat, corners: _typing.Sequence[cv2.UMat] | None = ..., ids: cv2.UMat | None = ..., markersConfidence: cv2.UMat | None = ..., rejectedImgPoints: _typing.Sequence[cv2.UMat] | None = ...) -> tuple[_typing.Sequence[cv2.UMat], cv2.UMat, cv2.UMat, _typing.Sequence[cv2.UMat]]: ... + + @_typing.overload + def refineDetectedMarkers(self, image: cv2.typing.MatLike, board: Board, detectedCorners: _typing.Sequence[cv2.typing.MatLike], detectedIds: cv2.typing.MatLike, rejectedCorners: _typing.Sequence[cv2.typing.MatLike], cameraMatrix: cv2.typing.MatLike | None = ..., distCoeffs: cv2.typing.MatLike | None = ..., recoveredIdxs: cv2.typing.MatLike | None = ...) -> tuple[_typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike, _typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike]: ... + @_typing.overload + def refineDetectedMarkers(self, image: cv2.UMat, board: Board, detectedCorners: _typing.Sequence[cv2.UMat], detectedIds: cv2.UMat, rejectedCorners: _typing.Sequence[cv2.UMat], cameraMatrix: cv2.UMat | None = ..., distCoeffs: cv2.UMat | None = ..., recoveredIdxs: cv2.UMat | None = ...) -> tuple[_typing.Sequence[cv2.UMat], cv2.UMat, _typing.Sequence[cv2.UMat], cv2.UMat]: ... + + @_typing.overload + def detectMarkersMultiDict(self, image: cv2.typing.MatLike, corners: _typing.Sequence[cv2.typing.MatLike] | None = ..., ids: cv2.typing.MatLike | None = ..., rejectedImgPoints: _typing.Sequence[cv2.typing.MatLike] | None = ..., dictIndices: cv2.typing.MatLike | None = ...) -> tuple[_typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike, _typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike]: ... + @_typing.overload + def detectMarkersMultiDict(self, image: cv2.UMat, corners: _typing.Sequence[cv2.UMat] | None = ..., ids: cv2.UMat | None = ..., rejectedImgPoints: _typing.Sequence[cv2.UMat] | None = ..., dictIndices: cv2.UMat | None = ...) -> tuple[_typing.Sequence[cv2.UMat], cv2.UMat, _typing.Sequence[cv2.UMat], cv2.UMat]: ... + + def getDictionary(self) -> Dictionary: ... + + def setDictionary(self, dictionary: Dictionary) -> None: ... + + def getDictionaries(self) -> _typing.Sequence[Dictionary]: ... + + def setDictionaries(self, dictionaries: _typing.Sequence[Dictionary]) -> None: ... + + def getDetectorParameters(self) -> DetectorParameters: ... + + def setDetectorParameters(self, detectorParameters: DetectorParameters) -> None: ... + + def getRefineParameters(self) -> RefineParameters: ... + + def setRefineParameters(self, refineParameters: RefineParameters) -> None: ... + + def write(self, fs: cv2.FileStorage, name: str) -> None: ... + + def read(self, fn: cv2.FileNode) -> None: ... + + +class Dictionary: + bytesList: cv2.typing.MatLike + markerSize: int + maxCorrectionBits: int + + # Functions + @_typing.overload + def __init__(self) -> None: ... + @_typing.overload + def __init__(self, bytesList: cv2.typing.MatLike, _markerSize: int, maxcorr: int = ...) -> None: ... + + def readDictionary(self, fn: cv2.FileNode) -> bool: ... + + def writeDictionary(self, fs: cv2.FileStorage, name: str = ...) -> None: ... + + @_typing.overload + def identify(self, onlyBits: cv2.typing.MatLike, maxCorrectionRate: float) -> tuple[bool, int, int]: ... + @_typing.overload + def identify(self, onlyCellPixelRatio: cv2.typing.MatLike, maxCorrectionRate: float, validBitIdThreshold: float) -> tuple[bool, int, int]: ... + + @_typing.overload + def getDistanceToId(self, bits: cv2.typing.MatLike, id: int, allRotations: bool = ...) -> int: ... + @_typing.overload + def getDistanceToId(self, bits: cv2.UMat, id: int, allRotations: bool = ...) -> int: ... + + @_typing.overload + def generateImageMarker(self, id: int, sidePixels: int, _img: cv2.typing.MatLike | None = ..., borderBits: int = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def generateImageMarker(self, id: int, sidePixels: int, _img: cv2.UMat | None = ..., borderBits: int = ...) -> cv2.UMat: ... + + @staticmethod + def getByteListFromBits(bits: cv2.typing.MatLike) -> cv2.typing.MatLike: ... + + @staticmethod + def getBitsFromByteList(byteList: cv2.typing.MatLike, markerSize: int, rotationId: int = ...) -> cv2.typing.MatLike: ... + + def getMarkerBits(self, markerId: int, rotationId: int = ...) -> cv2.typing.MatLike: ... + + +class CharucoParameters: + cameraMatrix: cv2.typing.MatLike + distCoeffs: cv2.typing.MatLike + minMarkers: int + tryRefineMarkers: bool + checkMarkers: bool + + # Functions + def __init__(self) -> None: ... + + +class CharucoDetector(cv2.Algorithm): + # Functions + def __init__(self, board: CharucoBoard, charucoParams: CharucoParameters = ..., detectorParams: DetectorParameters = ..., refineParams: RefineParameters = ...) -> None: ... + + def getBoard(self) -> CharucoBoard: ... + + def setBoard(self, board: CharucoBoard) -> None: ... + + def getCharucoParameters(self) -> CharucoParameters: ... + + def setCharucoParameters(self, charucoParameters: CharucoParameters) -> None: ... + + def getDetectorParameters(self) -> DetectorParameters: ... + + def setDetectorParameters(self, detectorParameters: DetectorParameters) -> None: ... + + def getRefineParameters(self) -> RefineParameters: ... + + def setRefineParameters(self, refineParameters: RefineParameters) -> None: ... + + @_typing.overload + def detectBoard(self, image: cv2.typing.MatLike, charucoCorners: cv2.typing.MatLike | None = ..., charucoIds: cv2.typing.MatLike | None = ..., markerCorners: _typing.Sequence[cv2.typing.MatLike] | None = ..., markerIds: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike, _typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike]: ... + @_typing.overload + def detectBoard(self, image: cv2.UMat, charucoCorners: cv2.UMat | None = ..., charucoIds: cv2.UMat | None = ..., markerCorners: _typing.Sequence[cv2.UMat] | None = ..., markerIds: cv2.UMat | None = ...) -> tuple[cv2.UMat, cv2.UMat, _typing.Sequence[cv2.UMat], cv2.UMat]: ... + + @_typing.overload + def detectDiamonds(self, image: cv2.typing.MatLike, diamondCorners: _typing.Sequence[cv2.typing.MatLike] | None = ..., diamondIds: cv2.typing.MatLike | None = ..., markerCorners: _typing.Sequence[cv2.typing.MatLike] | None = ..., markerIds: cv2.typing.MatLike | None = ...) -> tuple[_typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike, _typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike]: ... + @_typing.overload + def detectDiamonds(self, image: cv2.UMat, diamondCorners: _typing.Sequence[cv2.UMat] | None = ..., diamondIds: cv2.UMat | None = ..., markerCorners: _typing.Sequence[cv2.UMat] | None = ..., markerIds: cv2.UMat | None = ...) -> tuple[_typing.Sequence[cv2.UMat], cv2.UMat, _typing.Sequence[cv2.UMat], cv2.UMat]: ... + + + +# Functions +@_typing.overload +def drawDetectedCornersCharuco(image: cv2.typing.MatLike, charucoCorners: cv2.typing.MatLike, charucoIds: cv2.typing.MatLike | None = ..., cornerColor: cv2.typing.Scalar = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def drawDetectedCornersCharuco(image: cv2.UMat, charucoCorners: cv2.UMat, charucoIds: cv2.UMat | None = ..., cornerColor: cv2.typing.Scalar = ...) -> cv2.UMat: ... + +@_typing.overload +def drawDetectedDiamonds(image: cv2.typing.MatLike, diamondCorners: _typing.Sequence[cv2.typing.MatLike], diamondIds: cv2.typing.MatLike | None = ..., borderColor: cv2.typing.Scalar = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def drawDetectedDiamonds(image: cv2.UMat, diamondCorners: _typing.Sequence[cv2.UMat], diamondIds: cv2.UMat | None = ..., borderColor: cv2.typing.Scalar = ...) -> cv2.UMat: ... + +@_typing.overload +def drawDetectedMarkers(image: cv2.typing.MatLike, corners: _typing.Sequence[cv2.typing.MatLike], ids: cv2.typing.MatLike | None = ..., borderColor: cv2.typing.Scalar = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def drawDetectedMarkers(image: cv2.UMat, corners: _typing.Sequence[cv2.UMat], ids: cv2.UMat | None = ..., borderColor: cv2.typing.Scalar = ...) -> cv2.UMat: ... + +def extendDictionary(nMarkers: int, markerSize: int, baseDictionary: Dictionary = ..., randomSeed: int = ...) -> Dictionary: ... + +@_typing.overload +def generateImageMarker(dictionary: Dictionary, id: int, sidePixels: int, img: cv2.typing.MatLike | None = ..., borderBits: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def generateImageMarker(dictionary: Dictionary, id: int, sidePixels: int, img: cv2.UMat | None = ..., borderBits: int = ...) -> cv2.UMat: ... + +def getPredefinedDictionary(dict: int) -> Dictionary: ... + + diff --git a/hug/lib/python3.12/site-packages/cv2/barcode/__init__.pyi b/hug/lib/python3.12/site-packages/cv2/barcode/__init__.pyi new file mode 100644 index 0000000000000000000000000000000000000000..ef2719e03ba8912514f6fb471dc6ea6980babc8d --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/barcode/__init__.pyi @@ -0,0 +1,40 @@ +__all__: list[str] = [] + +import cv2 +import cv2.typing +import os +import typing as _typing + + +# Classes +class BarcodeDetector(cv2.GraphicalCodeDetector): + # Functions + @_typing.overload + def __init__(self) -> None: ... + @_typing.overload + def __init__(self, super_resolution_model_path: str | os.PathLike[str]) -> None: ... + + @_typing.overload + def decodeWithType(self, img: cv2.typing.MatLike, points: cv2.typing.MatLike) -> tuple[bool, _typing.Sequence[str], _typing.Sequence[str]]: ... + @_typing.overload + def decodeWithType(self, img: cv2.UMat, points: cv2.UMat) -> tuple[bool, _typing.Sequence[str], _typing.Sequence[str]]: ... + + @_typing.overload + def detectAndDecodeWithType(self, img: cv2.typing.MatLike, points: cv2.typing.MatLike | None = ...) -> tuple[bool, _typing.Sequence[str], _typing.Sequence[str], cv2.typing.MatLike]: ... + @_typing.overload + def detectAndDecodeWithType(self, img: cv2.UMat, points: cv2.UMat | None = ...) -> tuple[bool, _typing.Sequence[str], _typing.Sequence[str], cv2.UMat]: ... + + def getDownsamplingThreshold(self) -> float: ... + + def setDownsamplingThreshold(self, thresh: float) -> BarcodeDetector: ... + + def getDetectorScales(self) -> _typing.Sequence[float]: ... + + def setDetectorScales(self, sizes: _typing.Sequence[float]) -> BarcodeDetector: ... + + def getGradientThreshold(self) -> float: ... + + def setGradientThreshold(self, thresh: float) -> BarcodeDetector: ... + + + diff --git a/hug/lib/python3.12/site-packages/cv2/ccm/__init__.pyi b/hug/lib/python3.12/site-packages/cv2/ccm/__init__.pyi new file mode 100644 index 0000000000000000000000000000000000000000..1f83a79d5f5c1ca8e9f5439a4c15e5885b9b506a --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/ccm/__init__.pyi @@ -0,0 +1,165 @@ +__all__: list[str] = [] + +import cv2 +import cv2.typing +import typing as _typing + + +# Enumerations +CCM_LINEAR: int +CCM_AFFINE: int +CcmType = int +"""One of [CCM_LINEAR, CCM_AFFINE]""" + +INITIAL_METHOD_WHITE_BALANCE: int +INITIAL_METHOD_LEAST_SQUARE: int +InitialMethodType = int +"""One of [INITIAL_METHOD_WHITE_BALANCE, INITIAL_METHOD_LEAST_SQUARE]""" + +COLORCHECKER_MACBETH: int +COLORCHECKER_VINYL: int +COLORCHECKER_DIGITAL_SG: int +ColorCheckerType = int +"""One of [COLORCHECKER_MACBETH, COLORCHECKER_VINYL, COLORCHECKER_DIGITAL_SG]""" + +COLOR_SPACE_SRGB: int +COLOR_SPACE_SRGBL: int +COLOR_SPACE_ADOBE_RGB: int +COLOR_SPACE_ADOBE_RGBL: int +COLOR_SPACE_WIDE_GAMUT_RGB: int +COLOR_SPACE_WIDE_GAMUT_RGBL: int +COLOR_SPACE_PRO_PHOTO_RGB: int +COLOR_SPACE_PRO_PHOTO_RGBL: int +COLOR_SPACE_DCI_P3_RGB: int +COLOR_SPACE_DCI_P3_RGBL: int +COLOR_SPACE_APPLE_RGB: int +COLOR_SPACE_APPLE_RGBL: int +COLOR_SPACE_REC_709_RGB: int +COLOR_SPACE_REC_709_RGBL: int +COLOR_SPACE_REC_2020_RGB: int +COLOR_SPACE_REC_2020_RGBL: int +COLOR_SPACE_XYZ_D65_2: int +COLOR_SPACE_XYZ_D50_2: int +COLOR_SPACE_XYZ_D65_10: int +COLOR_SPACE_XYZ_D50_10: int +COLOR_SPACE_XYZ_A_2: int +COLOR_SPACE_XYZ_A_10: int +COLOR_SPACE_XYZ_D55_2: int +COLOR_SPACE_XYZ_D55_10: int +COLOR_SPACE_XYZ_D75_2: int +COLOR_SPACE_XYZ_D75_10: int +COLOR_SPACE_XYZ_E_2: int +COLOR_SPACE_XYZ_E_10: int +COLOR_SPACE_LAB_D65_2: int +COLOR_SPACE_LAB_D50_2: int +COLOR_SPACE_LAB_D65_10: int +COLOR_SPACE_LAB_D50_10: int +COLOR_SPACE_LAB_A_2: int +COLOR_SPACE_LAB_A_10: int +COLOR_SPACE_LAB_D55_2: int +COLOR_SPACE_LAB_D55_10: int +COLOR_SPACE_LAB_D75_2: int +COLOR_SPACE_LAB_D75_10: int +COLOR_SPACE_LAB_E_2: int +COLOR_SPACE_LAB_E_10: int +ColorSpace = int +"""One of [COLOR_SPACE_SRGB, COLOR_SPACE_SRGBL, COLOR_SPACE_ADOBE_RGB, COLOR_SPACE_ADOBE_RGBL, COLOR_SPACE_WIDE_GAMUT_RGB, COLOR_SPACE_WIDE_GAMUT_RGBL, COLOR_SPACE_PRO_PHOTO_RGB, COLOR_SPACE_PRO_PHOTO_RGBL, COLOR_SPACE_DCI_P3_RGB, COLOR_SPACE_DCI_P3_RGBL, COLOR_SPACE_APPLE_RGB, COLOR_SPACE_APPLE_RGBL, COLOR_SPACE_REC_709_RGB, COLOR_SPACE_REC_709_RGBL, COLOR_SPACE_REC_2020_RGB, COLOR_SPACE_REC_2020_RGBL, COLOR_SPACE_XYZ_D65_2, COLOR_SPACE_XYZ_D50_2, COLOR_SPACE_XYZ_D65_10, COLOR_SPACE_XYZ_D50_10, COLOR_SPACE_XYZ_A_2, COLOR_SPACE_XYZ_A_10, COLOR_SPACE_XYZ_D55_2, COLOR_SPACE_XYZ_D55_10, COLOR_SPACE_XYZ_D75_2, COLOR_SPACE_XYZ_D75_10, COLOR_SPACE_XYZ_E_2, COLOR_SPACE_XYZ_E_10, COLOR_SPACE_LAB_D65_2, COLOR_SPACE_LAB_D50_2, COLOR_SPACE_LAB_D65_10, COLOR_SPACE_LAB_D50_10, COLOR_SPACE_LAB_A_2, COLOR_SPACE_LAB_A_10, COLOR_SPACE_LAB_D55_2, COLOR_SPACE_LAB_D55_10, COLOR_SPACE_LAB_D75_2, COLOR_SPACE_LAB_D75_10, COLOR_SPACE_LAB_E_2, COLOR_SPACE_LAB_E_10]""" + +LINEARIZATION_IDENTITY: int +LINEARIZATION_GAMMA: int +LINEARIZATION_COLORPOLYFIT: int +LINEARIZATION_COLORLOGPOLYFIT: int +LINEARIZATION_GRAYPOLYFIT: int +LINEARIZATION_GRAYLOGPOLYFIT: int +LinearizationType = int +"""One of [LINEARIZATION_IDENTITY, LINEARIZATION_GAMMA, LINEARIZATION_COLORPOLYFIT, LINEARIZATION_COLORLOGPOLYFIT, LINEARIZATION_GRAYPOLYFIT, LINEARIZATION_GRAYLOGPOLYFIT]""" + +DISTANCE_CIE76: int +DISTANCE_CIE94_GRAPHIC_ARTS: int +DISTANCE_CIE94_TEXTILES: int +DISTANCE_CIE2000: int +DISTANCE_CMC_1TO1: int +DISTANCE_CMC_2TO1: int +DISTANCE_RGB: int +DISTANCE_RGBL: int +DistanceType = int +"""One of [DISTANCE_CIE76, DISTANCE_CIE94_GRAPHIC_ARTS, DISTANCE_CIE94_TEXTILES, DISTANCE_CIE2000, DISTANCE_CMC_1TO1, DISTANCE_CMC_2TO1, DISTANCE_RGB, DISTANCE_RGBL]""" + + + +# Classes +class ColorCorrectionModel: + # Functions + @_typing.overload + def __init__(self) -> None: ... + @_typing.overload + def __init__(self, src: cv2.typing.MatLike, constColor: int) -> None: ... + @_typing.overload + def __init__(self, src: cv2.UMat, constColor: int) -> None: ... + @_typing.overload + def __init__(self, src: cv2.typing.MatLike, colors: cv2.typing.MatLike, refColorSpace: ColorSpace) -> None: ... + @_typing.overload + def __init__(self, src: cv2.UMat, colors: cv2.UMat, refColorSpace: ColorSpace) -> None: ... + @_typing.overload + def __init__(self, src: cv2.typing.MatLike, colors: cv2.typing.MatLike, refColorSpace: ColorSpace, coloredPatchesMask: cv2.typing.MatLike) -> None: ... + @_typing.overload + def __init__(self, src: cv2.UMat, colors: cv2.UMat, refColorSpace: ColorSpace, coloredPatchesMask: cv2.UMat) -> None: ... + + def setColorSpace(self, cs: ColorSpace) -> None: ... + + def setCcmType(self, ccmType: CcmType) -> None: ... + + def setDistance(self, distance: DistanceType) -> None: ... + + def setLinearization(self, linearizationType: LinearizationType) -> None: ... + + def setLinearizationGamma(self, gamma: float) -> None: ... + + def setLinearizationDegree(self, deg: int) -> None: ... + + def setSaturatedThreshold(self, lower: float, upper: float) -> None: ... + + def setWeightsList(self, weightsList: cv2.typing.MatLike) -> None: ... + + def setWeightCoeff(self, weightsCoeff: float) -> None: ... + + def setInitialMethod(self, initialMethodType: InitialMethodType) -> None: ... + + def setMaxCount(self, maxCount: int) -> None: ... + + def setEpsilon(self, epsilon: float) -> None: ... + + def setRGB(self, rgb: bool) -> None: ... + + def compute(self) -> cv2.typing.MatLike: ... + + def getColorCorrectionMatrix(self) -> cv2.typing.MatLike: ... + + def getLoss(self) -> float: ... + + def getSrcLinearRGB(self) -> cv2.typing.MatLike: ... + + def getRefLinearRGB(self) -> cv2.typing.MatLike: ... + + def getMask(self) -> cv2.typing.MatLike: ... + + def getWeights(self) -> cv2.typing.MatLike: ... + + @_typing.overload + def correctImage(self, src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., islinear: bool = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def correctImage(self, src: cv2.UMat, dst: cv2.UMat | None = ..., islinear: bool = ...) -> cv2.UMat: ... + + def write(self, fs: cv2.FileStorage) -> None: ... + + def read(self, node: cv2.FileNode) -> None: ... + + + +# Functions +@_typing.overload +def gammaCorrection(src: cv2.typing.MatLike, gamma: float, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def gammaCorrection(src: cv2.UMat, gamma: float, dst: cv2.UMat | None = ...) -> cv2.UMat: ... + + diff --git a/hug/lib/python3.12/site-packages/cv2/config-3.py b/hug/lib/python3.12/site-packages/cv2/config-3.py new file mode 100644 index 0000000000000000000000000000000000000000..587a42bfacd8401281a51fe5dbc8ea44f4e156d5 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/config-3.py @@ -0,0 +1,24 @@ +PYTHON_EXTENSIONS_PATHS = [ + LOADER_DIR +] + PYTHON_EXTENSIONS_PATHS + +ci_and_not_headless = False + +try: + from .version import ci_build, headless + + ci_and_not_headless = ci_build and not headless +except: + pass + +# the Qt plugin is included currently only in the pre-built wheels +if sys.platform.startswith("linux") and ci_and_not_headless: + os.environ["QT_QPA_PLATFORM_PLUGIN_PATH"] = os.path.join( + os.path.dirname(os.path.abspath(__file__)), "qt", "plugins" + ) + +# Qt will throw warning on Linux if fonts are not found +if sys.platform.startswith("linux") and ci_and_not_headless: + os.environ["QT_QPA_FONTDIR"] = os.path.join( + os.path.dirname(os.path.abspath(__file__)), "qt", "fonts" + ) diff --git a/hug/lib/python3.12/site-packages/cv2/config.py b/hug/lib/python3.12/site-packages/cv2/config.py new file mode 100644 index 0000000000000000000000000000000000000000..a95fbcf0db643541979c557588cb264233bc6891 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/config.py @@ -0,0 +1,5 @@ +import os + +BINARIES_PATHS = [ + os.path.join(os.path.join(LOADER_DIR, '../../'), 'lib64') +] + BINARIES_PATHS diff --git a/hug/lib/python3.12/site-packages/cv2/cuda/__init__.pyi b/hug/lib/python3.12/site-packages/cv2/cuda/__init__.pyi new file mode 100644 index 0000000000000000000000000000000000000000..bcf5337997bf9a6278d0b816552dd418cedd4f83 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/cuda/__init__.pyi @@ -0,0 +1,513 @@ +__all__: list[str] = [] + +import cv2 +import cv2.typing +import typing as _typing + + +# Enumerations +FEATURE_SET_COMPUTE_10: int +FEATURE_SET_COMPUTE_11: int +FEATURE_SET_COMPUTE_12: int +FEATURE_SET_COMPUTE_13: int +FEATURE_SET_COMPUTE_20: int +FEATURE_SET_COMPUTE_21: int +FEATURE_SET_COMPUTE_30: int +FEATURE_SET_COMPUTE_32: int +FEATURE_SET_COMPUTE_35: int +FEATURE_SET_COMPUTE_50: int +GLOBAL_ATOMICS: int +SHARED_ATOMICS: int +NATIVE_DOUBLE: int +WARP_SHUFFLE_FUNCTIONS: int +DYNAMIC_PARALLELISM: int +FeatureSet = int +"""One of [FEATURE_SET_COMPUTE_10, FEATURE_SET_COMPUTE_11, FEATURE_SET_COMPUTE_12, FEATURE_SET_COMPUTE_13, FEATURE_SET_COMPUTE_20, FEATURE_SET_COMPUTE_21, FEATURE_SET_COMPUTE_30, FEATURE_SET_COMPUTE_32, FEATURE_SET_COMPUTE_35, FEATURE_SET_COMPUTE_50, GLOBAL_ATOMICS, SHARED_ATOMICS, NATIVE_DOUBLE, WARP_SHUFFLE_FUNCTIONS, DYNAMIC_PARALLELISM]""" + + +HostMem_PAGE_LOCKED: int +HOST_MEM_PAGE_LOCKED: int +HostMem_SHARED: int +HOST_MEM_SHARED: int +HostMem_WRITE_COMBINED: int +HOST_MEM_WRITE_COMBINED: int +HostMem_AllocType = int +"""One of [HostMem_PAGE_LOCKED, HOST_MEM_PAGE_LOCKED, HostMem_SHARED, HOST_MEM_SHARED, HostMem_WRITE_COMBINED, HOST_MEM_WRITE_COMBINED]""" + +Event_DEFAULT: int +EVENT_DEFAULT: int +Event_BLOCKING_SYNC: int +EVENT_BLOCKING_SYNC: int +Event_DISABLE_TIMING: int +EVENT_DISABLE_TIMING: int +Event_INTERPROCESS: int +EVENT_INTERPROCESS: int +Event_CreateFlags = int +"""One of [Event_DEFAULT, EVENT_DEFAULT, Event_BLOCKING_SYNC, EVENT_BLOCKING_SYNC, Event_DISABLE_TIMING, EVENT_DISABLE_TIMING, Event_INTERPROCESS, EVENT_INTERPROCESS]""" + +DeviceInfo_ComputeModeDefault: int +DEVICE_INFO_COMPUTE_MODE_DEFAULT: int +DeviceInfo_ComputeModeExclusive: int +DEVICE_INFO_COMPUTE_MODE_EXCLUSIVE: int +DeviceInfo_ComputeModeProhibited: int +DEVICE_INFO_COMPUTE_MODE_PROHIBITED: int +DeviceInfo_ComputeModeExclusiveProcess: int +DEVICE_INFO_COMPUTE_MODE_EXCLUSIVE_PROCESS: int +DeviceInfo_ComputeMode = int +"""One of [DeviceInfo_ComputeModeDefault, DEVICE_INFO_COMPUTE_MODE_DEFAULT, DeviceInfo_ComputeModeExclusive, DEVICE_INFO_COMPUTE_MODE_EXCLUSIVE, DeviceInfo_ComputeModeProhibited, DEVICE_INFO_COMPUTE_MODE_PROHIBITED, DeviceInfo_ComputeModeExclusiveProcess, DEVICE_INFO_COMPUTE_MODE_EXCLUSIVE_PROCESS]""" + + +# Classes +class GpuMat: + @property + def step(self) -> int: ... + + # Classes + class Allocator: + ... + + + # Functions + @_typing.overload + def __init__(self, allocator: GpuMat.Allocator = ...) -> None: ... + @_typing.overload + def __init__(self, rows: int, cols: int, type: int, allocator: GpuMat.Allocator = ...) -> None: ... + @_typing.overload + def __init__(self, size: cv2.typing.Size, type: int, allocator: GpuMat.Allocator = ...) -> None: ... + @_typing.overload + def __init__(self, rows: int, cols: int, type: int, s: cv2.typing.Scalar, allocator: GpuMat.Allocator = ...) -> None: ... + @_typing.overload + def __init__(self, size: cv2.typing.Size, type: int, s: cv2.typing.Scalar, allocator: GpuMat.Allocator = ...) -> None: ... + @_typing.overload + def __init__(self, m: GpuMat) -> None: ... + @_typing.overload + def __init__(self, m: GpuMat, rowRange: cv2.typing.Range, colRange: cv2.typing.Range) -> None: ... + @_typing.overload + def __init__(self, m: GpuMat, roi: cv2.typing.Rect) -> None: ... + @_typing.overload + def __init__(self, arr: cv2.typing.MatLike, allocator: GpuMat.Allocator = ...) -> None: ... + @_typing.overload + def __init__(self, arr: GpuMat, allocator: GpuMat.Allocator = ...) -> None: ... + @_typing.overload + def __init__(self, arr: cv2.UMat, allocator: GpuMat.Allocator = ...) -> None: ... + + @staticmethod + def defaultAllocator() -> GpuMat.Allocator: ... + + @staticmethod + def setDefaultAllocator(allocator: GpuMat.Allocator) -> None: ... + + @staticmethod + def getStdAllocator() -> GpuMat.Allocator: ... + + @_typing.overload + def create(self, rows: int, cols: int, type: int) -> None: ... + @_typing.overload + def create(self, size: cv2.typing.Size, type: int) -> None: ... + + def release(self) -> None: ... + + def swap(self, mat: GpuMat) -> None: ... + + @_typing.overload + def upload(self, arr: cv2.typing.MatLike) -> None: ... + @_typing.overload + def upload(self, arr: GpuMat) -> None: ... + @_typing.overload + def upload(self, arr: cv2.UMat) -> None: ... + @_typing.overload + def upload(self, arr: cv2.typing.MatLike, stream: Stream) -> None: ... + @_typing.overload + def upload(self, arr: GpuMat, stream: Stream) -> None: ... + @_typing.overload + def upload(self, arr: cv2.UMat, stream: Stream) -> None: ... + + @_typing.overload + def download(self, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def download(self, dst: GpuMat | None = ...) -> GpuMat: ... + @_typing.overload + def download(self, dst: cv2.UMat | None = ...) -> cv2.UMat: ... + @_typing.overload + def download(self, stream: Stream, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def download(self, stream: Stream, dst: GpuMat | None = ...) -> GpuMat: ... + @_typing.overload + def download(self, stream: Stream, dst: cv2.UMat | None = ...) -> cv2.UMat: ... + + def clone(self) -> GpuMat: ... + + @_typing.overload + def copyTo(self, dst: GpuMat | None = ...) -> GpuMat: ... + @_typing.overload + def copyTo(self, stream: Stream, dst: GpuMat | None = ...) -> GpuMat: ... + @_typing.overload + def copyTo(self, mask: GpuMat, dst: GpuMat | None = ...) -> GpuMat: ... + @_typing.overload + def copyTo(self, mask: GpuMat, stream: Stream, dst: GpuMat | None = ...) -> GpuMat: ... + + @_typing.overload + def setTo(self, s: cv2.typing.Scalar) -> GpuMat: ... + @_typing.overload + def setTo(self, s: cv2.typing.Scalar, stream: Stream) -> GpuMat: ... + @_typing.overload + def setTo(self, s: cv2.typing.Scalar, mask: cv2.typing.MatLike) -> GpuMat: ... + @_typing.overload + def setTo(self, s: cv2.typing.Scalar, mask: GpuMat) -> GpuMat: ... + @_typing.overload + def setTo(self, s: cv2.typing.Scalar, mask: cv2.UMat) -> GpuMat: ... + @_typing.overload + def setTo(self, s: cv2.typing.Scalar, mask: cv2.typing.MatLike, stream: Stream) -> GpuMat: ... + @_typing.overload + def setTo(self, s: cv2.typing.Scalar, mask: GpuMat, stream: Stream) -> GpuMat: ... + @_typing.overload + def setTo(self, s: cv2.typing.Scalar, mask: cv2.UMat, stream: Stream) -> GpuMat: ... + + @_typing.overload + def convertTo(self, rtype: int, dst: GpuMat | None = ...) -> GpuMat: ... + @_typing.overload + def convertTo(self, rtype: int, stream: Stream, dst: GpuMat | None = ...) -> GpuMat: ... + @_typing.overload + def convertTo(self, rtype: int, dst: GpuMat | None = ..., alpha: float = ..., beta: float = ...) -> GpuMat: ... + @_typing.overload + def convertTo(self, rtype: int, alpha: float, beta: float, stream: Stream, dst: GpuMat | None = ...) -> GpuMat: ... + + def assignTo(self, m: GpuMat, type: int = ...) -> None: ... + + def row(self, y: int) -> GpuMat: ... + + def col(self, x: int) -> GpuMat: ... + + @_typing.overload + def rowRange(self, startrow: int, endrow: int) -> GpuMat: ... + @_typing.overload + def rowRange(self, r: cv2.typing.Range) -> GpuMat: ... + + @_typing.overload + def colRange(self, startcol: int, endcol: int) -> GpuMat: ... + @_typing.overload + def colRange(self, r: cv2.typing.Range) -> GpuMat: ... + + def reshape(self, cn: int, rows: int = ...) -> GpuMat: ... + + def locateROI(self, wholeSize: cv2.typing.Size, ofs: cv2.typing.Point) -> None: ... + + def adjustROI(self, dtop: int, dbottom: int, dleft: int, dright: int) -> GpuMat: ... + + def isContinuous(self) -> bool: ... + + def elemSize(self) -> int: ... + + def elemSize1(self) -> int: ... + + def type(self) -> int: ... + + def depth(self) -> int: ... + + def channels(self) -> int: ... + + def step1(self) -> int: ... + + def size(self) -> cv2.typing.Size: ... + + def empty(self) -> bool: ... + + def cudaPtr(self) -> cv2.typing.IntPointer: ... + + def updateContinuityFlag(self) -> None: ... + + +class GpuData: + ... + +class GpuMatND: + ... + +class BufferPool: + # Functions + def __init__(self, stream: Stream) -> None: ... + + @_typing.overload + def getBuffer(self, rows: int, cols: int, type: int) -> GpuMat: ... + @_typing.overload + def getBuffer(self, size: cv2.typing.Size, type: int) -> GpuMat: ... + + def getAllocator(self) -> GpuMat.Allocator: ... + + +class HostMem: + @property + def step(self) -> int: ... + + # Functions + @_typing.overload + def __init__(self, alloc_type: HostMem_AllocType = ...) -> None: ... + @_typing.overload + def __init__(self, rows: int, cols: int, type: int, alloc_type: HostMem_AllocType = ...) -> None: ... + @_typing.overload + def __init__(self, size: cv2.typing.Size, type: int, alloc_type: HostMem_AllocType = ...) -> None: ... + @_typing.overload + def __init__(self, arr: cv2.typing.MatLike, alloc_type: HostMem_AllocType = ...) -> None: ... + @_typing.overload + def __init__(self, arr: GpuMat, alloc_type: HostMem_AllocType = ...) -> None: ... + @_typing.overload + def __init__(self, arr: cv2.UMat, alloc_type: HostMem_AllocType = ...) -> None: ... + + def swap(self, b: HostMem) -> None: ... + + def clone(self) -> HostMem: ... + + def create(self, rows: int, cols: int, type: int) -> None: ... + + def reshape(self, cn: int, rows: int = ...) -> HostMem: ... + + def createMatHeader(self) -> cv2.typing.MatLike: ... + + def isContinuous(self) -> bool: ... + + def elemSize(self) -> int: ... + + def elemSize1(self) -> int: ... + + def type(self) -> int: ... + + def depth(self) -> int: ... + + def channels(self) -> int: ... + + def step1(self) -> int: ... + + def size(self) -> cv2.typing.Size: ... + + def empty(self) -> bool: ... + + +class Stream: + # Functions + @_typing.overload + def __init__(self) -> None: ... + @_typing.overload + def __init__(self, allocator: GpuMat.Allocator) -> None: ... + @_typing.overload + def __init__(self, cudaFlags: int) -> None: ... + + def queryIfComplete(self) -> bool: ... + + def waitForCompletion(self) -> None: ... + + def waitEvent(self, event: Event) -> None: ... + + @classmethod + def Null(cls) -> Stream: ... + + def cudaPtr(self) -> cv2.typing.IntPointer: ... + + +class Event: + # Functions + def __init__(self, flags: Event_CreateFlags = ...) -> None: ... + + def record(self, stream: Stream = ...) -> None: ... + + def queryIfComplete(self) -> bool: ... + + def waitForCompletion(self) -> None: ... + + @staticmethod + def elapsedTime(start: Event, end: Event) -> float: ... + + +class TargetArchs: + # Functions + @staticmethod + def has(major: int, minor: int) -> bool: ... + + @staticmethod + def hasPtx(major: int, minor: int) -> bool: ... + + @staticmethod + def hasBin(major: int, minor: int) -> bool: ... + + @staticmethod + def hasEqualOrLessPtx(major: int, minor: int) -> bool: ... + + @staticmethod + def hasEqualOrGreater(major: int, minor: int) -> bool: ... + + @staticmethod + def hasEqualOrGreaterPtx(major: int, minor: int) -> bool: ... + + @staticmethod + def hasEqualOrGreaterBin(major: int, minor: int) -> bool: ... + + +class DeviceInfo: + # Functions + @_typing.overload + def __init__(self) -> None: ... + @_typing.overload + def __init__(self, device_id: int) -> None: ... + + def deviceID(self) -> int: ... + + def totalGlobalMem(self) -> int: ... + + def sharedMemPerBlock(self) -> int: ... + + def regsPerBlock(self) -> int: ... + + def warpSize(self) -> int: ... + + def memPitch(self) -> int: ... + + def maxThreadsPerBlock(self) -> int: ... + + def maxThreadsDim(self) -> cv2.typing.Vec3i: ... + + def maxGridSize(self) -> cv2.typing.Vec3i: ... + + def clockRate(self) -> int: ... + + def totalConstMem(self) -> int: ... + + def majorVersion(self) -> int: ... + + def minorVersion(self) -> int: ... + + def textureAlignment(self) -> int: ... + + def texturePitchAlignment(self) -> int: ... + + def multiProcessorCount(self) -> int: ... + + def kernelExecTimeoutEnabled(self) -> bool: ... + + def integrated(self) -> bool: ... + + def canMapHostMemory(self) -> bool: ... + + def computeMode(self) -> DeviceInfo_ComputeMode: ... + + def maxTexture1D(self) -> int: ... + + def maxTexture1DMipmap(self) -> int: ... + + def maxTexture1DLinear(self) -> int: ... + + def maxTexture2D(self) -> cv2.typing.Vec2i: ... + + def maxTexture2DMipmap(self) -> cv2.typing.Vec2i: ... + + def maxTexture2DLinear(self) -> cv2.typing.Vec3i: ... + + def maxTexture2DGather(self) -> cv2.typing.Vec2i: ... + + def maxTexture3D(self) -> cv2.typing.Vec3i: ... + + def maxTextureCubemap(self) -> int: ... + + def maxTexture1DLayered(self) -> cv2.typing.Vec2i: ... + + def maxTexture2DLayered(self) -> cv2.typing.Vec3i: ... + + def maxTextureCubemapLayered(self) -> cv2.typing.Vec2i: ... + + def maxSurface1D(self) -> int: ... + + def maxSurface2D(self) -> cv2.typing.Vec2i: ... + + def maxSurface3D(self) -> cv2.typing.Vec3i: ... + + def maxSurface1DLayered(self) -> cv2.typing.Vec2i: ... + + def maxSurface2DLayered(self) -> cv2.typing.Vec3i: ... + + def maxSurfaceCubemap(self) -> int: ... + + def maxSurfaceCubemapLayered(self) -> cv2.typing.Vec2i: ... + + def surfaceAlignment(self) -> int: ... + + def concurrentKernels(self) -> bool: ... + + def ECCEnabled(self) -> bool: ... + + def pciBusID(self) -> int: ... + + def pciDeviceID(self) -> int: ... + + def pciDomainID(self) -> int: ... + + def tccDriver(self) -> bool: ... + + def asyncEngineCount(self) -> int: ... + + def unifiedAddressing(self) -> bool: ... + + def memoryClockRate(self) -> int: ... + + def memoryBusWidth(self) -> int: ... + + def l2CacheSize(self) -> int: ... + + def maxThreadsPerMultiProcessor(self) -> int: ... + + def queryMemory(self, totalMemory: int, freeMemory: int) -> None: ... + + def freeMemory(self) -> int: ... + + def totalMemory(self) -> int: ... + + def isCompatible(self) -> bool: ... + + + +# Functions +@_typing.overload +def createContinuous(rows: int, cols: int, type: int, arr: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def createContinuous(rows: int, cols: int, type: int, arr: GpuMat | None = ...) -> GpuMat: ... +@_typing.overload +def createContinuous(rows: int, cols: int, type: int, arr: cv2.UMat | None = ...) -> cv2.UMat: ... + +@_typing.overload +def createGpuMatFromCudaMemory(rows: int, cols: int, type: int, cudaMemoryAddress: int, step: int = ...) -> GpuMat: ... +@_typing.overload +def createGpuMatFromCudaMemory(size: cv2.typing.Size, type: int, cudaMemoryAddress: int, step: int = ...) -> GpuMat: ... + +@_typing.overload +def ensureSizeIsEnough(rows: int, cols: int, type: int, arr: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def ensureSizeIsEnough(rows: int, cols: int, type: int, arr: GpuMat | None = ...) -> GpuMat: ... +@_typing.overload +def ensureSizeIsEnough(rows: int, cols: int, type: int, arr: cv2.UMat | None = ...) -> cv2.UMat: ... + +def fastNlMeansDenoising(src: GpuMat, h: float, dst: GpuMat | None = ..., search_window: int = ..., block_size: int = ..., stream: Stream = ...) -> GpuMat: ... + +def fastNlMeansDenoisingColored(src: GpuMat, h_luminance: float, photo_render: float, dst: GpuMat | None = ..., search_window: int = ..., block_size: int = ..., stream: Stream = ...) -> GpuMat: ... + +def getCudaEnabledDeviceCount() -> int: ... + +def getDevice() -> int: ... + +def nonLocalMeans(src: GpuMat, h: float, dst: GpuMat | None = ..., search_window: int = ..., block_size: int = ..., borderMode: int = ..., stream: Stream = ...) -> GpuMat: ... + +def printCudaDeviceInfo(device: int) -> None: ... + +def printShortCudaDeviceInfo(device: int) -> None: ... + +def registerPageLocked(m: cv2.typing.MatLike) -> None: ... + +def resetDevice() -> None: ... + +def setBufferPoolConfig(deviceId: int, stackSize: int, stackCount: int) -> None: ... + +def setBufferPoolUsage(on: bool) -> None: ... + +def setDevice(device: int) -> None: ... + +def unregisterPageLocked(m: cv2.typing.MatLike) -> None: ... + +def wrapStream(cudaStreamMemoryAddress: int) -> Stream: ... + + diff --git a/hug/lib/python3.12/site-packages/cv2/cv2.abi3.so b/hug/lib/python3.12/site-packages/cv2/cv2.abi3.so new file mode 100644 index 0000000000000000000000000000000000000000..0af3f74801015ca322a1d5beb5c4008d39c230d1 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/cv2.abi3.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f7746177b49e0368c73142ab92d3d5a4a9ce989aecce7178d7e05c58679349c9 +size 74161369 diff --git a/hug/lib/python3.12/site-packages/cv2/data/__init__.py b/hug/lib/python3.12/site-packages/cv2/data/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1cad2750a50da66bc344a874d527c5452a24d5b1 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/data/__init__.py @@ -0,0 +1,3 @@ +import os + +haarcascades = os.path.join(os.path.dirname(__file__), "") diff --git a/hug/lib/python3.12/site-packages/cv2/data/__pycache__/__init__.cpython-312.pyc b/hug/lib/python3.12/site-packages/cv2/data/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cdd55e602de3b7614510c9ab2cb2ecfd90c242c3 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cv2/data/__pycache__/__init__.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cv2/detail/__init__.pyi b/hug/lib/python3.12/site-packages/cv2/detail/__init__.pyi new file mode 100644 index 0000000000000000000000000000000000000000..c9598922a1a8225b02916dffd51b534ca7d87d63 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/detail/__init__.pyi @@ -0,0 +1,543 @@ +__all__: list[str] = [] + +import cv2 +import cv2.typing +import numpy +import typing as _typing + + +# Enumerations +TEST_CUSTOM: int +TEST_EQ: int +TEST_NE: int +TEST_LE: int +TEST_LT: int +TEST_GE: int +TEST_GT: int +TestOp = int +"""One of [TEST_CUSTOM, TEST_EQ, TEST_NE, TEST_LE, TEST_LT, TEST_GE, TEST_GT]""" + +WAVE_CORRECT_HORIZ: int +WAVE_CORRECT_VERT: int +WAVE_CORRECT_AUTO: int +WaveCorrectKind = int +"""One of [WAVE_CORRECT_HORIZ, WAVE_CORRECT_VERT, WAVE_CORRECT_AUTO]""" + + +Blender_NO: int +BLENDER_NO: int +Blender_FEATHER: int +BLENDER_FEATHER: int +Blender_MULTI_BAND: int +BLENDER_MULTI_BAND: int + +ExposureCompensator_NO: int +EXPOSURE_COMPENSATOR_NO: int +ExposureCompensator_GAIN: int +EXPOSURE_COMPENSATOR_GAIN: int +ExposureCompensator_GAIN_BLOCKS: int +EXPOSURE_COMPENSATOR_GAIN_BLOCKS: int +ExposureCompensator_CHANNELS: int +EXPOSURE_COMPENSATOR_CHANNELS: int +ExposureCompensator_CHANNELS_BLOCKS: int +EXPOSURE_COMPENSATOR_CHANNELS_BLOCKS: int + +SeamFinder_NO: int +SEAM_FINDER_NO: int +SeamFinder_VORONOI_SEAM: int +SEAM_FINDER_VORONOI_SEAM: int +SeamFinder_DP_SEAM: int +SEAM_FINDER_DP_SEAM: int + +DpSeamFinder_COLOR: int +DP_SEAM_FINDER_COLOR: int +DpSeamFinder_COLOR_GRAD: int +DP_SEAM_FINDER_COLOR_GRAD: int +DpSeamFinder_CostFunction = int +"""One of [DpSeamFinder_COLOR, DP_SEAM_FINDER_COLOR, DpSeamFinder_COLOR_GRAD, DP_SEAM_FINDER_COLOR_GRAD]""" + +Timelapser_AS_IS: int +TIMELAPSER_AS_IS: int +Timelapser_CROP: int +TIMELAPSER_CROP: int + +GraphCutSeamFinderBase_COST_COLOR: int +GRAPH_CUT_SEAM_FINDER_BASE_COST_COLOR: int +GraphCutSeamFinderBase_COST_COLOR_GRAD: int +GRAPH_CUT_SEAM_FINDER_BASE_COST_COLOR_GRAD: int +GraphCutSeamFinderBase_CostType = int +"""One of [GraphCutSeamFinderBase_COST_COLOR, GRAPH_CUT_SEAM_FINDER_BASE_COST_COLOR, GraphCutSeamFinderBase_COST_COLOR_GRAD, GRAPH_CUT_SEAM_FINDER_BASE_COST_COLOR_GRAD]""" + +TrackerSamplerCSC_MODE_INIT_POS: int +TRACKER_SAMPLER_CSC_MODE_INIT_POS: int +TrackerSamplerCSC_MODE_INIT_NEG: int +TRACKER_SAMPLER_CSC_MODE_INIT_NEG: int +TrackerSamplerCSC_MODE_TRACK_POS: int +TRACKER_SAMPLER_CSC_MODE_TRACK_POS: int +TrackerSamplerCSC_MODE_TRACK_NEG: int +TRACKER_SAMPLER_CSC_MODE_TRACK_NEG: int +TrackerSamplerCSC_MODE_DETECT: int +TRACKER_SAMPLER_CSC_MODE_DETECT: int +TrackerSamplerCSC_MODE = int +"""One of [TrackerSamplerCSC_MODE_INIT_POS, TRACKER_SAMPLER_CSC_MODE_INIT_POS, TrackerSamplerCSC_MODE_INIT_NEG, TRACKER_SAMPLER_CSC_MODE_INIT_NEG, TrackerSamplerCSC_MODE_TRACK_POS, TRACKER_SAMPLER_CSC_MODE_TRACK_POS, TrackerSamplerCSC_MODE_TRACK_NEG, TRACKER_SAMPLER_CSC_MODE_TRACK_NEG, TrackerSamplerCSC_MODE_DETECT, TRACKER_SAMPLER_CSC_MODE_DETECT]""" + + +# Classes +class PoseGraph: + ... + +class Blender: + # Functions + @classmethod + def createDefault(cls, type: int, try_gpu: bool = ...) -> Blender: ... + + @_typing.overload + def prepare(self, corners: _typing.Sequence[cv2.typing.Point], sizes: _typing.Sequence[cv2.typing.Size]) -> None: ... + @_typing.overload + def prepare(self, dst_roi: cv2.typing.Rect) -> None: ... + + @_typing.overload + def feed(self, img: cv2.typing.MatLike, mask: cv2.typing.MatLike, tl: cv2.typing.Point) -> None: ... + @_typing.overload + def feed(self, img: cv2.UMat, mask: cv2.UMat, tl: cv2.typing.Point) -> None: ... + + @_typing.overload + def blend(self, dst: cv2.typing.MatLike, dst_mask: cv2.typing.MatLike) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... + @_typing.overload + def blend(self, dst: cv2.UMat, dst_mask: cv2.UMat) -> tuple[cv2.UMat, cv2.UMat]: ... + + +class FeatherBlender(Blender): + # Functions + def __init__(self, sharpness: float = ...) -> None: ... + + def sharpness(self) -> float: ... + + def setSharpness(self, val: float) -> None: ... + + def prepare(self, dst_roi: cv2.typing.Rect) -> None: ... + + @_typing.overload + def feed(self, img: cv2.typing.MatLike, mask: cv2.typing.MatLike, tl: cv2.typing.Point) -> None: ... + @_typing.overload + def feed(self, img: cv2.UMat, mask: cv2.UMat, tl: cv2.typing.Point) -> None: ... + + @_typing.overload + def blend(self, dst: cv2.typing.MatLike, dst_mask: cv2.typing.MatLike) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... + @_typing.overload + def blend(self, dst: cv2.UMat, dst_mask: cv2.UMat) -> tuple[cv2.UMat, cv2.UMat]: ... + + def createWeightMaps(self, masks: _typing.Sequence[cv2.UMat], corners: _typing.Sequence[cv2.typing.Point], weight_maps: _typing.Sequence[cv2.UMat]) -> tuple[cv2.typing.Rect, _typing.Sequence[cv2.UMat]]: ... + + +class MultiBandBlender(Blender): + # Functions + def __init__(self, try_gpu: int = ..., num_bands: int = ..., weight_type: int = ...) -> None: ... + + def numBands(self) -> int: ... + + def setNumBands(self, val: int) -> None: ... + + def prepare(self, dst_roi: cv2.typing.Rect) -> None: ... + + @_typing.overload + def feed(self, img: cv2.typing.MatLike, mask: cv2.typing.MatLike, tl: cv2.typing.Point) -> None: ... + @_typing.overload + def feed(self, img: cv2.UMat, mask: cv2.UMat, tl: cv2.typing.Point) -> None: ... + + @_typing.overload + def blend(self, dst: cv2.typing.MatLike, dst_mask: cv2.typing.MatLike) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... + @_typing.overload + def blend(self, dst: cv2.UMat, dst_mask: cv2.UMat) -> tuple[cv2.UMat, cv2.UMat]: ... + + +class CameraParams: + focal: float + aspect: float + ppx: float + ppy: float + R: cv2.typing.MatLike + t: cv2.typing.MatLike + + # Functions + def K(self) -> cv2.typing.MatLike: ... + + +class ExposureCompensator: + # Functions + @classmethod + def createDefault(cls, type: int) -> ExposureCompensator: ... + + def feed(self, corners: _typing.Sequence[cv2.typing.Point], images: _typing.Sequence[cv2.UMat], masks: _typing.Sequence[cv2.UMat]) -> None: ... + + @_typing.overload + def apply(self, index: int, corner: cv2.typing.Point, image: cv2.typing.MatLike, mask: cv2.typing.MatLike) -> cv2.typing.MatLike: ... + @_typing.overload + def apply(self, index: int, corner: cv2.typing.Point, image: cv2.UMat, mask: cv2.UMat) -> cv2.UMat: ... + + def getMatGains(self, arg1: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ... + + def setMatGains(self, arg1: _typing.Sequence[cv2.typing.MatLike]) -> None: ... + + def setUpdateGain(self, b: bool) -> None: ... + + def getUpdateGain(self) -> bool: ... + + +class NoExposureCompensator(ExposureCompensator): + # Functions + @_typing.overload + def apply(self, arg1: int, arg2: cv2.typing.Point, arg3: cv2.typing.MatLike, arg4: cv2.typing.MatLike) -> cv2.typing.MatLike: ... + @_typing.overload + def apply(self, arg1: int, arg2: cv2.typing.Point, arg3: cv2.UMat, arg4: cv2.UMat) -> cv2.UMat: ... + + def getMatGains(self, umv: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ... + + def setMatGains(self, umv: _typing.Sequence[cv2.typing.MatLike]) -> None: ... + + +class GainCompensator(ExposureCompensator): + # Functions + @_typing.overload + def __init__(self) -> None: ... + @_typing.overload + def __init__(self, nr_feeds: int) -> None: ... + + @_typing.overload + def apply(self, index: int, corner: cv2.typing.Point, image: cv2.typing.MatLike, mask: cv2.typing.MatLike) -> cv2.typing.MatLike: ... + @_typing.overload + def apply(self, index: int, corner: cv2.typing.Point, image: cv2.UMat, mask: cv2.UMat) -> cv2.UMat: ... + + def getMatGains(self, umv: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ... + + def setMatGains(self, umv: _typing.Sequence[cv2.typing.MatLike]) -> None: ... + + def setNrFeeds(self, nr_feeds: int) -> None: ... + + def getNrFeeds(self) -> int: ... + + def setSimilarityThreshold(self, similarity_threshold: float) -> None: ... + + def getSimilarityThreshold(self) -> float: ... + + +class ChannelsCompensator(ExposureCompensator): + # Functions + def __init__(self, nr_feeds: int = ...) -> None: ... + + @_typing.overload + def apply(self, index: int, corner: cv2.typing.Point, image: cv2.typing.MatLike, mask: cv2.typing.MatLike) -> cv2.typing.MatLike: ... + @_typing.overload + def apply(self, index: int, corner: cv2.typing.Point, image: cv2.UMat, mask: cv2.UMat) -> cv2.UMat: ... + + def getMatGains(self, umv: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ... + + def setMatGains(self, umv: _typing.Sequence[cv2.typing.MatLike]) -> None: ... + + def setNrFeeds(self, nr_feeds: int) -> None: ... + + def getNrFeeds(self) -> int: ... + + def setSimilarityThreshold(self, similarity_threshold: float) -> None: ... + + def getSimilarityThreshold(self) -> float: ... + + +class BlocksCompensator(ExposureCompensator): + # Functions + @_typing.overload + def apply(self, index: int, corner: cv2.typing.Point, image: cv2.typing.MatLike, mask: cv2.typing.MatLike) -> cv2.typing.MatLike: ... + @_typing.overload + def apply(self, index: int, corner: cv2.typing.Point, image: cv2.UMat, mask: cv2.UMat) -> cv2.UMat: ... + + def getMatGains(self, umv: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ... + + def setMatGains(self, umv: _typing.Sequence[cv2.typing.MatLike]) -> None: ... + + def setNrFeeds(self, nr_feeds: int) -> None: ... + + def getNrFeeds(self) -> int: ... + + def setSimilarityThreshold(self, similarity_threshold: float) -> None: ... + + def getSimilarityThreshold(self) -> float: ... + + @_typing.overload + def setBlockSize(self, width: int, height: int) -> None: ... + @_typing.overload + def setBlockSize(self, size: cv2.typing.Size) -> None: ... + + def getBlockSize(self) -> cv2.typing.Size: ... + + def setNrGainsFilteringIterations(self, nr_iterations: int) -> None: ... + + def getNrGainsFilteringIterations(self) -> int: ... + + +class BlocksGainCompensator(BlocksCompensator): + # Functions + @_typing.overload + def __init__(self, bl_width: int = ..., bl_height: int = ...) -> None: ... + @_typing.overload + def __init__(self, bl_width: int, bl_height: int, nr_feeds: int) -> None: ... + + @_typing.overload + def apply(self, index: int, corner: cv2.typing.Point, image: cv2.typing.MatLike, mask: cv2.typing.MatLike) -> cv2.typing.MatLike: ... + @_typing.overload + def apply(self, index: int, corner: cv2.typing.Point, image: cv2.UMat, mask: cv2.UMat) -> cv2.UMat: ... + + def getMatGains(self, umv: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ... + + def setMatGains(self, umv: _typing.Sequence[cv2.typing.MatLike]) -> None: ... + + +class BlocksChannelsCompensator(BlocksCompensator): + # Functions + def __init__(self, bl_width: int = ..., bl_height: int = ..., nr_feeds: int = ...) -> None: ... + + +class ImageFeatures: + img_idx: int + img_size: cv2.typing.Size + keypoints: _typing.Sequence[cv2.KeyPoint] + descriptors: cv2.UMat + + # Functions + def getKeypoints(self) -> _typing.Sequence[cv2.KeyPoint]: ... + + +class MatchesInfo: + src_img_idx: int + dst_img_idx: int + matches: _typing.Sequence[cv2.DMatch] + inliers_mask: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]] + num_inliers: int + H: cv2.typing.MatLike + confidence: float + + # Functions + def getMatches(self) -> _typing.Sequence[cv2.DMatch]: ... + + def getInliers(self) -> numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]]: ... + + +class FeaturesMatcher: + # Functions + def apply(self, features1: ImageFeatures, features2: ImageFeatures) -> MatchesInfo: ... + + def apply2(self, features: _typing.Sequence[ImageFeatures], mask: cv2.UMat | None = ...) -> _typing.Sequence[MatchesInfo]: ... + + def isThreadSafe(self) -> bool: ... + + def collectGarbage(self) -> None: ... + + +class BestOf2NearestMatcher(FeaturesMatcher): + # Functions + def __init__(self, try_use_gpu: bool = ..., match_conf: float = ..., num_matches_thresh1: int = ..., num_matches_thresh2: int = ..., matches_confidence_thresh: float = ...) -> None: ... + + def collectGarbage(self) -> None: ... + + @classmethod + def create(cls, try_use_gpu: bool = ..., match_conf: float = ..., num_matches_thresh1: int = ..., num_matches_thresh2: int = ..., matches_confidence_thresh: float = ...) -> BestOf2NearestMatcher: ... + + +class BestOf2NearestRangeMatcher(BestOf2NearestMatcher): + # Functions + def __init__(self, range_width: int = ..., try_use_gpu: bool = ..., match_conf: float = ..., num_matches_thresh1: int = ..., num_matches_thresh2: int = ...) -> None: ... + + +class AffineBestOf2NearestMatcher(BestOf2NearestMatcher): + # Functions + def __init__(self, full_affine: bool = ..., try_use_gpu: bool = ..., match_conf: float = ..., num_matches_thresh1: int = ...) -> None: ... + + +class LightGlueFeaturesMatcher(FeaturesMatcher): + # Functions + def __init__(self, lgMatcher: cv2.LightGlueMatcher, num_matches_thresh1: int = ..., num_matches_thresh2: int = ..., matches_confidence_thresh: float = ...) -> None: ... + + def setScoreThreshold(self, thresh: float) -> None: ... + + +class Estimator: + # Functions + def apply(self, features: _typing.Sequence[ImageFeatures], pairwise_matches: _typing.Sequence[MatchesInfo], cameras: _typing.Sequence[CameraParams]) -> tuple[bool, _typing.Sequence[CameraParams]]: ... + + +class HomographyBasedEstimator(Estimator): + # Functions + def __init__(self, is_focals_estimated: bool = ...) -> None: ... + + +class AffineBasedEstimator(Estimator): + # Functions + def __init__(self) -> None: ... + + +class BundleAdjusterBase(Estimator): + # Functions + def refinementMask(self) -> cv2.typing.MatLike: ... + + def setRefinementMask(self, mask: cv2.typing.MatLike) -> None: ... + + def confThresh(self) -> float: ... + + def setConfThresh(self, conf_thresh: float) -> None: ... + + def termCriteria(self) -> cv2.typing.TermCriteria: ... + + def setTermCriteria(self, term_criteria: cv2.typing.TermCriteria) -> None: ... + + +class NoBundleAdjuster(BundleAdjusterBase): + # Functions + def __init__(self) -> None: ... + + +class BundleAdjusterReproj(BundleAdjusterBase): + # Functions + def __init__(self) -> None: ... + + +class BundleAdjusterRay(BundleAdjusterBase): + # Functions + def __init__(self) -> None: ... + + +class BundleAdjusterAffine(BundleAdjusterBase): + # Functions + def __init__(self) -> None: ... + + +class BundleAdjusterAffinePartial(BundleAdjusterBase): + # Functions + def __init__(self) -> None: ... + + +class SeamFinder: + # Functions + def find(self, src: _typing.Sequence[cv2.UMat], corners: _typing.Sequence[cv2.typing.Point], masks: _typing.Sequence[cv2.UMat]) -> _typing.Sequence[cv2.UMat]: ... + + @classmethod + def createDefault(cls, type: int) -> SeamFinder: ... + + +class NoSeamFinder(SeamFinder): + # Functions + def find(self, arg1: _typing.Sequence[cv2.UMat], arg2: _typing.Sequence[cv2.typing.Point], arg3: _typing.Sequence[cv2.UMat]) -> _typing.Sequence[cv2.UMat]: ... + + +class PairwiseSeamFinder(SeamFinder): + # Functions + def find(self, src: _typing.Sequence[cv2.UMat], corners: _typing.Sequence[cv2.typing.Point], masks: _typing.Sequence[cv2.UMat]) -> _typing.Sequence[cv2.UMat]: ... + + +class VoronoiSeamFinder(PairwiseSeamFinder): + # Functions + def find(self, src: _typing.Sequence[cv2.UMat], corners: _typing.Sequence[cv2.typing.Point], masks: _typing.Sequence[cv2.UMat]) -> _typing.Sequence[cv2.UMat]: ... + + +class DpSeamFinder(SeamFinder): + # Functions + def __init__(self, costFunc: str) -> None: ... + + def setCostFunction(self, val: str) -> None: ... + + +class GraphCutSeamFinder: + # Functions + def __init__(self, cost_type: str, terminal_cost: float = ..., bad_region_penalty: float = ...) -> None: ... + + def find(self, src: _typing.Sequence[cv2.UMat], corners: _typing.Sequence[cv2.typing.Point], masks: _typing.Sequence[cv2.UMat]) -> _typing.Sequence[cv2.UMat]: ... + + +class Timelapser: + # Functions + @classmethod + def createDefault(cls, type: int) -> Timelapser: ... + + def initialize(self, corners: _typing.Sequence[cv2.typing.Point], sizes: _typing.Sequence[cv2.typing.Size]) -> None: ... + + @_typing.overload + def process(self, img: cv2.typing.MatLike, mask: cv2.typing.MatLike, tl: cv2.typing.Point) -> None: ... + @_typing.overload + def process(self, img: cv2.UMat, mask: cv2.UMat, tl: cv2.typing.Point) -> None: ... + + def getDst(self) -> cv2.UMat: ... + + +class TimelapserCrop(Timelapser): + ... + +class ProjectorBase: + ... + +class SphericalProjector(ProjectorBase): + # Functions + def mapForward(self, x: float, y: float, u: float, v: float) -> None: ... + + def mapBackward(self, u: float, v: float, x: float, y: float) -> None: ... + + + +# Functions +def calibrateRotatingCamera(Hs: _typing.Sequence[cv2.typing.MatLike], K: cv2.typing.MatLike | None = ...) -> tuple[bool, cv2.typing.MatLike]: ... + +@_typing.overload +def computeImageFeatures(featuresFinder: cv2.Feature2D, images: _typing.Sequence[cv2.typing.MatLike], masks: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[ImageFeatures]: ... +@_typing.overload +def computeImageFeatures(featuresFinder: cv2.Feature2D, images: _typing.Sequence[cv2.UMat], masks: _typing.Sequence[cv2.UMat] | None = ...) -> _typing.Sequence[ImageFeatures]: ... + +@_typing.overload +def computeImageFeatures2(featuresFinder: cv2.Feature2D, image: cv2.typing.MatLike, mask: cv2.typing.MatLike | None = ...) -> ImageFeatures: ... +@_typing.overload +def computeImageFeatures2(featuresFinder: cv2.Feature2D, image: cv2.UMat, mask: cv2.UMat | None = ...) -> ImageFeatures: ... + +@_typing.overload +def createLaplacePyr(img: cv2.typing.MatLike, num_levels: int, pyr: _typing.Sequence[cv2.UMat]) -> _typing.Sequence[cv2.UMat]: ... +@_typing.overload +def createLaplacePyr(img: cv2.UMat, num_levels: int, pyr: _typing.Sequence[cv2.UMat]) -> _typing.Sequence[cv2.UMat]: ... + +@_typing.overload +def createLaplacePyrGpu(img: cv2.typing.MatLike, num_levels: int, pyr: _typing.Sequence[cv2.UMat]) -> _typing.Sequence[cv2.UMat]: ... +@_typing.overload +def createLaplacePyrGpu(img: cv2.UMat, num_levels: int, pyr: _typing.Sequence[cv2.UMat]) -> _typing.Sequence[cv2.UMat]: ... + +@_typing.overload +def createWeightMap(mask: cv2.typing.MatLike, sharpness: float, weight: cv2.typing.MatLike) -> cv2.typing.MatLike: ... +@_typing.overload +def createWeightMap(mask: cv2.UMat, sharpness: float, weight: cv2.UMat) -> cv2.UMat: ... + +def focalsFromHomography(H: cv2.typing.MatLike, f0: float, f1: float, f0_ok: bool, f1_ok: bool) -> None: ... + +def leaveBiggestComponent(features: _typing.Sequence[ImageFeatures], pairwise_matches: _typing.Sequence[MatchesInfo], conf_threshold: float) -> _typing.Sequence[int]: ... + +def matchesGraphAsString(paths: _typing.Sequence[str], pairwise_matches: _typing.Sequence[MatchesInfo], conf_threshold: float) -> str: ... + +@_typing.overload +def normalizeUsingWeightMap(weight: cv2.typing.MatLike, src: cv2.typing.MatLike) -> cv2.typing.MatLike: ... +@_typing.overload +def normalizeUsingWeightMap(weight: cv2.UMat, src: cv2.UMat) -> cv2.UMat: ... + +def overlapRoi(tl1: cv2.typing.Point, tl2: cv2.typing.Point, sz1: cv2.typing.Size, sz2: cv2.typing.Size, roi: cv2.typing.Rect) -> bool: ... + +def restoreImageFromLaplacePyr(pyr: _typing.Sequence[cv2.UMat]) -> _typing.Sequence[cv2.UMat]: ... + +def restoreImageFromLaplacePyrGpu(pyr: _typing.Sequence[cv2.UMat]) -> _typing.Sequence[cv2.UMat]: ... + +@_typing.overload +def resultRoi(corners: _typing.Sequence[cv2.typing.Point], images: _typing.Sequence[cv2.UMat]) -> cv2.typing.Rect: ... +@_typing.overload +def resultRoi(corners: _typing.Sequence[cv2.typing.Point], sizes: _typing.Sequence[cv2.typing.Size]) -> cv2.typing.Rect: ... + +def resultRoiIntersection(corners: _typing.Sequence[cv2.typing.Point], sizes: _typing.Sequence[cv2.typing.Size]) -> cv2.typing.Rect: ... + +def resultTl(corners: _typing.Sequence[cv2.typing.Point]) -> cv2.typing.Point: ... + +def selectRandomSubset(count: int, size: int, subset: _typing.Sequence[int]) -> None: ... + +def stitchingLogLevel() -> int: ... + +def waveCorrect(rmats: _typing.Sequence[cv2.typing.MatLike], kind: WaveCorrectKind) -> _typing.Sequence[cv2.typing.MatLike]: ... + + diff --git a/hug/lib/python3.12/site-packages/cv2/dnn/__init__.pyi b/hug/lib/python3.12/site-packages/cv2/dnn/__init__.pyi new file mode 100644 index 0000000000000000000000000000000000000000..89bf68e22f5f9ec7cb373da5af8024d3cf0d01c2 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/dnn/__init__.pyi @@ -0,0 +1,666 @@ +__all__: list[str] = [] + +import cv2 +import cv2.typing +import numpy +import os +import sys +import typing as _typing +if sys.version_info >= (3, 8): + from typing import Protocol +else: + from typing_extensions import Protocol + + +# Enumerations +AUTO_PAD_NONE: int +AUTO_PAD_SAME_UPPER: int +AUTO_PAD_SAME_LOWER: int +AUTO_PAD_VALID: int +AutoPadding = int +"""One of [AUTO_PAD_NONE, AUTO_PAD_SAME_UPPER, AUTO_PAD_SAME_LOWER, AUTO_PAD_VALID]""" + +ACTIV_NONE: int +ACTIV_MISH: int +ACTIV_SWISH: int +ACTIV_SIGMOID: int +ACTIV_TANH: int +ACTIV_ELU: int +ACTIV_HARDSWISH: int +ACTIV_HARDSIGMOID: int +ACTIV_GELU: int +ACTIV_GELU_APPROX: int +ACTIV_RELU: int +ACTIV_CLIP: int +ActivationType = int +"""One of [ACTIV_NONE, ACTIV_MISH, ACTIV_SWISH, ACTIV_SIGMOID, ACTIV_TANH, ACTIV_ELU, ACTIV_HARDSWISH, ACTIV_HARDSIGMOID, ACTIV_GELU, ACTIV_GELU_APPROX, ACTIV_RELU, ACTIV_CLIP]""" + +LOSS_REDUCTION_NONE: int +LOSS_REDUCTION_MEAN: int +LOSS_REDUCTION_SUM: int +LossReduction = int +"""One of [LOSS_REDUCTION_NONE, LOSS_REDUCTION_MEAN, LOSS_REDUCTION_SUM]""" + +DNN_BACKEND_DEFAULT: int +DNN_BACKEND_INFERENCE_ENGINE: int +DNN_BACKEND_OPENCV: int +DNN_BACKEND_VKCOM: int +DNN_BACKEND_CUDA: int +DNN_BACKEND_WEBNN: int +DNN_BACKEND_TIMVX: int +DNN_BACKEND_CANN: int +Backend = int +"""One of [DNN_BACKEND_DEFAULT, DNN_BACKEND_INFERENCE_ENGINE, DNN_BACKEND_OPENCV, DNN_BACKEND_VKCOM, DNN_BACKEND_CUDA, DNN_BACKEND_WEBNN, DNN_BACKEND_TIMVX, DNN_BACKEND_CANN]""" + +DNN_TARGET_CPU: int +DNN_TARGET_OPENCL: int +DNN_TARGET_OPENCL_FP16: int +DNN_TARGET_MYRIAD: int +DNN_TARGET_VULKAN: int +DNN_TARGET_FPGA: int +DNN_TARGET_CUDA: int +DNN_TARGET_CUDA_FP16: int +DNN_TARGET_HDDL: int +DNN_TARGET_NPU: int +DNN_TARGET_CPU_FP16: int +Target = int +"""One of [DNN_TARGET_CPU, DNN_TARGET_OPENCL, DNN_TARGET_OPENCL_FP16, DNN_TARGET_MYRIAD, DNN_TARGET_VULKAN, DNN_TARGET_FPGA, DNN_TARGET_CUDA, DNN_TARGET_CUDA_FP16, DNN_TARGET_HDDL, DNN_TARGET_NPU, DNN_TARGET_CPU_FP16]""" + +DNN_TRACE_NONE: int +DNN_TRACE_ALL: int +DNN_TRACE_OP: int +TracingMode = int +"""One of [DNN_TRACE_NONE, DNN_TRACE_ALL, DNN_TRACE_OP]""" + +DNN_PROFILE_NONE: int +DNN_PROFILE_SUMMARY: int +DNN_PROFILE_DETAILED: int +ProfilingMode = int +"""One of [DNN_PROFILE_NONE, DNN_PROFILE_SUMMARY, DNN_PROFILE_DETAILED]""" + +DNN_MODEL_GENERIC: int +DNN_MODEL_ONNX: int +DNN_MODEL_TF: int +DNN_MODEL_TFLITE: int +ModelFormat = int +"""One of [DNN_MODEL_GENERIC, DNN_MODEL_ONNX, DNN_MODEL_TF, DNN_MODEL_TFLITE]""" + +DNN_ARG_EMPTY: int +DNN_ARG_CONST: int +DNN_ARG_INPUT: int +DNN_ARG_OUTPUT: int +DNN_ARG_TEMP: int +DNN_ARG_PATTERN: int +ArgKind = int +"""One of [DNN_ARG_EMPTY, DNN_ARG_CONST, DNN_ARG_INPUT, DNN_ARG_OUTPUT, DNN_ARG_TEMP, DNN_ARG_PATTERN]""" + +ENGINE_CLASSIC: int +ENGINE_NEW: int +ENGINE_AUTO: int +ENGINE_ORT: int +EngineType = int +"""One of [ENGINE_CLASSIC, ENGINE_NEW, ENGINE_AUTO, ENGINE_ORT]""" + +DNN_PMODE_NULL: int +DNN_PMODE_CROP_CENTER: int +DNN_PMODE_LETTERBOX: int +ImagePaddingMode = int +"""One of [DNN_PMODE_NULL, DNN_PMODE_CROP_CENTER, DNN_PMODE_LETTERBOX]""" + +SoftNMSMethod_SOFTNMS_LINEAR: int +SOFT_NMSMETHOD_SOFTNMS_LINEAR: int +SoftNMSMethod_SOFTNMS_GAUSSIAN: int +SOFT_NMSMETHOD_SOFTNMS_GAUSSIAN: int +SoftNMSMethod = int +"""One of [SoftNMSMethod_SOFTNMS_LINEAR, SOFT_NMSMETHOD_SOFTNMS_LINEAR, SoftNMSMethod_SOFTNMS_GAUSSIAN, SOFT_NMSMETHOD_SOFTNMS_GAUSSIAN]""" + + +Reduce2Layer_ReduceType_MAX: int +REDUCE2LAYER_REDUCE_TYPE_MAX: int +Reduce2Layer_ReduceType_MIN: int +REDUCE2LAYER_REDUCE_TYPE_MIN: int +Reduce2Layer_ReduceType_MEAN: int +REDUCE2LAYER_REDUCE_TYPE_MEAN: int +Reduce2Layer_ReduceType_SUM: int +REDUCE2LAYER_REDUCE_TYPE_SUM: int +Reduce2Layer_ReduceType_L1: int +REDUCE2LAYER_REDUCE_TYPE_L1: int +Reduce2Layer_ReduceType_L2: int +REDUCE2LAYER_REDUCE_TYPE_L2: int +Reduce2Layer_ReduceType_PROD: int +REDUCE2LAYER_REDUCE_TYPE_PROD: int +Reduce2Layer_ReduceType_SUM_SQUARE: int +REDUCE2LAYER_REDUCE_TYPE_SUM_SQUARE: int +Reduce2Layer_ReduceType_LOG_SUM: int +REDUCE2LAYER_REDUCE_TYPE_LOG_SUM: int +Reduce2Layer_ReduceType_LOG_SUM_EXP: int +REDUCE2LAYER_REDUCE_TYPE_LOG_SUM_EXP: int +Reduce2Layer_ReduceType = int +"""One of [Reduce2Layer_ReduceType_MAX, REDUCE2LAYER_REDUCE_TYPE_MAX, Reduce2Layer_ReduceType_MIN, REDUCE2LAYER_REDUCE_TYPE_MIN, Reduce2Layer_ReduceType_MEAN, REDUCE2LAYER_REDUCE_TYPE_MEAN, Reduce2Layer_ReduceType_SUM, REDUCE2LAYER_REDUCE_TYPE_SUM, Reduce2Layer_ReduceType_L1, REDUCE2LAYER_REDUCE_TYPE_L1, Reduce2Layer_ReduceType_L2, REDUCE2LAYER_REDUCE_TYPE_L2, Reduce2Layer_ReduceType_PROD, REDUCE2LAYER_REDUCE_TYPE_PROD, Reduce2Layer_ReduceType_SUM_SQUARE, REDUCE2LAYER_REDUCE_TYPE_SUM_SQUARE, Reduce2Layer_ReduceType_LOG_SUM, REDUCE2LAYER_REDUCE_TYPE_LOG_SUM, Reduce2Layer_ReduceType_LOG_SUM_EXP, REDUCE2LAYER_REDUCE_TYPE_LOG_SUM_EXP]""" + +NaryEltwiseLayer_OPERATION_AND: int +NARY_ELTWISE_LAYER_OPERATION_AND: int +NaryEltwiseLayer_OPERATION_EQUAL: int +NARY_ELTWISE_LAYER_OPERATION_EQUAL: int +NaryEltwiseLayer_OPERATION_GREATER: int +NARY_ELTWISE_LAYER_OPERATION_GREATER: int +NaryEltwiseLayer_OPERATION_GREATER_EQUAL: int +NARY_ELTWISE_LAYER_OPERATION_GREATER_EQUAL: int +NaryEltwiseLayer_OPERATION_LESS: int +NARY_ELTWISE_LAYER_OPERATION_LESS: int +NaryEltwiseLayer_OPERATION_LESS_EQUAL: int +NARY_ELTWISE_LAYER_OPERATION_LESS_EQUAL: int +NaryEltwiseLayer_OPERATION_OR: int +NARY_ELTWISE_LAYER_OPERATION_OR: int +NaryEltwiseLayer_OPERATION_POW: int +NARY_ELTWISE_LAYER_OPERATION_POW: int +NaryEltwiseLayer_OPERATION_XOR: int +NARY_ELTWISE_LAYER_OPERATION_XOR: int +NaryEltwiseLayer_OPERATION_BITSHIFT: int +NARY_ELTWISE_LAYER_OPERATION_BITSHIFT: int +NaryEltwiseLayer_OPERATION_MAX: int +NARY_ELTWISE_LAYER_OPERATION_MAX: int +NaryEltwiseLayer_OPERATION_MEAN: int +NARY_ELTWISE_LAYER_OPERATION_MEAN: int +NaryEltwiseLayer_OPERATION_MIN: int +NARY_ELTWISE_LAYER_OPERATION_MIN: int +NaryEltwiseLayer_OPERATION_MOD: int +NARY_ELTWISE_LAYER_OPERATION_MOD: int +NaryEltwiseLayer_OPERATION_FMOD: int +NARY_ELTWISE_LAYER_OPERATION_FMOD: int +NaryEltwiseLayer_OPERATION_PROD: int +NARY_ELTWISE_LAYER_OPERATION_PROD: int +NaryEltwiseLayer_OPERATION_SUB: int +NARY_ELTWISE_LAYER_OPERATION_SUB: int +NaryEltwiseLayer_OPERATION_SUM: int +NARY_ELTWISE_LAYER_OPERATION_SUM: int +NaryEltwiseLayer_OPERATION_ADD: int +NARY_ELTWISE_LAYER_OPERATION_ADD: int +NaryEltwiseLayer_OPERATION_DIV: int +NARY_ELTWISE_LAYER_OPERATION_DIV: int +NaryEltwiseLayer_OPERATION_WHERE: int +NARY_ELTWISE_LAYER_OPERATION_WHERE: int +NaryEltwiseLayer_OPERATION_BITWISE_AND: int +NARY_ELTWISE_LAYER_OPERATION_BITWISE_AND: int +NaryEltwiseLayer_OPERATION_BITWISE_OR: int +NARY_ELTWISE_LAYER_OPERATION_BITWISE_OR: int +NaryEltwiseLayer_OPERATION_BITWISE_XOR: int +NARY_ELTWISE_LAYER_OPERATION_BITWISE_XOR: int +NaryEltwiseLayer_OPERATION = int +"""One of [NaryEltwiseLayer_OPERATION_AND, NARY_ELTWISE_LAYER_OPERATION_AND, NaryEltwiseLayer_OPERATION_EQUAL, NARY_ELTWISE_LAYER_OPERATION_EQUAL, NaryEltwiseLayer_OPERATION_GREATER, NARY_ELTWISE_LAYER_OPERATION_GREATER, NaryEltwiseLayer_OPERATION_GREATER_EQUAL, NARY_ELTWISE_LAYER_OPERATION_GREATER_EQUAL, NaryEltwiseLayer_OPERATION_LESS, NARY_ELTWISE_LAYER_OPERATION_LESS, NaryEltwiseLayer_OPERATION_LESS_EQUAL, NARY_ELTWISE_LAYER_OPERATION_LESS_EQUAL, NaryEltwiseLayer_OPERATION_OR, NARY_ELTWISE_LAYER_OPERATION_OR, NaryEltwiseLayer_OPERATION_POW, NARY_ELTWISE_LAYER_OPERATION_POW, NaryEltwiseLayer_OPERATION_XOR, NARY_ELTWISE_LAYER_OPERATION_XOR, NaryEltwiseLayer_OPERATION_BITSHIFT, NARY_ELTWISE_LAYER_OPERATION_BITSHIFT, NaryEltwiseLayer_OPERATION_MAX, NARY_ELTWISE_LAYER_OPERATION_MAX, NaryEltwiseLayer_OPERATION_MEAN, NARY_ELTWISE_LAYER_OPERATION_MEAN, NaryEltwiseLayer_OPERATION_MIN, NARY_ELTWISE_LAYER_OPERATION_MIN, NaryEltwiseLayer_OPERATION_MOD, NARY_ELTWISE_LAYER_OPERATION_MOD, NaryEltwiseLayer_OPERATION_FMOD, NARY_ELTWISE_LAYER_OPERATION_FMOD, NaryEltwiseLayer_OPERATION_PROD, NARY_ELTWISE_LAYER_OPERATION_PROD, NaryEltwiseLayer_OPERATION_SUB, NARY_ELTWISE_LAYER_OPERATION_SUB, NaryEltwiseLayer_OPERATION_SUM, NARY_ELTWISE_LAYER_OPERATION_SUM, NaryEltwiseLayer_OPERATION_ADD, NARY_ELTWISE_LAYER_OPERATION_ADD, NaryEltwiseLayer_OPERATION_DIV, NARY_ELTWISE_LAYER_OPERATION_DIV, NaryEltwiseLayer_OPERATION_WHERE, NARY_ELTWISE_LAYER_OPERATION_WHERE, NaryEltwiseLayer_OPERATION_BITWISE_AND, NARY_ELTWISE_LAYER_OPERATION_BITWISE_AND, NaryEltwiseLayer_OPERATION_BITWISE_OR, NARY_ELTWISE_LAYER_OPERATION_BITWISE_OR, NaryEltwiseLayer_OPERATION_BITWISE_XOR, NARY_ELTWISE_LAYER_OPERATION_BITWISE_XOR]""" + + +# Classes +class DictValue: + # Functions + @_typing.overload + def __init__(self, i: int) -> None: ... + @_typing.overload + def __init__(self, p: float) -> None: ... + @_typing.overload + def __init__(self, s: str) -> None: ... + + def isInt(self) -> bool: ... + + def isString(self) -> bool: ... + + def isReal(self) -> bool: ... + + def getIntValue(self, idx: int = ...) -> int: ... + + def getRealValue(self, idx: int = ...) -> float: ... + + def getStringValue(self, idx: int = ...) -> str: ... + + +class Layer(cv2.Algorithm): + blobs: _typing.Sequence[cv2.typing.MatLike] + @property + def name(self) -> str: ... + @property + def type(self) -> str: ... + @property + def preferableTarget(self) -> int: ... + + # Functions + @_typing.overload + def finalize(self, inputs: _typing.Sequence[cv2.typing.MatLike], outputs: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ... + @_typing.overload + def finalize(self, inputs: _typing.Sequence[cv2.UMat], outputs: _typing.Sequence[cv2.UMat] | None = ...) -> _typing.Sequence[cv2.UMat]: ... + + def run(self, inputs: _typing.Sequence[cv2.typing.MatLike], internals: _typing.Sequence[cv2.typing.MatLike], outputs: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> tuple[_typing.Sequence[cv2.typing.MatLike], _typing.Sequence[cv2.typing.MatLike]]: ... + + def outputNameToIndex(self, outputName: str) -> int: ... + + +class Net: + # Functions + def __init__(self) -> None: ... + + @classmethod + @_typing.overload + def readFromModelOptimizer(cls, xml: str | os.PathLike[str], bin: str | os.PathLike[str]) -> Net: ... + @classmethod + @_typing.overload + def readFromModelOptimizer(cls, bufferModelConfig: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]], bufferWeights: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]]) -> Net: ... + + def empty(self) -> bool: ... + + def dump(self) -> str: ... + + def dumpToFile(self, path: str | os.PathLike[str]) -> None: ... + + def dumpToPbtxt(self, path: str | os.PathLike[str]) -> None: ... + + def addLayer(self, name: str, type: str, dtype: int, params: cv2.typing.LayerParams) -> int: ... + + def addLayerToPrev(self, name: str, type: str, dtype: int, params: cv2.typing.LayerParams) -> int: ... + + def getLayerId(self, layer: str) -> int: ... + + def getLayerNames(self) -> _typing.Sequence[str]: ... + + @_typing.overload + def getLayer(self, layerId: int) -> Layer: ... + @_typing.overload + def getLayer(self, layerName: str) -> Layer: ... + @_typing.overload + def getLayer(self, layerId: cv2.typing.LayerId) -> Layer: ... + + def connect(self, outPin: str, inpPin: str) -> None: ... + + def registerOutput(self, outputName: str, layerId: int, outputPort: int) -> int: ... + + def setInputsNames(self, inputBlobNames: _typing.Sequence[str]) -> None: ... + + def setInputShape(self, inputName: str, shape: cv2.typing.MatShape) -> None: ... + + @_typing.overload + def forward(self, outputName: str = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def forward(self, outputBlobs: _typing.Sequence[cv2.typing.MatLike] | None = ..., outputName: str = ...) -> _typing.Sequence[cv2.typing.MatLike]: ... + @_typing.overload + def forward(self, outputBlobs: _typing.Sequence[cv2.UMat] | None = ..., outputName: str = ...) -> _typing.Sequence[cv2.UMat]: ... + @_typing.overload + def forward(self, outBlobNames: _typing.Sequence[str], outputBlobs: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ... + @_typing.overload + def forward(self, outBlobNames: _typing.Sequence[str], outputBlobs: _typing.Sequence[cv2.UMat] | None = ...) -> _typing.Sequence[cv2.UMat]: ... + + def forwardAsync(self, outputName: str = ...) -> cv2.AsyncArray: ... + + def forwardAndRetrieve(self, outBlobNames: _typing.Sequence[str]) -> _typing.Sequence[_typing.Sequence[cv2.typing.MatLike]]: ... + + def setPreferableBackend(self, backendId: int) -> None: ... + + def setPreferableTarget(self, targetId: int) -> None: ... + + def finalizeNet(self) -> None: ... + + def setTracingMode(self, tracingMode: TracingMode) -> None: ... + + def getTracingMode(self) -> TracingMode: ... + + def setProfilingMode(self, profilingMode: ProfilingMode) -> None: ... + + def getProfilingMode(self) -> ProfilingMode: ... + + def getModelFormat(self) -> ModelFormat: ... + + @_typing.overload + def setInput(self, blob: cv2.typing.MatLike, name: str = ..., scalefactor: float = ..., mean: cv2.typing.Scalar = ...) -> None: ... + @_typing.overload + def setInput(self, blob: cv2.UMat, name: str = ..., scalefactor: float = ..., mean: cv2.typing.Scalar = ...) -> None: ... + + @_typing.overload + def setParam(self, layer: int, numParam: int, blob: cv2.typing.MatLike) -> None: ... + @_typing.overload + def setParam(self, layerName: str, numParam: int, blob: cv2.typing.MatLike) -> None: ... + + @_typing.overload + def getParam(self, layer: int, numParam: int = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def getParam(self, layerName: str, numParam: int = ...) -> cv2.typing.MatLike: ... + + def getUnconnectedOutLayers(self) -> _typing.Sequence[int]: ... + + def getUnconnectedOutLayersNames(self) -> _typing.Sequence[str]: ... + + def getLayerShapes(self, netInputShapes: _typing.Sequence[cv2.typing.MatShape], netInputTypes: _typing.Sequence[int], layerId: int) -> tuple[_typing.Sequence[cv2.typing.MatShape], _typing.Sequence[cv2.typing.MatShape]]: ... + + def getFLOPS(self, netInputShapes: _typing.Sequence[cv2.typing.MatShape], netInputTypes: _typing.Sequence[int]) -> int: ... + + def getLayerTypes(self) -> _typing.Sequence[str]: ... + + def getLayersCount(self, layerType: str) -> int: ... + + def getMemoryConsumption(self, netInputShapes: _typing.Sequence[cv2.typing.MatShape], netInputTypes: _typing.Sequence[int]) -> tuple[int, int]: ... + + def enableFusion(self, fusion: bool) -> None: ... + + def enableWinograd(self, useWinograd: bool) -> None: ... + + @_typing.overload + def getPerfProfile(self) -> tuple[int, _typing.Sequence[float]]: ... + @_typing.overload + def getPerfProfile(self) -> tuple[_typing.Sequence[str], _typing.Sequence[str], _typing.Sequence[str]]: ... + + def enableKVCache(self) -> None: ... + + def disableKVCache(self) -> None: ... + + def resetKVCache(self) -> None: ... + + def printPerfProfile(self) -> None: ... + + +class Image2BlobParams: + scalefactor: cv2.typing.Scalar + size: cv2.typing.Size + mean: cv2.typing.Scalar + swapRB: bool + ddepth: int + datalayout: cv2.DataLayout + paddingmode: ImagePaddingMode + borderValue: cv2.typing.Scalar + + # Functions + @_typing.overload + def __init__(self) -> None: ... + @_typing.overload + def __init__(self, scalefactor: cv2.typing.Scalar, size: cv2.typing.Size = ..., mean: cv2.typing.Scalar = ..., swapRB: bool = ..., ddepth: int = ..., datalayout: cv2.DataLayout = ..., mode: ImagePaddingMode = ..., borderValue: cv2.typing.Scalar = ...) -> None: ... + + def blobRectToImageRect(self, rBlob: cv2.typing.Rect, size: cv2.typing.Size) -> cv2.typing.Rect: ... + + def blobRectsToImageRects(self, rBlob: _typing.Sequence[cv2.typing.Rect], size: cv2.typing.Size) -> _typing.Sequence[cv2.typing.Rect]: ... + + +class Model: + # Functions + @_typing.overload + def __init__(self, model: str | os.PathLike[str], config: str | os.PathLike[str] = ...) -> None: ... + @_typing.overload + def __init__(self, network: Net) -> None: ... + + @_typing.overload + def setInputSize(self, size: cv2.typing.Size) -> Model: ... + @_typing.overload + def setInputSize(self, width: int, height: int) -> Model: ... + + def setInputMean(self, mean: cv2.typing.Scalar) -> Model: ... + + def setInputScale(self, scale: cv2.typing.Scalar) -> Model: ... + + def setInputCrop(self, crop: bool) -> Model: ... + + def setInputSwapRB(self, swapRB: bool) -> Model: ... + + def setOutputNames(self, outNames: _typing.Sequence[str]) -> Model: ... + + def setInputParams(self, scale: float = ..., size: cv2.typing.Size = ..., mean: cv2.typing.Scalar = ..., swapRB: bool = ..., crop: bool = ...) -> None: ... + + @_typing.overload + def predict(self, frame: cv2.typing.MatLike, outs: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ... + @_typing.overload + def predict(self, frame: cv2.UMat, outs: _typing.Sequence[cv2.UMat] | None = ...) -> _typing.Sequence[cv2.UMat]: ... + + def setPreferableBackend(self, backendId: Backend) -> Model: ... + + def setPreferableTarget(self, targetId: Target) -> Model: ... + + def enableWinograd(self, useWinograd: bool) -> Model: ... + + +class ClassificationModel(Model): + # Functions + @_typing.overload + def __init__(self, model: str | os.PathLike[str], config: str | os.PathLike[str] = ...) -> None: ... + @_typing.overload + def __init__(self, network: Net) -> None: ... + + def setEnableSoftmaxPostProcessing(self, enable: bool) -> ClassificationModel: ... + + def getEnableSoftmaxPostProcessing(self) -> bool: ... + + @_typing.overload + def classify(self, frame: cv2.typing.MatLike) -> tuple[int, float]: ... + @_typing.overload + def classify(self, frame: cv2.UMat) -> tuple[int, float]: ... + + +class KeypointsModel(Model): + # Functions + @_typing.overload + def __init__(self, model: str | os.PathLike[str], config: str | os.PathLike[str] = ...) -> None: ... + @_typing.overload + def __init__(self, network: Net) -> None: ... + + @_typing.overload + def estimate(self, frame: cv2.typing.MatLike, thresh: float = ...) -> _typing.Sequence[cv2.typing.Point2f]: ... + @_typing.overload + def estimate(self, frame: cv2.UMat, thresh: float = ...) -> _typing.Sequence[cv2.typing.Point2f]: ... + + +class SegmentationModel(Model): + # Functions + @_typing.overload + def __init__(self, model: str | os.PathLike[str], config: str | os.PathLike[str] = ...) -> None: ... + @_typing.overload + def __init__(self, network: Net) -> None: ... + + @_typing.overload + def segment(self, frame: cv2.typing.MatLike, mask: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def segment(self, frame: cv2.UMat, mask: cv2.UMat | None = ...) -> cv2.UMat: ... + + +class DetectionModel(Model): + # Functions + @_typing.overload + def __init__(self, model: str | os.PathLike[str], config: str | os.PathLike[str] = ...) -> None: ... + @_typing.overload + def __init__(self, network: Net) -> None: ... + + def setNmsAcrossClasses(self, value: bool) -> DetectionModel: ... + + def getNmsAcrossClasses(self) -> bool: ... + + @_typing.overload + def detect(self, frame: cv2.typing.MatLike, confThreshold: float = ..., nmsThreshold: float = ...) -> tuple[_typing.Sequence[int], _typing.Sequence[float], _typing.Sequence[cv2.typing.Rect]]: ... + @_typing.overload + def detect(self, frame: cv2.UMat, confThreshold: float = ..., nmsThreshold: float = ...) -> tuple[_typing.Sequence[int], _typing.Sequence[float], _typing.Sequence[cv2.typing.Rect]]: ... + + +class TextRecognitionModel(Model): + # Functions + @_typing.overload + def __init__(self, network: Net) -> None: ... + @_typing.overload + def __init__(self, model: str | os.PathLike[str], config: str | os.PathLike[str] = ...) -> None: ... + + def setDecodeType(self, decodeType: str) -> TextRecognitionModel: ... + + def getDecodeType(self) -> str: ... + + def setDecodeOptsCTCPrefixBeamSearch(self, beamSize: int, vocPruneSize: int = ...) -> TextRecognitionModel: ... + + def setVocabulary(self, vocabulary: _typing.Sequence[str]) -> TextRecognitionModel: ... + + def getVocabulary(self) -> _typing.Sequence[str]: ... + + @_typing.overload + def recognize(self, frame: cv2.typing.MatLike) -> str: ... + @_typing.overload + def recognize(self, frame: cv2.UMat) -> str: ... + @_typing.overload + def recognize(self, frame: cv2.typing.MatLike, roiRects: _typing.Sequence[cv2.typing.MatLike]) -> _typing.Sequence[str]: ... + @_typing.overload + def recognize(self, frame: cv2.UMat, roiRects: _typing.Sequence[cv2.UMat]) -> _typing.Sequence[str]: ... + + +class TextDetectionModel(Model): + # Functions + @_typing.overload + def detect(self, frame: cv2.typing.MatLike) -> tuple[_typing.Sequence[_typing.Sequence[cv2.typing.Point]], _typing.Sequence[float]]: ... + @_typing.overload + def detect(self, frame: cv2.UMat) -> tuple[_typing.Sequence[_typing.Sequence[cv2.typing.Point]], _typing.Sequence[float]]: ... + @_typing.overload + def detect(self, frame: cv2.typing.MatLike) -> _typing.Sequence[_typing.Sequence[cv2.typing.Point]]: ... + @_typing.overload + def detect(self, frame: cv2.UMat) -> _typing.Sequence[_typing.Sequence[cv2.typing.Point]]: ... + + @_typing.overload + def detectTextRectangles(self, frame: cv2.typing.MatLike) -> tuple[_typing.Sequence[cv2.typing.RotatedRect], _typing.Sequence[float]]: ... + @_typing.overload + def detectTextRectangles(self, frame: cv2.UMat) -> tuple[_typing.Sequence[cv2.typing.RotatedRect], _typing.Sequence[float]]: ... + @_typing.overload + def detectTextRectangles(self, frame: cv2.typing.MatLike) -> _typing.Sequence[cv2.typing.RotatedRect]: ... + @_typing.overload + def detectTextRectangles(self, frame: cv2.UMat) -> _typing.Sequence[cv2.typing.RotatedRect]: ... + + +class TextDetectionModel_EAST(TextDetectionModel): + # Functions + @_typing.overload + def __init__(self, network: Net) -> None: ... + @_typing.overload + def __init__(self, model: str | os.PathLike[str], config: str | os.PathLike[str] = ...) -> None: ... + + def setConfidenceThreshold(self, confThreshold: float) -> TextDetectionModel_EAST: ... + + def getConfidenceThreshold(self) -> float: ... + + def setNMSThreshold(self, nmsThreshold: float) -> TextDetectionModel_EAST: ... + + def getNMSThreshold(self) -> float: ... + + +class TextDetectionModel_DB(TextDetectionModel): + # Functions + @_typing.overload + def __init__(self, network: Net) -> None: ... + @_typing.overload + def __init__(self, model: str | os.PathLike[str], config: str | os.PathLike[str] = ...) -> None: ... + + def setBinaryThreshold(self, binaryThreshold: float) -> TextDetectionModel_DB: ... + + def getBinaryThreshold(self) -> float: ... + + def setPolygonThreshold(self, polygonThreshold: float) -> TextDetectionModel_DB: ... + + def getPolygonThreshold(self) -> float: ... + + def setUnclipRatio(self, unclipRatio: float) -> TextDetectionModel_DB: ... + + def getUnclipRatio(self) -> float: ... + + def setMaxCandidates(self, maxCandidates: int) -> TextDetectionModel_DB: ... + + def getMaxCandidates(self) -> int: ... + + +class Tokenizer: + # Functions + @classmethod + def load(cls, model_config: str | os.PathLike[str]) -> Tokenizer: ... + + def encode(self, text: str) -> _typing.Sequence[int]: ... + + def decode(self, tokens: _typing.Sequence[int]) -> str: ... + + +class LayerProtocol(Protocol): + # Functions + def __init__(self, params: dict[str, DictValue], blobs: _typing.Sequence[cv2.typing.MatLike]) -> None: ... + + def getMemoryShapes(self, inputs: _typing.Sequence[_typing.Sequence[int]]) -> _typing.Sequence[_typing.Sequence[int]]: ... + + def forward(self, inputs: _typing.Sequence[cv2.typing.MatLike]) -> _typing.Sequence[cv2.typing.MatLike]: ... + + + +# Functions +def NMSBoxes(bboxes: _typing.Sequence[cv2.typing.Rect2d], scores: _typing.Sequence[float], score_threshold: float, nms_threshold: float, eta: float = ..., top_k: int = ...) -> _typing.Sequence[int]: ... + +def NMSBoxesBatched(bboxes: _typing.Sequence[cv2.typing.Rect2d], scores: _typing.Sequence[float], class_ids: _typing.Sequence[int], score_threshold: float, nms_threshold: float, eta: float = ..., top_k: int = ...) -> _typing.Sequence[int]: ... + +def NMSBoxesRotated(bboxes: _typing.Sequence[cv2.typing.RotatedRect], scores: _typing.Sequence[float], score_threshold: float, nms_threshold: float, eta: float = ..., top_k: int = ...) -> _typing.Sequence[int]: ... + +@_typing.overload +def blobFromImage(image: cv2.typing.MatLike, scalefactor: float = ..., size: cv2.typing.Size = ..., mean: cv2.typing.Scalar = ..., swapRB: bool = ..., crop: bool = ..., ddepth: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def blobFromImage(image: cv2.UMat, scalefactor: float = ..., size: cv2.typing.Size = ..., mean: cv2.typing.Scalar = ..., swapRB: bool = ..., crop: bool = ..., ddepth: int = ...) -> cv2.typing.MatLike: ... + +@_typing.overload +def blobFromImageWithParams(image: cv2.typing.MatLike, param: Image2BlobParams = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def blobFromImageWithParams(image: cv2.UMat, param: Image2BlobParams = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def blobFromImageWithParams(image: cv2.typing.MatLike, blob: cv2.typing.MatLike | None = ..., param: Image2BlobParams = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def blobFromImageWithParams(image: cv2.UMat, blob: cv2.UMat | None = ..., param: Image2BlobParams = ...) -> cv2.UMat: ... + +@_typing.overload +def blobFromImages(images: _typing.Sequence[cv2.typing.MatLike], scalefactor: float = ..., size: cv2.typing.Size = ..., mean: cv2.typing.Scalar = ..., swapRB: bool = ..., crop: bool = ..., ddepth: int = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def blobFromImages(images: _typing.Sequence[cv2.UMat], scalefactor: float = ..., size: cv2.typing.Size = ..., mean: cv2.typing.Scalar = ..., swapRB: bool = ..., crop: bool = ..., ddepth: int = ...) -> cv2.typing.MatLike: ... + +@_typing.overload +def blobFromImagesWithParams(images: _typing.Sequence[cv2.typing.MatLike], param: Image2BlobParams = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def blobFromImagesWithParams(images: _typing.Sequence[cv2.UMat], param: Image2BlobParams = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def blobFromImagesWithParams(images: _typing.Sequence[cv2.typing.MatLike], blob: cv2.typing.MatLike | None = ..., param: Image2BlobParams = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def blobFromImagesWithParams(images: _typing.Sequence[cv2.UMat], blob: cv2.UMat | None = ..., param: Image2BlobParams = ...) -> cv2.UMat: ... + +def getAvailableTargets(be: Backend) -> _typing.Sequence[Target]: ... + +def getInferenceEngineBackendType() -> str: ... + +def getInferenceEngineCPUType() -> str: ... + +def getInferenceEngineVPUType() -> str: ... + +@_typing.overload +def imagesFromBlob(blob_: cv2.typing.MatLike, images_: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ... +@_typing.overload +def imagesFromBlob(blob_: cv2.typing.MatLike, images_: _typing.Sequence[cv2.UMat] | None = ...) -> _typing.Sequence[cv2.UMat]: ... + +@_typing.overload +def readNet(model: str | os.PathLike[str], config: str | os.PathLike[str] = ..., framework: str = ..., engine: int = ...) -> Net: ... +@_typing.overload +def readNet(framework: str, bufferModel: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]], bufferConfig: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]] = ..., engine: int = ...) -> Net: ... + +@_typing.overload +def readNetFromModelOptimizer(xml: str | os.PathLike[str], bin: str | os.PathLike[str] = ...) -> Net: ... +@_typing.overload +def readNetFromModelOptimizer(bufferModelConfig: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]], bufferWeights: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]]) -> Net: ... + +@_typing.overload +def readNetFromONNX(onnxFile: str | os.PathLike[str], engine: int = ...) -> Net: ... +@_typing.overload +def readNetFromONNX(buffer: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]], engine: int = ...) -> Net: ... + +@_typing.overload +def readNetFromTFLite(model: str | os.PathLike[str], engine: int = ...) -> Net: ... +@_typing.overload +def readNetFromTFLite(bufferModel: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]], engine: int = ...) -> Net: ... + +@_typing.overload +def readNetFromTensorflow(model: str | os.PathLike[str], config: str | os.PathLike[str] = ..., engine: int = ..., extraOutputs: _typing.Sequence[str] = ...) -> Net: ... +@_typing.overload +def readNetFromTensorflow(bufferModel: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]], bufferConfig: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]] = ..., engine: int = ..., extraOutputs: _typing.Sequence[str] = ...) -> Net: ... + +def readTensorFromONNX(path: str | os.PathLike[str]) -> cv2.typing.MatLike: ... + +def releaseHDDLPlugin() -> None: ... + +def resetMyriadDevice() -> None: ... + +def setInferenceEngineBackendType(newBackendType: str) -> str: ... + +def softNMSBoxes(bboxes: _typing.Sequence[cv2.typing.Rect], scores: _typing.Sequence[float], score_threshold: float, nms_threshold: float, top_k: int = ..., sigma: float = ..., method: SoftNMSMethod = ...) -> tuple[_typing.Sequence[float], _typing.Sequence[int]]: ... + +def writeTextGraph(model: str | os.PathLike[str], output: str | os.PathLike[str]) -> None: ... + + diff --git a/hug/lib/python3.12/site-packages/cv2/fisheye/__init__.pyi b/hug/lib/python3.12/site-packages/cv2/fisheye/__init__.pyi new file mode 100644 index 0000000000000000000000000000000000000000..fe58924c697e3c6354801a89c5c2b833b90f892f --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/fisheye/__init__.pyi @@ -0,0 +1,72 @@ +__all__: list[str] = [] + +import cv2 +import cv2.typing +import typing as _typing + + +# Functions +@_typing.overload +def calibrate(objectPoints: _typing.Sequence[cv2.typing.MatLike], imagePoints: _typing.Sequence[cv2.typing.MatLike], image_size: cv2.typing.Size, K: cv2.typing.MatLike, D: cv2.typing.MatLike, rvecs: _typing.Sequence[cv2.typing.MatLike] | None = ..., tvecs: _typing.Sequence[cv2.typing.MatLike] | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, cv2.typing.MatLike, cv2.typing.MatLike, _typing.Sequence[cv2.typing.MatLike], _typing.Sequence[cv2.typing.MatLike]]: ... +@_typing.overload +def calibrate(objectPoints: _typing.Sequence[cv2.UMat], imagePoints: _typing.Sequence[cv2.UMat], image_size: cv2.typing.Size, K: cv2.UMat, D: cv2.UMat, rvecs: _typing.Sequence[cv2.UMat] | None = ..., tvecs: _typing.Sequence[cv2.UMat] | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, cv2.UMat, cv2.UMat, _typing.Sequence[cv2.UMat], _typing.Sequence[cv2.UMat]]: ... + +@_typing.overload +def distortPoints(undistorted: cv2.typing.MatLike, K: cv2.typing.MatLike, D: cv2.typing.MatLike, distorted: cv2.typing.MatLike | None = ..., alpha: float = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def distortPoints(undistorted: cv2.UMat, K: cv2.UMat, D: cv2.UMat, distorted: cv2.UMat | None = ..., alpha: float = ...) -> cv2.UMat: ... +@_typing.overload +def distortPoints(undistorted: cv2.typing.MatLike, Kundistorted: cv2.typing.MatLike, K: cv2.typing.MatLike, D: cv2.typing.MatLike, distorted: cv2.typing.MatLike | None = ..., alpha: float = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def distortPoints(undistorted: cv2.UMat, Kundistorted: cv2.UMat, K: cv2.UMat, D: cv2.UMat, distorted: cv2.UMat | None = ..., alpha: float = ...) -> cv2.UMat: ... + +@_typing.overload +def estimateNewCameraMatrixForUndistortRectify(K: cv2.typing.MatLike, D: cv2.typing.MatLike, image_size: cv2.typing.Size, R: cv2.typing.MatLike, P: cv2.typing.MatLike | None = ..., balance: float = ..., new_size: cv2.typing.Size = ..., fov_scale: float = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def estimateNewCameraMatrixForUndistortRectify(K: cv2.UMat, D: cv2.UMat, image_size: cv2.typing.Size, R: cv2.UMat, P: cv2.UMat | None = ..., balance: float = ..., new_size: cv2.typing.Size = ..., fov_scale: float = ...) -> cv2.UMat: ... + +@_typing.overload +def initUndistortRectifyMap(K: cv2.typing.MatLike, D: cv2.typing.MatLike | None, R: cv2.typing.MatLike, P: cv2.typing.MatLike, size: cv2.typing.Size, m1type: int, map1: cv2.typing.MatLike | None = ..., map2: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def initUndistortRectifyMap(K: cv2.UMat, D: cv2.UMat | None, R: cv2.UMat, P: cv2.UMat, size: cv2.typing.Size, m1type: int, map1: cv2.UMat | None = ..., map2: cv2.UMat | None = ...) -> tuple[cv2.UMat, cv2.UMat]: ... + +@_typing.overload +def projectPoints(objectPoints: cv2.typing.MatLike, rvec: cv2.typing.MatLike, tvec: cv2.typing.MatLike, K: cv2.typing.MatLike, D: cv2.typing.MatLike, imagePoints: cv2.typing.MatLike | None = ..., alpha: float = ..., jacobian: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def projectPoints(objectPoints: cv2.UMat, rvec: cv2.UMat, tvec: cv2.UMat, K: cv2.UMat, D: cv2.UMat, imagePoints: cv2.UMat | None = ..., alpha: float = ..., jacobian: cv2.UMat | None = ...) -> tuple[cv2.UMat, cv2.UMat]: ... + +@_typing.overload +def solvePnP(objectPoints: cv2.typing.MatLike, imagePoints: cv2.typing.MatLike, cameraMatrix: cv2.typing.MatLike, distCoeffs: cv2.typing.MatLike, rvec: cv2.typing.MatLike | None = ..., tvec: cv2.typing.MatLike | None = ..., useExtrinsicGuess: bool = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[bool, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def solvePnP(objectPoints: cv2.UMat, imagePoints: cv2.UMat, cameraMatrix: cv2.UMat, distCoeffs: cv2.UMat, rvec: cv2.UMat | None = ..., tvec: cv2.UMat | None = ..., useExtrinsicGuess: bool = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[bool, cv2.UMat, cv2.UMat]: ... + +@_typing.overload +def solvePnPRansac(objectPoints: cv2.typing.MatLike, imagePoints: cv2.typing.MatLike, cameraMatrix: cv2.typing.MatLike, distCoeffs: cv2.typing.MatLike, rvec: cv2.typing.MatLike | None = ..., tvec: cv2.typing.MatLike | None = ..., useExtrinsicGuess: bool = ..., iterationsCount: int = ..., reprojectionError: float = ..., confidence: float = ..., inliers: cv2.typing.MatLike | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[bool, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def solvePnPRansac(objectPoints: cv2.UMat, imagePoints: cv2.UMat, cameraMatrix: cv2.UMat, distCoeffs: cv2.UMat, rvec: cv2.UMat | None = ..., tvec: cv2.UMat | None = ..., useExtrinsicGuess: bool = ..., iterationsCount: int = ..., reprojectionError: float = ..., confidence: float = ..., inliers: cv2.UMat | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[bool, cv2.UMat, cv2.UMat, cv2.UMat]: ... + +@_typing.overload +def stereoCalibrate(objectPoints: _typing.Sequence[cv2.typing.MatLike], imagePoints1: _typing.Sequence[cv2.typing.MatLike], imagePoints2: _typing.Sequence[cv2.typing.MatLike], K1: cv2.typing.MatLike, D1: cv2.typing.MatLike, K2: cv2.typing.MatLike, D2: cv2.typing.MatLike, imageSize: cv2.typing.Size, R: cv2.typing.MatLike | None = ..., T: cv2.typing.MatLike | None = ..., rvecs: _typing.Sequence[cv2.typing.MatLike] | None = ..., tvecs: _typing.Sequence[cv2.typing.MatLike] | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, _typing.Sequence[cv2.typing.MatLike], _typing.Sequence[cv2.typing.MatLike]]: ... +@_typing.overload +def stereoCalibrate(objectPoints: _typing.Sequence[cv2.UMat], imagePoints1: _typing.Sequence[cv2.UMat], imagePoints2: _typing.Sequence[cv2.UMat], K1: cv2.UMat, D1: cv2.UMat, K2: cv2.UMat, D2: cv2.UMat, imageSize: cv2.typing.Size, R: cv2.UMat | None = ..., T: cv2.UMat | None = ..., rvecs: _typing.Sequence[cv2.UMat] | None = ..., tvecs: _typing.Sequence[cv2.UMat] | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, cv2.UMat, cv2.UMat, cv2.UMat, cv2.UMat, cv2.UMat, cv2.UMat, _typing.Sequence[cv2.UMat], _typing.Sequence[cv2.UMat]]: ... +@_typing.overload +def stereoCalibrate(objectPoints: _typing.Sequence[cv2.typing.MatLike], imagePoints1: _typing.Sequence[cv2.typing.MatLike], imagePoints2: _typing.Sequence[cv2.typing.MatLike], K1: cv2.typing.MatLike, D1: cv2.typing.MatLike, K2: cv2.typing.MatLike, D2: cv2.typing.MatLike, imageSize: cv2.typing.Size, R: cv2.typing.MatLike | None = ..., T: cv2.typing.MatLike | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def stereoCalibrate(objectPoints: _typing.Sequence[cv2.UMat], imagePoints1: _typing.Sequence[cv2.UMat], imagePoints2: _typing.Sequence[cv2.UMat], K1: cv2.UMat, D1: cv2.UMat, K2: cv2.UMat, D2: cv2.UMat, imageSize: cv2.typing.Size, R: cv2.UMat | None = ..., T: cv2.UMat | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, cv2.UMat, cv2.UMat, cv2.UMat, cv2.UMat, cv2.UMat, cv2.UMat]: ... + +@_typing.overload +def stereoRectify(K1: cv2.typing.MatLike, D1: cv2.typing.MatLike, K2: cv2.typing.MatLike, D2: cv2.typing.MatLike, imageSize: cv2.typing.Size, R: cv2.typing.MatLike, tvec: cv2.typing.MatLike, flags: int, R1: cv2.typing.MatLike | None = ..., R2: cv2.typing.MatLike | None = ..., P1: cv2.typing.MatLike | None = ..., P2: cv2.typing.MatLike | None = ..., Q: cv2.typing.MatLike | None = ..., newImageSize: cv2.typing.Size = ..., balance: float = ..., fov_scale: float = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ... +@_typing.overload +def stereoRectify(K1: cv2.UMat, D1: cv2.UMat, K2: cv2.UMat, D2: cv2.UMat, imageSize: cv2.typing.Size, R: cv2.UMat, tvec: cv2.UMat, flags: int, R1: cv2.UMat | None = ..., R2: cv2.UMat | None = ..., P1: cv2.UMat | None = ..., P2: cv2.UMat | None = ..., Q: cv2.UMat | None = ..., newImageSize: cv2.typing.Size = ..., balance: float = ..., fov_scale: float = ...) -> tuple[cv2.UMat, cv2.UMat, cv2.UMat, cv2.UMat, cv2.UMat]: ... + +@_typing.overload +def undistortImage(distorted: cv2.typing.MatLike, K: cv2.typing.MatLike, D: cv2.typing.MatLike, undistorted: cv2.typing.MatLike | None = ..., Knew: cv2.typing.MatLike | None = ..., new_size: cv2.typing.Size = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def undistortImage(distorted: cv2.UMat, K: cv2.UMat, D: cv2.UMat, undistorted: cv2.UMat | None = ..., Knew: cv2.UMat | None = ..., new_size: cv2.typing.Size = ...) -> cv2.UMat: ... + +@_typing.overload +def undistortPoints(distorted: cv2.typing.MatLike, K: cv2.typing.MatLike, D: cv2.typing.MatLike, undistorted: cv2.typing.MatLike | None = ..., R: cv2.typing.MatLike | None = ..., P: cv2.typing.MatLike | None = ..., criteria: cv2.typing.TermCriteria = ...) -> cv2.typing.MatLike: ... +@_typing.overload +def undistortPoints(distorted: cv2.UMat, K: cv2.UMat, D: cv2.UMat, undistorted: cv2.UMat | None = ..., R: cv2.UMat | None = ..., P: cv2.UMat | None = ..., criteria: cv2.typing.TermCriteria = ...) -> cv2.UMat: ... + + diff --git a/hug/lib/python3.12/site-packages/cv2/flann/__init__.pyi b/hug/lib/python3.12/site-packages/cv2/flann/__init__.pyi new file mode 100644 index 0000000000000000000000000000000000000000..9652fca075f905275c5a3f651f2271c5ca6b1c46 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/flann/__init__.pyi @@ -0,0 +1,65 @@ +__all__: list[str] = [] + +import cv2 +import cv2.typing +import os +import typing as _typing + + +# Enumerations +FLANN_INDEX_TYPE_8U: int +FLANN_INDEX_TYPE_8S: int +FLANN_INDEX_TYPE_16U: int +FLANN_INDEX_TYPE_16S: int +FLANN_INDEX_TYPE_32S: int +FLANN_INDEX_TYPE_32F: int +FLANN_INDEX_TYPE_64F: int +FLANN_INDEX_TYPE_STRING: int +FLANN_INDEX_TYPE_BOOL: int +FLANN_INDEX_TYPE_ALGORITHM: int +LAST_VALUE_FLANN_INDEX_TYPE: int +FlannIndexType = int +"""One of [FLANN_INDEX_TYPE_8U, FLANN_INDEX_TYPE_8S, FLANN_INDEX_TYPE_16U, FLANN_INDEX_TYPE_16S, FLANN_INDEX_TYPE_32S, FLANN_INDEX_TYPE_32F, FLANN_INDEX_TYPE_64F, FLANN_INDEX_TYPE_STRING, FLANN_INDEX_TYPE_BOOL, FLANN_INDEX_TYPE_ALGORITHM, LAST_VALUE_FLANN_INDEX_TYPE]""" + + + +# Classes +class Index: + # Functions + @_typing.overload + def __init__(self) -> None: ... + @_typing.overload + def __init__(self, features: cv2.typing.MatLike, params: cv2.typing.IndexParams, distType: int = ...) -> None: ... + @_typing.overload + def __init__(self, features: cv2.UMat, params: cv2.typing.IndexParams, distType: int = ...) -> None: ... + + @_typing.overload + def build(self, features: cv2.typing.MatLike, params: cv2.typing.IndexParams, distType: int = ...) -> None: ... + @_typing.overload + def build(self, features: cv2.UMat, params: cv2.typing.IndexParams, distType: int = ...) -> None: ... + + @_typing.overload + def knnSearch(self, query: cv2.typing.MatLike, knn: int, indices: cv2.typing.MatLike | None = ..., dists: cv2.typing.MatLike | None = ..., params: cv2.typing.SearchParams = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ... + @_typing.overload + def knnSearch(self, query: cv2.UMat, knn: int, indices: cv2.UMat | None = ..., dists: cv2.UMat | None = ..., params: cv2.typing.SearchParams = ...) -> tuple[cv2.UMat, cv2.UMat]: ... + + @_typing.overload + def radiusSearch(self, query: cv2.typing.MatLike, radius: float, maxResults: int, indices: cv2.typing.MatLike | None = ..., dists: cv2.typing.MatLike | None = ..., params: cv2.typing.SearchParams = ...) -> tuple[int, cv2.typing.MatLike, cv2.typing.MatLike]: ... + @_typing.overload + def radiusSearch(self, query: cv2.UMat, radius: float, maxResults: int, indices: cv2.UMat | None = ..., dists: cv2.UMat | None = ..., params: cv2.typing.SearchParams = ...) -> tuple[int, cv2.UMat, cv2.UMat]: ... + + def save(self, filename: str | os.PathLike[str]) -> None: ... + + @_typing.overload + def load(self, features: cv2.typing.MatLike, filename: str | os.PathLike[str]) -> bool: ... + @_typing.overload + def load(self, features: cv2.UMat, filename: str | os.PathLike[str]) -> bool: ... + + def release(self) -> None: ... + + def getDistance(self) -> int: ... + + def getAlgorithm(self) -> int: ... + + + diff --git a/hug/lib/python3.12/site-packages/cv2/instr/__init__.pyi b/hug/lib/python3.12/site-packages/cv2/instr/__init__.pyi new file mode 100644 index 0000000000000000000000000000000000000000..e86cba2804c99794371011160092881532880f75 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/instr/__init__.pyi @@ -0,0 +1,24 @@ +__all__: list[str] = [] + +# Enumerations +TYPE_GENERAL: int +TYPE_MARKER: int +TYPE_WRAPPER: int +TYPE_FUN: int +TYPE = int +"""One of [TYPE_GENERAL, TYPE_MARKER, TYPE_WRAPPER, TYPE_FUN]""" + +IMPL_PLAIN: int +IMPL_IPP: int +IMPL_OPENCL: int +IMPL = int +"""One of [IMPL_PLAIN, IMPL_IPP, IMPL_OPENCL]""" + +FLAGS_NONE: int +FLAGS_MAPPING: int +FLAGS_EXPAND_SAME_NAMES: int +FLAGS = int +"""One of [FLAGS_NONE, FLAGS_MAPPING, FLAGS_EXPAND_SAME_NAMES]""" + + + diff --git a/hug/lib/python3.12/site-packages/cv2/ipp/__init__.pyi b/hug/lib/python3.12/site-packages/cv2/ipp/__init__.pyi new file mode 100644 index 0000000000000000000000000000000000000000..23b6636ee899355b99cfe4fd3c2d5f897e538b33 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/ipp/__init__.pyi @@ -0,0 +1,14 @@ +__all__: list[str] = [] + +# Functions +def getIppVersion() -> str: ... + +def setUseIPP(flag: bool) -> None: ... + +def setUseIPP_NotExact(flag: bool) -> None: ... + +def useIPP() -> bool: ... + +def useIPP_NotExact() -> bool: ... + + diff --git a/hug/lib/python3.12/site-packages/cv2/load_config_py2.py b/hug/lib/python3.12/site-packages/cv2/load_config_py2.py new file mode 100644 index 0000000000000000000000000000000000000000..07fbae9f7aa704c64acfa4bbce187dc9dbf24759 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/load_config_py2.py @@ -0,0 +1,6 @@ +# flake8: noqa +import sys + +if sys.version_info[:2] < (3, 0): + def exec_file_wrapper(fpath, g_vars, l_vars): + execfile(fpath, g_vars, l_vars) diff --git a/hug/lib/python3.12/site-packages/cv2/load_config_py3.py b/hug/lib/python3.12/site-packages/cv2/load_config_py3.py new file mode 100644 index 0000000000000000000000000000000000000000..83a44d19ce47a33a351726983481dcc45f68272b --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/load_config_py3.py @@ -0,0 +1,9 @@ +# flake8: noqa +import os +import sys + +if sys.version_info[:2] >= (3, 0): + def exec_file_wrapper(fpath, g_vars, l_vars): + with open(fpath) as f: + code = compile(f.read(), fpath, 'exec') + exec(code, g_vars, l_vars) diff --git a/hug/lib/python3.12/site-packages/cv2/mat_wrapper/__init__.py b/hug/lib/python3.12/site-packages/cv2/mat_wrapper/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8a1e4580c9830128b44272fc86e86d60d06d0970 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/mat_wrapper/__init__.py @@ -0,0 +1,40 @@ +__all__ = [] + +import numpy as np +import cv2 as cv +from typing import TYPE_CHECKING, Any + +# Same as cv2.typing.NumPyArrayNumeric, but avoids circular dependencies +if TYPE_CHECKING: + _NumPyArrayNumeric = np.ndarray[Any, np.dtype[np.integer[Any] | np.floating[Any]]] +else: + _NumPyArrayNumeric = np.ndarray + +# NumPy documentation: https://numpy.org/doc/stable/user/basics.subclassing.html + + +class Mat(_NumPyArrayNumeric): + ''' + cv.Mat wrapper for numpy array. + + Stores extra metadata information how to interpret and process of numpy array for underlying C++ code. + ''' + + def __new__(cls, arr, **kwargs): + obj = arr.view(Mat) + return obj + + def __init__(self, arr, **kwargs): + self.wrap_channels = kwargs.pop('wrap_channels', getattr(arr, 'wrap_channels', False)) + if len(kwargs) > 0: + raise TypeError('Unknown parameters: {}'.format(repr(kwargs))) + + def __array_finalize__(self, obj): + if obj is None: + return + self.wrap_channels = getattr(obj, 'wrap_channels', None) + + +Mat.__module__ = cv.__name__ +cv.Mat = Mat +cv._registerMatType(Mat) diff --git a/hug/lib/python3.12/site-packages/cv2/mat_wrapper/__pycache__/__init__.cpython-312.pyc b/hug/lib/python3.12/site-packages/cv2/mat_wrapper/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4ca32af07b2f9fcbf8a5a7ea2caf5cc4bbd9a749 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cv2/mat_wrapper/__pycache__/__init__.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cv2/mcc/__init__.pyi b/hug/lib/python3.12/site-packages/cv2/mcc/__init__.pyi new file mode 100644 index 0000000000000000000000000000000000000000..6fc83c61d98d48974b1a70b1b5734710d807bf02 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/mcc/__init__.pyi @@ -0,0 +1,118 @@ +__all__: list[str] = [] + +import cv2 +import cv2.dnn +import cv2.typing +import typing as _typing + + +# Enumerations +MCC24: int +SG140: int +VINYL18: int +ColorChart = int +"""One of [MCC24, SG140, VINYL18]""" + + + +# Classes +class CChecker(cv2.Algorithm): + # Functions + @classmethod + def create(cls) -> CChecker: ... + + def setTarget(self, _target: ColorChart) -> None: ... + + def setBox(self, _box: _typing.Sequence[cv2.typing.Point2f]) -> None: ... + + def setChartsRGB(self, _chartsRGB: cv2.typing.MatLike) -> None: ... + + def setChartsYCbCr(self, _chartsYCbCr: cv2.typing.MatLike) -> None: ... + + def setCost(self, _cost: float) -> None: ... + + def setCenter(self, _center: cv2.typing.Point2f) -> None: ... + + def getTarget(self) -> ColorChart: ... + + def getBox(self) -> _typing.Sequence[cv2.typing.Point2f]: ... + + def getColorCharts(self) -> _typing.Sequence[cv2.typing.Point2f]: ... + + def getChartsRGB(self, getStats: bool = ...) -> cv2.typing.MatLike: ... + + def getChartsYCbCr(self) -> cv2.typing.MatLike: ... + + def getCost(self) -> float: ... + + def getCenter(self) -> cv2.typing.Point2f: ... + + +class DetectorParametersMCC: + adaptiveThreshWinSizeMin: int + adaptiveThreshWinSizeMax: int + adaptiveThreshWinSizeStep: int + adaptiveThreshConstant: float + minContoursAreaRate: float + minContoursArea: float + confidenceThreshold: float + minContourSolidity: float + findCandidatesApproxPolyDPEpsMultiplier: float + borderWidth: int + B0factor: float + maxError: float + minContourPointsAllowed: int + minContourLengthAllowed: int + minInterContourDistance: int + minInterCheckerDistance: int + minImageSize: int + minGroupSize: int + + # Functions + def __init__(self) -> None: ... + + +class CCheckerDetector(cv2.Algorithm): + # Functions + @_typing.overload + def processWithROI(self, image: cv2.typing.MatLike, regionsOfInterest: _typing.Sequence[cv2.typing.Rect], nc: int = ...) -> bool: ... + @_typing.overload + def processWithROI(self, image: cv2.UMat, regionsOfInterest: _typing.Sequence[cv2.typing.Rect], nc: int = ...) -> bool: ... + + @_typing.overload + def process(self, image: cv2.typing.MatLike, nc: int = ...) -> bool: ... + @_typing.overload + def process(self, image: cv2.UMat, nc: int = ...) -> bool: ... + + def getBestColorChecker(self) -> CChecker: ... + + def getListColorChecker(self) -> _typing.Sequence[CChecker]: ... + + @classmethod + @_typing.overload + def create(cls) -> CCheckerDetector: ... + @classmethod + @_typing.overload + def create(cls, net: cv2.dnn.Net) -> CCheckerDetector: ... + + @_typing.overload + def draw(self, checkers: _typing.Sequence[CChecker], img: cv2.typing.MatLike, color: cv2.typing.Scalar = ..., thickness: int = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def draw(self, checkers: _typing.Sequence[CChecker], img: cv2.UMat, color: cv2.typing.Scalar = ..., thickness: int = ...) -> cv2.UMat: ... + + def getRefColors(self) -> cv2.typing.MatLike: ... + + def setDetectionParams(self, params: DetectorParametersMCC) -> None: ... + + def setColorChartType(self, chartType: ColorChart) -> None: ... + + def setUseDnnModel(self, useDnn: bool) -> None: ... + + def getUseDnnModel(self) -> bool: ... + + def getDetectionParams(self) -> DetectorParametersMCC: ... + + def getColorChartType(self) -> ColorChart: ... + + + diff --git a/hug/lib/python3.12/site-packages/cv2/misc/__init__.py b/hug/lib/python3.12/site-packages/cv2/misc/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3e0559d3d4718e454eb687530f262bcf244e70e5 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/misc/__init__.py @@ -0,0 +1 @@ +from .version import get_ocv_version diff --git a/hug/lib/python3.12/site-packages/cv2/misc/__pycache__/__init__.cpython-312.pyc b/hug/lib/python3.12/site-packages/cv2/misc/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0be503007fd3848a75289a01c6154df782bdd842 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cv2/misc/__pycache__/__init__.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cv2/misc/__pycache__/version.cpython-312.pyc b/hug/lib/python3.12/site-packages/cv2/misc/__pycache__/version.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..94fa7c6c31d46b362c3c7d4d2431ea81d50a7c0f Binary files /dev/null and b/hug/lib/python3.12/site-packages/cv2/misc/__pycache__/version.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cv2/misc/version.py b/hug/lib/python3.12/site-packages/cv2/misc/version.py new file mode 100644 index 0000000000000000000000000000000000000000..d34705872edab5e755e896f9d85a0534b9ab7657 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/misc/version.py @@ -0,0 +1,5 @@ +import cv2 + + +def get_ocv_version(): + return getattr(cv2, "__version__", "unavailable") diff --git a/hug/lib/python3.12/site-packages/cv2/ocl/__init__.pyi b/hug/lib/python3.12/site-packages/cv2/ocl/__init__.pyi new file mode 100644 index 0000000000000000000000000000000000000000..1bf5bb2590c25ca1d490537a9b7ac2350031ac6f --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/ocl/__init__.pyi @@ -0,0 +1,252 @@ +__all__: list[str] = [] + +# Enumerations +OCL_VECTOR_OWN: int +OCL_VECTOR_MAX: int +OCL_VECTOR_DEFAULT: int +OclVectorStrategy = int +"""One of [OCL_VECTOR_OWN, OCL_VECTOR_MAX, OCL_VECTOR_DEFAULT]""" + + +Device_TYPE_DEFAULT: int +DEVICE_TYPE_DEFAULT: int +Device_TYPE_CPU: int +DEVICE_TYPE_CPU: int +Device_TYPE_GPU: int +DEVICE_TYPE_GPU: int +Device_TYPE_ACCELERATOR: int +DEVICE_TYPE_ACCELERATOR: int +Device_TYPE_DGPU: int +DEVICE_TYPE_DGPU: int +Device_TYPE_IGPU: int +DEVICE_TYPE_IGPU: int +Device_TYPE_ALL: int +DEVICE_TYPE_ALL: int +Device_FP_DENORM: int +DEVICE_FP_DENORM: int +Device_FP_INF_NAN: int +DEVICE_FP_INF_NAN: int +Device_FP_ROUND_TO_NEAREST: int +DEVICE_FP_ROUND_TO_NEAREST: int +Device_FP_ROUND_TO_ZERO: int +DEVICE_FP_ROUND_TO_ZERO: int +Device_FP_ROUND_TO_INF: int +DEVICE_FP_ROUND_TO_INF: int +Device_FP_FMA: int +DEVICE_FP_FMA: int +Device_FP_SOFT_FLOAT: int +DEVICE_FP_SOFT_FLOAT: int +Device_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT: int +DEVICE_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT: int +Device_EXEC_KERNEL: int +DEVICE_EXEC_KERNEL: int +Device_EXEC_NATIVE_KERNEL: int +DEVICE_EXEC_NATIVE_KERNEL: int +Device_NO_CACHE: int +DEVICE_NO_CACHE: int +Device_READ_ONLY_CACHE: int +DEVICE_READ_ONLY_CACHE: int +Device_READ_WRITE_CACHE: int +DEVICE_READ_WRITE_CACHE: int +Device_NO_LOCAL_MEM: int +DEVICE_NO_LOCAL_MEM: int +Device_LOCAL_IS_LOCAL: int +DEVICE_LOCAL_IS_LOCAL: int +Device_LOCAL_IS_GLOBAL: int +DEVICE_LOCAL_IS_GLOBAL: int +Device_UNKNOWN_VENDOR: int +DEVICE_UNKNOWN_VENDOR: int +Device_VENDOR_AMD: int +DEVICE_VENDOR_AMD: int +Device_VENDOR_INTEL: int +DEVICE_VENDOR_INTEL: int +Device_VENDOR_NVIDIA: int +DEVICE_VENDOR_NVIDIA: int + +KernelArg_LOCAL: int +KERNEL_ARG_LOCAL: int +KernelArg_READ_ONLY: int +KERNEL_ARG_READ_ONLY: int +KernelArg_WRITE_ONLY: int +KERNEL_ARG_WRITE_ONLY: int +KernelArg_READ_WRITE: int +KERNEL_ARG_READ_WRITE: int +KernelArg_CONSTANT: int +KERNEL_ARG_CONSTANT: int +KernelArg_PTR_ONLY: int +KERNEL_ARG_PTR_ONLY: int +KernelArg_NO_SIZE: int +KERNEL_ARG_NO_SIZE: int + + +# Classes +class Device: + # Functions + def __init__(self) -> None: ... + + def name(self) -> str: ... + + def extensions(self) -> str: ... + + def isExtensionSupported(self, extensionName: str) -> bool: ... + + def version(self) -> str: ... + + def vendorName(self) -> str: ... + + def OpenCL_C_Version(self) -> str: ... + + def OpenCLVersion(self) -> str: ... + + def deviceVersionMajor(self) -> int: ... + + def deviceVersionMinor(self) -> int: ... + + def driverVersion(self) -> str: ... + + def type(self) -> int: ... + + def addressBits(self) -> int: ... + + def available(self) -> bool: ... + + def compilerAvailable(self) -> bool: ... + + def linkerAvailable(self) -> bool: ... + + def doubleFPConfig(self) -> int: ... + + def singleFPConfig(self) -> int: ... + + def halfFPConfig(self) -> int: ... + + def hasFP64(self) -> bool: ... + + def hasFP16(self) -> bool: ... + + def endianLittle(self) -> bool: ... + + def errorCorrectionSupport(self) -> bool: ... + + def executionCapabilities(self) -> int: ... + + def globalMemCacheSize(self) -> int: ... + + def globalMemCacheType(self) -> int: ... + + def globalMemCacheLineSize(self) -> int: ... + + def globalMemSize(self) -> int: ... + + def localMemSize(self) -> int: ... + + def localMemType(self) -> int: ... + + def hostUnifiedMemory(self) -> bool: ... + + def imageSupport(self) -> bool: ... + + def imageFromBufferSupport(self) -> bool: ... + + def intelSubgroupsSupport(self) -> bool: ... + + def image2DMaxWidth(self) -> int: ... + + def image2DMaxHeight(self) -> int: ... + + def image3DMaxWidth(self) -> int: ... + + def image3DMaxHeight(self) -> int: ... + + def image3DMaxDepth(self) -> int: ... + + def imageMaxBufferSize(self) -> int: ... + + def imageMaxArraySize(self) -> int: ... + + def vendorID(self) -> int: ... + + def isAMD(self) -> bool: ... + + def isIntel(self) -> bool: ... + + def isNVidia(self) -> bool: ... + + def maxClockFrequency(self) -> int: ... + + def maxComputeUnits(self) -> int: ... + + def maxConstantArgs(self) -> int: ... + + def maxConstantBufferSize(self) -> int: ... + + def maxMemAllocSize(self) -> int: ... + + def maxParameterSize(self) -> int: ... + + def maxReadImageArgs(self) -> int: ... + + def maxWriteImageArgs(self) -> int: ... + + def maxSamplers(self) -> int: ... + + def maxWorkGroupSize(self) -> int: ... + + def maxWorkItemDims(self) -> int: ... + + def memBaseAddrAlign(self) -> int: ... + + def nativeVectorWidthChar(self) -> int: ... + + def nativeVectorWidthShort(self) -> int: ... + + def nativeVectorWidthInt(self) -> int: ... + + def nativeVectorWidthLong(self) -> int: ... + + def nativeVectorWidthFloat(self) -> int: ... + + def nativeVectorWidthDouble(self) -> int: ... + + def nativeVectorWidthHalf(self) -> int: ... + + def preferredVectorWidthChar(self) -> int: ... + + def preferredVectorWidthShort(self) -> int: ... + + def preferredVectorWidthInt(self) -> int: ... + + def preferredVectorWidthLong(self) -> int: ... + + def preferredVectorWidthFloat(self) -> int: ... + + def preferredVectorWidthDouble(self) -> int: ... + + def preferredVectorWidthHalf(self) -> int: ... + + def printfBufferSize(self) -> int: ... + + def profilingTimerResolution(self) -> int: ... + + @classmethod + def getDefault(cls) -> Device: ... + + +class OpenCLExecutionContext: + ... + + +# Functions +def finish() -> None: ... + +def haveAmdBlas() -> bool: ... + +def haveAmdFft() -> bool: ... + +def haveOpenCL() -> bool: ... + +def setUseOpenCL(flag: bool) -> None: ... + +def useOpenCL() -> bool: ... + + diff --git a/hug/lib/python3.12/site-packages/cv2/ogl/__init__.pyi b/hug/lib/python3.12/site-packages/cv2/ogl/__init__.pyi new file mode 100644 index 0000000000000000000000000000000000000000..503e1a837721dd524bd7b1f6b34250c98459f274 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/ogl/__init__.pyi @@ -0,0 +1,51 @@ +__all__: list[str] = [] + +# Enumerations +POINTS: int +LINES: int +LINE_LOOP: int +LINE_STRIP: int +TRIANGLES: int +TRIANGLE_STRIP: int +TRIANGLE_FAN: int +QUADS: int +QUAD_STRIP: int +POLYGON: int +RenderModes = int +"""One of [POINTS, LINES, LINE_LOOP, LINE_STRIP, TRIANGLES, TRIANGLE_STRIP, TRIANGLE_FAN, QUADS, QUAD_STRIP, POLYGON]""" + + +Buffer_ARRAY_BUFFER: int +BUFFER_ARRAY_BUFFER: int +Buffer_ELEMENT_ARRAY_BUFFER: int +BUFFER_ELEMENT_ARRAY_BUFFER: int +Buffer_PIXEL_PACK_BUFFER: int +BUFFER_PIXEL_PACK_BUFFER: int +Buffer_PIXEL_UNPACK_BUFFER: int +BUFFER_PIXEL_UNPACK_BUFFER: int +Buffer_Target = int +"""One of [Buffer_ARRAY_BUFFER, BUFFER_ARRAY_BUFFER, Buffer_ELEMENT_ARRAY_BUFFER, BUFFER_ELEMENT_ARRAY_BUFFER, Buffer_PIXEL_PACK_BUFFER, BUFFER_PIXEL_PACK_BUFFER, Buffer_PIXEL_UNPACK_BUFFER, BUFFER_PIXEL_UNPACK_BUFFER]""" + +Buffer_READ_ONLY: int +BUFFER_READ_ONLY: int +Buffer_WRITE_ONLY: int +BUFFER_WRITE_ONLY: int +Buffer_READ_WRITE: int +BUFFER_READ_WRITE: int +Buffer_Access = int +"""One of [Buffer_READ_ONLY, BUFFER_READ_ONLY, Buffer_WRITE_ONLY, BUFFER_WRITE_ONLY, Buffer_READ_WRITE, BUFFER_READ_WRITE]""" + +Texture2D_NONE: int +TEXTURE2D_NONE: int +Texture2D_DEPTH_COMPONENT: int +TEXTURE2D_DEPTH_COMPONENT: int +Texture2D_RGB: int +TEXTURE2D_RGB: int +Texture2D_RGBA: int +TEXTURE2D_RGBA: int +Texture2D_Format = int +"""One of [Texture2D_NONE, TEXTURE2D_NONE, Texture2D_DEPTH_COMPONENT, TEXTURE2D_DEPTH_COMPONENT, Texture2D_RGB, TEXTURE2D_RGB, Texture2D_RGBA, TEXTURE2D_RGBA]""" + + +# Classes + diff --git a/hug/lib/python3.12/site-packages/cv2/parallel/__init__.pyi b/hug/lib/python3.12/site-packages/cv2/parallel/__init__.pyi new file mode 100644 index 0000000000000000000000000000000000000000..50b6311be205a2c04750ef667717bd225a07bd76 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/parallel/__init__.pyi @@ -0,0 +1,6 @@ +__all__: list[str] = [] + +# Functions +def setParallelForBackend(backendName: str, propagateNumThreads: bool = ...) -> bool: ... + + diff --git a/hug/lib/python3.12/site-packages/cv2/py.typed b/hug/lib/python3.12/site-packages/cv2/py.typed new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/hug/lib/python3.12/site-packages/cv2/qt/plugins/platforms/libqxcb.so b/hug/lib/python3.12/site-packages/cv2/qt/plugins/platforms/libqxcb.so new file mode 100644 index 0000000000000000000000000000000000000000..2f0acd9899b0a53880f0dee9b0b97c3261d61fc9 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cv2/qt/plugins/platforms/libqxcb.so differ diff --git a/hug/lib/python3.12/site-packages/cv2/samples/__init__.pyi b/hug/lib/python3.12/site-packages/cv2/samples/__init__.pyi new file mode 100644 index 0000000000000000000000000000000000000000..03f2f9633de8ff81541a0ae6d15538100ed78aa5 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/samples/__init__.pyi @@ -0,0 +1,12 @@ +__all__: list[str] = [] + +# Functions +def addSamplesDataSearchPath(path: str) -> None: ... + +def addSamplesDataSearchSubDirectory(subdir: str) -> None: ... + +def findFile(relative_path: str, required: bool = ..., silentMode: bool = ...) -> str: ... + +def findFileOrKeep(relative_path: str, silentMode: bool = ...) -> str: ... + + diff --git a/hug/lib/python3.12/site-packages/cv2/segmentation/__init__.pyi b/hug/lib/python3.12/site-packages/cv2/segmentation/__init__.pyi new file mode 100644 index 0000000000000000000000000000000000000000..7baa0d1932b720547a9e5155bfe4eab9b5681822 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/segmentation/__init__.pyi @@ -0,0 +1,39 @@ +__all__: list[str] = [] + +import cv2 +import cv2.typing +import typing as _typing + + +# Classes +class IntelligentScissorsMB: + # Functions + def __init__(self) -> None: ... + + def setWeights(self, weight_non_edge: float, weight_gradient_direction: float, weight_gradient_magnitude: float) -> IntelligentScissorsMB: ... + + def setGradientMagnitudeMaxLimit(self, gradient_magnitude_threshold_max: float = ...) -> IntelligentScissorsMB: ... + + def setEdgeFeatureZeroCrossingParameters(self, gradient_magnitude_min_value: float = ...) -> IntelligentScissorsMB: ... + + def setEdgeFeatureCannyParameters(self, threshold1: float, threshold2: float, apertureSize: int = ..., L2gradient: bool = ...) -> IntelligentScissorsMB: ... + + @_typing.overload + def applyImage(self, image: cv2.typing.MatLike) -> IntelligentScissorsMB: ... + @_typing.overload + def applyImage(self, image: cv2.UMat) -> IntelligentScissorsMB: ... + + @_typing.overload + def applyImageFeatures(self, non_edge: cv2.typing.MatLike, gradient_direction: cv2.typing.MatLike, gradient_magnitude: cv2.typing.MatLike, image: cv2.typing.MatLike | None = ...) -> IntelligentScissorsMB: ... + @_typing.overload + def applyImageFeatures(self, non_edge: cv2.UMat, gradient_direction: cv2.UMat, gradient_magnitude: cv2.UMat, image: cv2.UMat | None = ...) -> IntelligentScissorsMB: ... + + def buildMap(self, sourcePt: cv2.typing.Point) -> None: ... + + @_typing.overload + def getContour(self, targetPt: cv2.typing.Point, contour: cv2.typing.MatLike | None = ..., backward: bool = ...) -> cv2.typing.MatLike: ... + @_typing.overload + def getContour(self, targetPt: cv2.typing.Point, contour: cv2.UMat | None = ..., backward: bool = ...) -> cv2.UMat: ... + + + diff --git a/hug/lib/python3.12/site-packages/cv2/typing/__init__.py b/hug/lib/python3.12/site-packages/cv2/typing/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..08251e992476365b9cecfd956e5d856ac1742959 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/typing/__init__.py @@ -0,0 +1,159 @@ +__all__ = [ + "IntPointer", + "MatLike", + "MatShape", + "Size", + "Size2f", + "Scalar", + "Point", + "Point2i", + "Point2f", + "Point2d", + "Point3i", + "Point3f", + "Point3d", + "Range", + "Rect", + "Rect2i", + "Rect2f", + "Rect2d", + "Moments", + "RotatedRect", + "TermCriteria", + "Vec2i", + "Vec2f", + "Vec2d", + "Vec3i", + "Vec3f", + "Vec3d", + "Vec4i", + "Vec4f", + "Vec4d", + "Vec6f", + "FeatureDetector", + "DescriptorExtractor", + "FeatureExtractor", + "Matx33f", + "Matx33d", + "Matx44f", + "Matx44d", + "LayerId", + "LayerParams", + "IndexParams", + "SearchParams", + "map_string_and_string", + "map_string_and_int", + "map_string_and_vector_size_t", + "map_string_and_vector_float", + "map_int_and_double", +] + +import cv2.dnn +import cv2.mat_wrapper +import cv2 +import numpy +import typing as _typing + + +if _typing.TYPE_CHECKING: + NumPyArrayNumeric = numpy.ndarray[_typing.Any, numpy.dtype[numpy.integer[_typing.Any] | numpy.floating[_typing.Any]]] +else: + NumPyArrayNumeric = numpy.ndarray + + +if _typing.TYPE_CHECKING: + NumPyArrayFloat32 = numpy.ndarray[_typing.Any, numpy.dtype[numpy.float32]] +else: + NumPyArrayFloat32 = numpy.ndarray + + +if _typing.TYPE_CHECKING: + NumPyArrayFloat64 = numpy.ndarray[_typing.Any, numpy.dtype[numpy.float64]] +else: + NumPyArrayFloat64 = numpy.ndarray + + +if _typing.TYPE_CHECKING: + TermCriteria_Type = cv2.TermCriteria_Type +else: + TermCriteria_Type = int + + +IntPointer = int +"""Represents an arbitrary pointer""" +MatLike = _typing.Union[cv2.mat_wrapper.Mat, NumPyArrayNumeric] +MatShape = _typing.Sequence[int] +Size = _typing.Sequence[int] +"""Required length is 2""" +Size2f = _typing.Sequence[float] +"""Required length is 2""" +Scalar = _typing.Union[_typing.Sequence[float], float] +"""Max sequence length is at most 4""" +Point = _typing.Sequence[int] +"""Required length is 2""" +Point2i = Point +Point2f = _typing.Sequence[float] +"""Required length is 2""" +Point2d = _typing.Sequence[float] +"""Required length is 2""" +Point3i = _typing.Sequence[int] +"""Required length is 3""" +Point3f = _typing.Sequence[float] +"""Required length is 3""" +Point3d = _typing.Sequence[float] +"""Required length is 3""" +Range = _typing.Sequence[int] +"""Required length is 2""" +Rect = _typing.Sequence[int] +"""Required length is 4""" +Rect2i = _typing.Sequence[int] +"""Required length is 4""" +Rect2f = _typing.Sequence[float] +"""Required length is 4""" +Rect2d = _typing.Sequence[float] +"""Required length is 4""" +Moments = _typing.Dict[str, float] +RotatedRect = _typing.Tuple[Point2f, Size2f, float] +"""Any type providing sequence protocol is supported""" +TermCriteria = _typing.Tuple[TermCriteria_Type, int, float] +"""Any type providing sequence protocol is supported""" +Vec2i = _typing.Sequence[int] +"""Required length is 2""" +Vec2f = _typing.Sequence[float] +"""Required length is 2""" +Vec2d = _typing.Sequence[float] +"""Required length is 2""" +Vec3i = _typing.Sequence[int] +"""Required length is 3""" +Vec3f = _typing.Sequence[float] +"""Required length is 3""" +Vec3d = _typing.Sequence[float] +"""Required length is 3""" +Vec4i = _typing.Sequence[int] +"""Required length is 4""" +Vec4f = _typing.Sequence[float] +"""Required length is 4""" +Vec4d = _typing.Sequence[float] +"""Required length is 4""" +Vec6f = _typing.Sequence[float] +"""Required length is 6""" +FeatureDetector = cv2.Feature2D +DescriptorExtractor = cv2.Feature2D +FeatureExtractor = cv2.Feature2D +Matx33f = NumPyArrayFloat32 +"""NDArray(shape=(3, 3), dtype=numpy.float32)""" +Matx33d = NumPyArrayFloat64 +"""NDArray(shape=(3, 3), dtype=numpy.float64)""" +Matx44f = NumPyArrayFloat32 +"""NDArray(shape=(4, 4), dtype=numpy.float32)""" +Matx44d = NumPyArrayFloat64 +"""NDArray(shape=(4, 4), dtype=numpy.float64)""" +LayerId = cv2.dnn.DictValue +LayerParams = _typing.Dict[str, _typing.Union[int, float, str]] +IndexParams = _typing.Dict[str, _typing.Union[bool, int, float, str]] +SearchParams = _typing.Dict[str, _typing.Union[bool, int, float, str]] +map_string_and_string = _typing.Dict[str, str] +map_string_and_int = _typing.Dict[str, int] +map_string_and_vector_size_t = _typing.Dict[str, _typing.Sequence[int]] +map_string_and_vector_float = _typing.Dict[str, _typing.Sequence[float]] +map_int_and_double = _typing.Dict[int, float] diff --git a/hug/lib/python3.12/site-packages/cv2/typing/__pycache__/__init__.cpython-312.pyc b/hug/lib/python3.12/site-packages/cv2/typing/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d2116ca55652ae3266ec837d883c5bba6aaf23c6 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cv2/typing/__pycache__/__init__.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cv2/utils/__init__.py b/hug/lib/python3.12/site-packages/cv2/utils/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..49cd40ba2db2d47df1043faf7e293aa978efa5a1 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/utils/__init__.py @@ -0,0 +1,14 @@ +from collections import namedtuple + +import cv2 + + +NativeMethodPatchedResult = namedtuple("NativeMethodPatchedResult", + ("py", "native")) + + +def testOverwriteNativeMethod(arg): + return NativeMethodPatchedResult( + arg + 1, + cv2.utils._native.testOverwriteNativeMethod(arg) + ) diff --git a/hug/lib/python3.12/site-packages/cv2/utils/__init__.pyi b/hug/lib/python3.12/site-packages/cv2/utils/__init__.pyi new file mode 100644 index 0000000000000000000000000000000000000000..812b293c0f1861d11617f570a6897f53ce5021c9 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/utils/__init__.pyi @@ -0,0 +1,110 @@ +__all__: list[str] = [] + +import cv2 +import cv2.typing +import typing as _typing + + +from cv2.utils import fs as fs +from cv2.utils import logging as logging +from cv2.utils import nested as nested + + +# Classes +class ClassWithKeywordProperties: + lambda_: int + @property + def except_(self) -> int: ... + + # Functions + def __init__(self, lambda_arg: int = ..., except_arg: int = ...) -> None: ... + + + +# Functions +@_typing.overload +def copyMatAndDumpNamedArguments(src: cv2.typing.MatLike, dst: cv2.typing.MatLike | None = ..., lambda_: int = ..., sigma: float = ...) -> tuple[str, cv2.typing.MatLike]: ... +@_typing.overload +def copyMatAndDumpNamedArguments(src: cv2.UMat, dst: cv2.UMat | None = ..., lambda_: int = ..., sigma: float = ...) -> tuple[str, cv2.UMat]: ... + +def dumpBool(argument: bool) -> str: ... + +def dumpCString(argument: str) -> str: ... + +def dumpDouble(argument: float) -> str: ... + +def dumpFloat(argument: float) -> str: ... + +@_typing.overload +def dumpInputArray(argument: cv2.typing.MatLike) -> str: ... +@_typing.overload +def dumpInputArray(argument: cv2.UMat) -> str: ... + +@_typing.overload +def dumpInputArrayOfArrays(argument: _typing.Sequence[cv2.typing.MatLike]) -> str: ... +@_typing.overload +def dumpInputArrayOfArrays(argument: _typing.Sequence[cv2.UMat]) -> str: ... + +@_typing.overload +def dumpInputOutputArray(argument: cv2.typing.MatLike) -> tuple[str, cv2.typing.MatLike]: ... +@_typing.overload +def dumpInputOutputArray(argument: cv2.UMat) -> tuple[str, cv2.UMat]: ... + +@_typing.overload +def dumpInputOutputArrayOfArrays(argument: _typing.Sequence[cv2.typing.MatLike]) -> tuple[str, _typing.Sequence[cv2.typing.MatLike]]: ... +@_typing.overload +def dumpInputOutputArrayOfArrays(argument: _typing.Sequence[cv2.UMat]) -> tuple[str, _typing.Sequence[cv2.UMat]]: ... + +def dumpInt(argument: int) -> str: ... + +def dumpInt64(argument: int) -> str: ... + +def dumpRange(argument: cv2.typing.Range) -> str: ... + +def dumpRect(argument: cv2.typing.Rect) -> str: ... + +def dumpRotatedRect(argument: cv2.typing.RotatedRect) -> str: ... + +def dumpSizeT(argument: int) -> str: ... + +def dumpString(argument: str) -> str: ... + +def dumpTermCriteria(argument: cv2.typing.TermCriteria) -> str: ... + +def dumpVec2i(value: cv2.typing.Vec2i = ...) -> str: ... + +def dumpVectorOfDouble(vec: _typing.Sequence[float]) -> str: ... + +def dumpVectorOfInt(vec: _typing.Sequence[int]) -> str: ... + +def dumpVectorOfRect(vec: _typing.Sequence[cv2.typing.Rect]) -> str: ... + +def generateVectorOfInt(len: int) -> _typing.Sequence[int]: ... + +def generateVectorOfMat(len: int, rows: int, cols: int, dtype: int, vec: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ... + +def generateVectorOfRect(len: int) -> _typing.Sequence[cv2.typing.Rect]: ... + +@_typing.overload +def testAsyncArray(argument: cv2.typing.MatLike) -> cv2.AsyncArray: ... +@_typing.overload +def testAsyncArray(argument: cv2.UMat) -> cv2.AsyncArray: ... + +def testAsyncException() -> cv2.AsyncArray: ... + +@_typing.overload +def testOverloadResolution(value: int, point: cv2.typing.Point = ...) -> str: ... +@_typing.overload +def testOverloadResolution(rect: cv2.typing.Rect) -> str: ... + +def testOverwriteNativeMethod(argument: int) -> int: ... + +def testRaiseGeneralException() -> None: ... + +def testReservedKeywordConversion(positional_argument: int, lambda_: int = ..., from_: int = ...) -> str: ... + +def testRotatedRect(x: float, y: float, w: float, h: float, angle: float) -> cv2.typing.RotatedRect: ... + +def testRotatedRectVector(x: float, y: float, w: float, h: float, angle: float) -> _typing.Sequence[cv2.typing.RotatedRect]: ... + + diff --git a/hug/lib/python3.12/site-packages/cv2/utils/__pycache__/__init__.cpython-312.pyc b/hug/lib/python3.12/site-packages/cv2/utils/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..32f1e0fb9e001fee413f5862ad59c02a14f3776a Binary files /dev/null and b/hug/lib/python3.12/site-packages/cv2/utils/__pycache__/__init__.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cv2/utils/fs/__init__.pyi b/hug/lib/python3.12/site-packages/cv2/utils/fs/__init__.pyi new file mode 100644 index 0000000000000000000000000000000000000000..3a7234f5fa1fd340f40523b5e5d7cf7e21d02bab --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/utils/fs/__init__.pyi @@ -0,0 +1,6 @@ +__all__: list[str] = [] + +# Functions +def getCacheDirectoryForDownloads() -> str: ... + + diff --git a/hug/lib/python3.12/site-packages/cv2/utils/logging/__init__.pyi b/hug/lib/python3.12/site-packages/cv2/utils/logging/__init__.pyi new file mode 100644 index 0000000000000000000000000000000000000000..1895ef38ca39e319945c9c3cac5262e9edbe61d0 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/utils/logging/__init__.pyi @@ -0,0 +1,22 @@ +__all__: list[str] = [] + +# Enumerations +LOG_LEVEL_SILENT: int +LOG_LEVEL_FATAL: int +LOG_LEVEL_ERROR: int +LOG_LEVEL_WARNING: int +LOG_LEVEL_INFO: int +LOG_LEVEL_DEBUG: int +LOG_LEVEL_VERBOSE: int +ENUM_LOG_LEVEL_FORCE_INT: int +LogLevel = int +"""One of [LOG_LEVEL_SILENT, LOG_LEVEL_FATAL, LOG_LEVEL_ERROR, LOG_LEVEL_WARNING, LOG_LEVEL_INFO, LOG_LEVEL_DEBUG, LOG_LEVEL_VERBOSE, ENUM_LOG_LEVEL_FORCE_INT]""" + + + +# Functions +def getLogLevel() -> LogLevel: ... + +def setLogLevel(logLevel: LogLevel) -> LogLevel: ... + + diff --git a/hug/lib/python3.12/site-packages/cv2/utils/nested/__init__.pyi b/hug/lib/python3.12/site-packages/cv2/utils/nested/__init__.pyi new file mode 100644 index 0000000000000000000000000000000000000000..1b30f925015ec5e9794d28e6185d0458b905925f --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/utils/nested/__init__.pyi @@ -0,0 +1,31 @@ +__all__: list[str] = [] + +# Classes +class ExportClassName: + # Classes + class Params: + int_value: int + float_value: float + + # Functions + def __init__(self, int_param: int = ..., float_param: float = ...) -> None: ... + + + + # Functions + def getIntParam(self) -> int: ... + + def getFloatParam(self) -> float: ... + + @staticmethod + def originalName() -> str: ... + + @classmethod + def create(cls, params: ExportClassName.Params = ...) -> ExportClassName: ... + + + +# Functions +def testEchoBooleanFunction(flag: bool) -> bool: ... + + diff --git a/hug/lib/python3.12/site-packages/cv2/version.py b/hug/lib/python3.12/site-packages/cv2/version.py new file mode 100644 index 0000000000000000000000000000000000000000..6071849dc072bb2535dae9f43a8ca934e4e9c6b7 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/version.py @@ -0,0 +1,5 @@ +opencv_version = "5.0.0.93" +contrib = False +headless = False +rolling = False +ci_build = True \ No newline at end of file diff --git a/hug/lib/python3.12/site-packages/cv2/videoio_registry/__init__.pyi b/hug/lib/python3.12/site-packages/cv2/videoio_registry/__init__.pyi new file mode 100644 index 0000000000000000000000000000000000000000..5dd99d09bf5994b43e81728b25b84465d197cb76 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cv2/videoio_registry/__init__.pyi @@ -0,0 +1,31 @@ +__all__: list[str] = [] + +import cv2 + + +# Functions +def getBackendName(api: cv2.VideoCaptureAPIs) -> str: ... + +def getBackends() -> _typing.Sequence[cv2.VideoCaptureAPIs]: ... + +def getCameraBackendPluginVersion(api: cv2.VideoCaptureAPIs) -> tuple[str, int, int]: ... + +def getCameraBackends() -> _typing.Sequence[cv2.VideoCaptureAPIs]: ... + +def getStreamBackendPluginVersion(api: cv2.VideoCaptureAPIs) -> tuple[str, int, int]: ... + +def getStreamBackends() -> _typing.Sequence[cv2.VideoCaptureAPIs]: ... + +def getStreamBufferedBackendPluginVersion(api: cv2.VideoCaptureAPIs) -> tuple[str, int, int]: ... + +def getStreamBufferedBackends() -> _typing.Sequence[cv2.VideoCaptureAPIs]: ... + +def getWriterBackendPluginVersion(api: cv2.VideoCaptureAPIs) -> tuple[str, int, int]: ... + +def getWriterBackends() -> _typing.Sequence[cv2.VideoCaptureAPIs]: ... + +def hasBackend(api: cv2.VideoCaptureAPIs) -> bool: ... + +def isBackendBuiltIn(api: cv2.VideoCaptureAPIs) -> bool: ... + + diff --git a/hug/lib/python3.12/site-packages/cycler-0.12.1.dist-info/INSTALLER b/hug/lib/python3.12/site-packages/cycler-0.12.1.dist-info/INSTALLER new file mode 100644 index 0000000000000000000000000000000000000000..a1b589e38a32041e49332e5e81c2d363dc418d68 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cycler-0.12.1.dist-info/INSTALLER @@ -0,0 +1 @@ +pip diff --git a/hug/lib/python3.12/site-packages/cycler-0.12.1.dist-info/LICENSE b/hug/lib/python3.12/site-packages/cycler-0.12.1.dist-info/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..d41d808995af2d59db2496a3ae772ca3d849cab2 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cycler-0.12.1.dist-info/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2015, matplotlib project +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the matplotlib project nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/hug/lib/python3.12/site-packages/cycler-0.12.1.dist-info/METADATA b/hug/lib/python3.12/site-packages/cycler-0.12.1.dist-info/METADATA new file mode 100644 index 0000000000000000000000000000000000000000..e81ab4fa3c9649ef7bc6355d1042f0344c90d83b --- /dev/null +++ b/hug/lib/python3.12/site-packages/cycler-0.12.1.dist-info/METADATA @@ -0,0 +1,78 @@ +Metadata-Version: 2.1 +Name: cycler +Version: 0.12.1 +Summary: Composable style cycles +Author-email: Thomas A Caswell +License: Copyright (c) 2015, matplotlib project + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the matplotlib project nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Project-URL: homepage, https://matplotlib.org/cycler/ +Project-URL: repository, https://github.com/matplotlib/cycler +Keywords: cycle kwargs +Classifier: License :: OSI Approved :: BSD License +Classifier: Development Status :: 4 - Beta +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3 :: Only +Requires-Python: >=3.8 +Description-Content-Type: text/x-rst +License-File: LICENSE +Provides-Extra: docs +Requires-Dist: ipython ; extra == 'docs' +Requires-Dist: matplotlib ; extra == 'docs' +Requires-Dist: numpydoc ; extra == 'docs' +Requires-Dist: sphinx ; extra == 'docs' +Provides-Extra: tests +Requires-Dist: pytest ; extra == 'tests' +Requires-Dist: pytest-cov ; extra == 'tests' +Requires-Dist: pytest-xdist ; extra == 'tests' + +|PyPi|_ |Conda|_ |Supported Python versions|_ |GitHub Actions|_ |Codecov|_ + +.. |PyPi| image:: https://img.shields.io/pypi/v/cycler.svg?style=flat +.. _PyPi: https://pypi.python.org/pypi/cycler + +.. |Conda| image:: https://img.shields.io/conda/v/conda-forge/cycler +.. _Conda: https://anaconda.org/conda-forge/cycler + +.. |Supported Python versions| image:: https://img.shields.io/pypi/pyversions/cycler.svg +.. _Supported Python versions: https://pypi.python.org/pypi/cycler + +.. |GitHub Actions| image:: https://github.com/matplotlib/cycler/actions/workflows/tests.yml/badge.svg +.. _GitHub Actions: https://github.com/matplotlib/cycler/actions + +.. |Codecov| image:: https://codecov.io/github/matplotlib/cycler/badge.svg?branch=main&service=github +.. _Codecov: https://codecov.io/github/matplotlib/cycler?branch=main + +cycler: composable cycles +========================= + +Docs: https://matplotlib.org/cycler/ diff --git a/hug/lib/python3.12/site-packages/cycler-0.12.1.dist-info/RECORD b/hug/lib/python3.12/site-packages/cycler-0.12.1.dist-info/RECORD new file mode 100644 index 0000000000000000000000000000000000000000..e3176801e47bb3c8c6c2d090e5be3b2caf352ed7 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cycler-0.12.1.dist-info/RECORD @@ -0,0 +1,9 @@ +cycler-0.12.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +cycler-0.12.1.dist-info/LICENSE,sha256=8SGBQ9dm2j_qZvEzlrfxXfRqgzA_Kb-Wum6Y601C9Ag,1497 +cycler-0.12.1.dist-info/METADATA,sha256=IyieGbdvHgE5Qidpbmryts0c556JcxIJv5GVFIsY7TY,3779 +cycler-0.12.1.dist-info/RECORD,, +cycler-0.12.1.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92 +cycler-0.12.1.dist-info/top_level.txt,sha256=D8BVVDdAAelLb2FOEz7lDpc6-AL21ylKPrMhtG6yzyE,7 +cycler/__init__.py,sha256=1JdRgv5Zzxo-W1ev7B_LWquysWP6LZH6CHk_COtIaXE,16709 +cycler/__pycache__/__init__.cpython-312.pyc,, +cycler/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 diff --git a/hug/lib/python3.12/site-packages/cycler-0.12.1.dist-info/WHEEL b/hug/lib/python3.12/site-packages/cycler-0.12.1.dist-info/WHEEL new file mode 100644 index 0000000000000000000000000000000000000000..7e688737d490be3643d705bc16b5a77f7bd567b7 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cycler-0.12.1.dist-info/WHEEL @@ -0,0 +1,5 @@ +Wheel-Version: 1.0 +Generator: bdist_wheel (0.41.2) +Root-Is-Purelib: true +Tag: py3-none-any + diff --git a/hug/lib/python3.12/site-packages/cycler-0.12.1.dist-info/top_level.txt b/hug/lib/python3.12/site-packages/cycler-0.12.1.dist-info/top_level.txt new file mode 100644 index 0000000000000000000000000000000000000000..22546440faf3e339c5fb7ec3956bd03cb602ac92 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cycler-0.12.1.dist-info/top_level.txt @@ -0,0 +1 @@ +cycler diff --git a/hug/lib/python3.12/site-packages/cycler/__init__.py b/hug/lib/python3.12/site-packages/cycler/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..97949547ad37c7105beb76cfc9e72a683465fc07 --- /dev/null +++ b/hug/lib/python3.12/site-packages/cycler/__init__.py @@ -0,0 +1,573 @@ +""" +Cycler +====== + +Cycling through combinations of values, producing dictionaries. + +You can add cyclers:: + + from cycler import cycler + cc = (cycler(color=list('rgb')) + + cycler(linestyle=['-', '--', '-.'])) + for d in cc: + print(d) + +Results in:: + + {'color': 'r', 'linestyle': '-'} + {'color': 'g', 'linestyle': '--'} + {'color': 'b', 'linestyle': '-.'} + + +You can multiply cyclers:: + + from cycler import cycler + cc = (cycler(color=list('rgb')) * + cycler(linestyle=['-', '--', '-.'])) + for d in cc: + print(d) + +Results in:: + + {'color': 'r', 'linestyle': '-'} + {'color': 'r', 'linestyle': '--'} + {'color': 'r', 'linestyle': '-.'} + {'color': 'g', 'linestyle': '-'} + {'color': 'g', 'linestyle': '--'} + {'color': 'g', 'linestyle': '-.'} + {'color': 'b', 'linestyle': '-'} + {'color': 'b', 'linestyle': '--'} + {'color': 'b', 'linestyle': '-.'} +""" + + +from __future__ import annotations + +from collections.abc import Hashable, Iterable, Generator +import copy +from functools import reduce +from itertools import product, cycle +from operator import mul, add +# Dict, List, Union required for runtime cast calls +from typing import TypeVar, Generic, Callable, Union, Dict, List, Any, overload, cast + +__version__ = "0.12.1" + +K = TypeVar("K", bound=Hashable) +L = TypeVar("L", bound=Hashable) +V = TypeVar("V") +U = TypeVar("U") + + +def _process_keys( + left: Cycler[K, V] | Iterable[dict[K, V]], + right: Cycler[K, V] | Iterable[dict[K, V]] | None, +) -> set[K]: + """ + Helper function to compose cycler keys. + + Parameters + ---------- + left, right : iterable of dictionaries or None + The cyclers to be composed. + + Returns + ------- + keys : set + The keys in the composition of the two cyclers. + """ + l_peek: dict[K, V] = next(iter(left)) if left != [] else {} + r_peek: dict[K, V] = next(iter(right)) if right is not None else {} + l_key: set[K] = set(l_peek.keys()) + r_key: set[K] = set(r_peek.keys()) + if l_key & r_key: + raise ValueError("Can not compose overlapping cycles") + return l_key | r_key + + +def concat(left: Cycler[K, V], right: Cycler[K, U]) -> Cycler[K, V | U]: + r""" + Concatenate `Cycler`\s, as if chained using `itertools.chain`. + + The keys must match exactly. + + Examples + -------- + >>> num = cycler('a', range(3)) + >>> let = cycler('a', 'abc') + >>> num.concat(let) + cycler('a', [0, 1, 2, 'a', 'b', 'c']) + + Returns + ------- + `Cycler` + The concatenated cycler. + """ + if left.keys != right.keys: + raise ValueError( + "Keys do not match:\n" + "\tIntersection: {both!r}\n" + "\tDisjoint: {just_one!r}".format( + both=left.keys & right.keys, just_one=left.keys ^ right.keys + ) + ) + _l = cast(Dict[K, List[Union[V, U]]], left.by_key()) + _r = cast(Dict[K, List[Union[V, U]]], right.by_key()) + return reduce(add, (_cycler(k, _l[k] + _r[k]) for k in left.keys)) + + +class Cycler(Generic[K, V]): + """ + Composable cycles. + + This class has compositions methods: + + ``+`` + for 'inner' products (zip) + + ``+=`` + in-place ``+`` + + ``*`` + for outer products (`itertools.product`) and integer multiplication + + ``*=`` + in-place ``*`` + + and supports basic slicing via ``[]``. + + Parameters + ---------- + left, right : Cycler or None + The 'left' and 'right' cyclers. + op : func or None + Function which composes the 'left' and 'right' cyclers. + """ + + def __call__(self): + return cycle(self) + + def __init__( + self, + left: Cycler[K, V] | Iterable[dict[K, V]] | None, + right: Cycler[K, V] | None = None, + op: Any = None, + ): + """ + Semi-private init. + + Do not use this directly, use `cycler` function instead. + """ + if isinstance(left, Cycler): + self._left: Cycler[K, V] | list[dict[K, V]] = Cycler( + left._left, left._right, left._op + ) + elif left is not None: + # Need to copy the dictionary or else that will be a residual + # mutable that could lead to strange errors + self._left = [copy.copy(v) for v in left] + else: + self._left = [] + + if isinstance(right, Cycler): + self._right: Cycler[K, V] | None = Cycler( + right._left, right._right, right._op + ) + else: + self._right = None + + self._keys: set[K] = _process_keys(self._left, self._right) + self._op: Any = op + + def __contains__(self, k): + return k in self._keys + + @property + def keys(self) -> set[K]: + """The keys this Cycler knows about.""" + return set(self._keys) + + def change_key(self, old: K, new: K) -> None: + """ + Change a key in this cycler to a new name. + Modification is performed in-place. + + Does nothing if the old key is the same as the new key. + Raises a ValueError if the new key is already a key. + Raises a KeyError if the old key isn't a key. + """ + if old == new: + return + if new in self._keys: + raise ValueError( + f"Can't replace {old} with {new}, {new} is already a key" + ) + if old not in self._keys: + raise KeyError( + f"Can't replace {old} with {new}, {old} is not a key" + ) + + self._keys.remove(old) + self._keys.add(new) + + if self._right is not None and old in self._right.keys: + self._right.change_key(old, new) + + # self._left should always be non-None + # if self._keys is non-empty. + elif isinstance(self._left, Cycler): + self._left.change_key(old, new) + else: + # It should be completely safe at this point to + # assume that the old key can be found in each + # iteration. + self._left = [{new: entry[old]} for entry in self._left] + + @classmethod + def _from_iter(cls, label: K, itr: Iterable[V]) -> Cycler[K, V]: + """ + Class method to create 'base' Cycler objects + that do not have a 'right' or 'op' and for which + the 'left' object is not another Cycler. + + Parameters + ---------- + label : hashable + The property key. + + itr : iterable + Finite length iterable of the property values. + + Returns + ------- + `Cycler` + New 'base' cycler. + """ + ret: Cycler[K, V] = cls(None) + ret._left = list({label: v} for v in itr) + ret._keys = {label} + return ret + + def __getitem__(self, key: slice) -> Cycler[K, V]: + # TODO : maybe add numpy style fancy slicing + if isinstance(key, slice): + trans = self.by_key() + return reduce(add, (_cycler(k, v[key]) for k, v in trans.items())) + else: + raise ValueError("Can only use slices with Cycler.__getitem__") + + def __iter__(self) -> Generator[dict[K, V], None, None]: + if self._right is None: + for left in self._left: + yield dict(left) + else: + if self._op is None: + raise TypeError( + "Operation cannot be None when both left and right are defined" + ) + for a, b in self._op(self._left, self._right): + out = {} + out.update(a) + out.update(b) + yield out + + def __add__(self, other: Cycler[L, U]) -> Cycler[K | L, V | U]: + """ + Pair-wise combine two equal length cyclers (zip). + + Parameters + ---------- + other : Cycler + """ + if len(self) != len(other): + raise ValueError( + f"Can only add equal length cycles, not {len(self)} and {len(other)}" + ) + return Cycler( + cast(Cycler[Union[K, L], Union[V, U]], self), + cast(Cycler[Union[K, L], Union[V, U]], other), + zip + ) + + @overload + def __mul__(self, other: Cycler[L, U]) -> Cycler[K | L, V | U]: + ... + + @overload + def __mul__(self, other: int) -> Cycler[K, V]: + ... + + def __mul__(self, other): + """ + Outer product of two cyclers (`itertools.product`) or integer + multiplication. + + Parameters + ---------- + other : Cycler or int + """ + if isinstance(other, Cycler): + return Cycler( + cast(Cycler[Union[K, L], Union[V, U]], self), + cast(Cycler[Union[K, L], Union[V, U]], other), + product + ) + elif isinstance(other, int): + trans = self.by_key() + return reduce( + add, (_cycler(k, v * other) for k, v in trans.items()) + ) + else: + return NotImplemented + + @overload + def __rmul__(self, other: Cycler[L, U]) -> Cycler[K | L, V | U]: + ... + + @overload + def __rmul__(self, other: int) -> Cycler[K, V]: + ... + + def __rmul__(self, other): + return self * other + + def __len__(self) -> int: + op_dict: dict[Callable, Callable[[int, int], int]] = {zip: min, product: mul} + if self._right is None: + return len(self._left) + l_len = len(self._left) + r_len = len(self._right) + return op_dict[self._op](l_len, r_len) + + # iadd and imul do not exapand the the type as the returns must be consistent with + # self, thus they flag as inconsistent with add/mul + def __iadd__(self, other: Cycler[K, V]) -> Cycler[K, V]: # type: ignore[misc] + """ + In-place pair-wise combine two equal length cyclers (zip). + + Parameters + ---------- + other : Cycler + """ + if not isinstance(other, Cycler): + raise TypeError("Cannot += with a non-Cycler object") + # True shallow copy of self is fine since this is in-place + old_self = copy.copy(self) + self._keys = _process_keys(old_self, other) + self._left = old_self + self._op = zip + self._right = Cycler(other._left, other._right, other._op) + return self + + def __imul__(self, other: Cycler[K, V] | int) -> Cycler[K, V]: # type: ignore[misc] + """ + In-place outer product of two cyclers (`itertools.product`). + + Parameters + ---------- + other : Cycler + """ + if not isinstance(other, Cycler): + raise TypeError("Cannot *= with a non-Cycler object") + # True shallow copy of self is fine since this is in-place + old_self = copy.copy(self) + self._keys = _process_keys(old_self, other) + self._left = old_self + self._op = product + self._right = Cycler(other._left, other._right, other._op) + return self + + def __eq__(self, other: object) -> bool: + if not isinstance(other, Cycler): + return False + if len(self) != len(other): + return False + if self.keys ^ other.keys: + return False + return all(a == b for a, b in zip(self, other)) + + __hash__ = None # type: ignore + + def __repr__(self) -> str: + op_map = {zip: "+", product: "*"} + if self._right is None: + lab = self.keys.pop() + itr = list(v[lab] for v in self) + return f"cycler({lab!r}, {itr!r})" + else: + op = op_map.get(self._op, "?") + msg = "({left!r} {op} {right!r})" + return msg.format(left=self._left, op=op, right=self._right) + + def _repr_html_(self) -> str: + # an table showing the value of each key through a full cycle + output = "" + sorted_keys = sorted(self.keys, key=repr) + for key in sorted_keys: + output += f"" + for d in iter(self): + output += "" + for k in sorted_keys: + output += f"" + output += "" + output += "
{key!r}
{d[k]!r}
" + return output + + def by_key(self) -> dict[K, list[V]]: + """ + Values by key. + + This returns the transposed values of the cycler. Iterating + over a `Cycler` yields dicts with a single value for each key, + this method returns a `dict` of `list` which are the values + for the given key. + + The returned value can be used to create an equivalent `Cycler` + using only `+`. + + Returns + ------- + transpose : dict + dict of lists of the values for each key. + """ + + # TODO : sort out if this is a bottle neck, if there is a better way + # and if we care. + + keys = self.keys + out: dict[K, list[V]] = {k: list() for k in keys} + + for d in self: + for k in keys: + out[k].append(d[k]) + return out + + # for back compatibility + _transpose = by_key + + def simplify(self) -> Cycler[K, V]: + """ + Simplify the cycler into a sum (but no products) of cyclers. + + Returns + ------- + simple : Cycler + """ + # TODO: sort out if it is worth the effort to make sure this is + # balanced. Currently it is is + # (((a + b) + c) + d) vs + # ((a + b) + (c + d)) + # I would believe that there is some performance implications + trans = self.by_key() + return reduce(add, (_cycler(k, v) for k, v in trans.items())) + + concat = concat + + +@overload +def cycler(arg: Cycler[K, V]) -> Cycler[K, V]: + ... + + +@overload +def cycler(**kwargs: Iterable[V]) -> Cycler[str, V]: + ... + + +@overload +def cycler(label: K, itr: Iterable[V]) -> Cycler[K, V]: + ... + + +def cycler(*args, **kwargs): + """ + Create a new `Cycler` object from a single positional argument, + a pair of positional arguments, or the combination of keyword arguments. + + cycler(arg) + cycler(label1=itr1[, label2=iter2[, ...]]) + cycler(label, itr) + + Form 1 simply copies a given `Cycler` object. + + Form 2 composes a `Cycler` as an inner product of the + pairs of keyword arguments. In other words, all of the + iterables are cycled simultaneously, as if through zip(). + + Form 3 creates a `Cycler` from a label and an iterable. + This is useful for when the label cannot be a keyword argument + (e.g., an integer or a name that has a space in it). + + Parameters + ---------- + arg : Cycler + Copy constructor for Cycler (does a shallow copy of iterables). + label : name + The property key. In the 2-arg form of the function, + the label can be any hashable object. In the keyword argument + form of the function, it must be a valid python identifier. + itr : iterable + Finite length iterable of the property values. + Can be a single-property `Cycler` that would + be like a key change, but as a shallow copy. + + Returns + ------- + cycler : Cycler + New `Cycler` for the given property + + """ + if args and kwargs: + raise TypeError( + "cycler() can only accept positional OR keyword arguments -- not both." + ) + + if len(args) == 1: + if not isinstance(args[0], Cycler): + raise TypeError( + "If only one positional argument given, it must " + "be a Cycler instance." + ) + return Cycler(args[0]) + elif len(args) == 2: + return _cycler(*args) + elif len(args) > 2: + raise TypeError( + "Only a single Cycler can be accepted as the lone " + "positional argument. Use keyword arguments instead." + ) + + if kwargs: + return reduce(add, (_cycler(k, v) for k, v in kwargs.items())) + + raise TypeError("Must have at least a positional OR keyword arguments") + + +def _cycler(label: K, itr: Iterable[V]) -> Cycler[K, V]: + """ + Create a new `Cycler` object from a property name and iterable of values. + + Parameters + ---------- + label : hashable + The property key. + itr : iterable + Finite length iterable of the property values. + + Returns + ------- + cycler : Cycler + New `Cycler` for the given property + """ + if isinstance(itr, Cycler): + keys = itr.keys + if len(keys) != 1: + msg = "Can not create Cycler from a multi-property Cycler" + raise ValueError(msg) + + lab = keys.pop() + # Doesn't need to be a new list because + # _from_iter() will be creating that new list anyway. + itr = (v[lab] for v in itr) + + return Cycler._from_iter(label, itr) diff --git a/hug/lib/python3.12/site-packages/cycler/__pycache__/__init__.cpython-312.pyc b/hug/lib/python3.12/site-packages/cycler/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0b330c67b2c21196279dfa359f26dc0f1519d0d8 Binary files /dev/null and b/hug/lib/python3.12/site-packages/cycler/__pycache__/__init__.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/cycler/py.typed b/hug/lib/python3.12/site-packages/cycler/py.typed new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/hug/lib/python3.12/site-packages/dateutil/__init__.py b/hug/lib/python3.12/site-packages/dateutil/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7397c0f8c25059b87733ecbe78e8124349357265 --- /dev/null +++ b/hug/lib/python3.12/site-packages/dateutil/__init__.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +import sys + +try: + from ._version import version as __version__ +except ImportError: + __version__ = 'unknown' + +__all__ = ["easter", "parser", "relativedelta", "rrule", "tz", "utils"] + + +def __getattr__(name): + import importlib + + if name in __all__ or name == "zoneinfo": + return importlib.import_module("." + name, __name__) + raise AttributeError( + "module {!r} has no attribute {!r}".format(__name__, name) + ) + + +def __dir__(): + # __dir__ should include all the lazy-importable modules as well. + return ( + [x for x in globals() if x not in sys.modules] + __all__ + ["zoneinfo"] + ) diff --git a/hug/lib/python3.12/site-packages/dateutil/__pycache__/__init__.cpython-312.pyc b/hug/lib/python3.12/site-packages/dateutil/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7de0cae02f4cb406db61b4675d3173cd0631d247 Binary files /dev/null and b/hug/lib/python3.12/site-packages/dateutil/__pycache__/__init__.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/dateutil/__pycache__/_common.cpython-312.pyc b/hug/lib/python3.12/site-packages/dateutil/__pycache__/_common.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0e88df1f7fe1ff137495bed7a143ab28b6b97b44 Binary files /dev/null and b/hug/lib/python3.12/site-packages/dateutil/__pycache__/_common.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/dateutil/__pycache__/_tzdata_impl.cpython-312.pyc b/hug/lib/python3.12/site-packages/dateutil/__pycache__/_tzdata_impl.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f092ada564051f433bc35deff5be9272e2ed2a1f Binary files /dev/null and b/hug/lib/python3.12/site-packages/dateutil/__pycache__/_tzdata_impl.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/dateutil/__pycache__/_version.cpython-312.pyc b/hug/lib/python3.12/site-packages/dateutil/__pycache__/_version.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dc835017a8af79a3ddf567457f2444dfc3a9c0c4 Binary files /dev/null and b/hug/lib/python3.12/site-packages/dateutil/__pycache__/_version.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/dateutil/__pycache__/easter.cpython-312.pyc b/hug/lib/python3.12/site-packages/dateutil/__pycache__/easter.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..92672dc7feeb3ec29ef8ed4300828a53e4320221 Binary files /dev/null and b/hug/lib/python3.12/site-packages/dateutil/__pycache__/easter.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/dateutil/__pycache__/relativedelta.cpython-312.pyc b/hug/lib/python3.12/site-packages/dateutil/__pycache__/relativedelta.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..68d582b38cd859646d6a229f7013ff8d17543176 Binary files /dev/null and b/hug/lib/python3.12/site-packages/dateutil/__pycache__/relativedelta.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/dateutil/__pycache__/rrule.cpython-312.pyc b/hug/lib/python3.12/site-packages/dateutil/__pycache__/rrule.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e46ddef5df4410a30519a419e2b4be8d0655f7ee Binary files /dev/null and b/hug/lib/python3.12/site-packages/dateutil/__pycache__/rrule.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/dateutil/__pycache__/tzwin.cpython-312.pyc b/hug/lib/python3.12/site-packages/dateutil/__pycache__/tzwin.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a857a3bdc8add6bfed71164f299caab0a440c03f Binary files /dev/null and b/hug/lib/python3.12/site-packages/dateutil/__pycache__/tzwin.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/dateutil/__pycache__/utils.cpython-312.pyc b/hug/lib/python3.12/site-packages/dateutil/__pycache__/utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8968c77e37c7b3920085027b95325364a70aba86 Binary files /dev/null and b/hug/lib/python3.12/site-packages/dateutil/__pycache__/utils.cpython-312.pyc differ diff --git a/hug/lib/python3.12/site-packages/dateutil/_common.py b/hug/lib/python3.12/site-packages/dateutil/_common.py new file mode 100644 index 0000000000000000000000000000000000000000..4eb2659bd2986125fcfb4afea5bae9efc2dcd1a0 --- /dev/null +++ b/hug/lib/python3.12/site-packages/dateutil/_common.py @@ -0,0 +1,43 @@ +""" +Common code used in multiple modules. +""" + + +class weekday(object): + __slots__ = ["weekday", "n"] + + def __init__(self, weekday, n=None): + self.weekday = weekday + self.n = n + + def __call__(self, n): + if n == self.n: + return self + else: + return self.__class__(self.weekday, n) + + def __eq__(self, other): + try: + if self.weekday != other.weekday or self.n != other.n: + return False + except AttributeError: + return False + return True + + def __hash__(self): + return hash(( + self.weekday, + self.n, + )) + + def __ne__(self, other): + return not (self == other) + + def __repr__(self): + s = ("MO", "TU", "WE", "TH", "FR", "SA", "SU")[self.weekday] + if not self.n: + return s + else: + return "%s(%+d)" % (s, self.n) + +# vim:ts=4:sw=4:et diff --git a/hug/lib/python3.12/site-packages/dateutil/_tzdata_impl.py b/hug/lib/python3.12/site-packages/dateutil/_tzdata_impl.py new file mode 100644 index 0000000000000000000000000000000000000000..fd72075ace005ae0148236f8307d2616c3b43839 --- /dev/null +++ b/hug/lib/python3.12/site-packages/dateutil/_tzdata_impl.py @@ -0,0 +1,147 @@ +"""This is an implementation of functions that interact with the tzdata module. + +It will only live as long as :mod:`dateutil.zoneinfo` lives; when the +``dateutil.zoneinfo`` module is removed, this can all move under :mod:`tz`. +""" + +import contextlib +import importlib +import io +import os +import pkgutil +import sys + +import six + +if six.PY2: + _TZDATA_LOAD_EXCEPTIONS = ( + ImportError, + IOError, + UnicodeEncodeError, + ValueError, + ) +else: + _TZDATA_LOAD_EXCEPTIONS = ( + ImportError, + FileNotFoundError, + UnicodeEncodeError, + IsADirectoryError, + ValueError, + ) + +if sys.version_info < (3, 8): + _nullcontext = getattr(contextlib, "nullcontext", None) + if _nullcontext is None: + + @contextlib.contextmanager + def _nullcontext(v): + yield v + + def _get_data(package, resource): + # pkgutil.get_data returns None rather than raising when the package + # cannot be found (and on Python 2 raises AttributeError if the + # package has been blocked by setting sys.modules[name] = None), so + # import the package first to get the ImportError the callers expect + # from the importlib.resources versions of these functions. + importlib.import_module(package) + + pkg_data = pkgutil.get_data(package, resource) + if pkg_data is None: + raise ImportError("No package named %r" % package) + + return pkg_data + + def _open_text(package, resource): + str_package_data = _get_data(package, resource).decode("utf-8") + + return _nullcontext(io.StringIO(str_package_data)) + + def _open_binary(package, resource): + return io.BytesIO(_get_data(package, resource)) + +else: + import importlib.resources + + if sys.version_info >= (3, 9): + + def _open_text(package, resource): + return ( + importlib.resources.files(package) + .joinpath(resource) + .open("r", encoding="utf-8") + ) + + def _open_binary(package, resource): + return ( + importlib.resources.files(package).joinpath(resource).open("rb") + ) + + else: + _open_text = importlib.resources.open_text + _open_binary = importlib.resources.open_binary + + +def _is_package_directory(package, resource): + """Whether ``resource`` names a directory inside ``package``. + + Opening a directory raises IsADirectoryError on POSIX but PermissionError + on Windows, and on Python < 3.9 there is no portable way to ask the + resource API, so check the package's search path directly (the tzdata + package is a regular directory-backed package). + """ + try: + pkg = importlib.import_module(package) + except ImportError: + return False + + for base in getattr(pkg, "__path__", ()): + if os.path.isdir(os.path.join(base, resource)): + return True + + return False + + +def _load_tzdata(key): + components = key.split("/") + package_name = ".".join(["tzdata.zoneinfo"] + components[:-1]) + resource_name = components[-1] + + # Empty or relative path components cannot name a zone, and they produce + # module names that the import machinery handles inconsistently across + # versions, so treat them as not found up front. A key naming a directory + # (a subpackage) is not a zone either, and opening it raises a + # platform-dependent error, see CPython gh-85702. + if any(c in ("", ".", "..") for c in components) or _is_package_directory( + package_name, resource_name + ): + raise TZFileNotFound("Time zone not found: %s", zone_key=key) + + try: + return _open_binary(package_name, resource_name) + except _TZDATA_LOAD_EXCEPTIONS: + # ImportError: package does not exist (or tzdata is not installed) + # FileNotFoundError: the key is not a file in the package + # UnicodeEncodeError: the key is not encodable as a filename + # IsADirectoryError: the key names a package rather than a resource + # ValueError: the key is not a valid path (e.g. contains a NUL byte) + six.raise_from( + TZFileNotFound("Time zone not found: %s", zone_key=key), None + ) + + +def _load_tzdata_keys(): + with _open_text("tzdata", "zones") as f: + return list(filter(None, (l.strip() for l in f))) + + +class TZFileNotFound(ValueError): + """Indicates that a time zone file isn't present in tzdata.""" + + def __init__(self, msg, *args, **kwargs): + # TODO: Use keyword-only argument when this is Python 3-only + zone_key = kwargs.pop("zone_key", None) + if zone_key is None: # pragma: nocover + raise TypeError("Required keyword argument missing: zone_key") + + super(TZFileNotFound, self).__init__(msg % zone_key, *args) + self.zone_key = zone_key diff --git a/hug/lib/python3.12/site-packages/dateutil/_version.py b/hug/lib/python3.12/site-packages/dateutil/_version.py new file mode 100644 index 0000000000000000000000000000000000000000..c80bc14c6e7df3b3d69d8fdf21ac1f05d95d0cc6 --- /dev/null +++ b/hug/lib/python3.12/site-packages/dateutil/_version.py @@ -0,0 +1,4 @@ +# file generated by setuptools_scm +# don't change, don't track in version control +__version__ = version = '3.0.0' +__version_tuple__ = version_tuple = (3, 0, 0) diff --git a/hug/lib/python3.12/site-packages/dateutil/easter.py b/hug/lib/python3.12/site-packages/dateutil/easter.py new file mode 100644 index 0000000000000000000000000000000000000000..f74d1f7442473997245ac683b8a269a3574d1ba4 --- /dev/null +++ b/hug/lib/python3.12/site-packages/dateutil/easter.py @@ -0,0 +1,89 @@ +# -*- coding: utf-8 -*- +""" +This module offers a generic Easter computing method for any given year, using +Western, Orthodox or Julian algorithms. +""" + +import datetime + +__all__ = ["easter", "EASTER_JULIAN", "EASTER_ORTHODOX", "EASTER_WESTERN"] + +EASTER_JULIAN = 1 +EASTER_ORTHODOX = 2 +EASTER_WESTERN = 3 + + +def easter(year, method=EASTER_WESTERN): + """ + This method was ported from the work done by GM Arts, + on top of the algorithm by Claus Tondering, which was + based in part on the algorithm of Ouding (1940), as + quoted in "Explanatory Supplement to the Astronomical + Almanac", P. Kenneth Seidelmann, editor. + + This algorithm implements three different Easter + calculation methods: + + 1. Original calculation in Julian calendar, valid in + dates after 326 AD + 2. Original method, with date converted to Gregorian + calendar, valid in years 1583 to 4099 + 3. Revised method, in Gregorian calendar, valid in + years 1583 to 4099 as well + + These methods are represented by the constants: + + * ``EASTER_JULIAN = 1`` + * ``EASTER_ORTHODOX = 2`` + * ``EASTER_WESTERN = 3`` + + The default method is method 3. + + More about the algorithm may be found at: + + `GM Arts: Easter Algorithms `_ + + and + + `The Calendar FAQ: Easter `_ + + """ + + if not (1 <= method <= 3): + raise ValueError("invalid method") + + # g - Golden year - 1 + # c - Century + # h - (23 - Epact) mod 30 + # i - Number of days from March 21 to Paschal Full Moon + # j - Weekday for PFM (0=Sunday, etc) + # p - Number of days from March 21 to Sunday on or before PFM + # (-6 to 28 methods 1 & 3, to 56 for method 2) + # e - Extra days to add for method 2 (converting Julian + # date to Gregorian date) + + y = year + g = y % 19 + e = 0 + if method < 3: + # Old method + i = (19*g + 15) % 30 + j = (y + y//4 + i) % 7 + if method == 2: + # Extra dates to convert Julian to Gregorian date + e = 10 + if y > 1600: + e = e + y//100 - 16 - (y//100 - 16)//4 + else: + # New method + c = y//100 + h = (c - c//4 - (8*c + 13)//25 + 19*g + 15) % 30 + i = h - (h//28)*(1 - (h//28)*(29//(h + 1))*((21 - g)//11)) + j = (y + y//4 + i + 2 - c + c//4) % 7 + + # p can be from -6 to 56 corresponding to dates 22 March to 23 May + # (later dates apply to method 2, although 23 May never actually occurs) + p = i - j + e + d = 1 + (p + 27 + (p + 6)//40) % 31 + m = 3 + (p + 26)//30 + return datetime.date(int(y), int(m), int(d))